diff options
Diffstat (limited to 'drivers/net/wireless/orinoco')
| -rw-r--r-- | drivers/net/wireless/orinoco/main.c | 18 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 14 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/scan.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/scan.h | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/spectrum_cs.c | 14 | ||||
| -rw-r--r-- | drivers/net/wireless/orinoco/wext.c | 4 |
6 files changed, 36 insertions, 23 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index e8e2d0f4763d..f3d396e7544b 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
| @@ -1392,10 +1392,9 @@ static void orinoco_process_scan_results(struct work_struct *work) | |||
| 1392 | orinoco_add_hostscan_results(priv, buf, len); | 1392 | orinoco_add_hostscan_results(priv, buf, len); |
| 1393 | 1393 | ||
| 1394 | kfree(buf); | 1394 | kfree(buf); |
| 1395 | } else if (priv->scan_request) { | 1395 | } else { |
| 1396 | /* Either abort or complete the scan */ | 1396 | /* Either abort or complete the scan */ |
| 1397 | cfg80211_scan_done(priv->scan_request, (len < 0)); | 1397 | orinoco_scan_done(priv, (len < 0)); |
| 1398 | priv->scan_request = NULL; | ||
| 1399 | } | 1398 | } |
| 1400 | 1399 | ||
| 1401 | spin_lock_irqsave(&priv->scan_lock, flags); | 1400 | spin_lock_irqsave(&priv->scan_lock, flags); |
| @@ -1684,6 +1683,8 @@ static int __orinoco_down(struct orinoco_private *priv) | |||
| 1684 | hermes_write_regn(hw, EVACK, 0xffff); | 1683 | hermes_write_regn(hw, EVACK, 0xffff); |
| 1685 | } | 1684 | } |
| 1686 | 1685 | ||
| 1686 | orinoco_scan_done(priv, true); | ||
| 1687 | |||
| 1687 | /* firmware will have to reassociate */ | 1688 | /* firmware will have to reassociate */ |
| 1688 | netif_carrier_off(dev); | 1689 | netif_carrier_off(dev); |
| 1689 | priv->last_linkstatus = 0xffff; | 1690 | priv->last_linkstatus = 0xffff; |
| @@ -1762,10 +1763,7 @@ void orinoco_reset(struct work_struct *work) | |||
| 1762 | orinoco_unlock(priv, &flags); | 1763 | orinoco_unlock(priv, &flags); |
| 1763 | 1764 | ||
| 1764 | /* Scanning support: Notify scan cancellation */ | 1765 | /* Scanning support: Notify scan cancellation */ |
| 1765 | if (priv->scan_request) { | 1766 | orinoco_scan_done(priv, true); |
| 1766 | cfg80211_scan_done(priv->scan_request, 1); | ||
| 1767 | priv->scan_request = NULL; | ||
| 1768 | } | ||
| 1769 | 1767 | ||
| 1770 | if (priv->hard_reset) { | 1768 | if (priv->hard_reset) { |
| 1771 | err = (*priv->hard_reset)(priv); | 1769 | err = (*priv->hard_reset)(priv); |
| @@ -1813,6 +1811,12 @@ static int __orinoco_commit(struct orinoco_private *priv) | |||
| 1813 | struct net_device *dev = priv->ndev; | 1811 | struct net_device *dev = priv->ndev; |
| 1814 | int err = 0; | 1812 | int err = 0; |
| 1815 | 1813 | ||
| 1814 | /* If we've called commit, we are reconfiguring or bringing the | ||
| 1815 | * interface up. Maintaining countermeasures across this would | ||
| 1816 | * be confusing, so note that we've disabled them. The port will | ||
| 1817 | * be enabled later in orinoco_commit or __orinoco_up. */ | ||
| 1818 | priv->tkip_cm_active = 0; | ||
| 1819 | |||
| 1816 | err = orinoco_hw_program_rids(priv); | 1820 | err = orinoco_hw_program_rids(priv); |
| 1817 | 1821 | ||
| 1818 | /* FIXME: what about netif_tx_lock */ | 1822 | /* FIXME: what about netif_tx_lock */ |
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 71b3d68b9403..32954c4b243a 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c | |||
| @@ -151,20 +151,20 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 151 | goto failed; | 151 | goto failed; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 155 | if (ret) | ||
| 156 | goto failed; | ||
| 157 | |||
| 158 | /* We initialize the hermes structure before completing PCMCIA | ||
| 159 | * configuration just in case the interrupt handler gets | ||
| 160 | * called. */ | ||
| 161 | mem = ioport_map(link->resource[0]->start, | 154 | mem = ioport_map(link->resource[0]->start, |
| 162 | resource_size(link->resource[0])); | 155 | resource_size(link->resource[0])); |
| 163 | if (!mem) | 156 | if (!mem) |
| 164 | goto failed; | 157 | goto failed; |
| 165 | 158 | ||
| 159 | /* We initialize the hermes structure before completing PCMCIA | ||
| 160 | * configuration just in case the interrupt handler gets | ||
| 161 | * called. */ | ||
| 166 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 162 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 167 | 163 | ||
| 164 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 165 | if (ret) | ||
| 166 | goto failed; | ||
| 167 | |||
| 168 | ret = pcmcia_enable_device(link); | 168 | ret = pcmcia_enable_device(link); |
| 169 | if (ret) | 169 | if (ret) |
| 170 | goto failed; | 170 | goto failed; |
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index 4300d9db7d8c..86cb54c842e7 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
| @@ -229,3 +229,11 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv, | |||
| 229 | priv->scan_request = NULL; | 229 | priv->scan_request = NULL; |
| 230 | } | 230 | } |
| 231 | } | 231 | } |
| 232 | |||
| 233 | void orinoco_scan_done(struct orinoco_private *priv, bool abort) | ||
| 234 | { | ||
| 235 | if (priv->scan_request) { | ||
| 236 | cfg80211_scan_done(priv->scan_request, abort); | ||
| 237 | priv->scan_request = NULL; | ||
| 238 | } | ||
| 239 | } | ||
diff --git a/drivers/net/wireless/orinoco/scan.h b/drivers/net/wireless/orinoco/scan.h index 2dc4e046dbdb..27281fb0a6dc 100644 --- a/drivers/net/wireless/orinoco/scan.h +++ b/drivers/net/wireless/orinoco/scan.h | |||
| @@ -16,5 +16,6 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
| 16 | void orinoco_add_hostscan_results(struct orinoco_private *dev, | 16 | void orinoco_add_hostscan_results(struct orinoco_private *dev, |
| 17 | unsigned char *buf, | 17 | unsigned char *buf, |
| 18 | size_t len); | 18 | size_t len); |
| 19 | void orinoco_scan_done(struct orinoco_private *priv, bool abort); | ||
| 19 | 20 | ||
| 20 | #endif /* _ORINOCO_SCAN_H_ */ | 21 | #endif /* _ORINOCO_SCAN_H_ */ |
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index fb859a5ad2eb..db34c282e59b 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
| @@ -214,21 +214,21 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 214 | goto failed; | 214 | goto failed; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 218 | if (ret) | ||
| 219 | goto failed; | ||
| 220 | |||
| 221 | /* We initialize the hermes structure before completing PCMCIA | ||
| 222 | * configuration just in case the interrupt handler gets | ||
| 223 | * called. */ | ||
| 224 | mem = ioport_map(link->resource[0]->start, | 217 | mem = ioport_map(link->resource[0]->start, |
| 225 | resource_size(link->resource[0])); | 218 | resource_size(link->resource[0])); |
| 226 | if (!mem) | 219 | if (!mem) |
| 227 | goto failed; | 220 | goto failed; |
| 228 | 221 | ||
| 222 | /* We initialize the hermes structure before completing PCMCIA | ||
| 223 | * configuration just in case the interrupt handler gets | ||
| 224 | * called. */ | ||
| 229 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); | 225 | hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); |
| 230 | hw->eeprom_pda = true; | 226 | hw->eeprom_pda = true; |
| 231 | 227 | ||
| 228 | ret = pcmcia_request_irq(link, orinoco_interrupt); | ||
| 229 | if (ret) | ||
| 230 | goto failed; | ||
| 231 | |||
| 232 | ret = pcmcia_enable_device(link); | 232 | ret = pcmcia_enable_device(link); |
| 233 | if (ret) | 233 | if (ret) |
| 234 | goto failed; | 234 | goto failed; |
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index 93505f93bf97..e5afabee60d1 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c | |||
| @@ -911,10 +911,10 @@ static int orinoco_ioctl_set_auth(struct net_device *dev, | |||
| 911 | */ | 911 | */ |
| 912 | if (param->value) { | 912 | if (param->value) { |
| 913 | priv->tkip_cm_active = 1; | 913 | priv->tkip_cm_active = 1; |
| 914 | ret = hermes_enable_port(hw, 0); | 914 | ret = hermes_disable_port(hw, 0); |
| 915 | } else { | 915 | } else { |
| 916 | priv->tkip_cm_active = 0; | 916 | priv->tkip_cm_active = 0; |
| 917 | ret = hermes_disable_port(hw, 0); | 917 | ret = hermes_enable_port(hw, 0); |
| 918 | } | 918 | } |
| 919 | break; | 919 | break; |
| 920 | 920 | ||
