Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224263
b: refs/heads/master
c: b739a42
h: refs/heads/master
i:
  224261: fd29de7
  224259: 97249e1
  224255: 142e3d1
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Nov 15, 2010
1 parent 76cd947 commit 5983ddf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb2382c75b1292aff0ebc8e209b0cb9ba70bb2cf
refs/heads/master: b739a42c921dcb0ae92cc14032b7f75dcba88e3b
17 changes: 14 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl)
wl->scan.state = WL1271_SCAN_STATE_IDLE;
kfree(wl->scan.scanned_ch);
wl->scan.scanned_ch = NULL;
wl->scan.req = NULL;
ieee80211_scan_completed(wl->hw, true);
}

Expand Down Expand Up @@ -1676,6 +1677,16 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,

mutex_lock(&wl->mutex);

if (wl->state == WL1271_STATE_OFF) {
/*
* We cannot return -EBUSY here because cfg80211 will expect
* a call to ieee80211_scan_completed if we do - in this case
* there won't be any call.
*/
ret = -EAGAIN;
goto out;
}

ret = wl1271_ps_elp_wakeup(wl, false);
if (ret < 0)
goto out;
Expand Down Expand Up @@ -2093,14 +2104,14 @@ static int wl1271_op_get_survey(struct ieee80211_hw *hw, int idx,
{
struct wl1271 *wl = hw->priv;
struct ieee80211_conf *conf = &hw->conf;

if (idx != 0)
return -ENOENT;

survey->channel = conf->channel;
survey->filled = SURVEY_INFO_NOISE_DBM;
survey->noise = wl->noise;

return 0;
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/wl1271_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ void wl1271_scan_complete_work(struct work_struct *work)
wl->scan.state = WL1271_SCAN_STATE_IDLE;
kfree(wl->scan.scanned_ch);
wl->scan.scanned_ch = NULL;
mutex_unlock(&wl->mutex);

wl->scan.req = NULL;
ieee80211_scan_completed(wl->hw, false);

if (wl->scan.failed) {
wl1271_info("Scan completed due to error.");
ieee80211_queue_work(wl->hw, &wl->recovery_work);
}
mutex_unlock(&wl->mutex);

}


Expand Down

0 comments on commit 5983ddf

Please sign in to comment.