summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/net/wireless/orinoco
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/net/wireless/orinoco')
-rw-r--r--kernel/drivers/net/wireless/orinoco/cfg.c6
-rw-r--r--kernel/drivers/net/wireless/orinoco/main.c2
-rw-r--r--kernel/drivers/net/wireless/orinoco/orinoco_cs.c1
-rw-r--r--kernel/drivers/net/wireless/orinoco/orinoco_nortel.c5
-rw-r--r--kernel/drivers/net/wireless/orinoco/orinoco_pci.c5
-rw-r--r--kernel/drivers/net/wireless/orinoco/orinoco_plx.c5
-rw-r--r--kernel/drivers/net/wireless/orinoco/orinoco_usb.c3
7 files changed, 19 insertions, 8 deletions
diff --git a/kernel/drivers/net/wireless/orinoco/cfg.c b/kernel/drivers/net/wireless/orinoco/cfg.c
index a9e94b6db..0f6ea316e 100644
--- a/kernel/drivers/net/wireless/orinoco/cfg.c
+++ b/kernel/drivers/net/wireless/orinoco/cfg.c
@@ -220,7 +220,7 @@ static int orinoco_set_wiphy_params(struct wiphy *wiphy, u32 changed)
if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
/* Set fragmentation */
if (priv->has_mwo) {
- if (wiphy->frag_threshold < 0)
+ if (wiphy->frag_threshold == -1)
frag_value = 0;
else {
printk(KERN_WARNING "%s: Fixed fragmentation "
@@ -230,7 +230,7 @@ static int orinoco_set_wiphy_params(struct wiphy *wiphy, u32 changed)
frag_value = 1;
}
} else {
- if (wiphy->frag_threshold < 0)
+ if (wiphy->frag_threshold == -1)
frag_value = 2346;
else if ((wiphy->frag_threshold < 257) ||
(wiphy->frag_threshold > 2347))
@@ -252,7 +252,7 @@ static int orinoco_set_wiphy_params(struct wiphy *wiphy, u32 changed)
* the upper limit.
*/
- if (wiphy->rts_threshold < 0)
+ if (wiphy->rts_threshold == -1)
rts_value = 2347;
else if (wiphy->rts_threshold > 2347)
err = -EINVAL;
diff --git a/kernel/drivers/net/wireless/orinoco/main.c b/kernel/drivers/net/wireless/orinoco/main.c
index c41018047..7b5c55432 100644
--- a/kernel/drivers/net/wireless/orinoco/main.c
+++ b/kernel/drivers/net/wireless/orinoco/main.c
@@ -2321,8 +2321,6 @@ void free_orinocodev(struct orinoco_private *priv)
struct orinoco_rx_data *rx_data, *temp;
struct orinoco_scan_data *sd, *sdtemp;
- wiphy_unregister(wiphy);
-
/* If the tasklet is scheduled when we call tasklet_kill it
* will run one final time. However the tasklet will only
* drain priv->rx_list if the hw is still available. */
diff --git a/kernel/drivers/net/wireless/orinoco/orinoco_cs.c b/kernel/drivers/net/wireless/orinoco/orinoco_cs.c
index c0a27377d..a956f965a 100644
--- a/kernel/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/kernel/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -118,6 +118,7 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
orinoco_cs_release(link);
+ wiphy_unregister(priv_to_wiphy(priv));
free_orinocodev(priv);
} /* orinoco_cs_detach */
diff --git a/kernel/drivers/net/wireless/orinoco/orinoco_nortel.c b/kernel/drivers/net/wireless/orinoco/orinoco_nortel.c
index 1b543e30e..048693b6c 100644
--- a/kernel/drivers/net/wireless/orinoco/orinoco_nortel.c
+++ b/kernel/drivers/net/wireless/orinoco/orinoco_nortel.c
@@ -223,13 +223,15 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
err = orinoco_if_add(priv, 0, 0, NULL);
if (err) {
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
- goto fail;
+ goto fail_wiphy;
}
pci_set_drvdata(pdev, priv);
return 0;
+ fail_wiphy:
+ wiphy_unregister(priv_to_wiphy(priv));
fail:
free_irq(pdev->irq, priv);
@@ -263,6 +265,7 @@ static void orinoco_nortel_remove_one(struct pci_dev *pdev)
iowrite16(0, card->bridge_io + 10);
orinoco_if_del(priv);
+ wiphy_unregister(priv_to_wiphy(priv));
free_irq(pdev->irq, priv);
free_orinocodev(priv);
pci_iounmap(pdev, priv->hw.iobase);
diff --git a/kernel/drivers/net/wireless/orinoco/orinoco_pci.c b/kernel/drivers/net/wireless/orinoco/orinoco_pci.c
index 74219d59d..4938a2208 100644
--- a/kernel/drivers/net/wireless/orinoco/orinoco_pci.c
+++ b/kernel/drivers/net/wireless/orinoco/orinoco_pci.c
@@ -173,13 +173,15 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
err = orinoco_if_add(priv, 0, 0, NULL);
if (err) {
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
- goto fail;
+ goto fail_wiphy;
}
pci_set_drvdata(pdev, priv);
return 0;
+ fail_wiphy:
+ wiphy_unregister(priv_to_wiphy(priv));
fail:
free_irq(pdev->irq, priv);
@@ -203,6 +205,7 @@ static void orinoco_pci_remove_one(struct pci_dev *pdev)
struct orinoco_private *priv = pci_get_drvdata(pdev);
orinoco_if_del(priv);
+ wiphy_unregister(priv_to_wiphy(priv));
free_irq(pdev->irq, priv);
free_orinocodev(priv);
pci_iounmap(pdev, priv->hw.iobase);
diff --git a/kernel/drivers/net/wireless/orinoco/orinoco_plx.c b/kernel/drivers/net/wireless/orinoco/orinoco_plx.c
index 8b045236b..221352027 100644
--- a/kernel/drivers/net/wireless/orinoco/orinoco_plx.c
+++ b/kernel/drivers/net/wireless/orinoco/orinoco_plx.c
@@ -262,13 +262,15 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
err = orinoco_if_add(priv, 0, 0, NULL);
if (err) {
printk(KERN_ERR PFX "orinoco_if_add() failed\n");
- goto fail;
+ goto fail_wiphy;
}
pci_set_drvdata(pdev, priv);
return 0;
+ fail_wiphy:
+ wiphy_unregister(priv_to_wiphy(priv));
fail:
free_irq(pdev->irq, priv);
@@ -299,6 +301,7 @@ static void orinoco_plx_remove_one(struct pci_dev *pdev)
struct orinoco_pci_card *card = priv->card;
orinoco_if_del(priv);
+ wiphy_unregister(priv_to_wiphy(priv));
free_irq(pdev->irq, priv);
free_orinocodev(priv);
pci_iounmap(pdev, priv->hw.iobase);
diff --git a/kernel/drivers/net/wireless/orinoco/orinoco_usb.c b/kernel/drivers/net/wireless/orinoco/orinoco_usb.c
index 8fb1c9272..6c0f4c963 100644
--- a/kernel/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/kernel/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -1502,6 +1502,7 @@ static inline void ezusb_delete(struct ezusb_priv *upriv)
if (upriv->dev) {
struct orinoco_private *priv = ndev_priv(upriv->dev);
orinoco_if_del(priv);
+ wiphy_unregister(priv_to_wiphy(upriv));
free_orinocodev(priv);
}
}
@@ -1575,6 +1576,7 @@ static int ezusb_probe(struct usb_interface *interface,
ezusb_hard_reset, NULL);
if (!priv) {
err("Couldn't allocate orinocodev");
+ retval = -ENOMEM;
goto exit;
}
@@ -1695,6 +1697,7 @@ static int ezusb_probe(struct usb_interface *interface,
if (orinoco_if_add(priv, 0, 0, &ezusb_netdev_ops) != 0) {
upriv->dev = NULL;
err("%s: orinoco_if_add() failed", __func__);
+ wiphy_unregister(priv_to_wiphy(priv));
goto error;
}
upriv->dev = priv->ndev;