aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-05-29 14:51:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-05-29 14:51:50 -0400
commit933faa43ab9c1545c53ea082a8e4e1d1859568aa (patch)
tree933a7e52081af4cb32699587cb79173537f6c638 /include
parent531efffc3e3ff52d732c8fa6f32e084e9c447612 (diff)
parent6abb9cb99f33b20c2f32f18a3ae9cc7543e46edb (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211.h9
-rw-r--r--include/net/cfg80211.h86
-rw-r--r--include/net/ieee80211_radiotap.h7
-rw-r--r--include/net/mac80211.h26
-rw-r--r--include/uapi/linux/nl80211.h20
5 files changed, 111 insertions, 37 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 06b0ed0154a4..d826e5a84af0 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1829,6 +1829,15 @@ enum ieee80211_key_len {
1829 WLAN_KEY_LEN_AES_CMAC = 16, 1829 WLAN_KEY_LEN_AES_CMAC = 16,
1830}; 1830};
1831 1831
1832#define IEEE80211_WEP_IV_LEN 4
1833#define IEEE80211_WEP_ICV_LEN 4
1834#define IEEE80211_CCMP_HDR_LEN 8
1835#define IEEE80211_CCMP_MIC_LEN 8
1836#define IEEE80211_CCMP_PN_LEN 6
1837#define IEEE80211_TKIP_IV_LEN 8
1838#define IEEE80211_TKIP_ICV_LEN 4
1839#define IEEE80211_CMAC_PN_LEN 6
1840
1832/* Public action codes */ 1841/* Public action codes */
1833enum ieee80211_pub_actioncode { 1842enum ieee80211_pub_actioncode {
1834 WLAN_PUB_ACTION_EXT_CHANSW_ANN = 4, 1843 WLAN_PUB_ACTION_EXT_CHANSW_ANN = 4,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 26b5b692c22b..b3b076a46d50 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -753,6 +753,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
753 * @STATION_INFO_LOCAL_PM: @local_pm filled 753 * @STATION_INFO_LOCAL_PM: @local_pm filled
754 * @STATION_INFO_PEER_PM: @peer_pm filled 754 * @STATION_INFO_PEER_PM: @peer_pm filled
755 * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled 755 * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled
756 * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled
757 * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled
756 */ 758 */
757enum station_info_flags { 759enum station_info_flags {
758 STATION_INFO_INACTIVE_TIME = 1<<0, 760 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -781,6 +783,8 @@ enum station_info_flags {
781 STATION_INFO_NONPEER_PM = 1<<23, 783 STATION_INFO_NONPEER_PM = 1<<23,
782 STATION_INFO_RX_BYTES64 = 1<<24, 784 STATION_INFO_RX_BYTES64 = 1<<24,
783 STATION_INFO_TX_BYTES64 = 1<<25, 785 STATION_INFO_TX_BYTES64 = 1<<25,
786 STATION_INFO_CHAIN_SIGNAL = 1<<26,
787 STATION_INFO_CHAIN_SIGNAL_AVG = 1<<27,
784}; 788};
785 789
786/** 790/**
@@ -857,6 +861,8 @@ struct sta_bss_parameters {
857 u16 beacon_interval; 861 u16 beacon_interval;
858}; 862};
859 863
864#define IEEE80211_MAX_CHAINS 4
865
860/** 866/**
861 * struct station_info - station information 867 * struct station_info - station information
862 * 868 *
@@ -874,6 +880,9 @@ struct sta_bss_parameters {
874 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. 880 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
875 * @signal_avg: Average signal strength, type depends on the wiphy's signal_type. 881 * @signal_avg: Average signal strength, type depends on the wiphy's signal_type.
876 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. 882 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
883 * @chains: bitmask for filled values in @chain_signal, @chain_signal_avg
884 * @chain_signal: per-chain signal strength of last received packet in dBm
885 * @chain_signal_avg: per-chain signal strength average in dBm
877 * @txrate: current unicast bitrate from this station 886 * @txrate: current unicast bitrate from this station
878 * @rxrate: current unicast bitrate to this station 887 * @rxrate: current unicast bitrate to this station
879 * @rx_packets: packets received from this station 888 * @rx_packets: packets received from this station
@@ -909,6 +918,11 @@ struct station_info {
909 u8 plink_state; 918 u8 plink_state;
910 s8 signal; 919 s8 signal;
911 s8 signal_avg; 920 s8 signal_avg;
921
922 u8 chains;
923 s8 chain_signal[IEEE80211_MAX_CHAINS];
924 s8 chain_signal_avg[IEEE80211_MAX_CHAINS];
925
912 struct rate_info txrate; 926 struct rate_info txrate;
913 struct rate_info rxrate; 927 struct rate_info rxrate;
914 u32 rx_packets; 928 u32 rx_packets;
@@ -1147,6 +1161,7 @@ struct mesh_config {
1147 * @sync_method: which synchronization method to use 1161 * @sync_method: which synchronization method to use
1148 * @path_sel_proto: which path selection protocol to use 1162 * @path_sel_proto: which path selection protocol to use
1149 * @path_metric: which metric to use 1163 * @path_metric: which metric to use
1164 * @auth_id: which authentication method this mesh is using
1150 * @ie: vendor information elements (optional) 1165 * @ie: vendor information elements (optional)
1151 * @ie_len: length of vendor information elements 1166 * @ie_len: length of vendor information elements
1152 * @is_authenticated: this mesh requires authentication 1167 * @is_authenticated: this mesh requires authentication
@@ -1165,6 +1180,7 @@ struct mesh_setup {
1165 u8 sync_method; 1180 u8 sync_method;
1166 u8 path_sel_proto; 1181 u8 path_sel_proto;
1167 u8 path_metric; 1182 u8 path_metric;
1183 u8 auth_id;
1168 const u8 *ie; 1184 const u8 *ie;
1169 u8 ie_len; 1185 u8 ie_len;
1170 bool is_authenticated; 1186 bool is_authenticated;
@@ -1241,6 +1257,7 @@ struct cfg80211_ssid {
1241 * @scan_start: time (in jiffies) when the scan started 1257 * @scan_start: time (in jiffies) when the scan started
1242 * @wdev: the wireless device to scan for 1258 * @wdev: the wireless device to scan for
1243 * @aborted: (internal) scan request was notified as aborted 1259 * @aborted: (internal) scan request was notified as aborted
1260 * @notified: (internal) scan request was notified as done or aborted
1244 * @no_cck: used to send probe requests at non CCK rate in 2GHz band 1261 * @no_cck: used to send probe requests at non CCK rate in 2GHz band
1245 */ 1262 */
1246struct cfg80211_scan_request { 1263struct cfg80211_scan_request {
@@ -1258,7 +1275,7 @@ struct cfg80211_scan_request {
1258 /* internal */ 1275 /* internal */
1259 struct wiphy *wiphy; 1276 struct wiphy *wiphy;
1260 unsigned long scan_start; 1277 unsigned long scan_start;
1261 bool aborted; 1278 bool aborted, notified;
1262 bool no_cck; 1279 bool no_cck;
1263 1280
1264 /* keep last */ 1281 /* keep last */
@@ -1850,7 +1867,9 @@ struct cfg80211_update_ft_ies_params {
1850 * @get_mpath: get a mesh path for the given parameters 1867 * @get_mpath: get a mesh path for the given parameters
1851 * @dump_mpath: dump mesh path callback -- resume dump at index @idx 1868 * @dump_mpath: dump mesh path callback -- resume dump at index @idx
1852 * @join_mesh: join the mesh network with the specified parameters 1869 * @join_mesh: join the mesh network with the specified parameters
1870 * (invoked with the wireless_dev mutex held)
1853 * @leave_mesh: leave the current mesh network 1871 * @leave_mesh: leave the current mesh network
1872 * (invoked with the wireless_dev mutex held)
1854 * 1873 *
1855 * @get_mesh_config: Get the current mesh configuration 1874 * @get_mesh_config: Get the current mesh configuration
1856 * 1875 *
@@ -1877,20 +1896,28 @@ struct cfg80211_update_ft_ies_params {
1877 * the scan/scan_done bracket too. 1896 * the scan/scan_done bracket too.
1878 * 1897 *
1879 * @auth: Request to authenticate with the specified peer 1898 * @auth: Request to authenticate with the specified peer
1899 * (invoked with the wireless_dev mutex held)
1880 * @assoc: Request to (re)associate with the specified peer 1900 * @assoc: Request to (re)associate with the specified peer
1901 * (invoked with the wireless_dev mutex held)
1881 * @deauth: Request to deauthenticate from the specified peer 1902 * @deauth: Request to deauthenticate from the specified peer
1903 * (invoked with the wireless_dev mutex held)
1882 * @disassoc: Request to disassociate from the specified peer 1904 * @disassoc: Request to disassociate from the specified peer
1905 * (invoked with the wireless_dev mutex held)
1883 * 1906 *
1884 * @connect: Connect to the ESS with the specified parameters. When connected, 1907 * @connect: Connect to the ESS with the specified parameters. When connected,
1885 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. 1908 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS.
1886 * If the connection fails for some reason, call cfg80211_connect_result() 1909 * If the connection fails for some reason, call cfg80211_connect_result()
1887 * with the status from the AP. 1910 * with the status from the AP.
1911 * (invoked with the wireless_dev mutex held)
1888 * @disconnect: Disconnect from the BSS/ESS. 1912 * @disconnect: Disconnect from the BSS/ESS.
1913 * (invoked with the wireless_dev mutex held)
1889 * 1914 *
1890 * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call 1915 * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call
1891 * cfg80211_ibss_joined(), also call that function when changing BSSID due 1916 * cfg80211_ibss_joined(), also call that function when changing BSSID due
1892 * to a merge. 1917 * to a merge.
1918 * (invoked with the wireless_dev mutex held)
1893 * @leave_ibss: Leave the IBSS. 1919 * @leave_ibss: Leave the IBSS.
1920 * (invoked with the wireless_dev mutex held)
1894 * 1921 *
1895 * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or 1922 * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or
1896 * MESH mode) 1923 * MESH mode)
@@ -2556,6 +2583,9 @@ struct wiphy_wowlan_support {
2556 * may request, if implemented. 2583 * may request, if implemented.
2557 * 2584 *
2558 * @wowlan: WoWLAN support information 2585 * @wowlan: WoWLAN support information
2586 * @wowlan_config: current WoWLAN configuration; this should usually not be
2587 * used since access to it is necessarily racy, use the parameter passed
2588 * to the suspend() operation instead.
2559 * 2589 *
2560 * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. 2590 * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features.
2561 * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden. 2591 * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden.
@@ -2623,6 +2653,7 @@ struct wiphy {
2623 2653
2624#ifdef CONFIG_PM 2654#ifdef CONFIG_PM
2625 struct wiphy_wowlan_support wowlan; 2655 struct wiphy_wowlan_support wowlan;
2656 struct cfg80211_wowlan *wowlan_config;
2626#endif 2657#endif
2627 2658
2628 u16 max_remain_on_channel_duration; 2659 u16 max_remain_on_channel_duration;
@@ -2834,7 +2865,8 @@ struct cfg80211_cached_keys;
2834 * by cfg80211 on change_interface 2865 * by cfg80211 on change_interface
2835 * @mgmt_registrations: list of registrations for management frames 2866 * @mgmt_registrations: list of registrations for management frames
2836 * @mgmt_registrations_lock: lock for the list 2867 * @mgmt_registrations_lock: lock for the list
2837 * @mtx: mutex used to lock data in this struct 2868 * @mtx: mutex used to lock data in this struct, may be used by drivers
2869 * and some API functions require it held
2838 * @cleanup_work: work struct used for cleanup that can't be done directly 2870 * @cleanup_work: work struct used for cleanup that can't be done directly
2839 * @beacon_interval: beacon interval used on this device for transmitting 2871 * @beacon_interval: beacon interval used on this device for transmitting
2840 * beacons, 0 when not valid 2872 * beacons, 0 when not valid
@@ -2858,8 +2890,6 @@ struct wireless_dev {
2858 2890
2859 struct mutex mtx; 2891 struct mutex mtx;
2860 2892
2861 struct work_struct cleanup_work;
2862
2863 bool use_4addr, p2p_started; 2893 bool use_4addr, p2p_started;
2864 2894
2865 u8 address[ETH_ALEN] __aligned(sizeof(u16)); 2895 u8 address[ETH_ALEN] __aligned(sizeof(u16));
@@ -2989,6 +3019,15 @@ struct ieee80211_rate *
2989ieee80211_get_response_rate(struct ieee80211_supported_band *sband, 3019ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
2990 u32 basic_rates, int bitrate); 3020 u32 basic_rates, int bitrate);
2991 3021
3022/**
3023 * ieee80211_mandatory_rates - get mandatory rates for a given band
3024 * @sband: the band to look for rates in
3025 *
3026 * This function returns a bitmap of the mandatory rates for the given
3027 * band, bits are set according to the rate position in the bitrates array.
3028 */
3029u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband);
3030
2992/* 3031/*
2993 * Radiotap parsing functions -- for controlled injection support 3032 * Radiotap parsing functions -- for controlled injection support
2994 * 3033 *
@@ -3400,7 +3439,8 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
3400 * This function is called whenever an authentication has been processed in 3439 * This function is called whenever an authentication has been processed in
3401 * station mode. The driver is required to call either this function or 3440 * station mode. The driver is required to call either this function or
3402 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() 3441 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth()
3403 * call. This function may sleep. 3442 * call. This function may sleep. The caller must hold the corresponding wdev's
3443 * mutex.
3404 */ 3444 */
3405void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); 3445void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
3406 3446
@@ -3409,7 +3449,8 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
3409 * @dev: network device 3449 * @dev: network device
3410 * @addr: The MAC address of the device with which the authentication timed out 3450 * @addr: The MAC address of the device with which the authentication timed out
3411 * 3451 *
3412 * This function may sleep. 3452 * This function may sleep. The caller must hold the corresponding wdev's
3453 * mutex.
3413 */ 3454 */
3414void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 3455void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
3415 3456
@@ -3424,7 +3465,8 @@ void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
3424 * This function is called whenever a (re)association response has been 3465 * This function is called whenever a (re)association response has been
3425 * processed in station mode. The driver is required to call either this 3466 * processed in station mode. The driver is required to call either this
3426 * function or cfg80211_send_assoc_timeout() to indicate the result of 3467 * function or cfg80211_send_assoc_timeout() to indicate the result of
3427 * cfg80211_ops::assoc() call. This function may sleep. 3468 * cfg80211_ops::assoc() call. This function may sleep. The caller must hold
3469 * the corresponding wdev's mutex.
3428 */ 3470 */
3429void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, 3471void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss,
3430 const u8 *buf, size_t len); 3472 const u8 *buf, size_t len);
@@ -3434,7 +3476,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss,
3434 * @dev: network device 3476 * @dev: network device
3435 * @addr: The MAC address of the device with which the association timed out 3477 * @addr: The MAC address of the device with which the association timed out
3436 * 3478 *
3437 * This function may sleep. 3479 * This function may sleep. The caller must hold the corresponding wdev's mutex.
3438 */ 3480 */
3439void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); 3481void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
3440 3482
@@ -3446,21 +3488,12 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
3446 * 3488 *
3447 * This function is called whenever deauthentication has been processed in 3489 * This function is called whenever deauthentication has been processed in
3448 * station mode. This includes both received deauthentication frames and 3490 * station mode. This includes both received deauthentication frames and
3449 * locally generated ones. This function may sleep. 3491 * locally generated ones. This function may sleep. The caller must hold the
3492 * corresponding wdev's mutex.
3450 */ 3493 */
3451void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); 3494void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
3452 3495
3453/** 3496/**
3454 * __cfg80211_send_deauth - notification of processed deauthentication
3455 * @dev: network device
3456 * @buf: deauthentication frame (header + body)
3457 * @len: length of the frame data
3458 *
3459 * Like cfg80211_send_deauth(), but doesn't take the wdev lock.
3460 */
3461void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
3462
3463/**
3464 * cfg80211_send_disassoc - notification of processed disassociation 3497 * cfg80211_send_disassoc - notification of processed disassociation
3465 * @dev: network device 3498 * @dev: network device
3466 * @buf: disassociation response frame (header + body) 3499 * @buf: disassociation response frame (header + body)
@@ -3468,22 +3501,12 @@ void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
3468 * 3501 *
3469 * This function is called whenever disassociation has been processed in 3502 * This function is called whenever disassociation has been processed in
3470 * station mode. This includes both received disassociation frames and locally 3503 * station mode. This includes both received disassociation frames and locally
3471 * generated ones. This function may sleep. 3504 * generated ones. This function may sleep. The caller must hold the
3505 * corresponding wdev's mutex.
3472 */ 3506 */
3473void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); 3507void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len);
3474 3508
3475/** 3509/**
3476 * __cfg80211_send_disassoc - notification of processed disassociation
3477 * @dev: network device
3478 * @buf: disassociation response frame (header + body)
3479 * @len: length of the frame data
3480 *
3481 * Like cfg80211_send_disassoc(), but doesn't take the wdev lock.
3482 */
3483void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf,
3484 size_t len);
3485
3486/**
3487 * cfg80211_send_unprot_deauth - notification of unprotected deauthentication 3510 * cfg80211_send_unprot_deauth - notification of unprotected deauthentication
3488 * @dev: network device 3511 * @dev: network device
3489 * @buf: deauthentication frame (header + body) 3512 * @buf: deauthentication frame (header + body)
@@ -4153,6 +4176,7 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
4153 * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. 4176 * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver.
4154 * 4177 *
4155 * @wdev: the wireless device for which critical protocol is stopped. 4178 * @wdev: the wireless device for which critical protocol is stopped.
4179 * @gfp: allocation flags
4156 * 4180 *
4157 * This function can be called by the driver to indicate it has reverted 4181 * This function can be called by the driver to indicate it has reverted
4158 * operation back to normal. One reason could be that the duration given 4182 * operation back to normal. One reason could be that the duration given
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index c3999632e616..c6d07cb074bc 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -269,6 +269,7 @@ enum ieee80211_radiotap_type {
269#define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04 269#define IEEE80211_RADIOTAP_MCS_HAVE_GI 0x04
270#define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08 270#define IEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08
271#define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10 271#define IEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10
272#define IEEE80211_RADIOTAP_MCS_HAVE_STBC 0x20
272 273
273#define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03 274#define IEEE80211_RADIOTAP_MCS_BW_MASK 0x03
274#define IEEE80211_RADIOTAP_MCS_BW_20 0 275#define IEEE80211_RADIOTAP_MCS_BW_20 0
@@ -278,6 +279,12 @@ enum ieee80211_radiotap_type {
278#define IEEE80211_RADIOTAP_MCS_SGI 0x04 279#define IEEE80211_RADIOTAP_MCS_SGI 0x04
279#define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08 280#define IEEE80211_RADIOTAP_MCS_FMT_GF 0x08
280#define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 281#define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10
282#define IEEE80211_RADIOTAP_MCS_STBC_MASK 0x60
283#define IEEE80211_RADIOTAP_MCS_STBC_1 1
284#define IEEE80211_RADIOTAP_MCS_STBC_2 2
285#define IEEE80211_RADIOTAP_MCS_STBC_3 3
286
287#define IEEE80211_RADIOTAP_MCS_STBC_SHIFT 5
281 288
282/* For IEEE80211_RADIOTAP_AMPDU_STATUS */ 289/* For IEEE80211_RADIOTAP_AMPDU_STATUS */
283#define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001 290#define IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 04c2d4670dc6..1f0014bd4d87 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -805,6 +805,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
805 * on this subframe 805 * on this subframe
806 * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC 806 * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC
807 * is stored in the @ampdu_delimiter_crc field) 807 * is stored in the @ampdu_delimiter_crc field)
808 * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3
808 */ 809 */
809enum mac80211_rx_flags { 810enum mac80211_rx_flags {
810 RX_FLAG_MMIC_ERROR = BIT(0), 811 RX_FLAG_MMIC_ERROR = BIT(0),
@@ -832,8 +833,11 @@ enum mac80211_rx_flags {
832 RX_FLAG_80MHZ = BIT(23), 833 RX_FLAG_80MHZ = BIT(23),
833 RX_FLAG_80P80MHZ = BIT(24), 834 RX_FLAG_80P80MHZ = BIT(24),
834 RX_FLAG_160MHZ = BIT(25), 835 RX_FLAG_160MHZ = BIT(25),
836 RX_FLAG_STBC_MASK = BIT(26) | BIT(27),
835}; 837};
836 838
839#define RX_FLAG_STBC_SHIFT 26
840
837/** 841/**
838 * struct ieee80211_rx_status - receive status 842 * struct ieee80211_rx_status - receive status
839 * 843 *
@@ -850,6 +854,10 @@ enum mac80211_rx_flags {
850 * @signal: signal strength when receiving this frame, either in dBm, in dB or 854 * @signal: signal strength when receiving this frame, either in dBm, in dB or
851 * unspecified depending on the hardware capabilities flags 855 * unspecified depending on the hardware capabilities flags
852 * @IEEE80211_HW_SIGNAL_* 856 * @IEEE80211_HW_SIGNAL_*
857 * @chains: bitmask of receive chains for which separate signal strength
858 * values were filled.
859 * @chain_signal: per-chain signal strength, in dBm (unlike @signal, doesn't
860 * support dB or unspecified units)
853 * @antenna: antenna used 861 * @antenna: antenna used
854 * @rate_idx: index of data rate into band's supported rates or MCS index if 862 * @rate_idx: index of data rate into band's supported rates or MCS index if
855 * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) 863 * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
@@ -881,6 +889,8 @@ struct ieee80211_rx_status {
881 u8 band; 889 u8 band;
882 u8 antenna; 890 u8 antenna;
883 s8 signal; 891 s8 signal;
892 u8 chains;
893 s8 chain_signal[IEEE80211_MAX_CHAINS];
884 u8 ampdu_delimiter_crc; 894 u8 ampdu_delimiter_crc;
885 u8 vendor_radiotap_align; 895 u8 vendor_radiotap_align;
886 u8 vendor_radiotap_oui[3]; 896 u8 vendor_radiotap_oui[3];
@@ -1235,7 +1245,7 @@ enum ieee80211_sta_rx_bandwidth {
1235 * struct ieee80211_sta_rates - station rate selection table 1245 * struct ieee80211_sta_rates - station rate selection table
1236 * 1246 *
1237 * @rcu_head: RCU head used for freeing the table on update 1247 * @rcu_head: RCU head used for freeing the table on update
1238 * @rates: transmit rates/flags to be used by default. 1248 * @rate: transmit rates/flags to be used by default.
1239 * Overriding entries per-packet is possible by using cb tx control. 1249 * Overriding entries per-packet is possible by using cb tx control.
1240 */ 1250 */
1241struct ieee80211_sta_rates { 1251struct ieee80211_sta_rates {
@@ -1276,7 +1286,7 @@ struct ieee80211_sta_rates {
1276 * notifications and capabilities. The value is only valid after 1286 * notifications and capabilities. The value is only valid after
1277 * the station moves to associated state. 1287 * the station moves to associated state.
1278 * @smps_mode: current SMPS mode (off, static or dynamic) 1288 * @smps_mode: current SMPS mode (off, static or dynamic)
1279 * @tx_rates: rate control selection table 1289 * @rates: rate control selection table
1280 */ 1290 */
1281struct ieee80211_sta { 1291struct ieee80211_sta {
1282 u32 supp_rates[IEEE80211_NUM_BANDS]; 1292 u32 supp_rates[IEEE80211_NUM_BANDS];
@@ -3043,7 +3053,8 @@ void ieee80211_napi_complete(struct ieee80211_hw *hw);
3043 * This function may not be called in IRQ context. Calls to this function 3053 * This function may not be called in IRQ context. Calls to this function
3044 * for a single hardware must be synchronized against each other. Calls to 3054 * for a single hardware must be synchronized against each other. Calls to
3045 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be 3055 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
3046 * mixed for a single hardware. 3056 * mixed for a single hardware. Must not run concurrently with
3057 * ieee80211_tx_status() or ieee80211_tx_status_ni().
3047 * 3058 *
3048 * In process context use instead ieee80211_rx_ni(). 3059 * In process context use instead ieee80211_rx_ni().
3049 * 3060 *
@@ -3059,7 +3070,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
3059 * (internally defers to a tasklet.) 3070 * (internally defers to a tasklet.)
3060 * 3071 *
3061 * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not 3072 * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not
3062 * be mixed for a single hardware. 3073 * be mixed for a single hardware.Must not run concurrently with
3074 * ieee80211_tx_status() or ieee80211_tx_status_ni().
3063 * 3075 *
3064 * @hw: the hardware this frame came in on 3076 * @hw: the hardware this frame came in on
3065 * @skb: the buffer to receive, owned by mac80211 after this call 3077 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -3073,7 +3085,8 @@ void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
3073 * (internally disables bottom halves). 3085 * (internally disables bottom halves).
3074 * 3086 *
3075 * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may 3087 * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may
3076 * not be mixed for a single hardware. 3088 * not be mixed for a single hardware. Must not run concurrently with
3089 * ieee80211_tx_status() or ieee80211_tx_status_ni().
3077 * 3090 *
3078 * @hw: the hardware this frame came in on 3091 * @hw: the hardware this frame came in on
3079 * @skb: the buffer to receive, owned by mac80211 after this call 3092 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -3196,7 +3209,8 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif,
3196 * This function may not be called in IRQ context. Calls to this function 3209 * This function may not be called in IRQ context. Calls to this function
3197 * for a single hardware must be synchronized against each other. Calls 3210 * for a single hardware must be synchronized against each other. Calls
3198 * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() 3211 * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe()
3199 * may not be mixed for a single hardware. 3212 * may not be mixed for a single hardware. Must not run concurrently with
3213 * ieee80211_rx() or ieee80211_rx_ni().
3200 * 3214 *
3201 * @hw: the hardware the frame was transmitted by 3215 * @hw: the hardware the frame was transmitted by
3202 * @skb: the frame that was transmitted, owned by mac80211 after this call 3216 * @skb: the frame that was transmitted, owned by mac80211 after this call
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index d1e48b5e348f..32b060ea5266 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -27,6 +27,8 @@
27 27
28#include <linux/types.h> 28#include <linux/types.h>
29 29
30#define NL80211_GENL_NAME "nl80211"
31
30/** 32/**
31 * DOC: Station handling 33 * DOC: Station handling
32 * 34 *
@@ -1429,6 +1431,11 @@ enum nl80211_commands {
1429 * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which 1431 * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which
1430 * the connection should have increased reliability (u16). 1432 * the connection should have increased reliability (u16).
1431 * 1433 *
1434 * @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16).
1435 * This is similar to @NL80211_ATTR_STA_AID but with a difference of being
1436 * allowed to be used with the first @NL80211_CMD_SET_STATION command to
1437 * update a TDLS peer STA entry.
1438 *
1432 * @NL80211_ATTR_MAX: highest attribute number currently defined 1439 * @NL80211_ATTR_MAX: highest attribute number currently defined
1433 * @__NL80211_ATTR_AFTER_LAST: internal use 1440 * @__NL80211_ATTR_AFTER_LAST: internal use
1434 */ 1441 */
@@ -1727,6 +1734,8 @@ enum nl80211_attrs {
1727 NL80211_ATTR_CRIT_PROT_ID, 1734 NL80211_ATTR_CRIT_PROT_ID,
1728 NL80211_ATTR_MAX_CRIT_PROT_DURATION, 1735 NL80211_ATTR_MAX_CRIT_PROT_DURATION,
1729 1736
1737 NL80211_ATTR_PEER_AID,
1738
1730 /* add attributes here, update the policy in nl80211.c */ 1739 /* add attributes here, update the policy in nl80211.c */
1731 1740
1732 __NL80211_ATTR_AFTER_LAST, 1741 __NL80211_ATTR_AFTER_LAST,
@@ -1991,6 +2000,10 @@ enum nl80211_sta_bss_param {
1991 * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode 2000 * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
1992 * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards 2001 * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
1993 * non-peer STA 2002 * non-peer STA
2003 * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
2004 * Contains a nested array of signal strength attributes (u8, dBm)
2005 * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
2006 * Same format as NL80211_STA_INFO_CHAIN_SIGNAL.
1994 * @__NL80211_STA_INFO_AFTER_LAST: internal 2007 * @__NL80211_STA_INFO_AFTER_LAST: internal
1995 * @NL80211_STA_INFO_MAX: highest possible station info attribute 2008 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1996 */ 2009 */
@@ -2020,6 +2033,8 @@ enum nl80211_sta_info {
2020 NL80211_STA_INFO_NONPEER_PM, 2033 NL80211_STA_INFO_NONPEER_PM,
2021 NL80211_STA_INFO_RX_BYTES64, 2034 NL80211_STA_INFO_RX_BYTES64,
2022 NL80211_STA_INFO_TX_BYTES64, 2035 NL80211_STA_INFO_TX_BYTES64,
2036 NL80211_STA_INFO_CHAIN_SIGNAL,
2037 NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
2023 2038
2024 /* keep last */ 2039 /* keep last */
2025 __NL80211_STA_INFO_AFTER_LAST, 2040 __NL80211_STA_INFO_AFTER_LAST,
@@ -2637,6 +2652,10 @@ enum nl80211_meshconf_params {
2637 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will 2652 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
2638 * implement an MPM which handles peer allocation and state. 2653 * implement an MPM which handles peer allocation and state.
2639 * 2654 *
2655 * @NL80211_MESH_SETUP_AUTH_PROTOCOL: Inform the kernel of the authentication
2656 * method (u8, as defined in IEEE 8.4.2.100.6, e.g. 0x1 for SAE).
2657 * Default is no authentication method required.
2658 *
2640 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 2659 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
2641 * 2660 *
2642 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 2661 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -2650,6 +2669,7 @@ enum nl80211_mesh_setup_params {
2650 NL80211_MESH_SETUP_USERSPACE_AMPE, 2669 NL80211_MESH_SETUP_USERSPACE_AMPE,
2651 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, 2670 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
2652 NL80211_MESH_SETUP_USERSPACE_MPM, 2671 NL80211_MESH_SETUP_USERSPACE_MPM,
2672 NL80211_MESH_SETUP_AUTH_PROTOCOL,
2653 2673
2654 /* keep last */ 2674 /* keep last */
2655 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 2675 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,