Commit 97fd311a authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho

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: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 121af049
...@@ -3057,8 +3057,6 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, ...@@ -3057,8 +3057,6 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
struct cfg80211_scan_request *req) struct cfg80211_scan_request *req)
{ {
struct wl1271 *wl = hw->priv; struct wl1271 *wl = hw->priv;
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
int ret; int ret;
u8 *ssid = NULL; u8 *ssid = NULL;
size_t len = 0; size_t len = 0;
...@@ -3086,8 +3084,8 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw, ...@@ -3086,8 +3084,8 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
if (ret < 0) if (ret < 0)
goto out; goto out;
if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) && /* fail if there is any role in ROC */
test_bit(wlvif->role_id, wl->roc_map)) { if (find_first_bit(wl->roc_map, WL12XX_MAX_ROLES) < WL12XX_MAX_ROLES) {
/* don't allow scanning right now */ /* don't allow scanning right now */
ret = -EBUSY; ret = -EBUSY;
goto out_sleep; goto out_sleep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment