aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ieee80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-12-01 07:37:02 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-22 13:31:16 -0500
commit0f78231bffb868a30e8533aace142213266bb811 (patch)
tree317f65dc6d89e9a89ad83f94fadd780dd1e0ca83 /include/linux/ieee80211.h
parent18974b5b0b5e758d416c550553b143e5c8038281 (diff)
mac80211: enable spatial multiplexing powersave
Enable spatial multiplexing in mac80211 by telling the driver what to do and, where necessary, sending action frames to the AP to update the requested SMPS mode. Also includes a trivial implementation for hwsim that just logs the requested mode. For now, the userspace interface is in debugfs only, and let you toggle the requested mode at any time. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r--include/linux/ieee80211.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index d9724a28c0c2..e8d43d0ff2c3 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -707,6 +707,10 @@ struct ieee80211_mgmt {
707 u8 action; 707 u8 action;
708 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 708 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
709 } __attribute__ ((packed)) sa_query; 709 } __attribute__ ((packed)) sa_query;
710 struct {
711 u8 action;
712 u8 smps_control;
713 } __attribute__ ((packed)) ht_smps;
710 } u; 714 } u;
711 } __attribute__ ((packed)) action; 715 } __attribute__ ((packed)) action;
712 } u; 716 } u;
@@ -824,6 +828,7 @@ struct ieee80211_ht_cap {
824#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 828#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
825#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 829#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
826#define IEEE80211_HT_CAP_SM_PS 0x000C 830#define IEEE80211_HT_CAP_SM_PS 0x000C
831#define IEEE80211_HT_CAP_SM_PS_SHIFT 2
827#define IEEE80211_HT_CAP_GRN_FLD 0x0010 832#define IEEE80211_HT_CAP_GRN_FLD 0x0010
828#define IEEE80211_HT_CAP_SGI_20 0x0020 833#define IEEE80211_HT_CAP_SGI_20 0x0020
829#define IEEE80211_HT_CAP_SGI_40 0x0040 834#define IEEE80211_HT_CAP_SGI_40 0x0040
@@ -839,6 +844,7 @@ struct ieee80211_ht_cap {
839/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ 844/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
840#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 845#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
841#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C 846#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
847#define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2
842 848
843/* 849/*
844 * Maximum length of AMPDU that the STA can receive. 850 * Maximum length of AMPDU that the STA can receive.
@@ -922,12 +928,17 @@ struct ieee80211_ht_info {
922#define IEEE80211_MAX_AMPDU_BUF 0x40 928#define IEEE80211_MAX_AMPDU_BUF 0x40
923 929
924 930
925/* Spatial Multiplexing Power Save Modes */ 931/* Spatial Multiplexing Power Save Modes (for capability) */
926#define WLAN_HT_CAP_SM_PS_STATIC 0 932#define WLAN_HT_CAP_SM_PS_STATIC 0
927#define WLAN_HT_CAP_SM_PS_DYNAMIC 1 933#define WLAN_HT_CAP_SM_PS_DYNAMIC 1
928#define WLAN_HT_CAP_SM_PS_INVALID 2 934#define WLAN_HT_CAP_SM_PS_INVALID 2
929#define WLAN_HT_CAP_SM_PS_DISABLED 3 935#define WLAN_HT_CAP_SM_PS_DISABLED 3
930 936
937/* for SM power control field lower two bits */
938#define WLAN_HT_SMPS_CONTROL_DISABLED 0
939#define WLAN_HT_SMPS_CONTROL_STATIC 1
940#define WLAN_HT_SMPS_CONTROL_DYNAMIC 3
941
931/* Authentication algorithms */ 942/* Authentication algorithms */
932#define WLAN_AUTH_OPEN 0 943#define WLAN_AUTH_OPEN 0
933#define WLAN_AUTH_SHARED_KEY 1 944#define WLAN_AUTH_SHARED_KEY 1
@@ -1150,6 +1161,18 @@ enum ieee80211_spectrum_mgmt_actioncode {
1150 WLAN_ACTION_SPCT_CHL_SWITCH = 4, 1161 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
1151}; 1162};
1152 1163
1164/* HT action codes */
1165enum ieee80211_ht_actioncode {
1166 WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0,
1167 WLAN_HT_ACTION_SMPS = 1,
1168 WLAN_HT_ACTION_PSMP = 2,
1169 WLAN_HT_ACTION_PCO_PHASE = 3,
1170 WLAN_HT_ACTION_CSI = 4,
1171 WLAN_HT_ACTION_NONCOMPRESSED_BF = 5,
1172 WLAN_HT_ACTION_COMPRESSED_BF = 6,
1173 WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
1174};
1175
1153/* Security key length */ 1176/* Security key length */
1154enum ieee80211_key_len { 1177enum ieee80211_key_len {
1155 WLAN_KEY_LEN_WEP40 = 5, 1178 WLAN_KEY_LEN_WEP40 = 5,