Skip to content

Commit 5762d7d

Browse files
jmberg-inteldavem330
authored andcommitted
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: 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]>
1 parent cd443f1 commit 5762d7d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

net/wireless/nl80211.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9809,7 +9809,7 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev,
98099809
*/
98109810
if (!wdev->cqm_config->last_rssi_event_value && wdev->current_bss &&
98119811
rdev->ops->get_station) {
9812-
struct station_info sinfo;
9812+
struct station_info sinfo = {};
98139813
u8 *mac_addr;
98149814

98159815
mac_addr = wdev->current_bss->pub.bssid;

net/wireless/wext-compat.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,8 +1254,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev,
12541254
{
12551255
struct wireless_dev *wdev = dev->ieee80211_ptr;
12561256
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
1257-
/* we are under RTNL - globally locked - so can use a static struct */
1258-
static struct station_info sinfo;
1257+
struct station_info sinfo = {};
12591258
u8 addr[ETH_ALEN];
12601259
int err;
12611260

0 commit comments

Comments
 (0)