diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 10:13:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:36 -0400 |
commit | 2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (patch) | |
tree | 9bf3cdfcbbefcb34f5984e6d797f488ebe358196 /net/mac80211/ibss.c | |
parent | 57c4d7b4c4986037be51476b8e3025d5ba18d8b8 (diff) |
mac80211: unify config_interface and bss_info_changed
The config_interface method is a little strange, it contains the
BSSID and beacon updates, while bss_info_changed contains most
other BSS information for each interface. This patch removes
config_interface and rolls all the information it previously
passed to drivers into bss_info_changed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index f4879dad3cd7..c87caad383f0 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -95,17 +95,10 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
95 | 95 | ||
96 | sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; | 96 | sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; |
97 | 97 | ||
98 | ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); | ||
99 | |||
100 | local->oper_channel = chan; | 98 | local->oper_channel = chan; |
101 | local->oper_channel_type = NL80211_CHAN_NO_HT; | 99 | local->oper_channel_type = NL80211_CHAN_NO_HT; |
102 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | 100 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); |
103 | 101 | ||
104 | sdata->vif.bss_conf.beacon_int = beacon_int; | ||
105 | bss_change = BSS_CHANGED_BEACON_INT; | ||
106 | bss_change |= ieee80211_reset_erp_info(sdata); | ||
107 | ieee80211_bss_info_change_notify(sdata, bss_change); | ||
108 | |||
109 | sband = local->hw.wiphy->bands[chan->band]; | 102 | sband = local->hw.wiphy->bands[chan->band]; |
110 | 103 | ||
111 | /* Build IBSS probe response */ | 104 | /* Build IBSS probe response */ |
@@ -161,8 +154,13 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
161 | 154 | ||
162 | rcu_assign_pointer(ifibss->presp, skb); | 155 | rcu_assign_pointer(ifibss->presp, skb); |
163 | 156 | ||
164 | ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON | | 157 | sdata->vif.bss_conf.beacon_int = beacon_int; |
165 | IEEE80211_IFCC_BEACON_ENABLED); | 158 | bss_change = BSS_CHANGED_BEACON_INT; |
159 | bss_change |= ieee80211_reset_erp_info(sdata); | ||
160 | bss_change |= BSS_CHANGED_BSSID; | ||
161 | bss_change |= BSS_CHANGED_BEACON; | ||
162 | bss_change |= BSS_CHANGED_BEACON_ENABLED; | ||
163 | ieee80211_bss_info_change_notify(sdata, bss_change); | ||
166 | 164 | ||
167 | rates = 0; | 165 | rates = 0; |
168 | for (i = 0; i < supp_rates_len; i++) { | 166 | for (i = 0; i < supp_rates_len; i++) { |
@@ -887,7 +885,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) | |||
887 | kfree(sdata->u.ibss.ie); | 885 | kfree(sdata->u.ibss.ie); |
888 | skb = sdata->u.ibss.presp; | 886 | skb = sdata->u.ibss.presp; |
889 | rcu_assign_pointer(sdata->u.ibss.presp, NULL); | 887 | rcu_assign_pointer(sdata->u.ibss.presp, NULL); |
890 | ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON_ENABLED); | 888 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); |
891 | synchronize_rcu(); | 889 | synchronize_rcu(); |
892 | kfree_skb(skb); | 890 | kfree_skb(skb); |
893 | 891 | ||