* [PATCH] wl12xx: Fix potential incorrect band in rx-status
@ 2011-03-10 8:01 juuso.oikarinen
2011-03-21 13:23 ` Luciano Coelho
0 siblings, 1 reply; 3+ messages in thread
From: juuso.oikarinen @ 2011-03-10 8:01 UTC (permalink / raw)
To: coelho; +Cc: linux-wireless
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
The rx-status passed to mac80211 along with each received frame contains the
band on which the frame was received. Under certain circumstances, this band
information may be incorrect, causing in worst case a WARNING from mac80211,
and causes the received frame to be dropped.
This scenario mainly occurs when performing connected-mode scans, when the
received scan results are from the other band than the one currentl
associated to.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
drivers/net/wireless/wl12xx/rx.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c
index 919b59f..e58c453 100644
--- a/drivers/net/wireless/wl12xx/rx.c
+++ b/drivers/net/wireless/wl12xx/rx.c
@@ -48,18 +48,14 @@ static void wl1271_rx_status(struct wl1271 *wl,
struct ieee80211_rx_status *status,
u8 beacon)
{
- enum ieee80211_band desc_band;
-
memset(status, 0, sizeof(struct ieee80211_rx_status));
- status->band = wl->band;
-
if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG)
- desc_band = IEEE80211_BAND_2GHZ;
+ status->band = IEEE80211_BAND_2GHZ;
else
- desc_band = IEEE80211_BAND_5GHZ;
+ status->band = IEEE80211_BAND_5GHZ;
- status->rate_idx = wl1271_rate_to_idx(desc->rate, desc_band);
+ status->rate_idx = wl1271_rate_to_idx(desc->rate, status->band);
#ifdef CONFIG_WL12XX_HT
/* 11n support */
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wl12xx: Fix potential incorrect band in rx-status
2011-03-10 8:01 [PATCH] wl12xx: Fix potential incorrect band in rx-status juuso.oikarinen
@ 2011-03-21 13:23 ` Luciano Coelho
2011-03-21 15:07 ` Luciano Coelho
0 siblings, 1 reply; 3+ messages in thread
From: Luciano Coelho @ 2011-03-21 13:23 UTC (permalink / raw)
To: juuso.oikarinen; +Cc: linux-wireless
On Thu, 2011-03-10 at 10:01 +0200, juuso.oikarinen@nokia.com wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> The rx-status passed to mac80211 along with each received frame
> contains the
> band on which the frame was received. Under certain circumstances,
> this band
> information may be incorrect, causing in worst case a WARNING from
> mac80211,
> and causes the received frame to be dropped.
>
> This scenario mainly occurs when performing connected-mode scans, when
> the
> received scan results are from the other band than the one currentl
> associated to.
>
> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Looks good, thanks!
Reviewed-by: Luciano Coelho <coelho@ti.com>
Applied to wl12xx/master with a small s/currentl/currently/ ;)
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wl12xx: Fix potential incorrect band in rx-status
2011-03-21 13:23 ` Luciano Coelho
@ 2011-03-21 15:07 ` Luciano Coelho
0 siblings, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2011-03-21 15:07 UTC (permalink / raw)
To: juuso.oikarinen; +Cc: linux-wireless
On Mon, 2011-03-21 at 15:23 +0200, Luciano Coelho wrote:
> On Thu, 2011-03-10 at 10:01 +0200, juuso.oikarinen@nokia.com wrote:
> > From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> >
> > The rx-status passed to mac80211 along with each received frame
> > contains the
> > band on which the frame was received. Under certain circumstances,
> > this band
> > information may be incorrect, causing in worst case a WARNING from
> > mac80211,
> > and causes the received frame to be dropped.
> >
> > This scenario mainly occurs when performing connected-mode scans, when
> > the
> > received scan results are from the other band than the one currentl
> > associated to.
> >
> > Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> Looks good, thanks!
>
> Reviewed-by: Luciano Coelho <coelho@ti.com>
>
> Applied to wl12xx/master with a small s/currentl/currently/ ;)
Ahm, there was a compilation problem with this on my tree. The
following line had to be changed as well:
- status->freq = ieee80211_channel_to_frequency(desc->channel, desc_band);
+ status->freq = ieee80211_channel_to_frequency(desc->channel,
+ status->band);
Fixed the patch and reapplied.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-21 15:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 8:01 [PATCH] wl12xx: Fix potential incorrect band in rx-status juuso.oikarinen
2011-03-21 13:23 ` Luciano Coelho
2011-03-21 15:07 ` 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).