diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-12-28 08:32:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:43 -0500 |
commit | 471b3efdfccc257591331724145f8ccf8b3217e1 (patch) | |
tree | c9e576442c7b62c8c667ae1046e560323f0821fd /include/net/mac80211.h | |
parent | 2bc454b0b30b3645d114689b64321cb49be99923 (diff) |
mac80211: add unified BSS configuration
This patch (based on Ron Rindjunsky's) creates a framework for
a unified way to pass BSS configuration to drivers that require
the information, e.g. for implementing power save mode.
This patch introduces new ieee80211_bss_conf structure that is
passed to the driver via the new bss_info_changed() callback
when the BSS configuration changes.
This new BSS configuration infrastructure adds the following
new features:
* drivers are notified of their association AID
* drivers are notified of association status
and replaces the erp_ie_changed() callback. The patch also does
the relevant driver updates for the latter change.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
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 | 66 |
1 files changed, 49 insertions, 17 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8a49c06dfd38..9083bafb63ca 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -275,6 +275,43 @@ struct ieee80211_low_level_stats { | |||
275 | unsigned int dot11RTSSuccessCount; | 275 | unsigned int dot11RTSSuccessCount; |
276 | }; | 276 | }; |
277 | 277 | ||
278 | /** | ||
279 | * enum ieee80211_bss_change - BSS change notification flags | ||
280 | * | ||
281 | * These flags are used with the bss_info_changed() callback | ||
282 | * to indicate which BSS parameter changed. | ||
283 | * | ||
284 | * @BSS_CHANGED_ASSOC: association status changed (associated/disassociated), | ||
285 | * also implies a change in the AID. | ||
286 | * @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed | ||
287 | * @BSS_CHANGED_ERP_PREAMBLE: preamble changed | ||
288 | */ | ||
289 | enum ieee80211_bss_change { | ||
290 | BSS_CHANGED_ASSOC = 1<<0, | ||
291 | BSS_CHANGED_ERP_CTS_PROT = 1<<1, | ||
292 | BSS_CHANGED_ERP_PREAMBLE = 1<<2, | ||
293 | }; | ||
294 | |||
295 | /** | ||
296 | * struct ieee80211_bss_conf - holds the BSS's changing parameters | ||
297 | * | ||
298 | * This structure keeps information about a BSS (and an association | ||
299 | * to that BSS) that can change during the lifetime of the BSS. | ||
300 | * | ||
301 | * @assoc: association status | ||
302 | * @aid: association ID number, valid only when @assoc is true | ||
303 | * @use_cts_prot: use CTS protection | ||
304 | * @use_short_preamble: use 802.11b short preamble | ||
305 | */ | ||
306 | struct ieee80211_bss_conf { | ||
307 | /* association related data */ | ||
308 | bool assoc; | ||
309 | u16 aid; | ||
310 | /* erp related data */ | ||
311 | bool use_cts_prot; | ||
312 | bool use_short_preamble; | ||
313 | }; | ||
314 | |||
278 | /* Transmit control fields. This data structure is passed to low-level driver | 315 | /* Transmit control fields. This data structure is passed to low-level driver |
279 | * with each TX frame. The low-level driver is responsible for configuring | 316 | * with each TX frame. The low-level driver is responsible for configuring |
280 | * the hardware to use given values (depending on what is supported). */ | 317 | * the hardware to use given values (depending on what is supported). */ |
@@ -924,19 +961,6 @@ enum ieee80211_filter_flags { | |||
924 | }; | 961 | }; |
925 | 962 | ||
926 | /** | 963 | /** |
927 | * enum ieee80211_erp_change_flags - erp change flags | ||
928 | * | ||
929 | * These flags are used with the erp_ie_changed() callback in | ||
930 | * &struct ieee80211_ops to indicate which parameter(s) changed. | ||
931 | * @IEEE80211_ERP_CHANGE_PROTECTION: protection changed | ||
932 | * @IEEE80211_ERP_CHANGE_PREAMBLE: barker preamble mode changed | ||
933 | */ | ||
934 | enum ieee80211_erp_change_flags { | ||
935 | IEEE80211_ERP_CHANGE_PROTECTION = 1<<0, | ||
936 | IEEE80211_ERP_CHANGE_PREAMBLE = 1<<1, | ||
937 | }; | ||
938 | |||
939 | /** | ||
940 | * enum ieee80211_ampdu_mlme_action - A-MPDU actions | 964 | * enum ieee80211_ampdu_mlme_action - A-MPDU actions |
941 | * | 965 | * |
942 | * These flags are used with the ampdu_action() callback in | 966 | * These flags are used with the ampdu_action() callback in |
@@ -1004,6 +1028,14 @@ enum ieee80211_ampdu_mlme_action { | |||
1004 | * @config_interface: Handler for configuration requests related to interfaces | 1028 | * @config_interface: Handler for configuration requests related to interfaces |
1005 | * (e.g. BSSID changes.) | 1029 | * (e.g. BSSID changes.) |
1006 | * | 1030 | * |
1031 | * @bss_info_changed: Handler for configuration requests related to BSS | ||
1032 | * parameters that may vary during BSS's lifespan, and may affect low | ||
1033 | * level driver (e.g. assoc/disassoc status, erp parameters). | ||
1034 | * This function should not be used if no BSS has been set, unless | ||
1035 | * for association indication. The @changed parameter indicates which | ||
1036 | * of the bss parameters has changed when a call is made. This callback | ||
1037 | * has to be atomic. | ||
1038 | * | ||
1007 | * @configure_filter: Configure the device's RX filter. | 1039 | * @configure_filter: Configure the device's RX filter. |
1008 | * See the section "Frame filtering" for more information. | 1040 | * See the section "Frame filtering" for more information. |
1009 | * This callback must be implemented and atomic. | 1041 | * This callback must be implemented and atomic. |
@@ -1038,8 +1070,6 @@ enum ieee80211_ampdu_mlme_action { | |||
1038 | * @sta_notify: Notifies low level driver about addition or removal | 1070 | * @sta_notify: Notifies low level driver about addition or removal |
1039 | * of assocaited station or AP. | 1071 | * of assocaited station or AP. |
1040 | * | 1072 | * |
1041 | * @erp_ie_changed: Handle ERP IE change notifications. Must be atomic. | ||
1042 | * | ||
1043 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), | 1073 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), |
1044 | * bursting) for a hardware TX queue. The @queue parameter uses the | 1074 | * bursting) for a hardware TX queue. The @queue parameter uses the |
1045 | * %IEEE80211_TX_QUEUE_* constants. Must be atomic. | 1075 | * %IEEE80211_TX_QUEUE_* constants. Must be atomic. |
@@ -1096,6 +1126,10 @@ struct ieee80211_ops { | |||
1096 | int (*config_interface)(struct ieee80211_hw *hw, | 1126 | int (*config_interface)(struct ieee80211_hw *hw, |
1097 | struct ieee80211_vif *vif, | 1127 | struct ieee80211_vif *vif, |
1098 | struct ieee80211_if_conf *conf); | 1128 | struct ieee80211_if_conf *conf); |
1129 | void (*bss_info_changed)(struct ieee80211_hw *hw, | ||
1130 | struct ieee80211_vif *vif, | ||
1131 | struct ieee80211_bss_conf *info, | ||
1132 | u32 changed); | ||
1099 | void (*configure_filter)(struct ieee80211_hw *hw, | 1133 | void (*configure_filter)(struct ieee80211_hw *hw, |
1100 | unsigned int changed_flags, | 1134 | unsigned int changed_flags, |
1101 | unsigned int *total_flags, | 1135 | unsigned int *total_flags, |
@@ -1115,8 +1149,6 @@ struct ieee80211_ops { | |||
1115 | u32 short_retry, u32 long_retr); | 1149 | u32 short_retry, u32 long_retr); |
1116 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1150 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
1117 | enum sta_notify_cmd, const u8 *addr); | 1151 | enum sta_notify_cmd, const u8 *addr); |
1118 | void (*erp_ie_changed)(struct ieee80211_hw *hw, u8 changes, | ||
1119 | int cts_protection, int preamble); | ||
1120 | int (*conf_tx)(struct ieee80211_hw *hw, int queue, | 1152 | int (*conf_tx)(struct ieee80211_hw *hw, int queue, |
1121 | const struct ieee80211_tx_queue_params *params); | 1153 | const struct ieee80211_tx_queue_params *params); |
1122 | int (*get_tx_stats)(struct ieee80211_hw *hw, | 1154 | int (*get_tx_stats)(struct ieee80211_hw *hw, |