aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-06-11 14:48:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-06-11 14:48:32 -0400
commit3899ba90a4ab2f3cab8e0f91a76c14ff131c8293 (patch)
treeae82b469f8a7ceb42547d11dd1fe5c73abc8635b /include
parent45203a3b380cee28f570475c0d28c169f908c209 (diff)
parent8b3e7be437a6b62118d0485ad971e724afe23fdf (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/ath/ath9k/debug.c net/mac80211/iface.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211.h9
-rw-r--r--include/linux/platform_data/net-cw1200.h81
-rw-r--r--include/linux/ssb/ssb_regs.h1
-rw-r--r--include/net/cfg80211.h89
-rw-r--r--include/net/ieee80211_radiotap.h7
-rw-r--r--include/net/mac80211.h14
-rw-r--r--include/uapi/linux/nl80211.h24
7 files changed, 191 insertions, 34 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/linux/platform_data/net-cw1200.h b/include/linux/platform_data/net-cw1200.h
new file mode 100644
index 000000000000..c6fbc3ce4ab0
--- /dev/null
+++ b/include/linux/platform_data/net-cw1200.h
@@ -0,0 +1,81 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2011
3 *
4 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#ifndef CW1200_PLAT_H_INCLUDED
9#define CW1200_PLAT_H_INCLUDED
10
11struct cw1200_platform_data_spi {
12 u8 spi_bits_per_word; /* REQUIRED */
13 u16 ref_clk; /* REQUIRED (in KHz) */
14
15 /* All others are optional */
16 bool have_5ghz;
17 int reset; /* GPIO to RSTn signal (0 disables) */
18 int powerup; /* GPIO to POWERUP signal (0 disables) */
19 int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata,
20 bool enable); /* Control 3v3 / 1v8 supply */
21 int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata,
22 bool enable); /* Control CLK32K */
23 const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
24 const char *sdd_file; /* if NULL, will use default for detected hw type */
25};
26
27struct cw1200_platform_data_sdio {
28 u16 ref_clk; /* REQUIRED (in KHz) */
29
30 /* All others are optional */
31 bool have_5ghz;
32 bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */
33 int reset; /* GPIO to RSTn signal (0 disables) */
34 int powerup; /* GPIO to POWERUP signal (0 disables) */
35 int irq; /* IRQ line or 0 to use SDIO IRQ */
36 int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata,
37 bool enable); /* Control 3v3 / 1v8 supply */
38 int (*clk_ctrl)(const struct cw1200_platform_data_sdio *pdata,
39 bool enable); /* Control CLK32K */
40 const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
41 const char *sdd_file; /* if NULL, will use default for detected hw type */
42};
43
44
45/* An example of SPI support in your board setup file:
46
47 static struct cw1200_platform_data_spi cw1200_platform_data = {
48 .ref_clk = 38400,
49 .spi_bits_per_word = 16,
50 .reset = GPIO_RF_RESET,
51 .powerup = GPIO_RF_POWERUP,
52 .macaddr = wifi_mac_addr,
53 .sdd_file = "sdd_sagrad_1091_1098.bin",
54 };
55 static struct spi_board_info myboard_spi_devices[] __initdata = {
56 {
57 .modalias = "cw1200_wlan_spi",
58 .max_speed_hz = 52000000,
59 .bus_num = 0,
60 .irq = WIFI_IRQ,
61 .platform_data = &cw1200_platform_data,
62 .chip_select = 0,
63 },
64 };
65
66 */
67
68/* An example of SDIO support in your board setup file:
69
70 static struct cw1200_platform_data_sdio my_cw1200_platform_data = {
71 .ref_clk = 38400,
72 .have_5ghz = false,
73 .sdd_file = "sdd_myplatform.bin",
74 };
75 cw1200_sdio_set_platform_data(&my_cw1200_platform_data);
76
77 */
78
79void __init cw1200_sdio_set_platform_data(struct cw1200_platform_data_sdio *pdata);
80
81#endif /* CW1200_PLAT_H_INCLUDED */
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index 3a7256955b10..f9f931c89e3e 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -172,6 +172,7 @@
172#define SSB_SPROMSIZE_WORDS_R4 220 172#define SSB_SPROMSIZE_WORDS_R4 220
173#define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16)) 173#define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16))
174#define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16)) 174#define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16))
175#define SSB_SPROMSIZE_WORDS_R10 230
175#define SSB_SPROM_BASE1 0x1000 176#define SSB_SPROM_BASE1 0x1000
176#define SSB_SPROM_BASE31 0x0800 177#define SSB_SPROM_BASE31 0x0800
177#define SSB_SPROM_REVISION 0x007E 178#define SSB_SPROM_REVISION 0x007E
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 26b5b692c22b..6dd19593e333 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;
@@ -947,6 +961,7 @@ struct station_info {
947 * @MONITOR_FLAG_CONTROL: pass control frames 961 * @MONITOR_FLAG_CONTROL: pass control frames
948 * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering 962 * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering
949 * @MONITOR_FLAG_COOK_FRAMES: report frames after processing 963 * @MONITOR_FLAG_COOK_FRAMES: report frames after processing
964 * @MONITOR_FLAG_ACTIVE: active monitor, ACKs frames on its MAC address
950 */ 965 */
951enum monitor_flags { 966enum monitor_flags {
952 MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, 967 MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL,
@@ -954,6 +969,7 @@ enum monitor_flags {
954 MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, 969 MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL,
955 MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS, 970 MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS,
956 MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, 971 MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES,
972 MONITOR_FLAG_ACTIVE = 1<<NL80211_MNTR_FLAG_ACTIVE,
957}; 973};
958 974
959/** 975/**
@@ -1147,6 +1163,7 @@ struct mesh_config {
1147 * @sync_method: which synchronization method to use 1163 * @sync_method: which synchronization method to use
1148 * @path_sel_proto: which path selection protocol to use 1164 * @path_sel_proto: which path selection protocol to use
1149 * @path_metric: which metric to use 1165 * @path_metric: which metric to use
1166 * @auth_id: which authentication method this mesh is using
1150 * @ie: vendor information elements (optional) 1167 * @ie: vendor information elements (optional)
1151 * @ie_len: length of vendor information elements 1168 * @ie_len: length of vendor information elements
1152 * @is_authenticated: this mesh requires authentication 1169 * @is_authenticated: this mesh requires authentication
@@ -1165,6 +1182,7 @@ struct mesh_setup {
1165 u8 sync_method; 1182 u8 sync_method;
1166 u8 path_sel_proto; 1183 u8 path_sel_proto;
1167 u8 path_metric; 1184 u8 path_metric;
1185 u8 auth_id;
1168 const u8 *ie; 1186 const u8 *ie;
1169 u8 ie_len; 1187 u8 ie_len;
1170 bool is_authenticated; 1188 bool is_authenticated;
@@ -1241,6 +1259,7 @@ struct cfg80211_ssid {
1241 * @scan_start: time (in jiffies) when the scan started 1259 * @scan_start: time (in jiffies) when the scan started
1242 * @wdev: the wireless device to scan for 1260 * @wdev: the wireless device to scan for
1243 * @aborted: (internal) scan request was notified as aborted 1261 * @aborted: (internal) scan request was notified as aborted
1262 * @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 1263 * @no_cck: used to send probe requests at non CCK rate in 2GHz band
1245 */ 1264 */
1246struct cfg80211_scan_request { 1265struct cfg80211_scan_request {
@@ -1258,7 +1277,7 @@ struct cfg80211_scan_request {
1258 /* internal */ 1277 /* internal */
1259 struct wiphy *wiphy; 1278 struct wiphy *wiphy;
1260 unsigned long scan_start; 1279 unsigned long scan_start;
1261 bool aborted; 1280 bool aborted, notified;
1262 bool no_cck; 1281 bool no_cck;
1263 1282
1264 /* keep last */ 1283 /* keep last */
@@ -1850,7 +1869,9 @@ struct cfg80211_update_ft_ies_params {
1850 * @get_mpath: get a mesh path for the given parameters 1869 * @get_mpath: get a mesh path for the given parameters
1851 * @dump_mpath: dump mesh path callback -- resume dump at index @idx 1870 * @dump_mpath: dump mesh path callback -- resume dump at index @idx
1852 * @join_mesh: join the mesh network with the specified parameters 1871 * @join_mesh: join the mesh network with the specified parameters
1872 * (invoked with the wireless_dev mutex held)
1853 * @leave_mesh: leave the current mesh network 1873 * @leave_mesh: leave the current mesh network
1874 * (invoked with the wireless_dev mutex held)
1854 * 1875 *
1855 * @get_mesh_config: Get the current mesh configuration 1876 * @get_mesh_config: Get the current mesh configuration
1856 * 1877 *
@@ -1877,20 +1898,28 @@ struct cfg80211_update_ft_ies_params {
1877 * the scan/scan_done bracket too. 1898 * the scan/scan_done bracket too.
1878 * 1899 *
1879 * @auth: Request to authenticate with the specified peer 1900 * @auth: Request to authenticate with the specified peer
1901 * (invoked with the wireless_dev mutex held)
1880 * @assoc: Request to (re)associate with the specified peer 1902 * @assoc: Request to (re)associate with the specified peer
1903 * (invoked with the wireless_dev mutex held)
1881 * @deauth: Request to deauthenticate from the specified peer 1904 * @deauth: Request to deauthenticate from the specified peer
1905 * (invoked with the wireless_dev mutex held)
1882 * @disassoc: Request to disassociate from the specified peer 1906 * @disassoc: Request to disassociate from the specified peer
1907 * (invoked with the wireless_dev mutex held)
1883 * 1908 *
1884 * @connect: Connect to the ESS with the specified parameters. When connected, 1909 * @connect: Connect to the ESS with the specified parameters. When connected,
1885 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. 1910 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS.
1886 * If the connection fails for some reason, call cfg80211_connect_result() 1911 * If the connection fails for some reason, call cfg80211_connect_result()
1887 * with the status from the AP. 1912 * with the status from the AP.
1913 * (invoked with the wireless_dev mutex held)
1888 * @disconnect: Disconnect from the BSS/ESS. 1914 * @disconnect: Disconnect from the BSS/ESS.
1915 * (invoked with the wireless_dev mutex held)
1889 * 1916 *
1890 * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call 1917 * @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 1918 * cfg80211_ibss_joined(), also call that function when changing BSSID due
1892 * to a merge. 1919 * to a merge.
1920 * (invoked with the wireless_dev mutex held)
1893 * @leave_ibss: Leave the IBSS. 1921 * @leave_ibss: Leave the IBSS.
1922 * (invoked with the wireless_dev mutex held)
1894 * 1923 *
1895 * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or 1924 * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or
1896 * MESH mode) 1925 * MESH mode)
@@ -2556,6 +2585,9 @@ struct wiphy_wowlan_support {
2556 * may request, if implemented. 2585 * may request, if implemented.
2557 * 2586 *
2558 * @wowlan: WoWLAN support information 2587 * @wowlan: WoWLAN support information
2588 * @wowlan_config: current WoWLAN configuration; this should usually not be
2589 * used since access to it is necessarily racy, use the parameter passed
2590 * to the suspend() operation instead.
2559 * 2591 *
2560 * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. 2592 * @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. 2593 * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden.
@@ -2623,6 +2655,7 @@ struct wiphy {
2623 2655
2624#ifdef CONFIG_PM 2656#ifdef CONFIG_PM
2625 struct wiphy_wowlan_support wowlan; 2657 struct wiphy_wowlan_support wowlan;
2658 struct cfg80211_wowlan *wowlan_config;
2626#endif 2659#endif
2627 2660
2628 u16 max_remain_on_channel_duration; 2661 u16 max_remain_on_channel_duration;
@@ -2834,8 +2867,8 @@ struct cfg80211_cached_keys;
2834 * by cfg80211 on change_interface 2867 * by cfg80211 on change_interface
2835 * @mgmt_registrations: list of registrations for management frames 2868 * @mgmt_registrations: list of registrations for management frames
2836 * @mgmt_registrations_lock: lock for the list 2869 * @mgmt_registrations_lock: lock for the list
2837 * @mtx: mutex used to lock data in this struct 2870 * @mtx: mutex used to lock data in this struct, may be used by drivers
2838 * @cleanup_work: work struct used for cleanup that can't be done directly 2871 * and some API functions require it held
2839 * @beacon_interval: beacon interval used on this device for transmitting 2872 * @beacon_interval: beacon interval used on this device for transmitting
2840 * beacons, 0 when not valid 2873 * beacons, 0 when not valid
2841 * @address: The address for this device, valid only if @netdev is %NULL 2874 * @address: The address for this device, valid only if @netdev is %NULL
@@ -2858,8 +2891,6 @@ struct wireless_dev {
2858 2891
2859 struct mutex mtx; 2892 struct mutex mtx;
2860 2893
2861 struct work_struct cleanup_work;
2862
2863 bool use_4addr, p2p_started; 2894 bool use_4addr, p2p_started;
2864 2895
2865 u8 address[ETH_ALEN] __aligned(sizeof(u16)); 2896 u8 address[ETH_ALEN] __aligned(sizeof(u16));
@@ -2989,6 +3020,15 @@ struct ieee80211_rate *
2989ieee80211_get_response_rate(struct ieee80211_supported_band *sband, 3020ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
2990 u32 basic_rates, int bitrate); 3021 u32 basic_rates, int bitrate);
2991 3022
3023/**
3024 * ieee80211_mandatory_rates - get mandatory rates for a given band
3025 * @sband: the band to look for rates in
3026 *
3027 * This function returns a bitmap of the mandatory rates for the given
3028 * band, bits are set according to the rate position in the bitrates array.
3029 */
3030u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband);
3031
2992/* 3032/*
2993 * Radiotap parsing functions -- for controlled injection support 3033 * Radiotap parsing functions -- for controlled injection support
2994 * 3034 *
@@ -3400,7 +3440,8 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
3400 * This function is called whenever an authentication has been processed in 3440 * This function is called whenever an authentication has been processed in
3401 * station mode. The driver is required to call either this function or 3441 * 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() 3442 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth()
3403 * call. This function may sleep. 3443 * call. This function may sleep. The caller must hold the corresponding wdev's
3444 * mutex.
3404 */ 3445 */
3405void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); 3446void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
3406 3447
@@ -3409,7 +3450,8 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
3409 * @dev: network device 3450 * @dev: network device
3410 * @addr: The MAC address of the device with which the authentication timed out 3451 * @addr: The MAC address of the device with which the authentication timed out
3411 * 3452 *
3412 * This function may sleep. 3453 * This function may sleep. The caller must hold the corresponding wdev's
3454 * mutex.
3413 */ 3455 */
3414void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 3456void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
3415 3457
@@ -3424,7 +3466,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 3466 * This function is called whenever a (re)association response has been
3425 * processed in station mode. The driver is required to call either this 3467 * processed in station mode. The driver is required to call either this
3426 * function or cfg80211_send_assoc_timeout() to indicate the result of 3468 * function or cfg80211_send_assoc_timeout() to indicate the result of
3427 * cfg80211_ops::assoc() call. This function may sleep. 3469 * cfg80211_ops::assoc() call. This function may sleep. The caller must hold
3470 * the corresponding wdev's mutex.
3428 */ 3471 */
3429void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, 3472void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss,
3430 const u8 *buf, size_t len); 3473 const u8 *buf, size_t len);
@@ -3434,7 +3477,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss,
3434 * @dev: network device 3477 * @dev: network device
3435 * @addr: The MAC address of the device with which the association timed out 3478 * @addr: The MAC address of the device with which the association timed out
3436 * 3479 *
3437 * This function may sleep. 3480 * This function may sleep. The caller must hold the corresponding wdev's mutex.
3438 */ 3481 */
3439void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); 3482void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
3440 3483
@@ -3446,21 +3489,12 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
3446 * 3489 *
3447 * This function is called whenever deauthentication has been processed in 3490 * This function is called whenever deauthentication has been processed in
3448 * station mode. This includes both received deauthentication frames and 3491 * station mode. This includes both received deauthentication frames and
3449 * locally generated ones. This function may sleep. 3492 * locally generated ones. This function may sleep. The caller must hold the
3493 * corresponding wdev's mutex.
3450 */ 3494 */
3451void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); 3495void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
3452 3496
3453/** 3497/**
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 3498 * cfg80211_send_disassoc - notification of processed disassociation
3465 * @dev: network device 3499 * @dev: network device
3466 * @buf: disassociation response frame (header + body) 3500 * @buf: disassociation response frame (header + body)
@@ -3468,22 +3502,12 @@ void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
3468 * 3502 *
3469 * This function is called whenever disassociation has been processed in 3503 * This function is called whenever disassociation has been processed in
3470 * station mode. This includes both received disassociation frames and locally 3504 * station mode. This includes both received disassociation frames and locally
3471 * generated ones. This function may sleep. 3505 * generated ones. This function may sleep. The caller must hold the
3506 * corresponding wdev's mutex.
3472 */ 3507 */
3473void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); 3508void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len);
3474 3509
3475/** 3510/**
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 3511 * cfg80211_send_unprot_deauth - notification of unprotected deauthentication
3488 * @dev: network device 3512 * @dev: network device
3489 * @buf: deauthentication frame (header + body) 3513 * @buf: deauthentication frame (header + body)
@@ -4153,6 +4177,7 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
4153 * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. 4177 * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver.
4154 * 4178 *
4155 * @wdev: the wireless device for which critical protocol is stopped. 4179 * @wdev: the wireless device for which critical protocol is stopped.
4180 * @gfp: allocation flags
4156 * 4181 *
4157 * This function can be called by the driver to indicate it has reverted 4182 * 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 4183 * 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 885898a40d13..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];
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index d1e48b5e348f..5920715278c2 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,
@@ -2413,6 +2428,8 @@ enum nl80211_survey_info {
2413 * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering 2428 * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering
2414 * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing. 2429 * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing.
2415 * overrides all other flags. 2430 * overrides all other flags.
2431 * @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address
2432 * and ACK incoming unicast packets.
2416 * 2433 *
2417 * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use 2434 * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use
2418 * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag 2435 * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag
@@ -2424,6 +2441,7 @@ enum nl80211_mntr_flags {
2424 NL80211_MNTR_FLAG_CONTROL, 2441 NL80211_MNTR_FLAG_CONTROL,
2425 NL80211_MNTR_FLAG_OTHER_BSS, 2442 NL80211_MNTR_FLAG_OTHER_BSS,
2426 NL80211_MNTR_FLAG_COOK_FRAMES, 2443 NL80211_MNTR_FLAG_COOK_FRAMES,
2444 NL80211_MNTR_FLAG_ACTIVE,
2427 2445
2428 /* keep last */ 2446 /* keep last */
2429 __NL80211_MNTR_FLAG_AFTER_LAST, 2447 __NL80211_MNTR_FLAG_AFTER_LAST,
@@ -2637,6 +2655,10 @@ enum nl80211_meshconf_params {
2637 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will 2655 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
2638 * implement an MPM which handles peer allocation and state. 2656 * implement an MPM which handles peer allocation and state.
2639 * 2657 *
2658 * @NL80211_MESH_SETUP_AUTH_PROTOCOL: Inform the kernel of the authentication
2659 * method (u8, as defined in IEEE 8.4.2.100.6, e.g. 0x1 for SAE).
2660 * Default is no authentication method required.
2661 *
2640 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 2662 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
2641 * 2663 *
2642 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 2664 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -2650,6 +2672,7 @@ enum nl80211_mesh_setup_params {
2650 NL80211_MESH_SETUP_USERSPACE_AMPE, 2672 NL80211_MESH_SETUP_USERSPACE_AMPE,
2651 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, 2673 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
2652 NL80211_MESH_SETUP_USERSPACE_MPM, 2674 NL80211_MESH_SETUP_USERSPACE_MPM,
2675 NL80211_MESH_SETUP_AUTH_PROTOCOL,
2653 2676
2654 /* keep last */ 2677 /* keep last */
2655 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 2678 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -3575,6 +3598,7 @@ enum nl80211_feature_flags {
3575 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, 3598 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
3576 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, 3599 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
3577 NL80211_FEATURE_USERSPACE_MPM = 1 << 16, 3600 NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
3601 NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17,
3578}; 3602};
3579 3603
3580/** 3604/**