Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256336
b: refs/heads/master
c: 73ecce3
h: refs/heads/master
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Jul 5, 2011
1 parent 30db517 commit 2dc6f13
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 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: 2aa01597eb29304fe7d863f15300c7b960b587ca
refs/heads/master: 73ecce31fe04a2d6c87192cc752b5bd733a8c94a
40 changes: 39 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,6 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
}
/* flush any remaining work */
wl1271_debug(DEBUG_MAC80211, "flushing remaining works");
flush_delayed_work(&wl->scan_complete_work);

/*
* disable and re-enable interrupts in order to flush
Expand Down Expand Up @@ -2786,6 +2785,44 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
return ret;
}

static void wl1271_op_cancel_hw_scan(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct wl1271 *wl = hw->priv;
int ret;

wl1271_debug(DEBUG_MAC80211, "mac80211 cancel hw scan");

mutex_lock(&wl->mutex);

if (wl->state == WL1271_STATE_OFF)
goto out;

if (wl->scan.state == WL1271_SCAN_STATE_IDLE)
goto out;

ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out;

if (wl->scan.state != WL1271_SCAN_STATE_DONE) {
ret = wl1271_scan_stop(wl);
if (ret < 0)
goto out_sleep;
}
wl->scan.state = WL1271_SCAN_STATE_IDLE;
memset(wl->scan.scanned_ch, 0, sizeof(wl->scan.scanned_ch));
wl->scan.req = NULL;
ieee80211_scan_completed(wl->hw, true);

out_sleep:
wl1271_ps_elp_sleep(wl);
out:
mutex_unlock(&wl->mutex);

cancel_delayed_work_sync(&wl->scan_complete_work);
}

static int wl1271_op_sched_scan_start(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct cfg80211_sched_scan_request *req,
Expand Down Expand Up @@ -3969,6 +4006,7 @@ static const struct ieee80211_ops wl1271_ops = {
.tx = wl1271_op_tx,
.set_key = wl1271_op_set_key,
.hw_scan = wl1271_op_hw_scan,
.cancel_hw_scan = wl1271_op_cancel_hw_scan,
.sched_scan_start = wl1271_op_sched_scan_start,
.sched_scan_stop = wl1271_op_sched_scan_stop,
.bss_info_changed = wl1271_op_bss_info_changed,
Expand Down

0 comments on commit 2dc6f13

Please sign in to comment.