aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h6
-rw-r--r--net/mac80211/ibss.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a36e0df5a17c..2879c8ef5571 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -145,6 +145,7 @@ struct ieee80211_low_level_stats {
145 * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be 145 * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be
146 * enabled/disabled (beaconing modes) 146 * enabled/disabled (beaconing modes)
147 * @BSS_CHANGED_CQM: Connection quality monitor config changed 147 * @BSS_CHANGED_CQM: Connection quality monitor config changed
148 * @BSS_CHANGED_IBSS: IBSS join status changed
148 */ 149 */
149enum ieee80211_bss_change { 150enum ieee80211_bss_change {
150 BSS_CHANGED_ASSOC = 1<<0, 151 BSS_CHANGED_ASSOC = 1<<0,
@@ -158,6 +159,7 @@ enum ieee80211_bss_change {
158 BSS_CHANGED_BEACON = 1<<8, 159 BSS_CHANGED_BEACON = 1<<8,
159 BSS_CHANGED_BEACON_ENABLED = 1<<9, 160 BSS_CHANGED_BEACON_ENABLED = 1<<9,
160 BSS_CHANGED_CQM = 1<<10, 161 BSS_CHANGED_CQM = 1<<10,
162 BSS_CHANGED_IBSS = 1<<11,
161}; 163};
162 164
163/** 165/**
@@ -167,6 +169,8 @@ enum ieee80211_bss_change {
167 * to that BSS) that can change during the lifetime of the BSS. 169 * to that BSS) that can change during the lifetime of the BSS.
168 * 170 *
169 * @assoc: association status 171 * @assoc: association status
172 * @ibss_joined: indicates whether this station is part of an IBSS
173 * or not
170 * @aid: association ID number, valid only when @assoc is true 174 * @aid: association ID number, valid only when @assoc is true
171 * @use_cts_prot: use CTS protection 175 * @use_cts_prot: use CTS protection
172 * @use_short_preamble: use 802.11b short preamble; 176 * @use_short_preamble: use 802.11b short preamble;
@@ -194,7 +198,7 @@ enum ieee80211_bss_change {
194struct ieee80211_bss_conf { 198struct ieee80211_bss_conf {
195 const u8 *bssid; 199 const u8 *bssid;
196 /* association related data */ 200 /* association related data */
197 bool assoc; 201 bool assoc, ibss_joined;
198 u16 aid; 202 u16 aid;
199 /* erp related data */ 203 /* erp related data */
200 bool use_cts_prot; 204 bool use_cts_prot;
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 01974c2510a8..a87e309e3b99 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -170,6 +170,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
170 bss_change |= BSS_CHANGED_BSSID; 170 bss_change |= BSS_CHANGED_BSSID;
171 bss_change |= BSS_CHANGED_BEACON; 171 bss_change |= BSS_CHANGED_BEACON;
172 bss_change |= BSS_CHANGED_BEACON_ENABLED; 172 bss_change |= BSS_CHANGED_BEACON_ENABLED;
173 bss_change |= BSS_CHANGED_IBSS;
174 sdata->vif.bss_conf.ibss_joined = true;
173 ieee80211_bss_info_change_notify(sdata, bss_change); 175 ieee80211_bss_info_change_notify(sdata, bss_change);
174 176
175 ieee80211_sta_def_wmm_params(sdata, sband->n_bitrates, supp_rates); 177 ieee80211_sta_def_wmm_params(sdata, sband->n_bitrates, supp_rates);
@@ -950,7 +952,9 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
950 kfree(sdata->u.ibss.ie); 952 kfree(sdata->u.ibss.ie);
951 skb = sdata->u.ibss.presp; 953 skb = sdata->u.ibss.presp;
952 rcu_assign_pointer(sdata->u.ibss.presp, NULL); 954 rcu_assign_pointer(sdata->u.ibss.presp, NULL);
953 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); 955 sdata->vif.bss_conf.ibss_joined = false;
956 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
957 BSS_CHANGED_IBSS);
954 synchronize_rcu(); 958 synchronize_rcu();
955 kfree_skb(skb); 959 kfree_skb(skb);
956 960