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 /net/mac80211 | |
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ibss.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 6 | ||||
-rw-r--r-- | net/mac80211/scan.c | 3 |
3 files changed, 7 insertions, 6 deletions
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) |