diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 84 |
1 files changed, 53 insertions, 31 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 12a52efcd0d1..3b83a80e3fe0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -93,12 +93,9 @@ struct ieee80211_ht_bss_info { | |||
93 | * enum ieee80211_max_queues - maximum number of queues | 93 | * enum ieee80211_max_queues - maximum number of queues |
94 | * | 94 | * |
95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. | 95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. |
96 | * @IEEE80211_MAX_AMPDU_QUEUES: Maximum number of queues usable | ||
97 | * for A-MPDU operation. | ||
98 | */ | 96 | */ |
99 | enum ieee80211_max_queues { | 97 | enum ieee80211_max_queues { |
100 | IEEE80211_MAX_QUEUES = 16, | 98 | IEEE80211_MAX_QUEUES = 4, |
101 | IEEE80211_MAX_AMPDU_QUEUES = 16, | ||
102 | }; | 99 | }; |
103 | 100 | ||
104 | /** | 101 | /** |
@@ -245,6 +242,12 @@ struct ieee80211_bss_conf { | |||
245 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be | 242 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be |
246 | * set by rate control algorithms to indicate probe rate, will | 243 | * set by rate control algorithms to indicate probe rate, will |
247 | * be cleared for fragmented frames (except on the last fragment) | 244 | * be cleared for fragmented frames (except on the last fragment) |
245 | * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or | ||
246 | * set this flag in the driver; indicates that the rate control | ||
247 | * algorithm was used and should be notified of TX status | ||
248 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, | ||
249 | * used to indicate that a pending frame requires TX processing before | ||
250 | * it can be sent out. | ||
248 | */ | 251 | */ |
249 | enum mac80211_tx_control_flags { | 252 | enum mac80211_tx_control_flags { |
250 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 253 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -260,6 +263,8 @@ enum mac80211_tx_control_flags { | |||
260 | IEEE80211_TX_STAT_AMPDU = BIT(10), | 263 | IEEE80211_TX_STAT_AMPDU = BIT(10), |
261 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), | 264 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), |
262 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), | 265 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), |
266 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | ||
267 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | ||
263 | }; | 268 | }; |
264 | 269 | ||
265 | /** | 270 | /** |
@@ -520,12 +525,6 @@ enum ieee80211_conf_flags { | |||
520 | IEEE80211_CONF_PS = (1<<1), | 525 | IEEE80211_CONF_PS = (1<<1), |
521 | }; | 526 | }; |
522 | 527 | ||
523 | /* XXX: remove all this once drivers stop trying to use it */ | ||
524 | static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | ||
525 | { | ||
526 | return 0; | ||
527 | } | ||
528 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) | ||
529 | 528 | ||
530 | /** | 529 | /** |
531 | * enum ieee80211_conf_changed - denotes which configuration changed | 530 | * enum ieee80211_conf_changed - denotes which configuration changed |
@@ -888,6 +887,10 @@ enum ieee80211_tkip_key_type { | |||
888 | * | 887 | * |
889 | * @IEEE80211_HW_MFP_CAPABLE: | 888 | * @IEEE80211_HW_MFP_CAPABLE: |
890 | * Hardware supports management frame protection (MFP, IEEE 802.11w). | 889 | * Hardware supports management frame protection (MFP, IEEE 802.11w). |
890 | * | ||
891 | * @IEEE80211_HW_BEACON_FILTER: | ||
892 | * Hardware supports dropping of irrelevant beacon frames to | ||
893 | * avoid waking up cpu. | ||
891 | */ | 894 | */ |
892 | enum ieee80211_hw_flags { | 895 | enum ieee80211_hw_flags { |
893 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, | 896 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, |
@@ -903,6 +906,7 @@ enum ieee80211_hw_flags { | |||
903 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, | 906 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, |
904 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 907 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
905 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 908 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
909 | IEEE80211_HW_BEACON_FILTER = 1<<14, | ||
906 | }; | 910 | }; |
907 | 911 | ||
908 | /** | 912 | /** |
@@ -945,12 +949,6 @@ enum ieee80211_hw_flags { | |||
945 | * data packets. WMM/QoS requires at least four, these | 949 | * data packets. WMM/QoS requires at least four, these |
946 | * queues need to have configurable access parameters. | 950 | * queues need to have configurable access parameters. |
947 | * | 951 | * |
948 | * @ampdu_queues: number of available hardware transmit queues | ||
949 | * for A-MPDU packets, these have no access parameters | ||
950 | * because they're used only for A-MPDU frames. Note that | ||
951 | * mac80211 will not currently use any of the regular queues | ||
952 | * for aggregation. | ||
953 | * | ||
954 | * @rate_control_algorithm: rate control algorithm for this hardware. | 952 | * @rate_control_algorithm: rate control algorithm for this hardware. |
955 | * If unset (NULL), the default algorithm will be used. Must be | 953 | * If unset (NULL), the default algorithm will be used. Must be |
956 | * set before calling ieee80211_register_hw(). | 954 | * set before calling ieee80211_register_hw(). |
@@ -975,7 +973,6 @@ struct ieee80211_hw { | |||
975 | int vif_data_size; | 973 | int vif_data_size; |
976 | int sta_data_size; | 974 | int sta_data_size; |
977 | u16 queues; | 975 | u16 queues; |
978 | u16 ampdu_queues; | ||
979 | u16 max_listen_interval; | 976 | u16 max_listen_interval; |
980 | s8 max_signal; | 977 | s8 max_signal; |
981 | u8 max_rates; | 978 | u8 max_rates; |
@@ -1017,11 +1014,6 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr) | |||
1017 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); | 1014 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); |
1018 | } | 1015 | } |
1019 | 1016 | ||
1020 | static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw) | ||
1021 | { | ||
1022 | return hw->queues; | ||
1023 | } | ||
1024 | |||
1025 | static inline struct ieee80211_rate * | 1017 | static inline struct ieee80211_rate * |
1026 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, | 1018 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, |
1027 | const struct ieee80211_tx_info *c) | 1019 | const struct ieee80211_tx_info *c) |
@@ -1132,6 +1124,24 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1132 | */ | 1124 | */ |
1133 | 1125 | ||
1134 | /** | 1126 | /** |
1127 | * DOC: Beacon filter support | ||
1128 | * | ||
1129 | * Some hardware have beacon filter support to reduce host cpu wakeups | ||
1130 | * which will reduce system power consumption. It usuallly works so that | ||
1131 | * the firmware creates a checksum of the beacon but omits all constantly | ||
1132 | * changing elements (TSF, TIM etc). Whenever the checksum changes the | ||
1133 | * beacon is forwarded to the host, otherwise it will be just dropped. That | ||
1134 | * way the host will only receive beacons where some relevant information | ||
1135 | * (for example ERP protection or WMM settings) have changed. | ||
1136 | * | ||
1137 | * Beacon filter support is informed with %IEEE80211_HW_BEACON_FILTER flag. | ||
1138 | * The driver needs to enable beacon filter support whenever power save is | ||
1139 | * enabled, that is %IEEE80211_CONF_PS is set. When power save is enabled, | ||
1140 | * the stack will not check for beacon miss at all and the driver needs to | ||
1141 | * notify about complete loss of beacons with ieee80211_beacon_loss(). | ||
1142 | */ | ||
1143 | |||
1144 | /** | ||
1135 | * DOC: Frame filtering | 1145 | * DOC: Frame filtering |
1136 | * | 1146 | * |
1137 | * mac80211 requires to see many management frames for proper | 1147 | * mac80211 requires to see many management frames for proper |
@@ -1220,14 +1230,14 @@ enum ieee80211_filter_flags { | |||
1220 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation | 1230 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation |
1221 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation | 1231 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation |
1222 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation | 1232 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation |
1223 | * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation | 1233 | * @IEEE80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational |
1224 | */ | 1234 | */ |
1225 | enum ieee80211_ampdu_mlme_action { | 1235 | enum ieee80211_ampdu_mlme_action { |
1226 | IEEE80211_AMPDU_RX_START, | 1236 | IEEE80211_AMPDU_RX_START, |
1227 | IEEE80211_AMPDU_RX_STOP, | 1237 | IEEE80211_AMPDU_RX_STOP, |
1228 | IEEE80211_AMPDU_TX_START, | 1238 | IEEE80211_AMPDU_TX_START, |
1229 | IEEE80211_AMPDU_TX_STOP, | 1239 | IEEE80211_AMPDU_TX_STOP, |
1230 | IEEE80211_AMPDU_TX_RESUME, | 1240 | IEEE80211_AMPDU_TX_OPERATIONAL, |
1231 | }; | 1241 | }; |
1232 | 1242 | ||
1233 | /** | 1243 | /** |
@@ -1318,11 +1328,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1318 | * | 1328 | * |
1319 | * @hw_scan: Ask the hardware to service the scan request, no need to start | 1329 | * @hw_scan: Ask the hardware to service the scan request, no need to start |
1320 | * the scan state machine in stack. The scan must honour the channel | 1330 | * the scan state machine in stack. The scan must honour the channel |
1321 | * configuration done by the regulatory agent in the wiphy's registered | 1331 | * configuration done by the regulatory agent in the wiphy's |
1322 | * bands. When the scan finishes, ieee80211_scan_completed() must be | 1332 | * registered bands. The hardware (or the driver) needs to make sure |
1323 | * called; note that it also must be called when the scan cannot finish | 1333 | * that power save is disabled. When the scan finishes, |
1324 | * because the hardware is turned off! Anything else is a bug! | 1334 | * ieee80211_scan_completed() must be called; note that it also must |
1325 | * Returns a negative error code which will be seen in userspace. | 1335 | * be called when the scan cannot finish because the hardware is |
1336 | * turned off! Anything else is a bug! Returns a negative error code | ||
1337 | * which will be seen in userspace. | ||
1326 | * | 1338 | * |
1327 | * @sw_scan_start: Notifier function that is called just before a software scan | 1339 | * @sw_scan_start: Notifier function that is called just before a software scan |
1328 | * is started. Can be NULL, if the driver doesn't need this notification. | 1340 | * is started. Can be NULL, if the driver doesn't need this notification. |
@@ -1350,8 +1362,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1350 | * @get_tx_stats: Get statistics of the current TX queue status. This is used | 1362 | * @get_tx_stats: Get statistics of the current TX queue status. This is used |
1351 | * to get number of currently queued packets (queue length), maximum queue | 1363 | * to get number of currently queued packets (queue length), maximum queue |
1352 | * size (limit), and total number of packets sent using each TX queue | 1364 | * size (limit), and total number of packets sent using each TX queue |
1353 | * (count). The 'stats' pointer points to an array that has hw->queues + | 1365 | * (count). The 'stats' pointer points to an array that has hw->queues |
1354 | * hw->ampdu_queues items. | 1366 | * items. |
1355 | * | 1367 | * |
1356 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, | 1368 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, |
1357 | * this is only used for IBSS mode BSSID merging and debugging. Is not a | 1369 | * this is only used for IBSS mode BSSID merging and debugging. Is not a |
@@ -1979,6 +1991,16 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | |||
1979 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, | 1991 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, |
1980 | const u8 *addr); | 1992 | const u8 *addr); |
1981 | 1993 | ||
1994 | /** | ||
1995 | * ieee80211_beacon_loss - inform hardware does not receive beacons | ||
1996 | * | ||
1997 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | ||
1998 | * | ||
1999 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and | ||
2000 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the | ||
2001 | * hardware is not receiving beacons with this function. | ||
2002 | */ | ||
2003 | void ieee80211_beacon_loss(struct ieee80211_vif *vif); | ||
1982 | 2004 | ||
1983 | /* Rate control API */ | 2005 | /* Rate control API */ |
1984 | 2006 | ||