aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-02-02 06:15:35 -0500
committerLuciano Coelho <coelho@ti.com>2012-02-15 01:38:34 -0500
commit79aba1baf251e22fbc97a42c711c4b683807ac43 (patch)
tree655c43a48da907d2f405e047eba2b75676cb07df /drivers/net/wireless/wl12xx
parent76a74c8a65c6d2587e48355d3a122b4274f5abbf (diff)
wl12xx: declare support for hw scan while idle
By allowing hw scan while idle, we no longer need the redundant ROC/CROC that are done on idle off/on, which helps simplifying the state machine of the driver. This way, we can also allow scanning while there is an ongoing sched scan (otherwise, we won't be able to ROC on idle-off) 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.c7
-rw-r--r--drivers/net/wireless/wl12xx/scan.c13
2 files changed, 2 insertions, 18 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index b45a16c1f717..17dcd63bfc48 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -3068,10 +3068,6 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
3068 goto out_sleep; 3068 goto out_sleep;
3069 } 3069 }
3070 3070
3071 /* cancel ROC before scanning */
3072 if (wl12xx_dev_role_started(wlvif))
3073 wl12xx_croc(wl, wlvif->dev_role_id);
3074
3075 ret = wl1271_scan(hw->priv, vif, ssid, len, req); 3071 ret = wl1271_scan(hw->priv, vif, ssid, len, req);
3076out_sleep: 3072out_sleep:
3077 wl1271_ps_elp_sleep(wl); 3073 wl1271_ps_elp_sleep(wl);
@@ -5050,7 +5046,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
5050 IEEE80211_HW_SPECTRUM_MGMT | 5046 IEEE80211_HW_SPECTRUM_MGMT |
5051 IEEE80211_HW_AP_LINK_PS | 5047 IEEE80211_HW_AP_LINK_PS |
5052 IEEE80211_HW_AMPDU_AGGREGATION | 5048 IEEE80211_HW_AMPDU_AGGREGATION |
5053 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW; 5049 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW |
5050 IEEE80211_HW_SCAN_WHILE_IDLE;
5054 5051
5055 wl->hw->wiphy->cipher_suites = cipher_suites; 5052 wl->hw->wiphy->cipher_suites = cipher_suites;
5056 wl->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); 5053 wl->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 6adc7333b7e6..848a165fa55c 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -38,7 +38,6 @@ void wl1271_scan_complete_work(struct work_struct *work)
38 struct ieee80211_vif *vif; 38 struct ieee80211_vif *vif;
39 struct wl12xx_vif *wlvif; 39 struct wl12xx_vif *wlvif;
40 int ret; 40 int ret;
41 bool is_sta, is_ibss;
42 41
43 dwork = container_of(work, struct delayed_work, work); 42 dwork = container_of(work, struct delayed_work, work);
44 wl = container_of(dwork, struct wl1271, scan_complete_work); 43 wl = container_of(dwork, struct wl1271, scan_complete_work);
@@ -70,18 +69,6 @@ void wl1271_scan_complete_work(struct work_struct *work)
70 wl1271_cmd_build_ap_probe_req(wl, wlvif, wlvif->probereq); 69 wl1271_cmd_build_ap_probe_req(wl, wlvif, wlvif->probereq);
71 } 70 }
72 71
73 /* return to ROC if needed */
74 is_sta = (wlvif->bss_type == BSS_TYPE_STA_BSS);
75 is_ibss = (wlvif->bss_type == BSS_TYPE_IBSS);
76 if (((is_sta && !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) ||
77 (is_ibss && !test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags))) &&
78 !test_bit(wlvif->dev_role_id, wl->roc_map)) {
79 /* restore remain on channel */
80 if (wlvif->dev_hlid == WL12XX_INVALID_LINK_ID)
81 wl12xx_start_dev(wl, wlvif);
82 else
83 wl12xx_roc(wl, wlvif, wlvif->dev_role_id);
84 }
85 wl1271_ps_elp_sleep(wl); 72 wl1271_ps_elp_sleep(wl);
86 73
87 if (wl->scan.failed) { 74 if (wl->scan.failed) {