summaryrefslogtreecommitdiff
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorMaxim Altshul <maxim.altshul@ti.com>2016-08-11 10:38:16 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2016-08-11 18:00:37 (GMT)
commit4fdbc67a25ce577b79b3af595e874e9ef921329f (patch)
treeac0650b0e51223b96cbfead2ff2f0af654889b37 /net/mac80211/sta_info.c
parent12d20fc9186a742d40e824f575df5aa62be31d69 (diff)
downloadlinux-4fdbc67a25ce577b79b3af595e874e9ef921329f.tar.xz
mac80211: call get_expected_throughput only after adding station
Depending on which method the driver implements, userspace could call this (indirectly, by getting station info) before the driver knows about the station, possibly causing it to misbehave. Therefore, add a check for sta->uploaded which indicates that the driver knows about the station. Signed-off-by: Maxim Altshul <maxim.altshul@ti.com> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index d1cba81..19f14c9 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2301,7 +2301,7 @@ u32 sta_get_expected_throughput(struct sta_info *sta)
if (ref && ref->ops->get_expected_throughput)
thr = ref->ops->get_expected_throughput(sta->rate_ctrl_priv);
else
- thr = drv_get_expected_throughput(local, &sta->sta);
+ thr = drv_get_expected_throughput(local, sta);
return thr;
}