* [PATCH] wl12xx: set scan probe requests rate according to the no_cck flag
@ 2011-10-15 20:23 Guy Eilam
2011-10-16 10:58 ` Eliad Peller
0 siblings, 1 reply; 3+ messages in thread
From: Guy Eilam @ 2011-10-15 20:23 UTC (permalink / raw)
To: coelho; +Cc: linux-wireless
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>
---
drivers/net/wireless/wl12xx/scan.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 5a6ae29..9a6bba4 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -184,7 +184,6 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
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;
@@ -243,7 +242,12 @@ void wl1271_scan_stm(struct wl1271 *wl)
case WL1271_SCAN_STATE_2GHZ_ACTIVE:
band = IEEE80211_BAND_2GHZ;
- rate = wl1271_tx_min_rate_get(wl, wl->bitrate_masks[band]);
+ if (wl->scan.req->no_cck)
+ rate = wl1271_tx_min_rate_get(wl,
+ CONF_TX_RATE_MASK_BASIC_P2P);
+ else
+ rate = wl1271_tx_min_rate_get(wl,
+ CONF_TX_RATE_MASK_BASIC);
ret = wl1271_scan_send(wl, band, false, rate);
if (ret == WL1271_NOTHING_TO_SCAN) {
wl->scan.state = WL1271_SCAN_STATE_2GHZ_PASSIVE;
@@ -254,7 +258,12 @@ void wl1271_scan_stm(struct wl1271 *wl)
case WL1271_SCAN_STATE_2GHZ_PASSIVE:
band = IEEE80211_BAND_2GHZ;
- rate = wl1271_tx_min_rate_get(wl, wl->bitrate_masks[band]);
+ if (wl->scan.req->no_cck)
+ rate = wl1271_tx_min_rate_get(wl,
+ CONF_TX_RATE_MASK_BASIC_P2P);
+ else
+ rate = wl1271_tx_min_rate_get(wl,
+ CONF_TX_RATE_MASK_BASIC);
ret = wl1271_scan_send(wl, band, true, rate);
if (ret == WL1271_NOTHING_TO_SCAN) {
if (wl->enable_11a)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wl12xx: set scan probe requests rate according to the no_cck flag
2011-10-15 20:23 [PATCH] wl12xx: set scan probe requests rate according to the no_cck flag Guy Eilam
@ 2011-10-16 10:58 ` Eliad Peller
2011-10-31 9:36 ` Luciano Coelho
0 siblings, 1 reply; 3+ messages in thread
From: Eliad Peller @ 2011-10-16 10:58 UTC (permalink / raw)
To: Guy Eilam; +Cc: coelho, linux-wireless
hi Guy,
On Sat, Oct 15, 2011 at 10:23 PM, Guy Eilam <guy@wizery.com> wrote:
> 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>
> ---
[...]
> @@ -243,7 +242,12 @@ void wl1271_scan_stm(struct wl1271 *wl)
>
> case WL1271_SCAN_STATE_2GHZ_ACTIVE:
> band = IEEE80211_BAND_2GHZ;
> - rate = wl1271_tx_min_rate_get(wl, wl->bitrate_masks[band]);
> + if (wl->scan.req->no_cck)
> + rate = wl1271_tx_min_rate_get(wl,
> + CONF_TX_RATE_MASK_BASIC_P2P);
> + else
> + rate = wl1271_tx_min_rate_get(wl,
> + CONF_TX_RATE_MASK_BASIC);
on a second thought, this seems a bit wrong.
i think we should consider the configured bitrate_masks when scanning.
maybe just mask-out the cck rates?
Eliad.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wl12xx: set scan probe requests rate according to the no_cck flag
2011-10-16 10:58 ` Eliad Peller
@ 2011-10-31 9:36 ` Luciano Coelho
0 siblings, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2011-10-31 9:36 UTC (permalink / raw)
To: guy; +Cc: linux-wireless, eliad
On Sun, 2011-10-16 at 12:58 +0200, Eliad Peller wrote:
> hi Guy,
>
> On Sat, Oct 15, 2011 at 10:23 PM, Guy Eilam <guy@wizery.com> wrote:
> > 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>
> > ---
> [...]
>
> > @@ -243,7 +242,12 @@ void wl1271_scan_stm(struct wl1271 *wl)
> >
> > case WL1271_SCAN_STATE_2GHZ_ACTIVE:
> > band = IEEE80211_BAND_2GHZ;
> > - rate = wl1271_tx_min_rate_get(wl, wl->bitrate_masks[band]);
> > + if (wl->scan.req->no_cck)
> > + rate = wl1271_tx_min_rate_get(wl,
> > + CONF_TX_RATE_MASK_BASIC_P2P);
> > + else
> > + rate = wl1271_tx_min_rate_get(wl,
> > + CONF_TX_RATE_MASK_BASIC);
>
> on a second thought, this seems a bit wrong.
> i think we should consider the configured bitrate_masks when scanning.
> maybe just mask-out the cck rates?
Any follow up on this?
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-31 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15 20:23 [PATCH] wl12xx: set scan probe requests rate according to the no_cck flag Guy Eilam
2011-10-16 10:58 ` Eliad Peller
2011-10-31 9:36 ` Luciano Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).