diff options
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index a61a44bc6cf0..bfac5e186f57 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -38,6 +38,7 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, struct cfg80211_bss *bss, | |||
38 | * frame instead of reassoc. | 38 | * frame instead of reassoc. |
39 | */ | 39 | */ |
40 | if (cfg80211_sme_rx_assoc_resp(wdev, status_code)) { | 40 | if (cfg80211_sme_rx_assoc_resp(wdev, status_code)) { |
41 | cfg80211_unhold_bss(bss_from_pub(bss)); | ||
41 | cfg80211_put_bss(wiphy, bss); | 42 | cfg80211_put_bss(wiphy, bss); |
42 | return; | 43 | return; |
43 | } | 44 | } |
@@ -131,16 +132,19 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr) | |||
131 | } | 132 | } |
132 | EXPORT_SYMBOL(cfg80211_auth_timeout); | 133 | EXPORT_SYMBOL(cfg80211_auth_timeout); |
133 | 134 | ||
134 | void cfg80211_assoc_timeout(struct net_device *dev, const u8 *addr) | 135 | void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss) |
135 | { | 136 | { |
136 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 137 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
137 | struct wiphy *wiphy = wdev->wiphy; | 138 | struct wiphy *wiphy = wdev->wiphy; |
138 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 139 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
139 | 140 | ||
140 | trace_cfg80211_send_assoc_timeout(dev, addr); | 141 | trace_cfg80211_send_assoc_timeout(dev, bss->bssid); |
141 | 142 | ||
142 | nl80211_send_assoc_timeout(rdev, dev, addr, GFP_KERNEL); | 143 | nl80211_send_assoc_timeout(rdev, dev, bss->bssid, GFP_KERNEL); |
143 | cfg80211_sme_assoc_timeout(wdev); | 144 | cfg80211_sme_assoc_timeout(wdev); |
145 | |||
146 | cfg80211_unhold_bss(bss_from_pub(bss)); | ||
147 | cfg80211_put_bss(wiphy, bss); | ||
144 | } | 148 | } |
145 | EXPORT_SYMBOL(cfg80211_assoc_timeout); | 149 | EXPORT_SYMBOL(cfg80211_assoc_timeout); |
146 | 150 | ||
@@ -307,6 +311,8 @@ int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev, | |||
307 | goto out; | 311 | goto out; |
308 | 312 | ||
309 | err = rdev_assoc(rdev, dev, req); | 313 | err = rdev_assoc(rdev, dev, req); |
314 | if (!err) | ||
315 | cfg80211_hold_bss(bss_from_pub(req->bss)); | ||
310 | 316 | ||
311 | out: | 317 | out: |
312 | if (err) | 318 | if (err) |