diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-01-31 19:49:58 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-11 12:44:52 -0500 |
commit | 5b112d3d098c97b867cc580f590395cd1e72f18c (patch) | |
tree | 75e3a6434adaab876ae54ea35d7ceebebbf3ca4a | |
parent | bba87ffe606b7fc5fba73d1c0c5ac1eacd2cebe8 (diff) |
cfg80211: pass wiphy to cfg80211_ref_bss/put_bss
This prepares for using the spinlock instead of krefs
which is needed in the next patch to track the refs
of combined BSSes correctly.
Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/cfg80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/scan.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 4 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/cfg80211.c | 2 | ||||
-rw-r--r-- | include/net/cfg80211.h | 6 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 6 | ||||
-rw-r--r-- | net/mac80211/scan.c | 3 | ||||
-rw-r--r-- | net/wireless/core.c | 2 | ||||
-rw-r--r-- | net/wireless/ibss.c | 4 | ||||
-rw-r--r-- | net/wireless/mlme.c | 14 | ||||
-rw-r--r-- | net/wireless/scan.c | 4 | ||||
-rw-r--r-- | net/wireless/sme.c | 16 |
21 files changed, 51 insertions, 48 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 4225cca0f198..a7fb442a99aa 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -767,7 +767,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, | |||
767 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "ad-hoc %s selected\n", | 767 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "ad-hoc %s selected\n", |
768 | nw_type & ADHOC_CREATOR ? "creator" : "joiner"); | 768 | nw_type & ADHOC_CREATOR ? "creator" : "joiner"); |
769 | cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL); | 769 | cfg80211_ibss_joined(vif->ndev, bssid, GFP_KERNEL); |
770 | cfg80211_put_bss(bss); | 770 | cfg80211_put_bss(ar->wiphy, bss); |
771 | return; | 771 | return; |
772 | } | 772 | } |
773 | 773 | ||
@@ -778,7 +778,7 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel, | |||
778 | assoc_req_ie, assoc_req_len, | 778 | assoc_req_ie, assoc_req_len, |
779 | assoc_resp_ie, assoc_resp_len, | 779 | assoc_resp_ie, assoc_resp_len, |
780 | WLAN_STATUS_SUCCESS, GFP_KERNEL); | 780 | WLAN_STATUS_SUCCESS, GFP_KERNEL); |
781 | cfg80211_put_bss(bss); | 781 | cfg80211_put_bss(ar->wiphy, bss); |
782 | } else if (vif->sme_state == SME_CONNECTED) { | 782 | } else if (vif->sme_state == SME_CONNECTED) { |
783 | /* inform roam event to cfg80211 */ | 783 | /* inform roam event to cfg80211 */ |
784 | cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len, | 784 | cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len, |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 998f8b0f62fd..d366cf105c7c 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -1108,7 +1108,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len, | |||
1108 | kfree(mgmt); | 1108 | kfree(mgmt); |
1109 | if (bss == NULL) | 1109 | if (bss == NULL) |
1110 | return -ENOMEM; | 1110 | return -ENOMEM; |
1111 | cfg80211_put_bss(bss); | 1111 | cfg80211_put_bss(ar->wiphy, bss); |
1112 | 1112 | ||
1113 | /* | 1113 | /* |
1114 | * Firmware doesn't return any event when scheduled scan has | 1114 | * Firmware doesn't return any event when scheduled scan has |
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 002851fceb2f..9ecc1968262c 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c | |||
@@ -341,7 +341,7 @@ static int wil_cfg80211_connect(struct wiphy *wiphy, | |||
341 | } | 341 | } |
342 | 342 | ||
343 | out: | 343 | out: |
344 | cfg80211_put_bss(bss); | 344 | cfg80211_put_bss(wiphy, bss); |
345 | 345 | ||
346 | return rc; | 346 | return rc; |
347 | } | 347 | } |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 0b70e17cd1fb..79d608caa903 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -338,7 +338,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) | |||
338 | if (bss) { | 338 | if (bss) { |
339 | wil_dbg_wmi(wil, "Added BSS %pM\n", | 339 | wil_dbg_wmi(wil, "Added BSS %pM\n", |
340 | rx_mgmt_frame->bssid); | 340 | rx_mgmt_frame->bssid); |
341 | cfg80211_put_bss(bss); | 341 | cfg80211_put_bss(wiphy, bss); |
342 | } else { | 342 | } else { |
343 | wil_err(wil, "cfg80211_inform_bss() failed\n"); | 343 | wil_err(wil, "cfg80211_inform_bss() failed\n"); |
344 | } | 344 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 481f41ad7989..cecc3eff72e9 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -2323,7 +2323,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, | |||
2323 | if (!bss) | 2323 | if (!bss) |
2324 | return -ENOMEM; | 2324 | return -ENOMEM; |
2325 | 2325 | ||
2326 | cfg80211_put_bss(bss); | 2326 | cfg80211_put_bss(wiphy, bss); |
2327 | 2327 | ||
2328 | return err; | 2328 | return err; |
2329 | } | 2329 | } |
@@ -2429,7 +2429,7 @@ static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg, | |||
2429 | goto CleanUp; | 2429 | goto CleanUp; |
2430 | } | 2430 | } |
2431 | 2431 | ||
2432 | cfg80211_put_bss(bss); | 2432 | cfg80211_put_bss(wiphy, bss); |
2433 | 2433 | ||
2434 | CleanUp: | 2434 | CleanUp: |
2435 | 2435 | ||
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 230f8ebbe289..61735db3b051 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -657,7 +657,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, | |||
657 | capa, intvl, ie, ielen, | 657 | capa, intvl, ie, ielen, |
658 | LBS_SCAN_RSSI_TO_MBM(rssi), | 658 | LBS_SCAN_RSSI_TO_MBM(rssi), |
659 | GFP_KERNEL); | 659 | GFP_KERNEL); |
660 | cfg80211_put_bss(bss); | 660 | cfg80211_put_bss(wiphy, bss); |
661 | } | 661 | } |
662 | } else | 662 | } else |
663 | lbs_deb_scan("scan response: missing BSS channel IE\n"); | 663 | lbs_deb_scan("scan response: missing BSS channel IE\n"); |
@@ -1444,7 +1444,7 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, | |||
1444 | 1444 | ||
1445 | done: | 1445 | done: |
1446 | if (bss) | 1446 | if (bss) |
1447 | cfg80211_put_bss(bss); | 1447 | cfg80211_put_bss(wiphy, bss); |
1448 | lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); | 1448 | lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); |
1449 | return ret; | 1449 | return ret; |
1450 | } | 1450 | } |
@@ -1766,7 +1766,7 @@ static void lbs_join_post(struct lbs_private *priv, | |||
1766 | params->beacon_interval, | 1766 | params->beacon_interval, |
1767 | fake_ie, fake - fake_ie, | 1767 | fake_ie, fake - fake_ie, |
1768 | 0, GFP_KERNEL); | 1768 | 0, GFP_KERNEL); |
1769 | cfg80211_put_bss(bss); | 1769 | cfg80211_put_bss(priv->wdev->wiphy, bss); |
1770 | 1770 | ||
1771 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); | 1771 | memcpy(priv->wdev->ssid, params->ssid, params->ssid_len); |
1772 | priv->wdev->ssid_len = params->ssid_len; | 1772 | priv->wdev->ssid_len = params->ssid_len; |
@@ -2011,7 +2011,7 @@ static int lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev, | |||
2011 | 2011 | ||
2012 | if (bss) { | 2012 | if (bss) { |
2013 | ret = lbs_ibss_join_existing(priv, params, bss); | 2013 | ret = lbs_ibss_join_existing(priv, params, bss); |
2014 | cfg80211_put_bss(bss); | 2014 | cfg80211_put_bss(wiphy, bss); |
2015 | } else | 2015 | } else |
2016 | ret = lbs_ibss_start_new(priv, params); | 2016 | ret = lbs_ibss_start_new(priv, params); |
2017 | 2017 | ||
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 3a004b85b99f..81c84a29308f 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -1430,7 +1430,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) | |||
1430 | bss = cfg80211_inform_bss(priv->wdev->wiphy, chan, | 1430 | bss = cfg80211_inform_bss(priv->wdev->wiphy, chan, |
1431 | bss_info.bssid, 0, WLAN_CAPABILITY_IBSS, | 1431 | bss_info.bssid, 0, WLAN_CAPABILITY_IBSS, |
1432 | 0, ie_buf, ie_len, 0, GFP_KERNEL); | 1432 | 0, ie_buf, ie_len, 0, GFP_KERNEL); |
1433 | cfg80211_put_bss(bss); | 1433 | cfg80211_put_bss(priv->wdev->wiphy, bss); |
1434 | memcpy(priv->cfg_bssid, bss_info.bssid, ETH_ALEN); | 1434 | memcpy(priv->cfg_bssid, bss_info.bssid, ETH_ALEN); |
1435 | 1435 | ||
1436 | return 0; | 1436 | return 0; |
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 9189a32b7844..232492487527 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -1746,7 +1746,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, | |||
1746 | .mac_address, ETH_ALEN)) | 1746 | .mac_address, ETH_ALEN)) |
1747 | mwifiex_update_curr_bss_params(priv, | 1747 | mwifiex_update_curr_bss_params(priv, |
1748 | bss); | 1748 | bss); |
1749 | cfg80211_put_bss(bss); | 1749 | cfg80211_put_bss(priv->wdev->wiphy, bss); |
1750 | } | 1750 | } |
1751 | } else { | 1751 | } else { |
1752 | dev_dbg(adapter->dev, "missing BSS channel IE\n"); | 1752 | dev_dbg(adapter->dev, "missing BSS channel IE\n"); |
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index f542bb8ccbc8..ee85b41a4dfd 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -324,7 +324,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
324 | } | 324 | } |
325 | 325 | ||
326 | if (bss) | 326 | if (bss) |
327 | cfg80211_put_bss(bss); | 327 | cfg80211_put_bss(priv->adapter->wiphy, bss); |
328 | } else { | 328 | } else { |
329 | /* Adhoc mode */ | 329 | /* Adhoc mode */ |
330 | /* If the requested SSID matches current SSID, return */ | 330 | /* If the requested SSID matches current SSID, return */ |
@@ -354,7 +354,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
354 | " list. Joining...\n"); | 354 | " list. Joining...\n"); |
355 | ret = mwifiex_adhoc_join(priv, bss_desc); | 355 | ret = mwifiex_adhoc_join(priv, bss_desc); |
356 | if (bss) | 356 | if (bss) |
357 | cfg80211_put_bss(bss); | 357 | cfg80211_put_bss(priv->adapter->wiphy, bss); |
358 | } else { | 358 | } else { |
359 | dev_dbg(adapter->dev, "info: Network not found in " | 359 | dev_dbg(adapter->dev, "info: Network not found in " |
360 | "the list, creating adhoc with ssid = %s\n", | 360 | "the list, creating adhoc with ssid = %s\n", |
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index 96e39edfec77..e8c5714bfd11 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
@@ -125,7 +125,7 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, | |||
125 | cbss = cfg80211_inform_bss(wiphy, channel, bss->a.bssid, timestamp, | 125 | cbss = cfg80211_inform_bss(wiphy, channel, bss->a.bssid, timestamp, |
126 | capability, beacon_interval, ie_buf, ie_len, | 126 | capability, beacon_interval, ie_buf, ie_len, |
127 | signal, GFP_KERNEL); | 127 | signal, GFP_KERNEL); |
128 | cfg80211_put_bss(cbss); | 128 | cfg80211_put_bss(wiphy, cbss); |
129 | } | 129 | } |
130 | 130 | ||
131 | void orinoco_add_extscan_result(struct orinoco_private *priv, | 131 | void orinoco_add_extscan_result(struct orinoco_private *priv, |
@@ -158,7 +158,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
158 | cbss = cfg80211_inform_bss(wiphy, channel, bss->bssid, timestamp, | 158 | cbss = cfg80211_inform_bss(wiphy, channel, bss->bssid, timestamp, |
159 | capability, beacon_interval, ie, ie_len, | 159 | capability, beacon_interval, ie, ie_len, |
160 | signal, GFP_KERNEL); | 160 | signal, GFP_KERNEL); |
161 | cfg80211_put_bss(cbss); | 161 | cfg80211_put_bss(wiphy, cbss); |
162 | } | 162 | } |
163 | 163 | ||
164 | void orinoco_add_hostscan_results(struct orinoco_private *priv, | 164 | void orinoco_add_hostscan_results(struct orinoco_private *priv, |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index abe1d039be81..fe2f272689aa 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2029,7 +2029,7 @@ static bool rndis_bss_info_update(struct usbnet *usbdev, | |||
2029 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid->mac, | 2029 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid->mac, |
2030 | timestamp, capability, beacon_interval, ie, ie_len, signal, | 2030 | timestamp, capability, beacon_interval, ie, ie_len, signal, |
2031 | GFP_KERNEL); | 2031 | GFP_KERNEL); |
2032 | cfg80211_put_bss(bss); | 2032 | cfg80211_put_bss(priv->wdev.wiphy, bss); |
2033 | 2033 | ||
2034 | return (bss != NULL); | 2034 | return (bss != NULL); |
2035 | } | 2035 | } |
@@ -2718,7 +2718,7 @@ static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid, | |||
2718 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid, | 2718 | bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid, |
2719 | timestamp, capability, beacon_period, ie_buf, ie_len, | 2719 | timestamp, capability, beacon_period, ie_buf, ie_len, |
2720 | signal, GFP_KERNEL); | 2720 | signal, GFP_KERNEL); |
2721 | cfg80211_put_bss(bss); | 2721 | cfg80211_put_bss(priv->wdev.wiphy, bss); |
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | /* | 2724 | /* |
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 18c06a59c091..a233f64ca22f 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c | |||
@@ -424,7 +424,7 @@ int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) | |||
424 | goto exit; | 424 | goto exit; |
425 | } | 425 | } |
426 | 426 | ||
427 | cfg80211_put_bss(bss); | 427 | cfg80211_put_bss(wiphy, bss); |
428 | } | 428 | } |
429 | 429 | ||
430 | if (result) | 430 | if (result) |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3ec70e1681d3..691b347545cb 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -3166,19 +3166,21 @@ cfg80211_get_ibss(struct wiphy *wiphy, | |||
3166 | 3166 | ||
3167 | /** | 3167 | /** |
3168 | * cfg80211_ref_bss - reference BSS struct | 3168 | * cfg80211_ref_bss - reference BSS struct |
3169 | * @wiphy: the wiphy this BSS struct belongs to | ||
3169 | * @bss: the BSS struct to reference | 3170 | * @bss: the BSS struct to reference |
3170 | * | 3171 | * |
3171 | * Increments the refcount of the given BSS struct. | 3172 | * Increments the refcount of the given BSS struct. |
3172 | */ | 3173 | */ |
3173 | void cfg80211_ref_bss(struct cfg80211_bss *bss); | 3174 | void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
3174 | 3175 | ||
3175 | /** | 3176 | /** |
3176 | * cfg80211_put_bss - unref BSS struct | 3177 | * cfg80211_put_bss - unref BSS struct |
3178 | * @wiphy: the wiphy this BSS struct belongs to | ||
3177 | * @bss: the BSS struct | 3179 | * @bss: the BSS struct |
3178 | * | 3180 | * |
3179 | * Decrements the refcount of the given BSS struct. | 3181 | * Decrements the refcount of the given BSS struct. |
3180 | */ | 3182 | */ |
3181 | void cfg80211_put_bss(struct cfg80211_bss *bss); | 3183 | void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
3182 | 3184 | ||
3183 | /** | 3185 | /** |
3184 | * cfg80211_unlink_bss - unlink BSS from internal data structures | 3186 | * cfg80211_unlink_bss - unlink BSS from internal data structures |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index a54c8248e0e0..71c55cc0f7b6 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -228,7 +228,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
228 | 228 | ||
229 | bss = cfg80211_inform_bss_frame(local->hw.wiphy, chan, | 229 | bss = cfg80211_inform_bss_frame(local->hw.wiphy, chan, |
230 | mgmt, skb->len, 0, GFP_KERNEL); | 230 | mgmt, skb->len, 0, GFP_KERNEL); |
231 | cfg80211_put_bss(bss); | 231 | cfg80211_put_bss(local->hw.wiphy, bss); |
232 | netif_carrier_on(sdata->dev); | 232 | netif_carrier_on(sdata->dev); |
233 | cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); | 233 | cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL); |
234 | } | 234 | } |
@@ -1159,7 +1159,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
1159 | 1159 | ||
1160 | if (cbss) { | 1160 | if (cbss) { |
1161 | cfg80211_unlink_bss(local->hw.wiphy, cbss); | 1161 | cfg80211_unlink_bss(local->hw.wiphy, cbss); |
1162 | cfg80211_put_bss(cbss); | 1162 | cfg80211_put_bss(local->hw.wiphy, cbss); |
1163 | } | 1163 | } |
1164 | } | 1164 | } |
1165 | 1165 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 353b690900e9..15f2edd08a95 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1934,7 +1934,7 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata, | |||
1934 | ieee80211_vif_release_channel(sdata); | 1934 | ieee80211_vif_release_channel(sdata); |
1935 | } | 1935 | } |
1936 | 1936 | ||
1937 | cfg80211_put_bss(auth_data->bss); | 1937 | cfg80211_put_bss(sdata->local->hw.wiphy, auth_data->bss); |
1938 | kfree(auth_data); | 1938 | kfree(auth_data); |
1939 | sdata->u.mgd.auth_data = NULL; | 1939 | sdata->u.mgd.auth_data = NULL; |
1940 | } | 1940 | } |
@@ -2387,7 +2387,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2387 | if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) { | 2387 | if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) { |
2388 | /* oops -- internal error -- send timeout for now */ | 2388 | /* oops -- internal error -- send timeout for now */ |
2389 | ieee80211_destroy_assoc_data(sdata, false); | 2389 | ieee80211_destroy_assoc_data(sdata, false); |
2390 | cfg80211_put_bss(*bss); | 2390 | cfg80211_put_bss(sdata->local->hw.wiphy, *bss); |
2391 | return RX_MGMT_CFG80211_ASSOC_TIMEOUT; | 2391 | return RX_MGMT_CFG80211_ASSOC_TIMEOUT; |
2392 | } | 2392 | } |
2393 | sdata_info(sdata, "associated\n"); | 2393 | sdata_info(sdata, "associated\n"); |
@@ -3831,7 +3831,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
3831 | } | 3831 | } |
3832 | 3832 | ||
3833 | /* hold our own reference */ | 3833 | /* hold our own reference */ |
3834 | cfg80211_ref_bss(auth_data->bss); | 3834 | cfg80211_ref_bss(local->hw.wiphy, auth_data->bss); |
3835 | err = 0; | 3835 | err = 0; |
3836 | goto out_unlock; | 3836 | goto out_unlock; |
3837 | 3837 | ||
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 7f80f0a5026e..400153f7f21f 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -34,7 +34,8 @@ void ieee80211_rx_bss_put(struct ieee80211_local *local, | |||
34 | { | 34 | { |
35 | if (!bss) | 35 | if (!bss) |
36 | return; | 36 | return; |
37 | cfg80211_put_bss(container_of((void *)bss, struct cfg80211_bss, priv)); | 37 | cfg80211_put_bss(local->hw.wiphy, |
38 | container_of((void *)bss, struct cfg80211_bss, priv)); | ||
38 | } | 39 | } |
39 | 40 | ||
40 | static bool is_uapsd_supported(struct ieee802_11_elems *elems) | 41 | static bool is_uapsd_supported(struct ieee802_11_elems *elems) |
diff --git a/net/wireless/core.c b/net/wireless/core.c index ce827242f390..f0a1bbe95cff 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -715,7 +715,7 @@ void cfg80211_dev_free(struct cfg80211_registered_device *rdev) | |||
715 | kfree(reg); | 715 | kfree(reg); |
716 | } | 716 | } |
717 | list_for_each_entry_safe(scan, tmp, &rdev->bss_list, list) | 717 | list_for_each_entry_safe(scan, tmp, &rdev->bss_list, list) |
718 | cfg80211_put_bss(&scan->pub); | 718 | cfg80211_put_bss(&rdev->wiphy, &scan->pub); |
719 | kfree(rdev); | 719 | kfree(rdev); |
720 | } | 720 | } |
721 | 721 | ||
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 9b9551e4a6f9..d80e47194d49 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -37,7 +37,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid) | |||
37 | 37 | ||
38 | if (wdev->current_bss) { | 38 | if (wdev->current_bss) { |
39 | cfg80211_unhold_bss(wdev->current_bss); | 39 | cfg80211_unhold_bss(wdev->current_bss); |
40 | cfg80211_put_bss(&wdev->current_bss->pub); | 40 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); |
41 | } | 41 | } |
42 | 42 | ||
43 | cfg80211_hold_bss(bss_from_pub(bss)); | 43 | cfg80211_hold_bss(bss_from_pub(bss)); |
@@ -182,7 +182,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext) | |||
182 | 182 | ||
183 | if (wdev->current_bss) { | 183 | if (wdev->current_bss) { |
184 | cfg80211_unhold_bss(wdev->current_bss); | 184 | cfg80211_unhold_bss(wdev->current_bss); |
185 | cfg80211_put_bss(&wdev->current_bss->pub); | 185 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); |
186 | } | 186 | } |
187 | 187 | ||
188 | wdev->current_bss = NULL; | 188 | wdev->current_bss = NULL; |
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index fee9bf70efcf..8e6920728c43 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -58,7 +58,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, | |||
58 | */ | 58 | */ |
59 | if (status_code != WLAN_STATUS_SUCCESS && wdev->conn && | 59 | if (status_code != WLAN_STATUS_SUCCESS && wdev->conn && |
60 | cfg80211_sme_failed_reassoc(wdev)) { | 60 | cfg80211_sme_failed_reassoc(wdev)) { |
61 | cfg80211_put_bss(bss); | 61 | cfg80211_put_bss(wiphy, bss); |
62 | goto out; | 62 | goto out; |
63 | } | 63 | } |
64 | 64 | ||
@@ -70,7 +70,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, | |||
70 | * do not call connect_result() now because the | 70 | * do not call connect_result() now because the |
71 | * sme will schedule work that does it later. | 71 | * sme will schedule work that does it later. |
72 | */ | 72 | */ |
73 | cfg80211_put_bss(bss); | 73 | cfg80211_put_bss(wiphy, bss); |
74 | goto out; | 74 | goto out; |
75 | } | 75 | } |
76 | 76 | ||
@@ -108,7 +108,7 @@ void __cfg80211_send_deauth(struct net_device *dev, | |||
108 | if (wdev->current_bss && | 108 | if (wdev->current_bss && |
109 | ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) { | 109 | ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) { |
110 | cfg80211_unhold_bss(wdev->current_bss); | 110 | cfg80211_unhold_bss(wdev->current_bss); |
111 | cfg80211_put_bss(&wdev->current_bss->pub); | 111 | cfg80211_put_bss(wiphy, &wdev->current_bss->pub); |
112 | wdev->current_bss = NULL; | 112 | wdev->current_bss = NULL; |
113 | was_current = true; | 113 | was_current = true; |
114 | } | 114 | } |
@@ -164,7 +164,7 @@ void __cfg80211_send_disassoc(struct net_device *dev, | |||
164 | ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) { | 164 | ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) { |
165 | cfg80211_sme_disassoc(dev, wdev->current_bss); | 165 | cfg80211_sme_disassoc(dev, wdev->current_bss); |
166 | cfg80211_unhold_bss(wdev->current_bss); | 166 | cfg80211_unhold_bss(wdev->current_bss); |
167 | cfg80211_put_bss(&wdev->current_bss->pub); | 167 | cfg80211_put_bss(wiphy, &wdev->current_bss->pub); |
168 | wdev->current_bss = NULL; | 168 | wdev->current_bss = NULL; |
169 | } else | 169 | } else |
170 | WARN_ON(1); | 170 | WARN_ON(1); |
@@ -324,7 +324,7 @@ int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev, | |||
324 | err = rdev_auth(rdev, dev, &req); | 324 | err = rdev_auth(rdev, dev, &req); |
325 | 325 | ||
326 | out: | 326 | out: |
327 | cfg80211_put_bss(req.bss); | 327 | cfg80211_put_bss(&rdev->wiphy, req.bss); |
328 | return err; | 328 | return err; |
329 | } | 329 | } |
330 | 330 | ||
@@ -432,7 +432,7 @@ out: | |||
432 | if (err) { | 432 | if (err) { |
433 | if (was_connected) | 433 | if (was_connected) |
434 | wdev->sme_state = CFG80211_SME_CONNECTED; | 434 | wdev->sme_state = CFG80211_SME_CONNECTED; |
435 | cfg80211_put_bss(req.bss); | 435 | cfg80211_put_bss(&rdev->wiphy, req.bss); |
436 | } | 436 | } |
437 | 437 | ||
438 | return err; | 438 | return err; |
@@ -572,7 +572,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev, | |||
572 | 572 | ||
573 | if (wdev->current_bss) { | 573 | if (wdev->current_bss) { |
574 | cfg80211_unhold_bss(wdev->current_bss); | 574 | cfg80211_unhold_bss(wdev->current_bss); |
575 | cfg80211_put_bss(&wdev->current_bss->pub); | 575 | cfg80211_put_bss(&rdev->wiphy, &wdev->current_bss->pub); |
576 | wdev->current_bss = NULL; | 576 | wdev->current_bss = NULL; |
577 | } | 577 | } |
578 | } | 578 | } |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 36daacb31788..dacb44ac2f74 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -818,7 +818,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
818 | } | 818 | } |
819 | EXPORT_SYMBOL(cfg80211_inform_bss_frame); | 819 | EXPORT_SYMBOL(cfg80211_inform_bss_frame); |
820 | 820 | ||
821 | void cfg80211_ref_bss(struct cfg80211_bss *pub) | 821 | void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) |
822 | { | 822 | { |
823 | struct cfg80211_internal_bss *bss; | 823 | struct cfg80211_internal_bss *bss; |
824 | 824 | ||
@@ -830,7 +830,7 @@ void cfg80211_ref_bss(struct cfg80211_bss *pub) | |||
830 | } | 830 | } |
831 | EXPORT_SYMBOL(cfg80211_ref_bss); | 831 | EXPORT_SYMBOL(cfg80211_ref_bss); |
832 | 832 | ||
833 | void cfg80211_put_bss(struct cfg80211_bss *pub) | 833 | void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) |
834 | { | 834 | { |
835 | struct cfg80211_internal_bss *bss; | 835 | struct cfg80211_internal_bss *bss; |
836 | 836 | ||
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index a825dfe12cf7..f432bd3755b1 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -301,7 +301,7 @@ static void __cfg80211_sme_scan_done(struct net_device *dev) | |||
301 | 301 | ||
302 | bss = cfg80211_get_conn_bss(wdev); | 302 | bss = cfg80211_get_conn_bss(wdev); |
303 | if (bss) { | 303 | if (bss) { |
304 | cfg80211_put_bss(bss); | 304 | cfg80211_put_bss(&rdev->wiphy, bss); |
305 | } else { | 305 | } else { |
306 | /* not found */ | 306 | /* not found */ |
307 | if (wdev->conn->state == CFG80211_CONN_SCAN_AGAIN) | 307 | if (wdev->conn->state == CFG80211_CONN_SCAN_AGAIN) |
@@ -464,7 +464,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
464 | 464 | ||
465 | if (wdev->current_bss) { | 465 | if (wdev->current_bss) { |
466 | cfg80211_unhold_bss(wdev->current_bss); | 466 | cfg80211_unhold_bss(wdev->current_bss); |
467 | cfg80211_put_bss(&wdev->current_bss->pub); | 467 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); |
468 | wdev->current_bss = NULL; | 468 | wdev->current_bss = NULL; |
469 | } | 469 | } |
470 | 470 | ||
@@ -480,7 +480,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
480 | kfree(wdev->connect_keys); | 480 | kfree(wdev->connect_keys); |
481 | wdev->connect_keys = NULL; | 481 | wdev->connect_keys = NULL; |
482 | wdev->ssid_len = 0; | 482 | wdev->ssid_len = 0; |
483 | cfg80211_put_bss(bss); | 483 | cfg80211_put_bss(wdev->wiphy, bss); |
484 | return; | 484 | return; |
485 | } | 485 | } |
486 | 486 | ||
@@ -586,7 +586,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev, | |||
586 | } | 586 | } |
587 | 587 | ||
588 | cfg80211_unhold_bss(wdev->current_bss); | 588 | cfg80211_unhold_bss(wdev->current_bss); |
589 | cfg80211_put_bss(&wdev->current_bss->pub); | 589 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); |
590 | wdev->current_bss = NULL; | 590 | wdev->current_bss = NULL; |
591 | 591 | ||
592 | cfg80211_hold_bss(bss_from_pub(bss)); | 592 | cfg80211_hold_bss(bss_from_pub(bss)); |
@@ -621,7 +621,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev, | |||
621 | 621 | ||
622 | return; | 622 | return; |
623 | out: | 623 | out: |
624 | cfg80211_put_bss(bss); | 624 | cfg80211_put_bss(wdev->wiphy, bss); |
625 | } | 625 | } |
626 | 626 | ||
627 | void cfg80211_roamed(struct net_device *dev, | 627 | void cfg80211_roamed(struct net_device *dev, |
@@ -663,7 +663,7 @@ void cfg80211_roamed_bss(struct net_device *dev, | |||
663 | 663 | ||
664 | ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); | 664 | ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp); |
665 | if (!ev) { | 665 | if (!ev) { |
666 | cfg80211_put_bss(bss); | 666 | cfg80211_put_bss(wdev->wiphy, bss); |
667 | return; | 667 | return; |
668 | } | 668 | } |
669 | 669 | ||
@@ -704,7 +704,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, | |||
704 | 704 | ||
705 | if (wdev->current_bss) { | 705 | if (wdev->current_bss) { |
706 | cfg80211_unhold_bss(wdev->current_bss); | 706 | cfg80211_unhold_bss(wdev->current_bss); |
707 | cfg80211_put_bss(&wdev->current_bss->pub); | 707 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); |
708 | } | 708 | } |
709 | 709 | ||
710 | wdev->current_bss = NULL; | 710 | wdev->current_bss = NULL; |
@@ -875,7 +875,7 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev, | |||
875 | if (bss) { | 875 | if (bss) { |
876 | wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT; | 876 | wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT; |
877 | err = cfg80211_conn_do_work(wdev); | 877 | err = cfg80211_conn_do_work(wdev); |
878 | cfg80211_put_bss(bss); | 878 | cfg80211_put_bss(wdev->wiphy, bss); |
879 | } else { | 879 | } else { |
880 | /* otherwise we'll need to scan for the AP first */ | 880 | /* otherwise we'll need to scan for the AP first */ |
881 | err = cfg80211_conn_scan(wdev); | 881 | err = cfg80211_conn_scan(wdev); |