diff options
author | David Kilroy <kilroyd@gmail.com> | 2010-11-24 15:33:02 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-30 13:23:05 -0500 |
commit | cf63495d0dbe435b475a44672f5dee150da6471b (patch) | |
tree | a43a42069bc2950260ba2aafa114ec66024983cd /drivers/net/wireless | |
parent | 5c5e138b590a748c57d54b39634cda974ab9af1d (diff) |
orinoco: abort scan on interface down
This fixes the problem causing the following trace:
------------[ cut here ]------------
WARNING: at linux-2.6.34/net/wireless/core.c:633 wdev_cleanup_work+0xb7/0xe0 [cfg80211]()
Hardware name: Latitude C840
Pid: 707, comm: cfg80211 Not tainted 2.6.34.7-0.5-desktop #1
Call Trace:
[<c02065c3>] try_stack_unwind+0x173/0x190
[<c02051cf>] dump_trace+0x3f/0xe0
[<c020662b>] show_trace_log_lvl+0x4b/0x60
[<c0206658>] show_trace+0x18/0x20
[<c064e0b3>] dump_stack+0x6d/0x72
[<c02443ae>] warn_slowpath_common+0x6e/0xb0
[<c0244403>] warn_slowpath_null+0x13/0x20
[<e2db5497>] wdev_cleanup_work+0xb7/0xe0 [cfg80211]
[<c025cfa9>] run_workqueue+0x79/0x170
[<c025d123>] worker_thread+0x83/0xe0
[<c025fef4>] kthread+0x74/0x80
[<c0203826>] kernel_thread_helper+0x6/0x10
---[ end trace 3f0348b3b0c6f4ff ]---
Reported by: Giacomo Comes <comes@naic.edu>
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/orinoco/main.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/scan.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/scan.h | 1 |
3 files changed, 14 insertions, 7 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index e8e2d0f4763d..fa0cf744958f 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); |
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_ */ |