diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-01-16 17:20:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-18 15:36:18 -0500 |
commit | 5762d7d3eda25c03cc2d9d45227be3f5ab6bec9e (patch) | |
tree | d918d7343c604f3c93e8c8bcad4ceed05562c7c2 | |
parent | cd443f1e91ca600a092e780e8250cd6a2954b763 (diff) |
cfg80211: fix station info handling bugs
Fix two places where the structure isn't initialized to zero,
and thus can't be filled properly by the driver.
Fixes: 4a4b8169501b ("cfg80211: Accept multiple RSSI thresholds for CQM")
Fixes: 9930380f0bd8 ("cfg80211: implement IWRATE")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/wireless/nl80211.c | 2 | ||||
-rw-r--r-- | net/wireless/wext-compat.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ed87a97fcb0b..542a4fc0a8d7 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -9809,7 +9809,7 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev, | |||
9809 | */ | 9809 | */ |
9810 | if (!wdev->cqm_config->last_rssi_event_value && wdev->current_bss && | 9810 | if (!wdev->cqm_config->last_rssi_event_value && wdev->current_bss && |
9811 | rdev->ops->get_station) { | 9811 | rdev->ops->get_station) { |
9812 | struct station_info sinfo; | 9812 | struct station_info sinfo = {}; |
9813 | u8 *mac_addr; | 9813 | u8 *mac_addr; |
9814 | 9814 | ||
9815 | mac_addr = wdev->current_bss->pub.bssid; | 9815 | mac_addr = wdev->current_bss->pub.bssid; |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 7ca04a7de85a..05186a47878f 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -1254,8 +1254,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev, | |||
1254 | { | 1254 | { |
1255 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 1255 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
1256 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); | 1256 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
1257 | /* we are under RTNL - globally locked - so can use a static struct */ | 1257 | struct station_info sinfo = {}; |
1258 | static struct station_info sinfo; | ||
1259 | u8 addr[ETH_ALEN]; | 1258 | u8 addr[ETH_ALEN]; |
1260 | int err; | 1259 | int err; |
1261 | 1260 | ||