aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h236
1 files changed, 141 insertions, 95 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 26b5b692c22b..7b0730aeb892 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -188,6 +188,8 @@ struct ieee80211_channel {
188 * when used with 802.11g (on the 2.4 GHz band); filled by the 188 * when used with 802.11g (on the 2.4 GHz band); filled by the
189 * core code when registering the wiphy. 189 * core code when registering the wiphy.
190 * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode. 190 * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode.
191 * @IEEE80211_RATE_SUPPORTS_5MHZ: Rate can be used in 5 MHz mode
192 * @IEEE80211_RATE_SUPPORTS_10MHZ: Rate can be used in 10 MHz mode
191 */ 193 */
192enum ieee80211_rate_flags { 194enum ieee80211_rate_flags {
193 IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, 195 IEEE80211_RATE_SHORT_PREAMBLE = 1<<0,
@@ -195,6 +197,8 @@ enum ieee80211_rate_flags {
195 IEEE80211_RATE_MANDATORY_B = 1<<2, 197 IEEE80211_RATE_MANDATORY_B = 1<<2,
196 IEEE80211_RATE_MANDATORY_G = 1<<3, 198 IEEE80211_RATE_MANDATORY_G = 1<<3,
197 IEEE80211_RATE_ERP_G = 1<<4, 199 IEEE80211_RATE_ERP_G = 1<<4,
200 IEEE80211_RATE_SUPPORTS_5MHZ = 1<<5,
201 IEEE80211_RATE_SUPPORTS_10MHZ = 1<<6,
198}; 202};
199 203
200/** 204/**
@@ -433,6 +437,30 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
433 u32 prohibited_flags); 437 u32 prohibited_flags);
434 438
435/** 439/**
440 * ieee80211_chandef_rate_flags - returns rate flags for a channel
441 *
442 * In some channel types, not all rates may be used - for example CCK
443 * rates may not be used in 5/10 MHz channels.
444 *
445 * @chandef: channel definition for the channel
446 *
447 * Returns: rate flags which apply for this channel
448 */
449static inline enum ieee80211_rate_flags
450ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef)
451{
452 switch (chandef->width) {
453 case NL80211_CHAN_WIDTH_5:
454 return IEEE80211_RATE_SUPPORTS_5MHZ;
455 case NL80211_CHAN_WIDTH_10:
456 return IEEE80211_RATE_SUPPORTS_10MHZ;
457 default:
458 break;
459 }
460 return 0;
461}
462
463/**
436 * enum survey_info_flags - survey information flags 464 * enum survey_info_flags - survey information flags
437 * 465 *
438 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in 466 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in
@@ -753,6 +781,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
753 * @STATION_INFO_LOCAL_PM: @local_pm filled 781 * @STATION_INFO_LOCAL_PM: @local_pm filled
754 * @STATION_INFO_PEER_PM: @peer_pm filled 782 * @STATION_INFO_PEER_PM: @peer_pm filled
755 * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled 783 * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled
784 * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled
785 * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled
756 */ 786 */
757enum station_info_flags { 787enum station_info_flags {
758 STATION_INFO_INACTIVE_TIME = 1<<0, 788 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -781,6 +811,8 @@ enum station_info_flags {
781 STATION_INFO_NONPEER_PM = 1<<23, 811 STATION_INFO_NONPEER_PM = 1<<23,
782 STATION_INFO_RX_BYTES64 = 1<<24, 812 STATION_INFO_RX_BYTES64 = 1<<24,
783 STATION_INFO_TX_BYTES64 = 1<<25, 813 STATION_INFO_TX_BYTES64 = 1<<25,
814 STATION_INFO_CHAIN_SIGNAL = 1<<26,
815 STATION_INFO_CHAIN_SIGNAL_AVG = 1<<27,
784}; 816};
785 817
786/** 818/**
@@ -857,6 +889,8 @@ struct sta_bss_parameters {
857 u16 beacon_interval; 889 u16 beacon_interval;
858}; 890};
859 891
892#define IEEE80211_MAX_CHAINS 4
893
860/** 894/**
861 * struct station_info - station information 895 * struct station_info - station information
862 * 896 *
@@ -874,6 +908,9 @@ struct sta_bss_parameters {
874 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. 908 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
875 * @signal_avg: Average signal strength, type depends on the wiphy's signal_type. 909 * @signal_avg: Average signal strength, type depends on the wiphy's signal_type.
876 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. 910 * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
911 * @chains: bitmask for filled values in @chain_signal, @chain_signal_avg
912 * @chain_signal: per-chain signal strength of last received packet in dBm
913 * @chain_signal_avg: per-chain signal strength average in dBm
877 * @txrate: current unicast bitrate from this station 914 * @txrate: current unicast bitrate from this station
878 * @rxrate: current unicast bitrate to this station 915 * @rxrate: current unicast bitrate to this station
879 * @rx_packets: packets received from this station 916 * @rx_packets: packets received from this station
@@ -909,6 +946,11 @@ struct station_info {
909 u8 plink_state; 946 u8 plink_state;
910 s8 signal; 947 s8 signal;
911 s8 signal_avg; 948 s8 signal_avg;
949
950 u8 chains;
951 s8 chain_signal[IEEE80211_MAX_CHAINS];
952 s8 chain_signal_avg[IEEE80211_MAX_CHAINS];
953
912 struct rate_info txrate; 954 struct rate_info txrate;
913 struct rate_info rxrate; 955 struct rate_info rxrate;
914 u32 rx_packets; 956 u32 rx_packets;
@@ -947,6 +989,7 @@ struct station_info {
947 * @MONITOR_FLAG_CONTROL: pass control frames 989 * @MONITOR_FLAG_CONTROL: pass control frames
948 * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering 990 * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering
949 * @MONITOR_FLAG_COOK_FRAMES: report frames after processing 991 * @MONITOR_FLAG_COOK_FRAMES: report frames after processing
992 * @MONITOR_FLAG_ACTIVE: active monitor, ACKs frames on its MAC address
950 */ 993 */
951enum monitor_flags { 994enum monitor_flags {
952 MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL, 995 MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL,
@@ -954,6 +997,7 @@ enum monitor_flags {
954 MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL, 997 MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL,
955 MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS, 998 MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS,
956 MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES, 999 MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES,
1000 MONITOR_FLAG_ACTIVE = 1<<NL80211_MNTR_FLAG_ACTIVE,
957}; 1001};
958 1002
959/** 1003/**
@@ -1108,6 +1152,9 @@ struct bss_parameters {
1108 * setting for new peer links. 1152 * setting for new peer links.
1109 * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake 1153 * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake
1110 * after transmitting its beacon. 1154 * after transmitting its beacon.
1155 * @plink_timeout: If no tx activity is seen from a STA we've established
1156 * peering with for longer than this time (in seconds), then remove it
1157 * from the STA's list of peers. Default is 30 minutes.
1111 */ 1158 */
1112struct mesh_config { 1159struct mesh_config {
1113 u16 dot11MeshRetryTimeout; 1160 u16 dot11MeshRetryTimeout;
@@ -1137,6 +1184,7 @@ struct mesh_config {
1137 u16 dot11MeshHWMPconfirmationInterval; 1184 u16 dot11MeshHWMPconfirmationInterval;
1138 enum nl80211_mesh_power_mode power_mode; 1185 enum nl80211_mesh_power_mode power_mode;
1139 u16 dot11MeshAwakeWindowDuration; 1186 u16 dot11MeshAwakeWindowDuration;
1187 u32 plink_timeout;
1140}; 1188};
1141 1189
1142/** 1190/**
@@ -1147,6 +1195,7 @@ struct mesh_config {
1147 * @sync_method: which synchronization method to use 1195 * @sync_method: which synchronization method to use
1148 * @path_sel_proto: which path selection protocol to use 1196 * @path_sel_proto: which path selection protocol to use
1149 * @path_metric: which metric to use 1197 * @path_metric: which metric to use
1198 * @auth_id: which authentication method this mesh is using
1150 * @ie: vendor information elements (optional) 1199 * @ie: vendor information elements (optional)
1151 * @ie_len: length of vendor information elements 1200 * @ie_len: length of vendor information elements
1152 * @is_authenticated: this mesh requires authentication 1201 * @is_authenticated: this mesh requires authentication
@@ -1155,6 +1204,7 @@ struct mesh_config {
1155 * @dtim_period: DTIM period to use 1204 * @dtim_period: DTIM period to use
1156 * @beacon_interval: beacon interval to use 1205 * @beacon_interval: beacon interval to use
1157 * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] 1206 * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a]
1207 * @basic_rates: basic rates to use when creating the mesh
1158 * 1208 *
1159 * These parameters are fixed when the mesh is created. 1209 * These parameters are fixed when the mesh is created.
1160 */ 1210 */
@@ -1165,6 +1215,7 @@ struct mesh_setup {
1165 u8 sync_method; 1215 u8 sync_method;
1166 u8 path_sel_proto; 1216 u8 path_sel_proto;
1167 u8 path_metric; 1217 u8 path_metric;
1218 u8 auth_id;
1168 const u8 *ie; 1219 const u8 *ie;
1169 u8 ie_len; 1220 u8 ie_len;
1170 bool is_authenticated; 1221 bool is_authenticated;
@@ -1173,6 +1224,7 @@ struct mesh_setup {
1173 u8 dtim_period; 1224 u8 dtim_period;
1174 u16 beacon_interval; 1225 u16 beacon_interval;
1175 int mcast_rate[IEEE80211_NUM_BANDS]; 1226 int mcast_rate[IEEE80211_NUM_BANDS];
1227 u32 basic_rates;
1176}; 1228};
1177 1229
1178/** 1230/**
@@ -1241,6 +1293,7 @@ struct cfg80211_ssid {
1241 * @scan_start: time (in jiffies) when the scan started 1293 * @scan_start: time (in jiffies) when the scan started
1242 * @wdev: the wireless device to scan for 1294 * @wdev: the wireless device to scan for
1243 * @aborted: (internal) scan request was notified as aborted 1295 * @aborted: (internal) scan request was notified as aborted
1296 * @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 1297 * @no_cck: used to send probe requests at non CCK rate in 2GHz band
1245 */ 1298 */
1246struct cfg80211_scan_request { 1299struct cfg80211_scan_request {
@@ -1258,7 +1311,7 @@ struct cfg80211_scan_request {
1258 /* internal */ 1311 /* internal */
1259 struct wiphy *wiphy; 1312 struct wiphy *wiphy;
1260 unsigned long scan_start; 1313 unsigned long scan_start;
1261 bool aborted; 1314 bool aborted, notified;
1262 bool no_cck; 1315 bool no_cck;
1263 1316
1264 /* keep last */ 1317 /* keep last */
@@ -1406,7 +1459,8 @@ const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
1406 * This structure provides information needed to complete IEEE 802.11 1459 * This structure provides information needed to complete IEEE 802.11
1407 * authentication. 1460 * authentication.
1408 * 1461 *
1409 * @bss: The BSS to authenticate with. 1462 * @bss: The BSS to authenticate with, the callee must obtain a reference
1463 * to it if it needs to keep it.
1410 * @auth_type: Authentication type (algorithm) 1464 * @auth_type: Authentication type (algorithm)
1411 * @ie: Extra IEs to add to Authentication frame or %NULL 1465 * @ie: Extra IEs to add to Authentication frame or %NULL
1412 * @ie_len: Length of ie buffer in octets 1466 * @ie_len: Length of ie buffer in octets
@@ -1444,11 +1498,10 @@ enum cfg80211_assoc_req_flags {
1444 * 1498 *
1445 * This structure provides information needed to complete IEEE 802.11 1499 * This structure provides information needed to complete IEEE 802.11
1446 * (re)association. 1500 * (re)association.
1447 * @bss: The BSS to associate with. If the call is successful the driver 1501 * @bss: The BSS to associate with. If the call is successful the driver is
1448 * is given a reference that it must release, normally via a call to 1502 * given a reference that it must give back to cfg80211_send_rx_assoc()
1449 * cfg80211_send_rx_assoc(), or, if association timed out, with a 1503 * or to cfg80211_assoc_timeout(). To ensure proper refcounting, new
1450 * call to cfg80211_put_bss() (in addition to calling 1504 * association requests while already associating must be rejected.
1451 * cfg80211_send_assoc_timeout())
1452 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL 1505 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL
1453 * @ie_len: Length of ie buffer in octets 1506 * @ie_len: Length of ie buffer in octets
1454 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association 1507 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association
@@ -1850,7 +1903,9 @@ struct cfg80211_update_ft_ies_params {
1850 * @get_mpath: get a mesh path for the given parameters 1903 * @get_mpath: get a mesh path for the given parameters
1851 * @dump_mpath: dump mesh path callback -- resume dump at index @idx 1904 * @dump_mpath: dump mesh path callback -- resume dump at index @idx
1852 * @join_mesh: join the mesh network with the specified parameters 1905 * @join_mesh: join the mesh network with the specified parameters
1906 * (invoked with the wireless_dev mutex held)
1853 * @leave_mesh: leave the current mesh network 1907 * @leave_mesh: leave the current mesh network
1908 * (invoked with the wireless_dev mutex held)
1854 * 1909 *
1855 * @get_mesh_config: Get the current mesh configuration 1910 * @get_mesh_config: Get the current mesh configuration
1856 * 1911 *
@@ -1877,20 +1932,28 @@ struct cfg80211_update_ft_ies_params {
1877 * the scan/scan_done bracket too. 1932 * the scan/scan_done bracket too.
1878 * 1933 *
1879 * @auth: Request to authenticate with the specified peer 1934 * @auth: Request to authenticate with the specified peer
1935 * (invoked with the wireless_dev mutex held)
1880 * @assoc: Request to (re)associate with the specified peer 1936 * @assoc: Request to (re)associate with the specified peer
1937 * (invoked with the wireless_dev mutex held)
1881 * @deauth: Request to deauthenticate from the specified peer 1938 * @deauth: Request to deauthenticate from the specified peer
1939 * (invoked with the wireless_dev mutex held)
1882 * @disassoc: Request to disassociate from the specified peer 1940 * @disassoc: Request to disassociate from the specified peer
1941 * (invoked with the wireless_dev mutex held)
1883 * 1942 *
1884 * @connect: Connect to the ESS with the specified parameters. When connected, 1943 * @connect: Connect to the ESS with the specified parameters. When connected,
1885 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. 1944 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS.
1886 * If the connection fails for some reason, call cfg80211_connect_result() 1945 * If the connection fails for some reason, call cfg80211_connect_result()
1887 * with the status from the AP. 1946 * with the status from the AP.
1947 * (invoked with the wireless_dev mutex held)
1888 * @disconnect: Disconnect from the BSS/ESS. 1948 * @disconnect: Disconnect from the BSS/ESS.
1949 * (invoked with the wireless_dev mutex held)
1889 * 1950 *
1890 * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call 1951 * @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 1952 * cfg80211_ibss_joined(), also call that function when changing BSSID due
1892 * to a merge. 1953 * to a merge.
1954 * (invoked with the wireless_dev mutex held)
1893 * @leave_ibss: Leave the IBSS. 1955 * @leave_ibss: Leave the IBSS.
1956 * (invoked with the wireless_dev mutex held)
1894 * 1957 *
1895 * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or 1958 * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or
1896 * MESH mode) 1959 * MESH mode)
@@ -2307,6 +2370,7 @@ struct cfg80211_ops {
2307 * responds to probe-requests in hardware. 2370 * responds to probe-requests in hardware.
2308 * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. 2371 * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX.
2309 * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. 2372 * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call.
2373 * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels.
2310 */ 2374 */
2311enum wiphy_flags { 2375enum wiphy_flags {
2312 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 2376 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -2330,6 +2394,7 @@ enum wiphy_flags {
2330 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), 2394 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19),
2331 WIPHY_FLAG_OFFCHAN_TX = BIT(20), 2395 WIPHY_FLAG_OFFCHAN_TX = BIT(20),
2332 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), 2396 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21),
2397 WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22),
2333}; 2398};
2334 2399
2335/** 2400/**
@@ -2556,6 +2621,9 @@ struct wiphy_wowlan_support {
2556 * may request, if implemented. 2621 * may request, if implemented.
2557 * 2622 *
2558 * @wowlan: WoWLAN support information 2623 * @wowlan: WoWLAN support information
2624 * @wowlan_config: current WoWLAN configuration; this should usually not be
2625 * used since access to it is necessarily racy, use the parameter passed
2626 * to the suspend() operation instead.
2559 * 2627 *
2560 * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. 2628 * @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. 2629 * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden.
@@ -2622,7 +2690,8 @@ struct wiphy {
2622 u32 hw_version; 2690 u32 hw_version;
2623 2691
2624#ifdef CONFIG_PM 2692#ifdef CONFIG_PM
2625 struct wiphy_wowlan_support wowlan; 2693 const struct wiphy_wowlan_support *wowlan;
2694 struct cfg80211_wowlan *wowlan_config;
2626#endif 2695#endif
2627 2696
2628 u16 max_remain_on_channel_duration; 2697 u16 max_remain_on_channel_duration;
@@ -2820,7 +2889,7 @@ struct cfg80211_cached_keys;
2820 * @current_bss: (private) Used by the internal configuration code 2889 * @current_bss: (private) Used by the internal configuration code
2821 * @channel: (private) Used by the internal configuration code to track 2890 * @channel: (private) Used by the internal configuration code to track
2822 * the user-set AP, monitor and WDS channel 2891 * the user-set AP, monitor and WDS channel
2823 * @preset_chan: (private) Used by the internal configuration code to 2892 * @preset_chandef: (private) Used by the internal configuration code to
2824 * track the channel to be used for AP later 2893 * track the channel to be used for AP later
2825 * @bssid: (private) Used by the internal configuration code 2894 * @bssid: (private) Used by the internal configuration code
2826 * @ssid: (private) Used by the internal configuration code 2895 * @ssid: (private) Used by the internal configuration code
@@ -2834,14 +2903,23 @@ struct cfg80211_cached_keys;
2834 * by cfg80211 on change_interface 2903 * by cfg80211 on change_interface
2835 * @mgmt_registrations: list of registrations for management frames 2904 * @mgmt_registrations: list of registrations for management frames
2836 * @mgmt_registrations_lock: lock for the list 2905 * @mgmt_registrations_lock: lock for the list
2837 * @mtx: mutex used to lock data in this struct 2906 * @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 2907 * and some API functions require it held
2839 * @beacon_interval: beacon interval used on this device for transmitting 2908 * @beacon_interval: beacon interval used on this device for transmitting
2840 * beacons, 0 when not valid 2909 * beacons, 0 when not valid
2841 * @address: The address for this device, valid only if @netdev is %NULL 2910 * @address: The address for this device, valid only if @netdev is %NULL
2842 * @p2p_started: true if this is a P2P Device that has been started 2911 * @p2p_started: true if this is a P2P Device that has been started
2843 * @cac_started: true if DFS channel availability check has been started 2912 * @cac_started: true if DFS channel availability check has been started
2844 * @cac_start_time: timestamp (jiffies) when the dfs state was entered. 2913 * @cac_start_time: timestamp (jiffies) when the dfs state was entered.
2914 * @ps: powersave mode is enabled
2915 * @ps_timeout: dynamic powersave timeout
2916 * @ap_unexpected_nlportid: (private) netlink port ID of application
2917 * registered for unexpected class 3 frames (AP mode)
2918 * @conn: (private) cfg80211 software SME connection state machine data
2919 * @connect_keys: (private) keys to set after connection is established
2920 * @ibss_fixed: (private) IBSS is using fixed BSSID
2921 * @event_list: (private) list for internal event processing
2922 * @event_lock: (private) lock for event list
2845 */ 2923 */
2846struct wireless_dev { 2924struct wireless_dev {
2847 struct wiphy *wiphy; 2925 struct wiphy *wiphy;
@@ -2858,8 +2936,6 @@ struct wireless_dev {
2858 2936
2859 struct mutex mtx; 2937 struct mutex mtx;
2860 2938
2861 struct work_struct cleanup_work;
2862
2863 bool use_4addr, p2p_started; 2939 bool use_4addr, p2p_started;
2864 2940
2865 u8 address[ETH_ALEN] __aligned(sizeof(u16)); 2941 u8 address[ETH_ALEN] __aligned(sizeof(u16));
@@ -2867,11 +2943,6 @@ struct wireless_dev {
2867 /* currently used for IBSS and SME - might be rearranged later */ 2943 /* currently used for IBSS and SME - might be rearranged later */
2868 u8 ssid[IEEE80211_MAX_SSID_LEN]; 2944 u8 ssid[IEEE80211_MAX_SSID_LEN];
2869 u8 ssid_len, mesh_id_len, mesh_id_up_len; 2945 u8 ssid_len, mesh_id_len, mesh_id_up_len;
2870 enum {
2871 CFG80211_SME_IDLE,
2872 CFG80211_SME_CONNECTING,
2873 CFG80211_SME_CONNECTED,
2874 } sme_state;
2875 struct cfg80211_conn *conn; 2946 struct cfg80211_conn *conn;
2876 struct cfg80211_cached_keys *connect_keys; 2947 struct cfg80211_cached_keys *connect_keys;
2877 2948
@@ -2989,6 +3060,15 @@ struct ieee80211_rate *
2989ieee80211_get_response_rate(struct ieee80211_supported_band *sband, 3060ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
2990 u32 basic_rates, int bitrate); 3061 u32 basic_rates, int bitrate);
2991 3062
3063/**
3064 * ieee80211_mandatory_rates - get mandatory rates for a given band
3065 * @sband: the band to look for rates in
3066 *
3067 * This function returns a bitmap of the mandatory rates for the given
3068 * band, bits are set according to the rate position in the bitrates array.
3069 */
3070u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband);
3071
2992/* 3072/*
2993 * Radiotap parsing functions -- for controlled injection support 3073 * Radiotap parsing functions -- for controlled injection support
2994 * 3074 *
@@ -3392,122 +3472,87 @@ void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
3392void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); 3472void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
3393 3473
3394/** 3474/**
3395 * cfg80211_send_rx_auth - notification of processed authentication 3475 * cfg80211_rx_mlme_mgmt - notification of processed MLME management frame
3396 * @dev: network device 3476 * @dev: network device
3397 * @buf: authentication frame (header + body) 3477 * @buf: authentication frame (header + body)
3398 * @len: length of the frame data 3478 * @len: length of the frame data
3399 * 3479 *
3400 * This function is called whenever an authentication has been processed in 3480 * This function is called whenever an authentication, disassociation or
3401 * station mode. The driver is required to call either this function or 3481 * deauthentication frame has been received and processed in station mode.
3402 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() 3482 * After being asked to authenticate via cfg80211_ops::auth() the driver must
3403 * call. This function may sleep. 3483 * call either this function or cfg80211_auth_timeout().
3484 * After being asked to associate via cfg80211_ops::assoc() the driver must
3485 * call either this function or cfg80211_auth_timeout().
3486 * While connected, the driver must calls this for received and processed
3487 * disassociation and deauthentication frames. If the frame couldn't be used
3488 * because it was unprotected, the driver must call the function
3489 * cfg80211_rx_unprot_mlme_mgmt() instead.
3490 *
3491 * This function may sleep. The caller must hold the corresponding wdev's mutex.
3404 */ 3492 */
3405void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); 3493void cfg80211_rx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len);
3406 3494
3407/** 3495/**
3408 * cfg80211_send_auth_timeout - notification of timed out authentication 3496 * cfg80211_auth_timeout - notification of timed out authentication
3409 * @dev: network device 3497 * @dev: network device
3410 * @addr: The MAC address of the device with which the authentication timed out 3498 * @addr: The MAC address of the device with which the authentication timed out
3411 * 3499 *
3412 * This function may sleep. 3500 * This function may sleep. The caller must hold the corresponding wdev's
3501 * mutex.
3413 */ 3502 */
3414void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 3503void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr);
3415 3504
3416/** 3505/**
3417 * cfg80211_send_rx_assoc - notification of processed association 3506 * cfg80211_rx_assoc_resp - notification of processed association response
3418 * @dev: network device 3507 * @dev: network device
3419 * @bss: the BSS struct association was requested for, the struct reference 3508 * @bss: the BSS that association was requested with, ownership of the pointer
3420 * is owned by cfg80211 after this call 3509 * moves to cfg80211 in this call
3421 * @buf: (re)association response frame (header + body) 3510 * @buf: authentication frame (header + body)
3422 * @len: length of the frame data 3511 * @len: length of the frame data
3423 * 3512 *
3424 * This function is called whenever a (re)association response has been 3513 * After being asked to associate via cfg80211_ops::assoc() the driver must
3425 * processed in station mode. The driver is required to call either this 3514 * call either this function or cfg80211_auth_timeout().
3426 * function or cfg80211_send_assoc_timeout() to indicate the result of 3515 *
3427 * cfg80211_ops::assoc() call. This function may sleep. 3516 * This function may sleep. The caller must hold the corresponding wdev's mutex.
3428 */ 3517 */
3429void cfg80211_send_rx_assoc(struct net_device *dev, struct cfg80211_bss *bss, 3518void cfg80211_rx_assoc_resp(struct net_device *dev,
3519 struct cfg80211_bss *bss,
3430 const u8 *buf, size_t len); 3520 const u8 *buf, size_t len);
3431 3521
3432/** 3522/**
3433 * cfg80211_send_assoc_timeout - notification of timed out association 3523 * cfg80211_assoc_timeout - notification of timed out association
3434 * @dev: network device 3524 * @dev: network device
3435 * @addr: The MAC address of the device with which the association timed out 3525 * @bss: The BSS entry with which association timed out.
3436 * 3526 *
3437 * This function may sleep. 3527 * This function may sleep. The caller must hold the corresponding wdev's mutex.
3438 */ 3528 */
3439void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); 3529void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss);
3440 3530
3441/** 3531/**
3442 * cfg80211_send_deauth - notification of processed deauthentication 3532 * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame
3443 * @dev: network device 3533 * @dev: network device
3444 * @buf: deauthentication frame (header + body) 3534 * @buf: 802.11 frame (header + body)
3445 * @len: length of the frame data 3535 * @len: length of the frame data
3446 * 3536 *
3447 * This function is called whenever deauthentication has been processed in 3537 * This function is called whenever deauthentication has been processed in
3448 * station mode. This includes both received deauthentication frames and 3538 * station mode. This includes both received deauthentication frames and
3449 * locally generated ones. This function may sleep. 3539 * locally generated ones. This function may sleep. The caller must hold the
3450 */ 3540 * corresponding wdev's mutex.
3451void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
3452
3453/**
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
3465 * @dev: network device
3466 * @buf: disassociation response frame (header + body)
3467 * @len: length of the frame data
3468 *
3469 * This function is called whenever disassociation has been processed in
3470 * station mode. This includes both received disassociation frames and locally
3471 * generated ones. This function may sleep.
3472 */
3473void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len);
3474
3475/**
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 */ 3541 */
3483void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, 3542void cfg80211_tx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len);
3484 size_t len);
3485 3543
3486/** 3544/**
3487 * cfg80211_send_unprot_deauth - notification of unprotected deauthentication 3545 * cfg80211_rx_unprot_mlme_mgmt - notification of unprotected mlme mgmt frame
3488 * @dev: network device 3546 * @dev: network device
3489 * @buf: deauthentication frame (header + body) 3547 * @buf: deauthentication frame (header + body)
3490 * @len: length of the frame data 3548 * @len: length of the frame data
3491 * 3549 *
3492 * This function is called whenever a received Deauthentication frame has been 3550 * This function is called whenever a received deauthentication or dissassoc
3493 * dropped in station mode because of MFP being used but the Deauthentication 3551 * frame has been dropped in station mode because of MFP being used but the
3494 * frame was not protected. This function may sleep. 3552 * frame was not protected. This function may sleep.
3495 */ 3553 */
3496void cfg80211_send_unprot_deauth(struct net_device *dev, const u8 *buf, 3554void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev,
3497 size_t len); 3555 const u8 *buf, size_t len);
3498
3499/**
3500 * cfg80211_send_unprot_disassoc - notification of unprotected disassociation
3501 * @dev: network device
3502 * @buf: disassociation frame (header + body)
3503 * @len: length of the frame data
3504 *
3505 * This function is called whenever a received Disassociation frame has been
3506 * dropped in station mode because of MFP being used but the Disassociation
3507 * frame was not protected. This function may sleep.
3508 */
3509void cfg80211_send_unprot_disassoc(struct net_device *dev, const u8 *buf,
3510 size_t len);
3511 3556
3512/** 3557/**
3513 * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) 3558 * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP)
@@ -4153,6 +4198,7 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
4153 * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver. 4198 * cfg80211_crit_proto_stopped() - indicate critical protocol stopped by driver.
4154 * 4199 *
4155 * @wdev: the wireless device for which critical protocol is stopped. 4200 * @wdev: the wireless device for which critical protocol is stopped.
4201 * @gfp: allocation flags
4156 * 4202 *
4157 * This function can be called by the driver to indicate it has reverted 4203 * 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 4204 * operation back to normal. One reason could be that the duration given