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 /include/net/mac80211.h | |
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 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 22c65e8cbb71..7806e22f4ace 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -150,6 +150,12 @@ struct ieee80211_low_level_stats { | |||
150 | * @BSS_CHANGED_HT: 802.11n parameters changed | 150 | * @BSS_CHANGED_HT: 802.11n parameters changed |
151 | * @BSS_CHANGED_BASIC_RATES: Basic rateset changed | 151 | * @BSS_CHANGED_BASIC_RATES: Basic rateset changed |
152 | * @BSS_CHANGED_BEACON_INT: Beacon interval changed | 152 | * @BSS_CHANGED_BEACON_INT: Beacon interval changed |
153 | * @BSS_CHANGED_BSSID: BSSID changed, for whatever | ||
154 | * reason (IBSS and managed mode) | ||
155 | * @BSS_CHANGED_BEACON: Beacon data changed, retrieve | ||
156 | * new beacon (beaconing modes) | ||
157 | * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be | ||
158 | * enabled/disabled (beaconing modes) | ||
153 | */ | 159 | */ |
154 | enum ieee80211_bss_change { | 160 | enum ieee80211_bss_change { |
155 | BSS_CHANGED_ASSOC = 1<<0, | 161 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -159,6 +165,9 @@ enum ieee80211_bss_change { | |||
159 | BSS_CHANGED_HT = 1<<4, | 165 | BSS_CHANGED_HT = 1<<4, |
160 | BSS_CHANGED_BASIC_RATES = 1<<5, | 166 | BSS_CHANGED_BASIC_RATES = 1<<5, |
161 | BSS_CHANGED_BEACON_INT = 1<<6, | 167 | BSS_CHANGED_BEACON_INT = 1<<6, |
168 | BSS_CHANGED_BSSID = 1<<7, | ||
169 | BSS_CHANGED_BEACON = 1<<8, | ||
170 | BSS_CHANGED_BEACON_ENABLED = 1<<9, | ||
162 | }; | 171 | }; |
163 | 172 | ||
164 | /** | 173 | /** |
@@ -192,8 +201,11 @@ struct ieee80211_bss_ht_conf { | |||
192 | * @basic_rates: bitmap of basic rates, each bit stands for an | 201 | * @basic_rates: bitmap of basic rates, each bit stands for an |
193 | * index into the rate table configured by the driver in | 202 | * index into the rate table configured by the driver in |
194 | * the current band. | 203 | * the current band. |
204 | * @bssid: The BSSID for this BSS | ||
205 | * @enable_beacon: whether beaconing should be enabled or not | ||
195 | */ | 206 | */ |
196 | struct ieee80211_bss_conf { | 207 | struct ieee80211_bss_conf { |
208 | const u8 *bssid; | ||
197 | /* association related data */ | 209 | /* association related data */ |
198 | bool assoc; | 210 | bool assoc; |
199 | u16 aid; | 211 | u16 aid; |
@@ -201,6 +213,7 @@ struct ieee80211_bss_conf { | |||
201 | bool use_cts_prot; | 213 | bool use_cts_prot; |
202 | bool use_short_preamble; | 214 | bool use_short_preamble; |
203 | bool use_short_slot; | 215 | bool use_short_slot; |
216 | bool enable_beacon; | ||
204 | u8 dtim_period; | 217 | u8 dtim_period; |
205 | u16 beacon_int; | 218 | u16 beacon_int; |
206 | u16 assoc_capability; | 219 | u16 assoc_capability; |
@@ -660,37 +673,6 @@ struct ieee80211_if_init_conf { | |||
660 | }; | 673 | }; |
661 | 674 | ||
662 | /** | 675 | /** |
663 | * enum ieee80211_if_conf_change - interface config change flags | ||
664 | * | ||
665 | * @IEEE80211_IFCC_BSSID: The BSSID changed. | ||
666 | * @IEEE80211_IFCC_BEACON: The beacon for this interface changed | ||
667 | * (currently AP and MESH only), use ieee80211_beacon_get(). | ||
668 | * @IEEE80211_IFCC_BEACON_ENABLED: The enable_beacon value changed. | ||
669 | */ | ||
670 | enum ieee80211_if_conf_change { | ||
671 | IEEE80211_IFCC_BSSID = BIT(0), | ||
672 | IEEE80211_IFCC_BEACON = BIT(1), | ||
673 | IEEE80211_IFCC_BEACON_ENABLED = BIT(2), | ||
674 | }; | ||
675 | |||
676 | /** | ||
677 | * struct ieee80211_if_conf - configuration of an interface | ||
678 | * | ||
679 | * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. | ||
680 | * @bssid: BSSID of the network we are associated to/creating. | ||
681 | * @enable_beacon: Indicates whether beacons can be sent. | ||
682 | * This is valid only for AP/IBSS/MESH modes. | ||
683 | * | ||
684 | * This structure is passed to the config_interface() callback of | ||
685 | * &struct ieee80211_hw. | ||
686 | */ | ||
687 | struct ieee80211_if_conf { | ||
688 | u32 changed; | ||
689 | const u8 *bssid; | ||
690 | bool enable_beacon; | ||
691 | }; | ||
692 | |||
693 | /** | ||
694 | * enum ieee80211_key_alg - key algorithm | 676 | * enum ieee80211_key_alg - key algorithm |
695 | * @ALG_WEP: WEP40 or WEP104 | 677 | * @ALG_WEP: WEP40 or WEP104 |
696 | * @ALG_TKIP: TKIP | 678 | * @ALG_TKIP: TKIP |
@@ -1358,10 +1340,6 @@ enum ieee80211_ampdu_mlme_action { | |||
1358 | * This function should never fail but returns a negative error code | 1340 | * This function should never fail but returns a negative error code |
1359 | * if it does. | 1341 | * if it does. |
1360 | * | 1342 | * |
1361 | * @config_interface: Handler for configuration requests related to interfaces | ||
1362 | * (e.g. BSSID changes.) | ||
1363 | * Returns a negative error code which will be seen in userspace. | ||
1364 | * | ||
1365 | * @bss_info_changed: Handler for configuration requests related to BSS | 1343 | * @bss_info_changed: Handler for configuration requests related to BSS |
1366 | * parameters that may vary during BSS's lifespan, and may affect low | 1344 | * parameters that may vary during BSS's lifespan, and may affect low |
1367 | * level driver (e.g. assoc/disassoc status, erp parameters). | 1345 | * level driver (e.g. assoc/disassoc status, erp parameters). |
@@ -1463,9 +1441,6 @@ struct ieee80211_ops { | |||
1463 | void (*remove_interface)(struct ieee80211_hw *hw, | 1441 | void (*remove_interface)(struct ieee80211_hw *hw, |
1464 | struct ieee80211_if_init_conf *conf); | 1442 | struct ieee80211_if_init_conf *conf); |
1465 | int (*config)(struct ieee80211_hw *hw, u32 changed); | 1443 | int (*config)(struct ieee80211_hw *hw, u32 changed); |
1466 | int (*config_interface)(struct ieee80211_hw *hw, | ||
1467 | struct ieee80211_vif *vif, | ||
1468 | struct ieee80211_if_conf *conf); | ||
1469 | void (*bss_info_changed)(struct ieee80211_hw *hw, | 1444 | void (*bss_info_changed)(struct ieee80211_hw *hw, |
1470 | struct ieee80211_vif *vif, | 1445 | struct ieee80211_vif *vif, |
1471 | struct ieee80211_bss_conf *info, | 1446 | struct ieee80211_bss_conf *info, |