aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-07-23 13:01:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-23 13:01:14 -0400
commit3b8de0749276abcb86bd7a6ca6691769a4ba7987 (patch)
treed8fb187da3f8caca8c4557b76b5b4fe6f85348b5 /net
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes (diff)
parentmac80211: fix crash on getting sta info with uninitialized rate control (diff)
downloadlinux-dev-3b8de0749276abcb86bd7a6ca6691769a4ba7987.tar.xz
linux-dev-3b8de0749276abcb86bd7a6ca6691769a4ba7987.zip
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d7513a503be1..592f4b152ba8 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -472,12 +472,15 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;
- struct rate_control_ref *ref = local->rate_ctrl;
+ struct rate_control_ref *ref = NULL;
struct timespec uptime;
u64 packets = 0;
u32 thr = 0;
int i, ac;
+ if (test_sta_flag(sta, WLAN_STA_RATE_CONTROL))
+ ref = local->rate_ctrl;
+
sinfo->generation = sdata->local->sta_generation;
sinfo->filled = STATION_INFO_INACTIVE_TIME |