diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 183 |
1 files changed, 156 insertions, 27 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 9210bdc7bd8d..1937c7d98304 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -95,9 +95,11 @@ struct device; | |||
95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. | 95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. |
96 | */ | 96 | */ |
97 | enum ieee80211_max_queues { | 97 | enum ieee80211_max_queues { |
98 | IEEE80211_MAX_QUEUES = 4, | 98 | IEEE80211_MAX_QUEUES = 16, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | #define IEEE80211_INVAL_HW_QUEUE 0xff | ||
102 | |||
101 | /** | 103 | /** |
102 | * enum ieee80211_ac_numbers - AC numbers as used in mac80211 | 104 | * enum ieee80211_ac_numbers - AC numbers as used in mac80211 |
103 | * @IEEE80211_AC_VO: voice | 105 | * @IEEE80211_AC_VO: voice |
@@ -244,7 +246,7 @@ enum ieee80211_rssi_event { | |||
244 | * @channel_type: Channel type for this BSS -- the hardware might be | 246 | * @channel_type: Channel type for this BSS -- the hardware might be |
245 | * configured for HT40+ while this BSS only uses no-HT, for | 247 | * configured for HT40+ while this BSS only uses no-HT, for |
246 | * example. | 248 | * example. |
247 | * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info). | 249 | * @ht_operation_mode: HT operation mode like in &struct ieee80211_ht_operation. |
248 | * This field is only valid when the channel type is one of the HT types. | 250 | * This field is only valid when the channel type is one of the HT types. |
249 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value | 251 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value |
250 | * implies disabled | 252 | * implies disabled |
@@ -522,7 +524,7 @@ struct ieee80211_tx_rate { | |||
522 | * | 524 | * |
523 | * @flags: transmit info flags, defined above | 525 | * @flags: transmit info flags, defined above |
524 | * @band: the band to transmit on (use for checking for races) | 526 | * @band: the band to transmit on (use for checking for races) |
525 | * @antenna_sel_tx: antenna to use, 0 for automatic diversity | 527 | * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC |
526 | * @ack_frame_id: internal frame ID for TX status, used internally | 528 | * @ack_frame_id: internal frame ID for TX status, used internally |
527 | * @control: union for control data | 529 | * @control: union for control data |
528 | * @status: union for status data | 530 | * @status: union for status data |
@@ -538,7 +540,7 @@ struct ieee80211_tx_info { | |||
538 | u32 flags; | 540 | u32 flags; |
539 | u8 band; | 541 | u8 band; |
540 | 542 | ||
541 | u8 antenna_sel_tx; | 543 | u8 hw_queue; |
542 | 544 | ||
543 | u16 ack_frame_id; | 545 | u16 ack_frame_id; |
544 | 546 | ||
@@ -564,7 +566,8 @@ struct ieee80211_tx_info { | |||
564 | u8 ampdu_ack_len; | 566 | u8 ampdu_ack_len; |
565 | int ack_signal; | 567 | int ack_signal; |
566 | u8 ampdu_len; | 568 | u8 ampdu_len; |
567 | /* 15 bytes free */ | 569 | u8 antenna; |
570 | /* 14 bytes free */ | ||
568 | } status; | 571 | } status; |
569 | struct { | 572 | struct { |
570 | struct ieee80211_tx_rate driver_rates[ | 573 | struct ieee80211_tx_rate driver_rates[ |
@@ -664,6 +667,9 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
664 | * @RX_FLAG_SHORT_GI: Short guard interval was used | 667 | * @RX_FLAG_SHORT_GI: Short guard interval was used |
665 | * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. | 668 | * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. |
666 | * Valid only for data frames (mainly A-MPDU) | 669 | * Valid only for data frames (mainly A-MPDU) |
670 | * @RX_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, if | ||
671 | * the driver fills this value it should add %IEEE80211_RADIOTAP_MCS_HAVE_FMT | ||
672 | * to hw.radiotap_mcs_details to advertise that fact | ||
667 | */ | 673 | */ |
668 | enum mac80211_rx_flags { | 674 | enum mac80211_rx_flags { |
669 | RX_FLAG_MMIC_ERROR = 1<<0, | 675 | RX_FLAG_MMIC_ERROR = 1<<0, |
@@ -678,6 +684,7 @@ enum mac80211_rx_flags { | |||
678 | RX_FLAG_40MHZ = 1<<10, | 684 | RX_FLAG_40MHZ = 1<<10, |
679 | RX_FLAG_SHORT_GI = 1<<11, | 685 | RX_FLAG_SHORT_GI = 1<<11, |
680 | RX_FLAG_NO_SIGNAL_VAL = 1<<12, | 686 | RX_FLAG_NO_SIGNAL_VAL = 1<<12, |
687 | RX_FLAG_HT_GF = 1<<13, | ||
681 | }; | 688 | }; |
682 | 689 | ||
683 | /** | 690 | /** |
@@ -888,6 +895,8 @@ enum ieee80211_vif_flags { | |||
888 | * these need to be set (or cleared) when the interface is added | 895 | * these need to be set (or cleared) when the interface is added |
889 | * or, if supported by the driver, the interface type is changed | 896 | * or, if supported by the driver, the interface type is changed |
890 | * at runtime, mac80211 will never touch this field | 897 | * at runtime, mac80211 will never touch this field |
898 | * @hw_queue: hardware queue for each AC | ||
899 | * @cab_queue: content-after-beacon (DTIM beacon really) queue, AP mode only | ||
891 | * @drv_priv: data area for driver use, will always be aligned to | 900 | * @drv_priv: data area for driver use, will always be aligned to |
892 | * sizeof(void *). | 901 | * sizeof(void *). |
893 | */ | 902 | */ |
@@ -896,7 +905,12 @@ struct ieee80211_vif { | |||
896 | struct ieee80211_bss_conf bss_conf; | 905 | struct ieee80211_bss_conf bss_conf; |
897 | u8 addr[ETH_ALEN]; | 906 | u8 addr[ETH_ALEN]; |
898 | bool p2p; | 907 | bool p2p; |
908 | |||
909 | u8 cab_queue; | ||
910 | u8 hw_queue[IEEE80211_NUM_ACS]; | ||
911 | |||
899 | u32 driver_flags; | 912 | u32 driver_flags; |
913 | |||
900 | /* must be last */ | 914 | /* must be last */ |
901 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); | 915 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); |
902 | }; | 916 | }; |
@@ -929,7 +943,7 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) | |||
929 | * CCMP key if it requires CCMP encryption of management frames (MFP) to | 943 | * CCMP key if it requires CCMP encryption of management frames (MFP) to |
930 | * be done in software. | 944 | * be done in software. |
931 | * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver | 945 | * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver |
932 | * for a CCMP key if space should be prepared for the IV, but the IV | 946 | * if space should be prepared for the IV, but the IV |
933 | * itself should not be generated. Do not set together with | 947 | * itself should not be generated. Do not set together with |
934 | * @IEEE80211_KEY_FLAG_GENERATE_IV on the same key. | 948 | * @IEEE80211_KEY_FLAG_GENERATE_IV on the same key. |
935 | */ | 949 | */ |
@@ -1174,6 +1188,15 @@ enum sta_notify_cmd { | |||
1174 | * @IEEE80211_HW_SCAN_WHILE_IDLE: The device can do hw scan while | 1188 | * @IEEE80211_HW_SCAN_WHILE_IDLE: The device can do hw scan while |
1175 | * being idle (i.e. mac80211 doesn't have to go idle-off during the | 1189 | * being idle (i.e. mac80211 doesn't have to go idle-off during the |
1176 | * the scan). | 1190 | * the scan). |
1191 | * | ||
1192 | * @IEEE80211_HW_WANT_MONITOR_VIF: The driver would like to be informed of | ||
1193 | * a virtual monitor interface when monitor interfaces are the only | ||
1194 | * active interfaces. | ||
1195 | * | ||
1196 | * @IEEE80211_HW_QUEUE_CONTROL: The driver wants to control per-interface | ||
1197 | * queue mapping in order to use different queues (not just one per AC) | ||
1198 | * for different virtual interfaces. See the doc section on HW queue | ||
1199 | * control for more details. | ||
1177 | */ | 1200 | */ |
1178 | enum ieee80211_hw_flags { | 1201 | enum ieee80211_hw_flags { |
1179 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1202 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -1190,13 +1213,13 @@ enum ieee80211_hw_flags { | |||
1190 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, | 1213 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, |
1191 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 1214 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
1192 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 1215 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
1193 | /* reuse bit 14 */ | 1216 | IEEE80211_HW_WANT_MONITOR_VIF = 1<<14, |
1194 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, | 1217 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, |
1195 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, | 1218 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, |
1196 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, | 1219 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, |
1197 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, | 1220 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, |
1198 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, | 1221 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, |
1199 | /* reuse bit 20 */ | 1222 | IEEE80211_HW_QUEUE_CONTROL = 1<<20, |
1200 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, | 1223 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, |
1201 | IEEE80211_HW_AP_LINK_PS = 1<<22, | 1224 | IEEE80211_HW_AP_LINK_PS = 1<<22, |
1202 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, | 1225 | IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23, |
@@ -1266,6 +1289,14 @@ enum ieee80211_hw_flags { | |||
1266 | * @max_tx_aggregation_subframes: maximum number of subframes in an | 1289 | * @max_tx_aggregation_subframes: maximum number of subframes in an |
1267 | * aggregate an HT driver will transmit, used by the peer as a | 1290 | * aggregate an HT driver will transmit, used by the peer as a |
1268 | * hint to size its reorder buffer. | 1291 | * hint to size its reorder buffer. |
1292 | * | ||
1293 | * @offchannel_tx_hw_queue: HW queue ID to use for offchannel TX | ||
1294 | * (if %IEEE80211_HW_QUEUE_CONTROL is set) | ||
1295 | * | ||
1296 | * @radiotap_mcs_details: lists which MCS information can the HW | ||
1297 | * reports, by default it is set to _MCS, _GI and _BW but doesn't | ||
1298 | * include _FMT. Use %IEEE80211_RADIOTAP_MCS_HAVE_* values, only | ||
1299 | * adding _BW is supported today. | ||
1269 | */ | 1300 | */ |
1270 | struct ieee80211_hw { | 1301 | struct ieee80211_hw { |
1271 | struct ieee80211_conf conf; | 1302 | struct ieee80211_conf conf; |
@@ -1286,6 +1317,8 @@ struct ieee80211_hw { | |||
1286 | u8 max_rate_tries; | 1317 | u8 max_rate_tries; |
1287 | u8 max_rx_aggregation_subframes; | 1318 | u8 max_rx_aggregation_subframes; |
1288 | u8 max_tx_aggregation_subframes; | 1319 | u8 max_tx_aggregation_subframes; |
1320 | u8 offchannel_tx_hw_queue; | ||
1321 | u8 radiotap_mcs_details; | ||
1289 | }; | 1322 | }; |
1290 | 1323 | ||
1291 | /** | 1324 | /** |
@@ -1694,6 +1727,61 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
1694 | */ | 1727 | */ |
1695 | 1728 | ||
1696 | /** | 1729 | /** |
1730 | * DOC: HW queue control | ||
1731 | * | ||
1732 | * Before HW queue control was introduced, mac80211 only had a single static | ||
1733 | * assignment of per-interface AC software queues to hardware queues. This | ||
1734 | * was problematic for a few reasons: | ||
1735 | * 1) off-channel transmissions might get stuck behind other frames | ||
1736 | * 2) multiple virtual interfaces couldn't be handled correctly | ||
1737 | * 3) after-DTIM frames could get stuck behind other frames | ||
1738 | * | ||
1739 | * To solve this, hardware typically uses multiple different queues for all | ||
1740 | * the different usages, and this needs to be propagated into mac80211 so it | ||
1741 | * won't have the same problem with the software queues. | ||
1742 | * | ||
1743 | * Therefore, mac80211 now offers the %IEEE80211_HW_QUEUE_CONTROL capability | ||
1744 | * flag that tells it that the driver implements its own queue control. To do | ||
1745 | * so, the driver will set up the various queues in each &struct ieee80211_vif | ||
1746 | * and the offchannel queue in &struct ieee80211_hw. In response, mac80211 will | ||
1747 | * use those queue IDs in the hw_queue field of &struct ieee80211_tx_info and | ||
1748 | * if necessary will queue the frame on the right software queue that mirrors | ||
1749 | * the hardware queue. | ||
1750 | * Additionally, the driver has to then use these HW queue IDs for the queue | ||
1751 | * management functions (ieee80211_stop_queue() et al.) | ||
1752 | * | ||
1753 | * The driver is free to set up the queue mappings as needed, multiple virtual | ||
1754 | * interfaces may map to the same hardware queues if needed. The setup has to | ||
1755 | * happen during add_interface or change_interface callbacks. For example, a | ||
1756 | * driver supporting station+station and station+AP modes might decide to have | ||
1757 | * 10 hardware queues to handle different scenarios: | ||
1758 | * | ||
1759 | * 4 AC HW queues for 1st vif: 0, 1, 2, 3 | ||
1760 | * 4 AC HW queues for 2nd vif: 4, 5, 6, 7 | ||
1761 | * after-DTIM queue for AP: 8 | ||
1762 | * off-channel queue: 9 | ||
1763 | * | ||
1764 | * It would then set up the hardware like this: | ||
1765 | * hw.offchannel_tx_hw_queue = 9 | ||
1766 | * | ||
1767 | * and the first virtual interface that is added as follows: | ||
1768 | * vif.hw_queue[IEEE80211_AC_VO] = 0 | ||
1769 | * vif.hw_queue[IEEE80211_AC_VI] = 1 | ||
1770 | * vif.hw_queue[IEEE80211_AC_BE] = 2 | ||
1771 | * vif.hw_queue[IEEE80211_AC_BK] = 3 | ||
1772 | * vif.cab_queue = 8 // if AP mode, otherwise %IEEE80211_INVAL_HW_QUEUE | ||
1773 | * and the second virtual interface with 4-7. | ||
1774 | * | ||
1775 | * If queue 6 gets full, for example, mac80211 would only stop the second | ||
1776 | * virtual interface's BE queue since virtual interface queues are per AC. | ||
1777 | * | ||
1778 | * Note that the vif.cab_queue value should be set to %IEEE80211_INVAL_HW_QUEUE | ||
1779 | * whenever the queue is not used (i.e. the interface is not in AP mode) if the | ||
1780 | * queue could potentially be shared since mac80211 will look at cab_queue when | ||
1781 | * a queue is stopped/woken even if the interface is not in AP mode. | ||
1782 | */ | ||
1783 | |||
1784 | /** | ||
1697 | * enum ieee80211_filter_flags - hardware filter flags | 1785 | * enum ieee80211_filter_flags - hardware filter flags |
1698 | * | 1786 | * |
1699 | * These flags determine what the filter in hardware should be | 1787 | * These flags determine what the filter in hardware should be |
@@ -1780,6 +1868,18 @@ enum ieee80211_frame_release_type { | |||
1780 | }; | 1868 | }; |
1781 | 1869 | ||
1782 | /** | 1870 | /** |
1871 | * enum ieee80211_rate_control_changed - flags to indicate what changed | ||
1872 | * | ||
1873 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit | ||
1874 | * to this station changed. | ||
1875 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. | ||
1876 | */ | ||
1877 | enum ieee80211_rate_control_changed { | ||
1878 | IEEE80211_RC_BW_CHANGED = BIT(0), | ||
1879 | IEEE80211_RC_SMPS_CHANGED = BIT(1), | ||
1880 | }; | ||
1881 | |||
1882 | /** | ||
1783 | * struct ieee80211_ops - callbacks from mac80211 to the driver | 1883 | * struct ieee80211_ops - callbacks from mac80211 to the driver |
1784 | * | 1884 | * |
1785 | * This structure contains various callbacks that the driver may | 1885 | * This structure contains various callbacks that the driver may |
@@ -1980,6 +2080,14 @@ enum ieee80211_frame_release_type { | |||
1980 | * up the list of states. | 2080 | * up the list of states. |
1981 | * The callback can sleep. | 2081 | * The callback can sleep. |
1982 | * | 2082 | * |
2083 | * @sta_rc_update: Notifies the driver of changes to the bitrates that can be | ||
2084 | * used to transmit to the station. The changes are advertised with bits | ||
2085 | * from &enum ieee80211_rate_control_changed and the values are reflected | ||
2086 | * in the station data. This callback should only be used when the driver | ||
2087 | * uses hardware rate control (%IEEE80211_HW_HAS_RATE_CONTROL) since | ||
2088 | * otherwise the rate control algorithm is notified directly. | ||
2089 | * Must be atomic. | ||
2090 | * | ||
1983 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), | 2091 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), |
1984 | * bursting) for a hardware TX queue. | 2092 | * bursting) for a hardware TX queue. |
1985 | * Returns a negative error code on failure. | 2093 | * Returns a negative error code on failure. |
@@ -2125,6 +2233,14 @@ enum ieee80211_frame_release_type { | |||
2125 | * The @tids parameter is a bitmap and tells the driver which TIDs the | 2233 | * The @tids parameter is a bitmap and tells the driver which TIDs the |
2126 | * frames will be on; it will at most have two bits set. | 2234 | * frames will be on; it will at most have two bits set. |
2127 | * This callback must be atomic. | 2235 | * This callback must be atomic. |
2236 | * | ||
2237 | * @get_et_sset_count: Ethtool API to get string-set count. | ||
2238 | * | ||
2239 | * @get_et_stats: Ethtool API to get a set of u64 stats. | ||
2240 | * | ||
2241 | * @get_et_strings: Ethtool API to get a set of strings to describe stats | ||
2242 | * and perhaps other supported types of ethtool data-sets. | ||
2243 | * | ||
2128 | */ | 2244 | */ |
2129 | struct ieee80211_ops { | 2245 | struct ieee80211_ops { |
2130 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 2246 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -2135,6 +2251,7 @@ struct ieee80211_ops { | |||
2135 | #ifdef CONFIG_PM | 2251 | #ifdef CONFIG_PM |
2136 | int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); | 2252 | int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); |
2137 | int (*resume)(struct ieee80211_hw *hw); | 2253 | int (*resume)(struct ieee80211_hw *hw); |
2254 | void (*set_wakeup)(struct ieee80211_hw *hw, bool enabled); | ||
2138 | #endif | 2255 | #endif |
2139 | int (*add_interface)(struct ieee80211_hw *hw, | 2256 | int (*add_interface)(struct ieee80211_hw *hw, |
2140 | struct ieee80211_vif *vif); | 2257 | struct ieee80211_vif *vif); |
@@ -2196,8 +2313,12 @@ struct ieee80211_ops { | |||
2196 | struct ieee80211_sta *sta, | 2313 | struct ieee80211_sta *sta, |
2197 | enum ieee80211_sta_state old_state, | 2314 | enum ieee80211_sta_state old_state, |
2198 | enum ieee80211_sta_state new_state); | 2315 | enum ieee80211_sta_state new_state); |
2316 | void (*sta_rc_update)(struct ieee80211_hw *hw, | ||
2317 | struct ieee80211_vif *vif, | ||
2318 | struct ieee80211_sta *sta, | ||
2319 | u32 changed); | ||
2199 | int (*conf_tx)(struct ieee80211_hw *hw, | 2320 | int (*conf_tx)(struct ieee80211_hw *hw, |
2200 | struct ieee80211_vif *vif, u16 queue, | 2321 | struct ieee80211_vif *vif, u16 ac, |
2201 | const struct ieee80211_tx_queue_params *params); | 2322 | const struct ieee80211_tx_queue_params *params); |
2202 | u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | 2323 | u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
2203 | void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2324 | void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
@@ -2250,6 +2371,15 @@ struct ieee80211_ops { | |||
2250 | u16 tids, int num_frames, | 2371 | u16 tids, int num_frames, |
2251 | enum ieee80211_frame_release_type reason, | 2372 | enum ieee80211_frame_release_type reason, |
2252 | bool more_data); | 2373 | bool more_data); |
2374 | |||
2375 | int (*get_et_sset_count)(struct ieee80211_hw *hw, | ||
2376 | struct ieee80211_vif *vif, int sset); | ||
2377 | void (*get_et_stats)(struct ieee80211_hw *hw, | ||
2378 | struct ieee80211_vif *vif, | ||
2379 | struct ethtool_stats *stats, u64 *data); | ||
2380 | void (*get_et_strings)(struct ieee80211_hw *hw, | ||
2381 | struct ieee80211_vif *vif, | ||
2382 | u32 sset, u8 *data); | ||
2253 | }; | 2383 | }; |
2254 | 2384 | ||
2255 | /** | 2385 | /** |
@@ -2844,6 +2974,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, | |||
2844 | */ | 2974 | */ |
2845 | __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, | 2975 | __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, |
2846 | struct ieee80211_vif *vif, | 2976 | struct ieee80211_vif *vif, |
2977 | enum ieee80211_band band, | ||
2847 | size_t frame_len, | 2978 | size_t frame_len, |
2848 | struct ieee80211_rate *rate); | 2979 | struct ieee80211_rate *rate); |
2849 | 2980 | ||
@@ -3512,19 +3643,6 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn); | |||
3512 | /* Rate control API */ | 3643 | /* Rate control API */ |
3513 | 3644 | ||
3514 | /** | 3645 | /** |
3515 | * enum rate_control_changed - flags to indicate which parameter changed | ||
3516 | * | ||
3517 | * @IEEE80211_RC_HT_CHANGED: The HT parameters of the operating channel have | ||
3518 | * changed, rate control algorithm can update its internal state if needed. | ||
3519 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed, the rate | ||
3520 | * control algorithm needs to adjust accordingly. | ||
3521 | */ | ||
3522 | enum rate_control_changed { | ||
3523 | IEEE80211_RC_HT_CHANGED = BIT(0), | ||
3524 | IEEE80211_RC_SMPS_CHANGED = BIT(1), | ||
3525 | }; | ||
3526 | |||
3527 | /** | ||
3528 | * struct ieee80211_tx_rate_control - rate control information for/from RC algo | 3646 | * struct ieee80211_tx_rate_control - rate control information for/from RC algo |
3529 | * | 3647 | * |
3530 | * @hw: The hardware the algorithm is invoked for. | 3648 | * @hw: The hardware the algorithm is invoked for. |
@@ -3569,9 +3687,8 @@ struct rate_control_ops { | |||
3569 | void (*rate_init)(void *priv, struct ieee80211_supported_band *sband, | 3687 | void (*rate_init)(void *priv, struct ieee80211_supported_band *sband, |
3570 | struct ieee80211_sta *sta, void *priv_sta); | 3688 | struct ieee80211_sta *sta, void *priv_sta); |
3571 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, | 3689 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, |
3572 | struct ieee80211_sta *sta, | 3690 | struct ieee80211_sta *sta, void *priv_sta, |
3573 | void *priv_sta, u32 changed, | 3691 | u32 changed); |
3574 | enum nl80211_channel_type oper_chan_type); | ||
3575 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 3692 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |
3576 | void *priv_sta); | 3693 | void *priv_sta); |
3577 | 3694 | ||
@@ -3706,8 +3823,20 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif, | |||
3706 | 3823 | ||
3707 | void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); | 3824 | void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); |
3708 | 3825 | ||
3709 | int ieee80211_add_srates_ie(struct ieee80211_vif *vif, struct sk_buff *skb); | 3826 | int ieee80211_add_srates_ie(struct ieee80211_vif *vif, |
3827 | struct sk_buff *skb, bool need_basic); | ||
3710 | 3828 | ||
3711 | int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif, | 3829 | int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif, |
3712 | struct sk_buff *skb); | 3830 | struct sk_buff *skb, bool need_basic); |
3831 | |||
3832 | /** | ||
3833 | * ieee80211_ave_rssi - report the average rssi for the specified interface | ||
3834 | * | ||
3835 | * @vif: the specified virtual interface | ||
3836 | * | ||
3837 | * This function return the average rssi value for the requested interface. | ||
3838 | * It assumes that the given vif is valid. | ||
3839 | */ | ||
3840 | int ieee80211_ave_rssi(struct ieee80211_vif *vif); | ||
3841 | |||
3713 | #endif /* MAC80211_H */ | 3842 | #endif /* MAC80211_H */ |