Skip to content

Commit

Permalink
wl12xx: don't allow scanning while device is in ROC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Mar 5, 2012
1 parent 121af04 commit 97fd311
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3057,8 +3057,6 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
struct cfg80211_scan_request *req)
{
struct wl1271 *wl = hw->priv;
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);

int ret;
u8 *ssid = NULL;
size_t len = 0;
Expand Down Expand Up @@ -3086,8 +3084,8 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
if (ret < 0)
goto out;

if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) &&
test_bit(wlvif->role_id, wl->roc_map)) {
/* fail if there is any role in ROC */
if (find_first_bit(wl->roc_map, WL12XX_MAX_ROLES) < WL12XX_MAX_ROLES) {
/* don't allow scanning right now */
ret = -EBUSY;
goto out_sleep;
Expand Down

0 comments on commit 97fd311

Please sign in to comment.