diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 106 |
1 files changed, 99 insertions, 7 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 62c0ce2d1dc8..8650e7bf2ed0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -341,6 +341,9 @@ struct ieee80211_bss_conf { | |||
341 | * the off-channel channel when a remain-on-channel offload is done | 341 | * the off-channel channel when a remain-on-channel offload is done |
342 | * in hardware -- normal packets still flow and are expected to be | 342 | * in hardware -- normal packets still flow and are expected to be |
343 | * handled properly by the device. | 343 | * handled properly by the device. |
344 | * @IEEE80211_TX_INTFL_TKIP_MIC_FAILURE: Marks this packet to be used for TKIP | ||
345 | * testing. It will be sent out with incorrect Michael MIC key to allow | ||
346 | * TKIP countermeasures to be tested. | ||
344 | * | 347 | * |
345 | * Note: If you have to add new flags to the enumeration, then don't | 348 | * Note: If you have to add new flags to the enumeration, then don't |
346 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. | 349 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. |
@@ -370,6 +373,7 @@ enum mac80211_tx_control_flags { | |||
370 | IEEE80211_TX_CTL_LDPC = BIT(22), | 373 | IEEE80211_TX_CTL_LDPC = BIT(22), |
371 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), | 374 | IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24), |
372 | IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), | 375 | IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), |
376 | IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26), | ||
373 | }; | 377 | }; |
374 | 378 | ||
375 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | 379 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 |
@@ -595,9 +599,10 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
595 | * the frame. | 599 | * the frame. |
596 | * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on | 600 | * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on |
597 | * the frame. | 601 | * the frame. |
598 | * @RX_FLAG_TSFT: The timestamp passed in the RX status (@mactime field) | 602 | * @RX_FLAG_MACTIME_MPDU: The timestamp passed in the RX status (@mactime |
599 | * is valid. This is useful in monitor mode and necessary for beacon frames | 603 | * field) is valid and contains the time the first symbol of the MPDU |
600 | * to enable IBSS merging. | 604 | * was received. This is useful in monitor mode and for proper IBSS |
605 | * merging. | ||
601 | * @RX_FLAG_SHORTPRE: Short preamble was used for this frame | 606 | * @RX_FLAG_SHORTPRE: Short preamble was used for this frame |
602 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index | 607 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index |
603 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used | 608 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used |
@@ -610,7 +615,7 @@ enum mac80211_rx_flags { | |||
610 | RX_FLAG_IV_STRIPPED = 1<<4, | 615 | RX_FLAG_IV_STRIPPED = 1<<4, |
611 | RX_FLAG_FAILED_FCS_CRC = 1<<5, | 616 | RX_FLAG_FAILED_FCS_CRC = 1<<5, |
612 | RX_FLAG_FAILED_PLCP_CRC = 1<<6, | 617 | RX_FLAG_FAILED_PLCP_CRC = 1<<6, |
613 | RX_FLAG_TSFT = 1<<7, | 618 | RX_FLAG_MACTIME_MPDU = 1<<7, |
614 | RX_FLAG_SHORTPRE = 1<<8, | 619 | RX_FLAG_SHORTPRE = 1<<8, |
615 | RX_FLAG_HT = 1<<9, | 620 | RX_FLAG_HT = 1<<9, |
616 | RX_FLAG_40MHZ = 1<<10, | 621 | RX_FLAG_40MHZ = 1<<10, |
@@ -1069,6 +1074,13 @@ enum ieee80211_tkip_key_type { | |||
1069 | * to decrypt group addressed frames, then IBSS RSN support is still | 1074 | * to decrypt group addressed frames, then IBSS RSN support is still |
1070 | * possible but software crypto will be used. Advertise the wiphy flag | 1075 | * possible but software crypto will be used. Advertise the wiphy flag |
1071 | * only in that case. | 1076 | * only in that case. |
1077 | * | ||
1078 | * @IEEE80211_HW_AP_LINK_PS: When operating in AP mode the device | ||
1079 | * autonomously manages the PS status of connected stations. When | ||
1080 | * this flag is set mac80211 will not trigger PS mode for connected | ||
1081 | * stations based on the PM bit of incoming frames. | ||
1082 | * Use ieee80211_start_ps()/ieee8021_end_ps() to manually configure | ||
1083 | * the PS mode of connected stations. | ||
1072 | */ | 1084 | */ |
1073 | enum ieee80211_hw_flags { | 1085 | enum ieee80211_hw_flags { |
1074 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1086 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -1093,6 +1105,7 @@ enum ieee80211_hw_flags { | |||
1093 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, | 1105 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, |
1094 | IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, | 1106 | IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, |
1095 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, | 1107 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, |
1108 | IEEE80211_HW_AP_LINK_PS = 1<<22, | ||
1096 | }; | 1109 | }; |
1097 | 1110 | ||
1098 | /** | 1111 | /** |
@@ -1147,6 +1160,17 @@ enum ieee80211_hw_flags { | |||
1147 | * @napi_weight: weight used for NAPI polling. You must specify an | 1160 | * @napi_weight: weight used for NAPI polling. You must specify an |
1148 | * appropriate value here if a napi_poll operation is provided | 1161 | * appropriate value here if a napi_poll operation is provided |
1149 | * by your driver. | 1162 | * by your driver. |
1163 | |||
1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of | ||
1165 | * sub-frames) to be used for A-MPDU block ack receiver | ||
1166 | * aggregation. | ||
1167 | * This is only relevant if the device has restrictions on the | ||
1168 | * number of subframes, if it relies on mac80211 to do reordering | ||
1169 | * it shouldn't be set. | ||
1170 | * | ||
1171 | * @max_tx_aggregation_subframes: maximum number of subframes in an | ||
1172 | * aggregate an HT driver will transmit, used by the peer as a | ||
1173 | * hint to size its reorder buffer. | ||
1150 | */ | 1174 | */ |
1151 | struct ieee80211_hw { | 1175 | struct ieee80211_hw { |
1152 | struct ieee80211_conf conf; | 1176 | struct ieee80211_conf conf; |
@@ -1165,6 +1189,8 @@ struct ieee80211_hw { | |||
1165 | u8 max_rates; | 1189 | u8 max_rates; |
1166 | u8 max_report_rates; | 1190 | u8 max_report_rates; |
1167 | u8 max_rate_tries; | 1191 | u8 max_rate_tries; |
1192 | u8 max_rx_aggregation_subframes; | ||
1193 | u8 max_tx_aggregation_subframes; | ||
1168 | }; | 1194 | }; |
1169 | 1195 | ||
1170 | /** | 1196 | /** |
@@ -1688,7 +1714,9 @@ enum ieee80211_ampdu_mlme_action { | |||
1688 | * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep. | 1714 | * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep. |
1689 | * | 1715 | * |
1690 | * @sta_notify: Notifies low level driver about power state transition of an | 1716 | * @sta_notify: Notifies low level driver about power state transition of an |
1691 | * associated station, AP, IBSS/WDS/mesh peer etc. Must be atomic. | 1717 | * associated station, AP, IBSS/WDS/mesh peer etc. For a VIF operating |
1718 | * in AP mode, this callback will not be called when the flag | ||
1719 | * %IEEE80211_HW_AP_LINK_PS is set. Must be atomic. | ||
1692 | * | 1720 | * |
1693 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), | 1721 | * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), |
1694 | * bursting) for a hardware TX queue. | 1722 | * bursting) for a hardware TX queue. |
@@ -1723,6 +1751,10 @@ enum ieee80211_ampdu_mlme_action { | |||
1723 | * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn) | 1751 | * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn) |
1724 | * is the first frame we expect to perform the action on. Notice | 1752 | * is the first frame we expect to perform the action on. Notice |
1725 | * that TX/RX_STOP can pass NULL for this parameter. | 1753 | * that TX/RX_STOP can pass NULL for this parameter. |
1754 | * The @buf_size parameter is only valid when the action is set to | ||
1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder | ||
1756 | * buffer size (number of subframes) for this session -- aggregates | ||
1757 | * containing more subframes than this may not be transmitted to the peer. | ||
1726 | * Returns a negative error code on failure. | 1758 | * Returns a negative error code on failure. |
1727 | * The callback can sleep. | 1759 | * The callback can sleep. |
1728 | * | 1760 | * |
@@ -1767,9 +1799,18 @@ enum ieee80211_ampdu_mlme_action { | |||
1767 | * ieee80211_remain_on_channel_expired(). This callback may sleep. | 1799 | * ieee80211_remain_on_channel_expired(). This callback may sleep. |
1768 | * @cancel_remain_on_channel: Requests that an ongoing off-channel period is | 1800 | * @cancel_remain_on_channel: Requests that an ongoing off-channel period is |
1769 | * aborted before it expires. This callback may sleep. | 1801 | * aborted before it expires. This callback may sleep. |
1802 | * @offchannel_tx: Transmit frame on another channel, wait for a response | ||
1803 | * and return. Reliable TX status must be reported for the frame. If the | ||
1804 | * return value is 1, then the @remain_on_channel will be used with a | ||
1805 | * regular transmission (if supported.) | ||
1806 | * @offchannel_tx_cancel_wait: cancel wait associated with offchannel TX | ||
1807 | * | ||
1808 | * @set_ringparam: Set tx and rx ring sizes. | ||
1809 | * | ||
1810 | * @get_ringparam: Get tx and rx ring current and maximum sizes. | ||
1770 | */ | 1811 | */ |
1771 | struct ieee80211_ops { | 1812 | struct ieee80211_ops { |
1772 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1813 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
1773 | int (*start)(struct ieee80211_hw *hw); | 1814 | int (*start)(struct ieee80211_hw *hw); |
1774 | void (*stop)(struct ieee80211_hw *hw); | 1815 | void (*stop)(struct ieee80211_hw *hw); |
1775 | int (*add_interface)(struct ieee80211_hw *hw, | 1816 | int (*add_interface)(struct ieee80211_hw *hw, |
@@ -1825,7 +1866,8 @@ struct ieee80211_ops { | |||
1825 | int (*ampdu_action)(struct ieee80211_hw *hw, | 1866 | int (*ampdu_action)(struct ieee80211_hw *hw, |
1826 | struct ieee80211_vif *vif, | 1867 | struct ieee80211_vif *vif, |
1827 | enum ieee80211_ampdu_mlme_action action, | 1868 | enum ieee80211_ampdu_mlme_action action, |
1828 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 1869 | struct ieee80211_sta *sta, u16 tid, u16 *ssn, |
1870 | u8 buf_size); | ||
1829 | int (*get_survey)(struct ieee80211_hw *hw, int idx, | 1871 | int (*get_survey)(struct ieee80211_hw *hw, int idx, |
1830 | struct survey_info *survey); | 1872 | struct survey_info *survey); |
1831 | void (*rfkill_poll)(struct ieee80211_hw *hw); | 1873 | void (*rfkill_poll)(struct ieee80211_hw *hw); |
@@ -1845,6 +1887,14 @@ struct ieee80211_ops { | |||
1845 | enum nl80211_channel_type channel_type, | 1887 | enum nl80211_channel_type channel_type, |
1846 | int duration); | 1888 | int duration); |
1847 | int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); | 1889 | int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); |
1890 | int (*offchannel_tx)(struct ieee80211_hw *hw, struct sk_buff *skb, | ||
1891 | struct ieee80211_channel *chan, | ||
1892 | enum nl80211_channel_type channel_type, | ||
1893 | unsigned int wait); | ||
1894 | int (*offchannel_tx_cancel_wait)(struct ieee80211_hw *hw); | ||
1895 | int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); | ||
1896 | void (*get_ringparam)(struct ieee80211_hw *hw, | ||
1897 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); | ||
1848 | }; | 1898 | }; |
1849 | 1899 | ||
1850 | /** | 1900 | /** |
@@ -2113,6 +2163,48 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw, | |||
2113 | local_bh_enable(); | 2163 | local_bh_enable(); |
2114 | } | 2164 | } |
2115 | 2165 | ||
2166 | /** | ||
2167 | * ieee80211_sta_ps_transition - PS transition for connected sta | ||
2168 | * | ||
2169 | * When operating in AP mode with the %IEEE80211_HW_AP_LINK_PS | ||
2170 | * flag set, use this function to inform mac80211 about a connected station | ||
2171 | * entering/leaving PS mode. | ||
2172 | * | ||
2173 | * This function may not be called in IRQ context or with softirqs enabled. | ||
2174 | * | ||
2175 | * Calls to this function for a single hardware must be synchronized against | ||
2176 | * each other. | ||
2177 | * | ||
2178 | * The function returns -EINVAL when the requested PS mode is already set. | ||
2179 | * | ||
2180 | * @sta: currently connected sta | ||
2181 | * @start: start or stop PS | ||
2182 | */ | ||
2183 | int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start); | ||
2184 | |||
2185 | /** | ||
2186 | * ieee80211_sta_ps_transition_ni - PS transition for connected sta | ||
2187 | * (in process context) | ||
2188 | * | ||
2189 | * Like ieee80211_sta_ps_transition() but can be called in process context | ||
2190 | * (internally disables bottom halves). Concurrent call restriction still | ||
2191 | * applies. | ||
2192 | * | ||
2193 | * @sta: currently connected sta | ||
2194 | * @start: start or stop PS | ||
2195 | */ | ||
2196 | static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, | ||
2197 | bool start) | ||
2198 | { | ||
2199 | int ret; | ||
2200 | |||
2201 | local_bh_disable(); | ||
2202 | ret = ieee80211_sta_ps_transition(sta, start); | ||
2203 | local_bh_enable(); | ||
2204 | |||
2205 | return ret; | ||
2206 | } | ||
2207 | |||
2116 | /* | 2208 | /* |
2117 | * The TX headroom reserved by mac80211 for its own tx_status functions. | 2209 | * The TX headroom reserved by mac80211 for its own tx_status functions. |
2118 | * This is enough for the radiotap header. | 2210 | * This is enough for the radiotap header. |