diff options
author | Eliad Peller <eliad@wizery.com> | 2012-03-04 03:55:52 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-03-05 08:45:25 -0500 |
commit | 97fd311a2615d8f35e796b11a14b6cf3d335d423 (patch) | |
tree | a0bee642ba33b98d0488920cbc411f6e9e4e68a7 /drivers/net/wireless/wl12xx | |
parent | 121af04995d29e3287b849a768789c668d39dce3 (diff) |
wl12xx: don't allow scanning while device is in ROC
return EBUSY on scan when there is any role
in ROC (not necessarily the one we are going
to use)
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/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 85bbe7f4f517..1d5f2d5614fb 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -3057,8 +3057,6 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, | |||
3057 | struct cfg80211_scan_request *req) | 3057 | struct cfg80211_scan_request *req) |
3058 | { | 3058 | { |
3059 | struct wl1271 *wl = hw->priv; | 3059 | struct wl1271 *wl = hw->priv; |
3060 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); | ||
3061 | |||
3062 | int ret; | 3060 | int ret; |
3063 | u8 *ssid = NULL; | 3061 | u8 *ssid = NULL; |
3064 | size_t len = 0; | 3062 | size_t len = 0; |
@@ -3086,8 +3084,8 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, | |||
3086 | if (ret < 0) | 3084 | if (ret < 0) |
3087 | goto out; | 3085 | goto out; |
3088 | 3086 | ||
3089 | if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) && | 3087 | /* fail if there is any role in ROC */ |
3090 | test_bit(wlvif->role_id, wl->roc_map)) { | 3088 | if (find_first_bit(wl->roc_map, WL12XX_MAX_ROLES) < WL12XX_MAX_ROLES) { |
3091 | /* don't allow scanning right now */ | 3089 | /* don't allow scanning right now */ |
3092 | ret = -EBUSY; | 3090 | ret = -EBUSY; |
3093 | goto out_sleep; | 3091 | goto out_sleep; |