* [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag
@ 2011-11-01 7:23 Eliad Peller
2011-11-01 7:23 ` [PATCH v2 2/2] wl12xx: use p2p rate index when the skb has the NO_CCK flag Eliad Peller
2011-11-08 14:19 ` [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag Luciano Coelho
0 siblings, 2 replies; 3+ messages in thread
From: Eliad Peller @ 2011-11-01 7:23 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
From: Guy Eilam <guy@wizery.com>
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>
---
v2: consider bitrate_mask
drivers/net/wireless/wl12xx/conf.h | 4 ++++
drivers/net/wireless/wl12xx/scan.c | 19 +++++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 04bb8fb..1bcfb01 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -440,6 +440,10 @@ struct conf_rx_settings {
CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
CONF_HW_BIT_RATE_54MBPS)
+#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
+ CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
+ CONF_HW_BIT_RATE_11MBPS)
+
#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
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 fb2c431..de82ccf 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -203,7 +203,6 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
cmd->params.tx_rate = cpu_to_le32(basic_rate);
cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
- cmd->params.tx_rate = cpu_to_le32(basic_rate);
cmd->params.tid_trigger = 0;
cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;
@@ -255,7 +254,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif)
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
int ret = 0;
enum ieee80211_band band;
- u32 rate;
+ u32 rate, mask;
switch (wl->scan.state) {
case WL1271_SCAN_STATE_IDLE:
@@ -263,7 +262,13 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif)
case WL1271_SCAN_STATE_2GHZ_ACTIVE:
band = IEEE80211_BAND_2GHZ;
- rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]);
+ mask = wlvif->bitrate_masks[band];
+ if (wl->scan.req->no_cck) {
+ mask &= ~CONF_TX_CCK_RATES;
+ if (!mask)
+ mask = CONF_TX_RATE_MASK_BASIC_P2P;
+ }
+ rate = wl1271_tx_min_rate_get(wl, mask);
ret = wl1271_scan_send(wl, vif, band, false, rate);
if (ret == WL1271_NOTHING_TO_SCAN) {
wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE;
@@ -274,7 +279,13 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif)
case WL1271_SCAN_STATE_2GHZ_PASSIVE:
band = IEEE80211_BAND_2GHZ;
- rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]);
+ mask = wlvif->bitrate_masks[band];
+ if (wl->scan.req->no_cck) {
+ mask &= ~CONF_TX_CCK_RATES;
+ if (!mask)
+ mask = CONF_TX_RATE_MASK_BASIC_P2P;
+ }
+ rate = wl1271_tx_min_rate_get(wl, mask);
ret = wl1271_scan_send(wl, vif, band, true, rate);
if (ret == WL1271_NOTHING_TO_SCAN) {
if (wl->enable_11a)
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH v2 2/2] wl12xx: use p2p rate index when the skb has the NO_CCK flag
2011-11-01 7:23 [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag Eliad Peller
@ 2011-11-01 7:23 ` Eliad Peller
2011-11-08 14:19 ` [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag Luciano Coelho
1 sibling, 0 replies; 3+ messages in thread
From: Eliad Peller @ 2011-11-01 7:23 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
If the skb contains the NO_CCK flag, use the p2p rate index
(which contains only the OFDM rates)
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/tx.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index c7ad4f5..f1add54 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -340,7 +340,9 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
/* if the packets are destined for AP (have a STA entry)
send them with AP rate policies, otherwise use default
basic rates */
- if (control->control.sta)
+ if (control->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
+ rate_idx = wlvif->sta.p2p_rate_idx;
+ else if (control->control.sta)
rate_idx = wlvif->sta.ap_rate_idx;
else
rate_idx = wlvif->sta.basic_rate_idx;
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag
2011-11-01 7:23 [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag Eliad Peller
2011-11-01 7:23 ` [PATCH v2 2/2] wl12xx: use p2p rate index when the skb has the NO_CCK flag Eliad Peller
@ 2011-11-08 14:19 ` Luciano Coelho
1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2011-11-08 14:19 UTC (permalink / raw)
To: Eliad Peller; +Cc: linux-wireless
On Tue, 2011-11-01 at 09:23 +0200, Eliad Peller wrote:
> From: Guy Eilam <guy@wizery.com>
>
> 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>
> ---
Applied both patches, thanks!
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-08 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01 7:23 [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag Eliad Peller
2011-11-01 7:23 ` [PATCH v2 2/2] wl12xx: use p2p rate index when the skb has the NO_CCK flag Eliad Peller
2011-11-08 14:19 ` [PATCH v2 1/2] wl12xx: set scan probe requests rate according to the no_cck flag Luciano Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox