diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-15 21:33:15 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-17 15:27:13 -0400 |
commit | 7181d4673710888b6d7084b37b9d77ed4f4e41b2 (patch) | |
tree | ba8c94b02cf57d01256d95f28f3f4fd628cf4c53 /net/mac80211 | |
parent | 1269fa737f21b3f643e4b12d3ac9938b142a7f00 (diff) | |
download | linux-7181d4673710888b6d7084b37b9d77ed4f4e41b2.tar.bz2 |
mac80211: avoid crashing when no scan sdata
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]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1b14d0204dd2..dc60804d6dd0 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2113,12 +2113,13 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) 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; |