diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 61 |
1 files changed, 61 insertions, 0 deletions
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 |