diff options
author | Guy Eilam <guy@wizery.com> | 2011-11-01 03:23:51 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-11-08 08:50:09 -0500 |
commit | bfafba8a4c61841ab850887d6dfe2741ad037ab6 (patch) | |
tree | b66c431022f90cdc871faa3b881d7cdf2eda0d16 /drivers/net/wireless/wl12xx/scan.c | |
parent | 3f3fd78e33213b1684ac1e4deacbcf7ed1828e3c (diff) |
wl12xx: set scan probe requests rate according to the no_cck flag
Set the TX rate of probe requests during scanning according to the
no_cck flag in the scan request struct.
Signed-off-by: Guy Eilam <guy@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/scan.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index 898d03d5b527..a13c49e27a36 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -202,7 +202,6 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif, | |||
202 | 202 | ||
203 | cmd->params.tx_rate = cpu_to_le32(basic_rate); | 203 | cmd->params.tx_rate = cpu_to_le32(basic_rate); |
204 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; | 204 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; |
205 | cmd->params.tx_rate = cpu_to_le32(basic_rate); | ||
206 | cmd->params.tid_trigger = 0; | 205 | cmd->params.tid_trigger = 0; |
207 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; | 206 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
208 | 207 | ||
@@ -254,7 +253,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif) | |||
254 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); | 253 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); |
255 | int ret = 0; | 254 | int ret = 0; |
256 | enum ieee80211_band band; | 255 | enum ieee80211_band band; |
257 | u32 rate; | 256 | u32 rate, mask; |
258 | 257 | ||
259 | switch (wl->scan.state) { | 258 | switch (wl->scan.state) { |
260 | case WL1271_SCAN_STATE_IDLE: | 259 | case WL1271_SCAN_STATE_IDLE: |
@@ -262,7 +261,13 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif) | |||
262 | 261 | ||
263 | case WL1271_SCAN_STATE_2GHZ_ACTIVE: | 262 | case WL1271_SCAN_STATE_2GHZ_ACTIVE: |
264 | band = IEEE80211_BAND_2GHZ; | 263 | band = IEEE80211_BAND_2GHZ; |
265 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); | 264 | mask = wlvif->bitrate_masks[band]; |
265 | if (wl->scan.req->no_cck) { | ||
266 | mask &= ~CONF_TX_CCK_RATES; | ||
267 | if (!mask) | ||
268 | mask = CONF_TX_RATE_MASK_BASIC_P2P; | ||
269 | } | ||
270 | rate = wl1271_tx_min_rate_get(wl, mask); | ||
266 | ret = wl1271_scan_send(wl, vif, band, false, rate); | 271 | ret = wl1271_scan_send(wl, vif, band, false, rate); |
267 | if (ret == WL1271_NOTHING_TO_SCAN) { | 272 | if (ret == WL1271_NOTHING_TO_SCAN) { |
268 | wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE; | 273 | wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE; |
@@ -273,7 +278,13 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif) | |||
273 | 278 | ||
274 | case WL1271_SCAN_STATE_2GHZ_PASSIVE: | 279 | case WL1271_SCAN_STATE_2GHZ_PASSIVE: |
275 | band = IEEE80211_BAND_2GHZ; | 280 | band = IEEE80211_BAND_2GHZ; |
276 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); | 281 | mask = wlvif->bitrate_masks[band]; |
282 | if (wl->scan.req->no_cck) { | ||
283 | mask &= ~CONF_TX_CCK_RATES; | ||
284 | if (!mask) | ||
285 | mask = CONF_TX_RATE_MASK_BASIC_P2P; | ||
286 | } | ||
287 | rate = wl1271_tx_min_rate_get(wl, mask); | ||
277 | ret = wl1271_scan_send(wl, vif, band, true, rate); | 288 | ret = wl1271_scan_send(wl, vif, band, true, rate); |
278 | if (ret == WL1271_NOTHING_TO_SCAN) { | 289 | if (ret == WL1271_NOTHING_TO_SCAN) { |
279 | if (wl->enable_11a) | 290 | if (wl->enable_11a) |