diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2008-08-07 13:07:01 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-29 16:23:55 -0400 |
commit | 9f1ba9062e032fb7b395cd27fc564754fe4e9867 (patch) | |
tree | 6610106cd769aa3cc144b7a4f1547e07eeba5c88 /include/net | |
parent | 7f93ea3e246db512c0c17b79847f57dd3a2891e1 (diff) |
mac80211/cfg80211: Add BSS configuration options for AP mode
This change adds a new cfg80211 command, NL80211_CMD_SET_BSS, to allow
AP mode BSS parameters to be changed from user space (e.g., hostapd).
The drivers using mac80211 are expected to be modified with separate
changes to use the new BSS info parameter for short slot time in the
bss_info_changed() handler.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 22 | ||||
-rw-r--r-- | include/net/mac80211.h | 9 |
2 files changed, 31 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index e00750836ba5..7afef14d5c5b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -268,6 +268,23 @@ struct mpath_info { | |||
268 | u8 flags; | 268 | u8 flags; |
269 | }; | 269 | }; |
270 | 270 | ||
271 | /** | ||
272 | * struct bss_parameters - BSS parameters | ||
273 | * | ||
274 | * Used to change BSS parameters (mainly for AP mode). | ||
275 | * | ||
276 | * @use_cts_prot: Whether to use CTS protection | ||
277 | * (0 = no, 1 = yes, -1 = do not change) | ||
278 | * @use_short_preamble: Whether the use of short preambles is allowed | ||
279 | * (0 = no, 1 = yes, -1 = do not change) | ||
280 | * @use_short_slot_time: Whether the use of short slot time is allowed | ||
281 | * (0 = no, 1 = yes, -1 = do not change) | ||
282 | */ | ||
283 | struct bss_parameters { | ||
284 | int use_cts_prot; | ||
285 | int use_short_preamble; | ||
286 | int use_short_slot_time; | ||
287 | }; | ||
271 | 288 | ||
272 | /* from net/wireless.h */ | 289 | /* from net/wireless.h */ |
273 | struct wiphy; | 290 | struct wiphy; |
@@ -318,6 +335,8 @@ struct wiphy; | |||
318 | * @change_station: Modify a given station. | 335 | * @change_station: Modify a given station. |
319 | * | 336 | * |
320 | * @set_mesh_cfg: set mesh parameters (by now, just mesh id) | 337 | * @set_mesh_cfg: set mesh parameters (by now, just mesh id) |
338 | * | ||
339 | * @change_bss: Modify parameters for a given BSS. | ||
321 | */ | 340 | */ |
322 | struct cfg80211_ops { | 341 | struct cfg80211_ops { |
323 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 342 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
@@ -370,6 +389,9 @@ struct cfg80211_ops { | |||
370 | int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, | 389 | int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, |
371 | int idx, u8 *dst, u8 *next_hop, | 390 | int idx, u8 *dst, u8 *next_hop, |
372 | struct mpath_info *pinfo); | 391 | struct mpath_info *pinfo); |
392 | |||
393 | int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, | ||
394 | struct bss_parameters *params); | ||
373 | }; | 395 | }; |
374 | 396 | ||
375 | #endif /* __NET_CFG80211_H */ | 397 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0fdc3dabc964..7c399a9c11da 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -158,12 +158,14 @@ struct ieee80211_low_level_stats { | |||
158 | * also implies a change in the AID. | 158 | * also implies a change in the AID. |
159 | * @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed | 159 | * @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed |
160 | * @BSS_CHANGED_ERP_PREAMBLE: preamble changed | 160 | * @BSS_CHANGED_ERP_PREAMBLE: preamble changed |
161 | * @BSS_CHANGED_ERP_SLOT: slot timing changed | ||
161 | * @BSS_CHANGED_HT: 802.11n parameters changed | 162 | * @BSS_CHANGED_HT: 802.11n parameters changed |
162 | */ | 163 | */ |
163 | enum ieee80211_bss_change { | 164 | enum ieee80211_bss_change { |
164 | BSS_CHANGED_ASSOC = 1<<0, | 165 | BSS_CHANGED_ASSOC = 1<<0, |
165 | BSS_CHANGED_ERP_CTS_PROT = 1<<1, | 166 | BSS_CHANGED_ERP_CTS_PROT = 1<<1, |
166 | BSS_CHANGED_ERP_PREAMBLE = 1<<2, | 167 | BSS_CHANGED_ERP_PREAMBLE = 1<<2, |
168 | BSS_CHANGED_ERP_SLOT = 1<<3, | ||
167 | BSS_CHANGED_HT = 1<<4, | 169 | BSS_CHANGED_HT = 1<<4, |
168 | }; | 170 | }; |
169 | 171 | ||
@@ -177,6 +179,7 @@ enum ieee80211_bss_change { | |||
177 | * @aid: association ID number, valid only when @assoc is true | 179 | * @aid: association ID number, valid only when @assoc is true |
178 | * @use_cts_prot: use CTS protection | 180 | * @use_cts_prot: use CTS protection |
179 | * @use_short_preamble: use 802.11b short preamble | 181 | * @use_short_preamble: use 802.11b short preamble |
182 | * @use_short_slot: use short slot time (only relevant for ERP) | ||
180 | * @dtim_period: num of beacons before the next DTIM, for PSM | 183 | * @dtim_period: num of beacons before the next DTIM, for PSM |
181 | * @timestamp: beacon timestamp | 184 | * @timestamp: beacon timestamp |
182 | * @beacon_int: beacon interval | 185 | * @beacon_int: beacon interval |
@@ -192,6 +195,7 @@ struct ieee80211_bss_conf { | |||
192 | /* erp related data */ | 195 | /* erp related data */ |
193 | bool use_cts_prot; | 196 | bool use_cts_prot; |
194 | bool use_short_preamble; | 197 | bool use_short_preamble; |
198 | bool use_short_slot; | ||
195 | u8 dtim_period; | 199 | u8 dtim_period; |
196 | u16 beacon_int; | 200 | u16 beacon_int; |
197 | u16 assoc_capability; | 201 | u16 assoc_capability; |
@@ -420,6 +424,11 @@ struct ieee80211_rx_status { | |||
420 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode | 424 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode |
421 | */ | 425 | */ |
422 | enum ieee80211_conf_flags { | 426 | enum ieee80211_conf_flags { |
427 | /* | ||
428 | * TODO: IEEE80211_CONF_SHORT_SLOT_TIME will be removed once drivers | ||
429 | * have been converted to use bss_info_changed() for slot time | ||
430 | * configuration | ||
431 | */ | ||
423 | IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0), | 432 | IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0), |
424 | IEEE80211_CONF_RADIOTAP = (1<<1), | 433 | IEEE80211_CONF_RADIOTAP = (1<<1), |
425 | IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2), | 434 | IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2), |