aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-12-14 20:33:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-12-14 20:33:40 -0500
commitb4fe2a03422e6bd20bd8df5e428109a85c9ea961 (patch)
treeb6505c0599251421fef39c9fa0655f255aac9ed6 /drivers/net/wireless/orinoco
parent85cb7f1264c4d9e60ccdce52740238222e77ccd0 (diff)
parent2a27a03d3a891e87ca33d27a858b4db734a4cbab (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (75 commits) pppoe.c: Fix kernel panic caused by __pppoe_xmit WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers. bnx2x: Advance a version number to 1.60.01-0 bnx2x: Fixed a compilation warning bnx2x: LSO code was broken on BE platforms qlge: Fix deadlock when cancelling worker. net: fix skb_defer_rx_timestamp() cxgb4vf: Ingress Queue Entry Size needs to be 64 bytes phy: add the IC+ IP1001 driver atm: correct sysfs 'device' link creation and parent relationships MAINTAINERS: remove me from tulip SCTP: Fix SCTP_SET_PEER_PRIMARY_ADDR to accpet v4mapped address enic: Bug Fix: Pass napi reference to the isr that services receive queue ipv6: fix nl group when advertising a new link connector: add module alias net: Document the kernel_recvmsg() function r8169: Fix runtime power management hso: IP checksuming doesn't work on GE0301 option cards xfrm: Fix xfrm_state_migrate leak net: Convert netpoll blocking api in bonding driver to be a counter ...
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r--drivers/net/wireless/orinoco/main.c18
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c14
-rw-r--r--drivers/net/wireless/orinoco/scan.c8
-rw-r--r--drivers/net/wireless/orinoco/scan.h1
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c14
-rw-r--r--drivers/net/wireless/orinoco/wext.c4
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
233void 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,
16void orinoco_add_hostscan_results(struct orinoco_private *dev, 16void orinoco_add_hostscan_results(struct orinoco_private *dev,
17 unsigned char *buf, 17 unsigned char *buf,
18 size_t len); 18 size_t len);
19void 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