* [PATCH] mac80211: avoid crashing when no scan sdata
@ 2009-04-15 19:33 Johannes Berg
2009-04-16 6:00 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-04-15 19:33 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Kalle Valo
Using the scan_sdata variable here is terribly wrong,
if there has never been a scan then we fail. However,
we need a bandaid...
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.29]
---
John, for 2.6.29 and 2.6.30 we need this bandaid -- my new work to
properly fix this can only go into 2.6.31.
net/mac80211/mlme.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-04-15 20:48:57.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-04-15 21:31:13.000000000 +0200
@@ -2197,12 +2197,13 @@ void ieee80211_dynamic_ps_enable_work(st
struct ieee80211_local *local =
container_of(work, struct ieee80211_local,
dynamic_ps_enable_work);
+ /* XXX: using scan_sdata is completely broken! */
struct ieee80211_sub_if_data *sdata = local->scan_sdata;
if (local->hw.conf.flags & IEEE80211_CONF_PS)
return;
- if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
+ if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK && sdata)
ieee80211_send_nullfunc(local, sdata, 1);
local->hw.conf.flags |= IEEE80211_CONF_PS;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: avoid crashing when no scan sdata
2009-04-15 19:33 [PATCH] mac80211: avoid crashing when no scan sdata Johannes Berg
@ 2009-04-16 6:00 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2009-04-16 6:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> Using the scan_sdata variable here is terribly wrong,
> if there has never been a scan then we fail. However,
> we need a bandaid...
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Cc: stable@kernel.org [2.6.29]
> ---
> John, for 2.6.29 and 2.6.30 we need this bandaid -- my new work to
> properly fix this can only go into 2.6.31.
Sorry, I did this mistake. Thanks for fixing it!
--
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-16 6:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 19:33 [PATCH] mac80211: avoid crashing when no scan sdata Johannes Berg
2009-04-16 6:00 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox