Skip to content

Commit

Permalink
cfg80211: fix station info handling bugs
Browse files Browse the repository at this point in the history
Fix two places where the structure isn't initialized to zero,
and thus can't be filled properly by the driver.

Fixes: 4a4b816 ("cfg80211: Accept multiple RSSI thresholds for CQM")
Fixes: 9930380 ("cfg80211: implement IWRATE")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jmberg-intel authored and davem330 committed Jan 18, 2018
1 parent cd443f1 commit 5762d7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -9809,7 +9809,7 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev,
*/
if (!wdev->cqm_config->last_rssi_event_value && wdev->current_bss &&
rdev->ops->get_station) {
struct station_info sinfo;
struct station_info sinfo = {};
u8 *mac_addr;

mac_addr = wdev->current_bss->pub.bssid;
Expand Down
3 changes: 1 addition & 2 deletions net/wireless/wext-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,8 +1254,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev,
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
/* we are under RTNL - globally locked - so can use a static struct */
static struct station_info sinfo;
struct station_info sinfo = {};
u8 addr[ETH_ALEN];
int err;

Expand Down

0 comments on commit 5762d7d

Please sign in to comment.