summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-08-28 15:11:55 +0300
committerLuciano Coelho <coelho@ti.com>2011-09-14 11:47:26 +0300
commite0b38265b035a8a2ea05071b67b997f5db181c45 (patch)
tree8e00dec092e67d961ee2d9392908f391674e2b3f /drivers/net/wireless/wl12xx
parent2ec7da254c5bdb5fe1dc18f8f5bdbe32deb3c466 (diff)
downloadblackbird-op-linux-e0b38265b035a8a2ea05071b67b997f5db181c45.tar.gz
blackbird-op-linux-e0b38265b035a8a2ea05071b67b997f5db181c45.zip
wl12xx: check for ROC on scan_complete
When scan completes, and we are not associated, we should start the dev role and ROC. however, we might already be in this situation (e.g. if we got disconnected during scan). check for it. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/scan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index b2e2abd40045..4a4d0d03fa1f 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -65,8 +65,9 @@ void wl1271_scan_complete_work(struct work_struct *work)
/* return to ROC if needed */
is_sta = (wl->bss_type == BSS_TYPE_STA_BSS);
is_ibss = (wl->bss_type == BSS_TYPE_IBSS);
- if ((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) ||
- (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) {
+ if (((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) ||
+ (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) &&
+ !test_bit(wl->dev_role_id, wl->roc_map)) {
/* restore remain on channel */
wl12xx_cmd_role_start_dev(wl);
wl12xx_roc(wl, wl->dev_role_id);
OpenPOWER on IntegriCloud