aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorGuy Eilam <guy@wizery.com>2011-11-01 03:23:51 -0400
committerLuciano Coelho <coelho@ti.com>2011-11-08 08:50:09 -0500
commitbfafba8a4c61841ab850887d6dfe2741ad037ab6 (patch)
treeb66c431022f90cdc871faa3b881d7cdf2eda0d16 /drivers/net/wireless
parent3f3fd78e33213b1684ac1e4deacbcf7ed1828e3c (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')
-rw-r--r--drivers/net/wireless/wl12xx/conf.h4
-rw-r--r--drivers/net/wireless/wl12xx/scan.c19
2 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 04bb8fbf93f9..1bcfb017058d 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -440,6 +440,10 @@ struct conf_rx_settings {
440 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \ 440 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
441 CONF_HW_BIT_RATE_54MBPS) 441 CONF_HW_BIT_RATE_54MBPS)
442 442
443#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
444 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
445 CONF_HW_BIT_RATE_11MBPS)
446
443#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \ 447#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
444 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \ 448 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
445 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \ 449 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
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)