diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 30 | ||||
-rw-r--r-- | include/net/cfg80211.h | 22 | ||||
-rw-r--r-- | include/net/mac80211.h | 61 |
3 files changed, 109 insertions, 4 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 163c840437d6..d62edc7df3ae 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; |
@@ -771,7 +775,10 @@ struct ieee80211_bar { | |||
771 | /** | 775 | /** |
772 | * struct ieee80211_mcs_info - MCS information | 776 | * struct ieee80211_mcs_info - MCS information |
773 | * @rx_mask: RX mask | 777 | * @rx_mask: RX mask |
774 | * @rx_highest: highest supported RX rate | 778 | * @rx_highest: highest supported RX rate. If set represents |
779 | * the highest supported RX data rate in units of 1 Mbps. | ||
780 | * If this field is 0 this value should not be used to | ||
781 | * consider the highest RX data rate supported. | ||
775 | * @tx_params: TX parameters | 782 | * @tx_params: TX parameters |
776 | */ | 783 | */ |
777 | struct ieee80211_mcs_info { | 784 | struct ieee80211_mcs_info { |
@@ -824,6 +831,7 @@ struct ieee80211_ht_cap { | |||
824 | #define IEEE80211_HT_CAP_LDPC_CODING 0x0001 | 831 | #define IEEE80211_HT_CAP_LDPC_CODING 0x0001 |
825 | #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 | 832 | #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 |
826 | #define IEEE80211_HT_CAP_SM_PS 0x000C | 833 | #define IEEE80211_HT_CAP_SM_PS 0x000C |
834 | #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 | ||
827 | #define IEEE80211_HT_CAP_GRN_FLD 0x0010 | 835 | #define IEEE80211_HT_CAP_GRN_FLD 0x0010 |
828 | #define IEEE80211_HT_CAP_SGI_20 0x0020 | 836 | #define IEEE80211_HT_CAP_SGI_20 0x0020 |
829 | #define IEEE80211_HT_CAP_SGI_40 0x0040 | 837 | #define IEEE80211_HT_CAP_SGI_40 0x0040 |
@@ -839,6 +847,7 @@ struct ieee80211_ht_cap { | |||
839 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ | 847 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ |
840 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 | 848 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 |
841 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C | 849 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C |
850 | #define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2 | ||
842 | 851 | ||
843 | /* | 852 | /* |
844 | * Maximum length of AMPDU that the STA can receive. | 853 | * Maximum length of AMPDU that the STA can receive. |
@@ -922,12 +931,17 @@ struct ieee80211_ht_info { | |||
922 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | 931 | #define IEEE80211_MAX_AMPDU_BUF 0x40 |
923 | 932 | ||
924 | 933 | ||
925 | /* Spatial Multiplexing Power Save Modes */ | 934 | /* Spatial Multiplexing Power Save Modes (for capability) */ |
926 | #define WLAN_HT_CAP_SM_PS_STATIC 0 | 935 | #define WLAN_HT_CAP_SM_PS_STATIC 0 |
927 | #define WLAN_HT_CAP_SM_PS_DYNAMIC 1 | 936 | #define WLAN_HT_CAP_SM_PS_DYNAMIC 1 |
928 | #define WLAN_HT_CAP_SM_PS_INVALID 2 | 937 | #define WLAN_HT_CAP_SM_PS_INVALID 2 |
929 | #define WLAN_HT_CAP_SM_PS_DISABLED 3 | 938 | #define WLAN_HT_CAP_SM_PS_DISABLED 3 |
930 | 939 | ||
940 | /* for SM power control field lower two bits */ | ||
941 | #define WLAN_HT_SMPS_CONTROL_DISABLED 0 | ||
942 | #define WLAN_HT_SMPS_CONTROL_STATIC 1 | ||
943 | #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 | ||
944 | |||
931 | /* Authentication algorithms */ | 945 | /* Authentication algorithms */ |
932 | #define WLAN_AUTH_OPEN 0 | 946 | #define WLAN_AUTH_OPEN 0 |
933 | #define WLAN_AUTH_SHARED_KEY 1 | 947 | #define WLAN_AUTH_SHARED_KEY 1 |
@@ -1150,6 +1164,18 @@ enum ieee80211_spectrum_mgmt_actioncode { | |||
1150 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, | 1164 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, |
1151 | }; | 1165 | }; |
1152 | 1166 | ||
1167 | /* HT action codes */ | ||
1168 | enum ieee80211_ht_actioncode { | ||
1169 | WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0, | ||
1170 | WLAN_HT_ACTION_SMPS = 1, | ||
1171 | WLAN_HT_ACTION_PSMP = 2, | ||
1172 | WLAN_HT_ACTION_PCO_PHASE = 3, | ||
1173 | WLAN_HT_ACTION_CSI = 4, | ||
1174 | WLAN_HT_ACTION_NONCOMPRESSED_BF = 5, | ||
1175 | WLAN_HT_ACTION_COMPRESSED_BF = 6, | ||
1176 | WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, | ||
1177 | }; | ||
1178 | |||
1153 | /* Security key length */ | 1179 | /* Security key length */ |
1154 | enum ieee80211_key_len { | 1180 | enum ieee80211_key_len { |
1155 | WLAN_KEY_LEN_WEP40 = 5, | 1181 | WLAN_KEY_LEN_WEP40 = 5, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 0884b9a0f778..542a477a94da 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1578,7 +1578,7 @@ unsigned int ieee80211_hdrlen(__le16 fc); | |||
1578 | * @addr: the device MAC address | 1578 | * @addr: the device MAC address |
1579 | * @iftype: the virtual interface type | 1579 | * @iftype: the virtual interface type |
1580 | */ | 1580 | */ |
1581 | int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | 1581 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, |
1582 | enum nl80211_iftype iftype); | 1582 | enum nl80211_iftype iftype); |
1583 | 1583 | ||
1584 | /** | 1584 | /** |
@@ -1589,10 +1589,28 @@ int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | |||
1589 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | 1589 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) |
1590 | * @qos: build 802.11 QoS data frame | 1590 | * @qos: build 802.11 QoS data frame |
1591 | */ | 1591 | */ |
1592 | int ieee80211_data_from_8023(struct sk_buff *skb, u8 *addr, | 1592 | int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, |
1593 | enum nl80211_iftype iftype, u8 *bssid, bool qos); | 1593 | enum nl80211_iftype iftype, u8 *bssid, bool qos); |
1594 | 1594 | ||
1595 | /** | 1595 | /** |
1596 | * ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame | ||
1597 | * | ||
1598 | * Decode an IEEE 802.11n A-MSDU frame and convert it to a list of | ||
1599 | * 802.3 frames. The @list will be empty if the decode fails. The | ||
1600 | * @skb is consumed after the function returns. | ||
1601 | * | ||
1602 | * @skb: The input IEEE 802.11n A-MSDU frame. | ||
1603 | * @list: The output list of 802.3 frames. It must be allocated and | ||
1604 | * initialized by by the caller. | ||
1605 | * @addr: The device MAC address. | ||
1606 | * @iftype: The device interface type. | ||
1607 | * @extra_headroom: The hardware extra headroom for SKBs in the @list. | ||
1608 | */ | ||
1609 | void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | ||
1610 | const u8 *addr, enum nl80211_iftype iftype, | ||
1611 | const unsigned int extra_headroom); | ||
1612 | |||
1613 | /** | ||
1596 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | 1614 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame |
1597 | * @skb: the data frame | 1615 | * @skb: the data frame |
1598 | */ | 1616 | */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 538d6b761887..494ac69ff477 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -597,8 +597,10 @@ enum ieee80211_conf_flags { | |||
597 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed | 597 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed |
598 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed | 598 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed |
599 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed | 599 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed |
600 | * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed | ||
600 | */ | 601 | */ |
601 | enum ieee80211_conf_changed { | 602 | enum ieee80211_conf_changed { |
603 | IEEE80211_CONF_CHANGE_SMPS = BIT(1), | ||
602 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 604 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
603 | IEEE80211_CONF_CHANGE_MONITOR = BIT(3), | 605 | IEEE80211_CONF_CHANGE_MONITOR = BIT(3), |
604 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 606 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
@@ -609,6 +611,21 @@ enum ieee80211_conf_changed { | |||
609 | }; | 611 | }; |
610 | 612 | ||
611 | /** | 613 | /** |
614 | * enum ieee80211_smps_mode - spatial multiplexing power save mode | ||
615 | * | ||
616 | * @ | ||
617 | */ | ||
618 | enum ieee80211_smps_mode { | ||
619 | IEEE80211_SMPS_AUTOMATIC, | ||
620 | IEEE80211_SMPS_OFF, | ||
621 | IEEE80211_SMPS_STATIC, | ||
622 | IEEE80211_SMPS_DYNAMIC, | ||
623 | |||
624 | /* keep last */ | ||
625 | IEEE80211_SMPS_NUM_MODES, | ||
626 | }; | ||
627 | |||
628 | /** | ||
612 | * struct ieee80211_conf - configuration of the device | 629 | * struct ieee80211_conf - configuration of the device |
613 | * | 630 | * |
614 | * This struct indicates how the driver shall configure the hardware. | 631 | * This struct indicates how the driver shall configure the hardware. |
@@ -636,6 +653,10 @@ enum ieee80211_conf_changed { | |||
636 | * @short_frame_max_tx_count: Maximum number of transmissions for a "short" | 653 | * @short_frame_max_tx_count: Maximum number of transmissions for a "short" |
637 | * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the | 654 | * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the |
638 | * number of transmissions not the number of retries | 655 | * number of transmissions not the number of retries |
656 | * | ||
657 | * @smps_mode: spatial multiplexing powersave mode; note that | ||
658 | * %IEEE80211_SMPS_STATIC is used when the device is not | ||
659 | * configured for an HT channel | ||
639 | */ | 660 | */ |
640 | struct ieee80211_conf { | 661 | struct ieee80211_conf { |
641 | u32 flags; | 662 | u32 flags; |
@@ -648,6 +669,7 @@ struct ieee80211_conf { | |||
648 | 669 | ||
649 | struct ieee80211_channel *channel; | 670 | struct ieee80211_channel *channel; |
650 | enum nl80211_channel_type channel_type; | 671 | enum nl80211_channel_type channel_type; |
672 | enum ieee80211_smps_mode smps_mode; | ||
651 | }; | 673 | }; |
652 | 674 | ||
653 | /** | 675 | /** |
@@ -659,12 +681,14 @@ struct ieee80211_conf { | |||
659 | * @type: type of this virtual interface | 681 | * @type: type of this virtual interface |
660 | * @bss_conf: BSS configuration for this interface, either our own | 682 | * @bss_conf: BSS configuration for this interface, either our own |
661 | * or the BSS we're associated to | 683 | * or the BSS we're associated to |
684 | * @addr: address of this interface | ||
662 | * @drv_priv: data area for driver use, will always be aligned to | 685 | * @drv_priv: data area for driver use, will always be aligned to |
663 | * sizeof(void *). | 686 | * sizeof(void *). |
664 | */ | 687 | */ |
665 | struct ieee80211_vif { | 688 | struct ieee80211_vif { |
666 | enum nl80211_iftype type; | 689 | enum nl80211_iftype type; |
667 | struct ieee80211_bss_conf bss_conf; | 690 | struct ieee80211_bss_conf bss_conf; |
691 | u8 addr[ETH_ALEN]; | ||
668 | /* must be last */ | 692 | /* must be last */ |
669 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); | 693 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); |
670 | }; | 694 | }; |
@@ -928,6 +952,16 @@ enum ieee80211_tkip_key_type { | |||
928 | * @IEEE80211_HW_BEACON_FILTER: | 952 | * @IEEE80211_HW_BEACON_FILTER: |
929 | * Hardware supports dropping of irrelevant beacon frames to | 953 | * Hardware supports dropping of irrelevant beacon frames to |
930 | * avoid waking up cpu. | 954 | * avoid waking up cpu. |
955 | * | ||
956 | * @IEEE80211_HW_SUPPORTS_STATIC_SMPS: | ||
957 | * Hardware supports static spatial multiplexing powersave, | ||
958 | * ie. can turn off all but one chain even on HT connections | ||
959 | * that should be using more chains. | ||
960 | * | ||
961 | * @IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS: | ||
962 | * Hardware supports dynamic spatial multiplexing powersave, | ||
963 | * ie. can turn off all but one chain and then wake the rest | ||
964 | * up as required after, for example, rts/cts handshake. | ||
931 | */ | 965 | */ |
932 | enum ieee80211_hw_flags { | 966 | enum ieee80211_hw_flags { |
933 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 967 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -945,6 +979,8 @@ enum ieee80211_hw_flags { | |||
945 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 979 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
946 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 980 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
947 | IEEE80211_HW_BEACON_FILTER = 1<<14, | 981 | IEEE80211_HW_BEACON_FILTER = 1<<14, |
982 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, | ||
983 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, | ||
948 | }; | 984 | }; |
949 | 985 | ||
950 | /** | 986 | /** |
@@ -1213,6 +1249,31 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1213 | */ | 1249 | */ |
1214 | 1250 | ||
1215 | /** | 1251 | /** |
1252 | * DOC: Spatial multiplexing power save | ||
1253 | * | ||
1254 | * SMPS (Spatial multiplexing power save) is a mechanism to conserve | ||
1255 | * power in an 802.11n implementation. For details on the mechanism | ||
1256 | * and rationale, please refer to 802.11 (as amended by 802.11n-2009) | ||
1257 | * "11.2.3 SM power save". | ||
1258 | * | ||
1259 | * The mac80211 implementation is capable of sending action frames | ||
1260 | * to update the AP about the station's SMPS mode, and will instruct | ||
1261 | * the driver to enter the specific mode. It will also announce the | ||
1262 | * requested SMPS mode during the association handshake. Hardware | ||
1263 | * support for this feature is required, and can be indicated by | ||
1264 | * hardware flags. | ||
1265 | * | ||
1266 | * The default mode will be "automatic", which nl80211/cfg80211 | ||
1267 | * defines to be dynamic SMPS in (regular) powersave, and SMPS | ||
1268 | * turned off otherwise. | ||
1269 | * | ||
1270 | * To support this feature, the driver must set the appropriate | ||
1271 | * hardware support flags, and handle the SMPS flag to the config() | ||
1272 | * operation. It will then with this mechanism be instructed to | ||
1273 | * enter the requested SMPS mode while associated to an HT AP. | ||
1274 | */ | ||
1275 | |||
1276 | /** | ||
1216 | * DOC: Frame filtering | 1277 | * DOC: Frame filtering |
1217 | * | 1278 | * |
1218 | * mac80211 requires to see many management frames for proper | 1279 | * mac80211 requires to see many management frames for proper |