mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
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>
This commit is contained in:
parent
7f93ea3e24
commit
9f1ba9062e
5 changed files with 139 additions and 0 deletions
|
|
@ -268,6 +268,23 @@ struct mpath_info {
|
|||
u8 flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct bss_parameters - BSS parameters
|
||||
*
|
||||
* Used to change BSS parameters (mainly for AP mode).
|
||||
*
|
||||
* @use_cts_prot: Whether to use CTS protection
|
||||
* (0 = no, 1 = yes, -1 = do not change)
|
||||
* @use_short_preamble: Whether the use of short preambles is allowed
|
||||
* (0 = no, 1 = yes, -1 = do not change)
|
||||
* @use_short_slot_time: Whether the use of short slot time is allowed
|
||||
* (0 = no, 1 = yes, -1 = do not change)
|
||||
*/
|
||||
struct bss_parameters {
|
||||
int use_cts_prot;
|
||||
int use_short_preamble;
|
||||
int use_short_slot_time;
|
||||
};
|
||||
|
||||
/* from net/wireless.h */
|
||||
struct wiphy;
|
||||
|
|
@ -318,6 +335,8 @@ struct wiphy;
|
|||
* @change_station: Modify a given station.
|
||||
*
|
||||
* @set_mesh_cfg: set mesh parameters (by now, just mesh id)
|
||||
*
|
||||
* @change_bss: Modify parameters for a given BSS.
|
||||
*/
|
||||
struct cfg80211_ops {
|
||||
int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
|
||||
|
|
@ -370,6 +389,9 @@ struct cfg80211_ops {
|
|||
int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
|
||||
int idx, u8 *dst, u8 *next_hop,
|
||||
struct mpath_info *pinfo);
|
||||
|
||||
int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct bss_parameters *params);
|
||||
};
|
||||
|
||||
#endif /* __NET_CFG80211_H */
|
||||
|
|
|
|||
|
|
@ -158,12 +158,14 @@ struct ieee80211_low_level_stats {
|
|||
* also implies a change in the AID.
|
||||
* @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed
|
||||
* @BSS_CHANGED_ERP_PREAMBLE: preamble changed
|
||||
* @BSS_CHANGED_ERP_SLOT: slot timing changed
|
||||
* @BSS_CHANGED_HT: 802.11n parameters changed
|
||||
*/
|
||||
enum ieee80211_bss_change {
|
||||
BSS_CHANGED_ASSOC = 1<<0,
|
||||
BSS_CHANGED_ERP_CTS_PROT = 1<<1,
|
||||
BSS_CHANGED_ERP_PREAMBLE = 1<<2,
|
||||
BSS_CHANGED_ERP_SLOT = 1<<3,
|
||||
BSS_CHANGED_HT = 1<<4,
|
||||
};
|
||||
|
||||
|
|
@ -177,6 +179,7 @@ enum ieee80211_bss_change {
|
|||
* @aid: association ID number, valid only when @assoc is true
|
||||
* @use_cts_prot: use CTS protection
|
||||
* @use_short_preamble: use 802.11b short preamble
|
||||
* @use_short_slot: use short slot time (only relevant for ERP)
|
||||
* @dtim_period: num of beacons before the next DTIM, for PSM
|
||||
* @timestamp: beacon timestamp
|
||||
* @beacon_int: beacon interval
|
||||
|
|
@ -192,6 +195,7 @@ struct ieee80211_bss_conf {
|
|||
/* erp related data */
|
||||
bool use_cts_prot;
|
||||
bool use_short_preamble;
|
||||
bool use_short_slot;
|
||||
u8 dtim_period;
|
||||
u16 beacon_int;
|
||||
u16 assoc_capability;
|
||||
|
|
@ -420,6 +424,11 @@ struct ieee80211_rx_status {
|
|||
* @IEEE80211_CONF_PS: Enable 802.11 power save mode
|
||||
*/
|
||||
enum ieee80211_conf_flags {
|
||||
/*
|
||||
* TODO: IEEE80211_CONF_SHORT_SLOT_TIME will be removed once drivers
|
||||
* have been converted to use bss_info_changed() for slot time
|
||||
* configuration
|
||||
*/
|
||||
IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0),
|
||||
IEEE80211_CONF_RADIOTAP = (1<<1),
|
||||
IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2),
|
||||
|
|
|
|||
Loading…
Reference in a new issue