aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-02-18 13:47:13 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-18 13:47:13 -0500
commit98d5fac2330779e6eea6431a90b44c7476260dcc (patch)
tree99870656d835fc6c12093bc67517956cc7b3d6ec /include/net/cfg80211.h
parent4153577a8d318ae02b3791341e10e78416de402f (diff)
parent9e97d14b4923da524d202f2e005d5d30b70db9d6 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c drivers/net/wireless/ti/wlcore/sdio.c drivers/net/wireless/ti/wlcore/spi.c
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h226
1 files changed, 205 insertions, 21 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f9df20028bbd..d581c6de5d64 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -19,6 +19,7 @@
19#include <linux/nl80211.h> 19#include <linux/nl80211.h>
20#include <linux/if_ether.h> 20#include <linux/if_ether.h>
21#include <linux/ieee80211.h> 21#include <linux/ieee80211.h>
22#include <linux/net.h>
22#include <net/regulatory.h> 23#include <net/regulatory.h>
23 24
24/** 25/**
@@ -99,6 +100,16 @@ enum ieee80211_band {
99 * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel 100 * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel
100 * is not permitted. 101 * is not permitted.
101 * @IEEE80211_CHAN_NO_OFDM: OFDM is not allowed on this channel. 102 * @IEEE80211_CHAN_NO_OFDM: OFDM is not allowed on this channel.
103 * @IEEE80211_CHAN_NO_80MHZ: If the driver supports 80 MHz on the band,
104 * this flag indicates that an 80 MHz channel cannot use this
105 * channel as the control or any of the secondary channels.
106 * This may be due to the driver or due to regulatory bandwidth
107 * restrictions.
108 * @IEEE80211_CHAN_NO_160MHZ: If the driver supports 160 MHz on the band,
109 * this flag indicates that an 160 MHz channel cannot use this
110 * channel as the control or any of the secondary channels.
111 * This may be due to the driver or due to regulatory bandwidth
112 * restrictions.
102 */ 113 */
103enum ieee80211_channel_flags { 114enum ieee80211_channel_flags {
104 IEEE80211_CHAN_DISABLED = 1<<0, 115 IEEE80211_CHAN_DISABLED = 1<<0,
@@ -108,11 +119,16 @@ enum ieee80211_channel_flags {
108 IEEE80211_CHAN_NO_HT40PLUS = 1<<4, 119 IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
109 IEEE80211_CHAN_NO_HT40MINUS = 1<<5, 120 IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
110 IEEE80211_CHAN_NO_OFDM = 1<<6, 121 IEEE80211_CHAN_NO_OFDM = 1<<6,
122 IEEE80211_CHAN_NO_80MHZ = 1<<7,
123 IEEE80211_CHAN_NO_160MHZ = 1<<8,
111}; 124};
112 125
113#define IEEE80211_CHAN_NO_HT40 \ 126#define IEEE80211_CHAN_NO_HT40 \
114 (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS) 127 (IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS)
115 128
129#define IEEE80211_DFS_MIN_CAC_TIME_MS 60000
130#define IEEE80211_DFS_MIN_NOP_TIME_MS (30 * 60 * 1000)
131
116/** 132/**
117 * struct ieee80211_channel - channel definition 133 * struct ieee80211_channel - channel definition
118 * 134 *
@@ -133,6 +149,9 @@ enum ieee80211_channel_flags {
133 * to enable this, this is useful only on 5 GHz band. 149 * to enable this, this is useful only on 5 GHz band.
134 * @orig_mag: internal use 150 * @orig_mag: internal use
135 * @orig_mpwr: internal use 151 * @orig_mpwr: internal use
152 * @dfs_state: current state of this channel. Only relevant if radar is required
153 * on this channel.
154 * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered.
136 */ 155 */
137struct ieee80211_channel { 156struct ieee80211_channel {
138 enum ieee80211_band band; 157 enum ieee80211_band band;
@@ -145,6 +164,8 @@ struct ieee80211_channel {
145 bool beacon_found; 164 bool beacon_found;
146 u32 orig_flags; 165 u32 orig_flags;
147 int orig_mag, orig_mpwr; 166 int orig_mag, orig_mpwr;
167 enum nl80211_dfs_state dfs_state;
168 unsigned long dfs_state_entered;
148}; 169};
149 170
150/** 171/**
@@ -535,7 +556,7 @@ struct mac_address {
535 * struct cfg80211_acl_data - Access control list data 556 * struct cfg80211_acl_data - Access control list data
536 * 557 *
537 * @acl_policy: ACL policy to be applied on the station's 558 * @acl_policy: ACL policy to be applied on the station's
538 entry specified by mac_addr 559 * entry specified by mac_addr
539 * @n_acl_entries: Number of MAC address entries passed 560 * @n_acl_entries: Number of MAC address entries passed
540 * @mac_addrs: List of MAC addresses of stations to be used for ACL 561 * @mac_addrs: List of MAC addresses of stations to be used for ACL
541 */ 562 */
@@ -568,6 +589,7 @@ struct cfg80211_acl_data {
568 * @p2p_opp_ps: P2P opportunistic PS 589 * @p2p_opp_ps: P2P opportunistic PS
569 * @acl: ACL configuration used by the drivers which has support for 590 * @acl: ACL configuration used by the drivers which has support for
570 * MAC address based access control 591 * MAC address based access control
592 * @radar_required: set if radar detection is required
571 */ 593 */
572struct cfg80211_ap_settings { 594struct cfg80211_ap_settings {
573 struct cfg80211_chan_def chandef; 595 struct cfg80211_chan_def chandef;
@@ -585,6 +607,7 @@ struct cfg80211_ap_settings {
585 u8 p2p_ctwindow; 607 u8 p2p_ctwindow;
586 bool p2p_opp_ps; 608 bool p2p_opp_ps;
587 const struct cfg80211_acl_data *acl; 609 const struct cfg80211_acl_data *acl;
610 bool radar_required;
588}; 611};
589 612
590/** 613/**
@@ -603,12 +626,14 @@ enum plink_actions {
603/** 626/**
604 * enum station_parameters_apply_mask - station parameter values to apply 627 * enum station_parameters_apply_mask - station parameter values to apply
605 * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) 628 * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp)
629 * @STATION_PARAM_APPLY_CAPABILITY: apply new capability
606 * 630 *
607 * Not all station parameters have in-band "no change" signalling, 631 * Not all station parameters have in-band "no change" signalling,
608 * for those that don't these flags will are used. 632 * for those that don't these flags will are used.
609 */ 633 */
610enum station_parameters_apply_mask { 634enum station_parameters_apply_mask {
611 STATION_PARAM_APPLY_UAPSD = BIT(0), 635 STATION_PARAM_APPLY_UAPSD = BIT(0),
636 STATION_PARAM_APPLY_CAPABILITY = BIT(1),
612}; 637};
613 638
614/** 639/**
@@ -639,6 +664,9 @@ enum station_parameters_apply_mask {
639 * see &enum station_parameters_apply_mask 664 * see &enum station_parameters_apply_mask
640 * @local_pm: local link-specific mesh power save mode (no change when set 665 * @local_pm: local link-specific mesh power save mode (no change when set
641 * to unknown) 666 * to unknown)
667 * @capability: station capability
668 * @ext_capab: extended capabilities of the station
669 * @ext_capab_len: number of extended capabilities
642 */ 670 */
643struct station_parameters { 671struct station_parameters {
644 u8 *supported_rates; 672 u8 *supported_rates;
@@ -655,6 +683,9 @@ struct station_parameters {
655 u8 uapsd_queues; 683 u8 uapsd_queues;
656 u8 max_sp; 684 u8 max_sp;
657 enum nl80211_mesh_power_mode local_pm; 685 enum nl80211_mesh_power_mode local_pm;
686 u16 capability;
687 u8 *ext_capab;
688 u8 ext_capab_len;
658}; 689};
659 690
660/** 691/**
@@ -666,14 +697,16 @@ struct station_parameters {
666 * @STATION_INFO_INACTIVE_TIME: @inactive_time filled 697 * @STATION_INFO_INACTIVE_TIME: @inactive_time filled
667 * @STATION_INFO_RX_BYTES: @rx_bytes filled 698 * @STATION_INFO_RX_BYTES: @rx_bytes filled
668 * @STATION_INFO_TX_BYTES: @tx_bytes filled 699 * @STATION_INFO_TX_BYTES: @tx_bytes filled
700 * @STATION_INFO_RX_BYTES64: @rx_bytes filled with 64-bit value
701 * @STATION_INFO_TX_BYTES64: @tx_bytes filled with 64-bit value
669 * @STATION_INFO_LLID: @llid filled 702 * @STATION_INFO_LLID: @llid filled
670 * @STATION_INFO_PLID: @plid filled 703 * @STATION_INFO_PLID: @plid filled
671 * @STATION_INFO_PLINK_STATE: @plink_state filled 704 * @STATION_INFO_PLINK_STATE: @plink_state filled
672 * @STATION_INFO_SIGNAL: @signal filled 705 * @STATION_INFO_SIGNAL: @signal filled
673 * @STATION_INFO_TX_BITRATE: @txrate fields are filled 706 * @STATION_INFO_TX_BITRATE: @txrate fields are filled
674 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) 707 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
675 * @STATION_INFO_RX_PACKETS: @rx_packets filled 708 * @STATION_INFO_RX_PACKETS: @rx_packets filled with 32-bit value
676 * @STATION_INFO_TX_PACKETS: @tx_packets filled 709 * @STATION_INFO_TX_PACKETS: @tx_packets filled with 32-bit value
677 * @STATION_INFO_TX_RETRIES: @tx_retries filled 710 * @STATION_INFO_TX_RETRIES: @tx_retries filled
678 * @STATION_INFO_TX_FAILED: @tx_failed filled 711 * @STATION_INFO_TX_FAILED: @tx_failed filled
679 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled 712 * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled
@@ -714,6 +747,8 @@ enum station_info_flags {
714 STATION_INFO_LOCAL_PM = 1<<21, 747 STATION_INFO_LOCAL_PM = 1<<21,
715 STATION_INFO_PEER_PM = 1<<22, 748 STATION_INFO_PEER_PM = 1<<22,
716 STATION_INFO_NONPEER_PM = 1<<23, 749 STATION_INFO_NONPEER_PM = 1<<23,
750 STATION_INFO_RX_BYTES64 = 1<<24,
751 STATION_INFO_TX_BYTES64 = 1<<25,
717}; 752};
718 753
719/** 754/**
@@ -835,8 +870,8 @@ struct station_info {
835 u32 filled; 870 u32 filled;
836 u32 connected_time; 871 u32 connected_time;
837 u32 inactive_time; 872 u32 inactive_time;
838 u32 rx_bytes; 873 u64 rx_bytes;
839 u32 tx_bytes; 874 u64 tx_bytes;
840 u16 llid; 875 u16 llid;
841 u16 plid; 876 u16 plid;
842 u8 plink_state; 877 u8 plink_state;
@@ -1222,6 +1257,7 @@ struct cfg80211_match_set {
1222 * @n_match_sets: number of match sets 1257 * @n_match_sets: number of match sets
1223 * @wiphy: the wiphy this was for 1258 * @wiphy: the wiphy this was for
1224 * @dev: the interface 1259 * @dev: the interface
1260 * @scan_start: start time of the scheduled scan
1225 * @channels: channels to scan 1261 * @channels: channels to scan
1226 * @rssi_thold: don't report scan results below this threshold (in s32 dBm) 1262 * @rssi_thold: don't report scan results below this threshold (in s32 dBm)
1227 */ 1263 */
@@ -1261,11 +1297,13 @@ enum cfg80211_signal_type {
1261 1297
1262/** 1298/**
1263 * struct cfg80211_bss_ie_data - BSS entry IE data 1299 * struct cfg80211_bss_ie_data - BSS entry IE data
1300 * @tsf: TSF contained in the frame that carried these IEs
1264 * @rcu_head: internal use, for freeing 1301 * @rcu_head: internal use, for freeing
1265 * @len: length of the IEs 1302 * @len: length of the IEs
1266 * @data: IE data 1303 * @data: IE data
1267 */ 1304 */
1268struct cfg80211_bss_ies { 1305struct cfg80211_bss_ies {
1306 u64 tsf;
1269 struct rcu_head rcu_head; 1307 struct rcu_head rcu_head;
1270 int len; 1308 int len;
1271 u8 data[]; 1309 u8 data[];
@@ -1279,29 +1317,32 @@ struct cfg80211_bss_ies {
1279 * 1317 *
1280 * @channel: channel this BSS is on 1318 * @channel: channel this BSS is on
1281 * @bssid: BSSID of the BSS 1319 * @bssid: BSSID of the BSS
1282 * @tsf: timestamp of last received update
1283 * @beacon_interval: the beacon interval as from the frame 1320 * @beacon_interval: the beacon interval as from the frame
1284 * @capability: the capability field in host byte order 1321 * @capability: the capability field in host byte order
1285 * @ies: the information elements (Note that there 1322 * @ies: the information elements (Note that there is no guarantee that these
1286 * is no guarantee that these are well-formed!); this is a pointer to 1323 * are well-formed!); this is a pointer to either the beacon_ies or
1287 * either the beacon_ies or proberesp_ies depending on whether Probe 1324 * proberesp_ies depending on whether Probe Response frame has been
1288 * Response frame has been received 1325 * received. It is always non-%NULL.
1289 * @beacon_ies: the information elements from the last Beacon frame 1326 * @beacon_ies: the information elements from the last Beacon frame
1327 * (implementation note: if @hidden_beacon_bss is set this struct doesn't
1328 * own the beacon_ies, but they're just pointers to the ones from the
1329 * @hidden_beacon_bss struct)
1290 * @proberesp_ies: the information elements from the last Probe Response frame 1330 * @proberesp_ies: the information elements from the last Probe Response frame
1331 * @hidden_beacon_bss: in case this BSS struct represents a probe response from
1332 * a BSS that hides the SSID in its beacon, this points to the BSS struct
1333 * that holds the beacon data. @beacon_ies is still valid, of course, and
1334 * points to the same data as hidden_beacon_bss->beacon_ies in that case.
1291 * @signal: signal strength value (type depends on the wiphy's signal_type) 1335 * @signal: signal strength value (type depends on the wiphy's signal_type)
1292 * @free_priv: function pointer to free private data
1293 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes 1336 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
1294 */ 1337 */
1295struct cfg80211_bss { 1338struct cfg80211_bss {
1296 u64 tsf;
1297
1298 struct ieee80211_channel *channel; 1339 struct ieee80211_channel *channel;
1299 1340
1300 const struct cfg80211_bss_ies __rcu *ies; 1341 const struct cfg80211_bss_ies __rcu *ies;
1301 const struct cfg80211_bss_ies __rcu *beacon_ies; 1342 const struct cfg80211_bss_ies __rcu *beacon_ies;
1302 const struct cfg80211_bss_ies __rcu *proberesp_ies; 1343 const struct cfg80211_bss_ies __rcu *proberesp_ies;
1303 1344
1304 void (*free_priv)(struct cfg80211_bss *bss); 1345 struct cfg80211_bss *hidden_beacon_bss;
1305 1346
1306 s32 signal; 1347 s32 signal;
1307 1348
@@ -1403,6 +1444,8 @@ struct cfg80211_assoc_request {
1403 * @ie: Extra IEs to add to Deauthentication frame or %NULL 1444 * @ie: Extra IEs to add to Deauthentication frame or %NULL
1404 * @ie_len: Length of ie buffer in octets 1445 * @ie_len: Length of ie buffer in octets
1405 * @reason_code: The reason code for the deauthentication 1446 * @reason_code: The reason code for the deauthentication
1447 * @local_state_change: if set, change local state only and
1448 * do not set a deauth frame
1406 */ 1449 */
1407struct cfg80211_deauth_request { 1450struct cfg80211_deauth_request {
1408 const u8 *bssid; 1451 const u8 *bssid;
@@ -1564,6 +1607,7 @@ struct cfg80211_pmksa {
1564 * one bit per byte, in same format as nl80211 1607 * one bit per byte, in same format as nl80211
1565 * @pattern: bytes to match where bitmask is 1 1608 * @pattern: bytes to match where bitmask is 1
1566 * @pattern_len: length of pattern (in bytes) 1609 * @pattern_len: length of pattern (in bytes)
1610 * @pkt_offset: packet offset (in bytes)
1567 * 1611 *
1568 * Internal note: @mask and @pattern are allocated in one chunk of 1612 * Internal note: @mask and @pattern are allocated in one chunk of
1569 * memory, free @mask only! 1613 * memory, free @mask only!
@@ -1571,6 +1615,42 @@ struct cfg80211_pmksa {
1571struct cfg80211_wowlan_trig_pkt_pattern { 1615struct cfg80211_wowlan_trig_pkt_pattern {
1572 u8 *mask, *pattern; 1616 u8 *mask, *pattern;
1573 int pattern_len; 1617 int pattern_len;
1618 int pkt_offset;
1619};
1620
1621/**
1622 * struct cfg80211_wowlan_tcp - TCP connection parameters
1623 *
1624 * @sock: (internal) socket for source port allocation
1625 * @src: source IP address
1626 * @dst: destination IP address
1627 * @dst_mac: destination MAC address
1628 * @src_port: source port
1629 * @dst_port: destination port
1630 * @payload_len: data payload length
1631 * @payload: data payload buffer
1632 * @payload_seq: payload sequence stamping configuration
1633 * @data_interval: interval at which to send data packets
1634 * @wake_len: wakeup payload match length
1635 * @wake_data: wakeup payload match data
1636 * @wake_mask: wakeup payload match mask
1637 * @tokens_size: length of the tokens buffer
1638 * @payload_tok: payload token usage configuration
1639 */
1640struct cfg80211_wowlan_tcp {
1641 struct socket *sock;
1642 __be32 src, dst;
1643 u16 src_port, dst_port;
1644 u8 dst_mac[ETH_ALEN];
1645 int payload_len;
1646 const u8 *payload;
1647 struct nl80211_wowlan_tcp_data_seq payload_seq;
1648 u32 data_interval;
1649 u32 wake_len;
1650 const u8 *wake_data, *wake_mask;
1651 u32 tokens_size;
1652 /* must be last, variable member */
1653 struct nl80211_wowlan_tcp_data_token payload_tok;
1574}; 1654};
1575 1655
1576/** 1656/**
@@ -1587,16 +1667,49 @@ struct cfg80211_wowlan_trig_pkt_pattern {
1587 * @eap_identity_req: wake up on EAP identity request packet 1667 * @eap_identity_req: wake up on EAP identity request packet
1588 * @four_way_handshake: wake up on 4-way handshake 1668 * @four_way_handshake: wake up on 4-way handshake
1589 * @rfkill_release: wake up when rfkill is released 1669 * @rfkill_release: wake up when rfkill is released
1670 * @tcp: TCP connection establishment/wakeup parameters, see nl80211.h.
1671 * NULL if not configured.
1590 */ 1672 */
1591struct cfg80211_wowlan { 1673struct cfg80211_wowlan {
1592 bool any, disconnect, magic_pkt, gtk_rekey_failure, 1674 bool any, disconnect, magic_pkt, gtk_rekey_failure,
1593 eap_identity_req, four_way_handshake, 1675 eap_identity_req, four_way_handshake,
1594 rfkill_release; 1676 rfkill_release;
1595 struct cfg80211_wowlan_trig_pkt_pattern *patterns; 1677 struct cfg80211_wowlan_trig_pkt_pattern *patterns;
1678 struct cfg80211_wowlan_tcp *tcp;
1596 int n_patterns; 1679 int n_patterns;
1597}; 1680};
1598 1681
1599/** 1682/**
1683 * struct cfg80211_wowlan_wakeup - wakeup report
1684 * @disconnect: woke up by getting disconnected
1685 * @magic_pkt: woke up by receiving magic packet
1686 * @gtk_rekey_failure: woke up by GTK rekey failure
1687 * @eap_identity_req: woke up by EAP identity request packet
1688 * @four_way_handshake: woke up by 4-way handshake
1689 * @rfkill_release: woke up by rfkill being released
1690 * @pattern_idx: pattern that caused wakeup, -1 if not due to pattern
1691 * @packet_present_len: copied wakeup packet data
1692 * @packet_len: original wakeup packet length
1693 * @packet: The packet causing the wakeup, if any.
1694 * @packet_80211: For pattern match, magic packet and other data
1695 * frame triggers an 802.3 frame should be reported, for
1696 * disconnect due to deauth 802.11 frame. This indicates which
1697 * it is.
1698 * @tcp_match: TCP wakeup packet received
1699 * @tcp_connlost: TCP connection lost or failed to establish
1700 * @tcp_nomoretokens: TCP data ran out of tokens
1701 */
1702struct cfg80211_wowlan_wakeup {
1703 bool disconnect, magic_pkt, gtk_rekey_failure,
1704 eap_identity_req, four_way_handshake,
1705 rfkill_release, packet_80211,
1706 tcp_match, tcp_connlost, tcp_nomoretokens;
1707 s32 pattern_idx;
1708 u32 packet_present_len, packet_len;
1709 const void *packet;
1710};
1711
1712/**
1600 * struct cfg80211_gtk_rekey_data - rekey data 1713 * struct cfg80211_gtk_rekey_data - rekey data
1601 * @kek: key encryption key 1714 * @kek: key encryption key
1602 * @kck: key confirmation key 1715 * @kck: key confirmation key
@@ -1826,6 +1939,8 @@ struct cfg80211_gtk_rekey_data {
1826 * this new list replaces the existing one. Driver has to clear its ACL 1939 * this new list replaces the existing one. Driver has to clear its ACL
1827 * when number of MAC addresses entries is passed as 0. Drivers which 1940 * when number of MAC addresses entries is passed as 0. Drivers which
1828 * advertise the support for MAC based ACL have to implement this callback. 1941 * advertise the support for MAC based ACL have to implement this callback.
1942 *
1943 * @start_radar_detection: Start radar detection in the driver.
1829 */ 1944 */
1830struct cfg80211_ops { 1945struct cfg80211_ops {
1831 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); 1946 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -2049,6 +2164,10 @@ struct cfg80211_ops {
2049 2164
2050 int (*set_mac_acl)(struct wiphy *wiphy, struct net_device *dev, 2165 int (*set_mac_acl)(struct wiphy *wiphy, struct net_device *dev,
2051 const struct cfg80211_acl_data *params); 2166 const struct cfg80211_acl_data *params);
2167
2168 int (*start_radar_detection)(struct wiphy *wiphy,
2169 struct net_device *dev,
2170 struct cfg80211_chan_def *chandef);
2052}; 2171};
2053 2172
2054/* 2173/*
@@ -2245,6 +2364,14 @@ enum wiphy_wowlan_support_flags {
2245 WIPHY_WOWLAN_RFKILL_RELEASE = BIT(7), 2364 WIPHY_WOWLAN_RFKILL_RELEASE = BIT(7),
2246}; 2365};
2247 2366
2367struct wiphy_wowlan_tcp_support {
2368 const struct nl80211_wowlan_tcp_data_token_feature *tok;
2369 u32 data_payload_max;
2370 u32 data_interval_max;
2371 u32 wake_payload_max;
2372 bool seq;
2373};
2374
2248/** 2375/**
2249 * struct wiphy_wowlan_support - WoWLAN support data 2376 * struct wiphy_wowlan_support - WoWLAN support data
2250 * @flags: see &enum wiphy_wowlan_support_flags 2377 * @flags: see &enum wiphy_wowlan_support_flags
@@ -2252,12 +2379,16 @@ enum wiphy_wowlan_support_flags {
2252 * (see nl80211.h for the pattern definition) 2379 * (see nl80211.h for the pattern definition)
2253 * @pattern_max_len: maximum length of each pattern 2380 * @pattern_max_len: maximum length of each pattern
2254 * @pattern_min_len: minimum length of each pattern 2381 * @pattern_min_len: minimum length of each pattern
2382 * @max_pkt_offset: maximum Rx packet offset
2383 * @tcp: TCP wakeup support information
2255 */ 2384 */
2256struct wiphy_wowlan_support { 2385struct wiphy_wowlan_support {
2257 u32 flags; 2386 u32 flags;
2258 int n_patterns; 2387 int n_patterns;
2259 int pattern_max_len; 2388 int pattern_max_len;
2260 int pattern_min_len; 2389 int pattern_min_len;
2390 int max_pkt_offset;
2391 const struct wiphy_wowlan_tcp_support *tcp;
2261}; 2392};
2262 2393
2263/** 2394/**
@@ -2357,6 +2488,14 @@ struct wiphy_wowlan_support {
2357 * 2488 *
2358 * @max_acl_mac_addrs: Maximum number of MAC addresses that the device 2489 * @max_acl_mac_addrs: Maximum number of MAC addresses that the device
2359 * supports for ACL. 2490 * supports for ACL.
2491 *
2492 * @extended_capabilities: extended capabilities supported by the driver,
2493 * additional capabilities might be supported by userspace; these are
2494 * the 802.11 extended capabilities ("Extended Capabilities element")
2495 * and are in the same format as in the information element. See
2496 * 802.11-2012 8.4.2.29 for the defined fields.
2497 * @extended_capabilities_mask: mask of the valid values
2498 * @extended_capabilities_len: length of the extended capabilities
2360 */ 2499 */
2361struct wiphy { 2500struct wiphy {
2362 /* assign these fields before you register the wiphy */ 2501 /* assign these fields before you register the wiphy */
@@ -2423,6 +2562,9 @@ struct wiphy {
2423 */ 2562 */
2424 u32 probe_resp_offload; 2563 u32 probe_resp_offload;
2425 2564
2565 const u8 *extended_capabilities, *extended_capabilities_mask;
2566 u8 extended_capabilities_len;
2567
2426 /* If multiple wiphys are registered and you're handed e.g. 2568 /* If multiple wiphys are registered and you're handed e.g.
2427 * a regular netdev with assigned ieee80211_ptr, you won't 2569 * a regular netdev with assigned ieee80211_ptr, you won't
2428 * know whether it points to a wiphy your driver has registered 2570 * know whether it points to a wiphy your driver has registered
@@ -2602,7 +2744,6 @@ struct cfg80211_cached_keys;
2602 * the user-set AP, monitor and WDS channel 2744 * the user-set AP, monitor and WDS channel
2603 * @preset_chan: (private) Used by the internal configuration code to 2745 * @preset_chan: (private) Used by the internal configuration code to
2604 * track the channel to be used for AP later 2746 * track the channel to be used for AP later
2605 * @preset_chantype: (private) the corresponding channel type
2606 * @bssid: (private) Used by the internal configuration code 2747 * @bssid: (private) Used by the internal configuration code
2607 * @ssid: (private) Used by the internal configuration code 2748 * @ssid: (private) Used by the internal configuration code
2608 * @ssid_len: (private) Used by the internal configuration code 2749 * @ssid_len: (private) Used by the internal configuration code
@@ -2621,6 +2762,8 @@ struct cfg80211_cached_keys;
2621 * beacons, 0 when not valid 2762 * beacons, 0 when not valid
2622 * @address: The address for this device, valid only if @netdev is %NULL 2763 * @address: The address for this device, valid only if @netdev is %NULL
2623 * @p2p_started: true if this is a P2P Device that has been started 2764 * @p2p_started: true if this is a P2P Device that has been started
2765 * @cac_started: true if DFS channel availability check has been started
2766 * @cac_start_time: timestamp (jiffies) when the dfs state was entered.
2624 */ 2767 */
2625struct wireless_dev { 2768struct wireless_dev {
2626 struct wiphy *wiphy; 2769 struct wiphy *wiphy;
@@ -2672,6 +2815,9 @@ struct wireless_dev {
2672 2815
2673 u32 ap_unexpected_nlportid; 2816 u32 ap_unexpected_nlportid;
2674 2817
2818 bool cac_started;
2819 unsigned long cac_start_time;
2820
2675#ifdef CONFIG_CFG80211_WEXT 2821#ifdef CONFIG_CFG80211_WEXT
2676 /* wext data */ 2822 /* wext data */
2677 struct { 2823 struct {
@@ -3137,25 +3283,23 @@ cfg80211_get_ibss(struct wiphy *wiphy,
3137 WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS); 3283 WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
3138} 3284}
3139 3285
3140struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy,
3141 struct ieee80211_channel *channel,
3142 const u8 *meshid, size_t meshidlen,
3143 const u8 *meshcfg);
3144/** 3286/**
3145 * cfg80211_ref_bss - reference BSS struct 3287 * cfg80211_ref_bss - reference BSS struct
3288 * @wiphy: the wiphy this BSS struct belongs to
3146 * @bss: the BSS struct to reference 3289 * @bss: the BSS struct to reference
3147 * 3290 *
3148 * Increments the refcount of the given BSS struct. 3291 * Increments the refcount of the given BSS struct.
3149 */ 3292 */
3150void cfg80211_ref_bss(struct cfg80211_bss *bss); 3293void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
3151 3294
3152/** 3295/**
3153 * cfg80211_put_bss - unref BSS struct 3296 * cfg80211_put_bss - unref BSS struct
3297 * @wiphy: the wiphy this BSS struct belongs to
3154 * @bss: the BSS struct 3298 * @bss: the BSS struct
3155 * 3299 *
3156 * Decrements the refcount of the given BSS struct. 3300 * Decrements the refcount of the given BSS struct.
3157 */ 3301 */
3158void cfg80211_put_bss(struct cfg80211_bss *bss); 3302void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
3159 3303
3160/** 3304/**
3161 * cfg80211_unlink_bss - unlink BSS from internal data structures 3305 * cfg80211_unlink_bss - unlink BSS from internal data structures
@@ -3663,6 +3807,31 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
3663 gfp_t gfp); 3807 gfp_t gfp);
3664 3808
3665/** 3809/**
3810 * cfg80211_radar_event - radar detection event
3811 * @wiphy: the wiphy
3812 * @chandef: chandef for the current channel
3813 * @gfp: context flags
3814 *
3815 * This function is called when a radar is detected on the current chanenl.
3816 */
3817void cfg80211_radar_event(struct wiphy *wiphy,
3818 struct cfg80211_chan_def *chandef, gfp_t gfp);
3819
3820/**
3821 * cfg80211_cac_event - Channel availability check (CAC) event
3822 * @netdev: network device
3823 * @event: type of event
3824 * @gfp: context flags
3825 *
3826 * This function is called when a Channel availability check (CAC) is finished
3827 * or aborted. This must be called to notify the completion of a CAC process,
3828 * also by full-MAC drivers.
3829 */
3830void cfg80211_cac_event(struct net_device *netdev,
3831 enum nl80211_radar_event event, gfp_t gfp);
3832
3833
3834/**
3666 * cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer 3835 * cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer
3667 * @dev: network device 3836 * @dev: network device
3668 * @peer: peer's MAC address 3837 * @peer: peer's MAC address
@@ -3852,6 +4021,21 @@ int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
3852 enum ieee80211_p2p_attr_id attr, 4021 enum ieee80211_p2p_attr_id attr,
3853 u8 *buf, unsigned int bufsize); 4022 u8 *buf, unsigned int bufsize);
3854 4023
4024/**
4025 * cfg80211_report_wowlan_wakeup - report wakeup from WoWLAN
4026 * @wdev: the wireless device reporting the wakeup
4027 * @wakeup: the wakeup report
4028 * @gfp: allocation flags
4029 *
4030 * This function reports that the given device woke up. If it
4031 * caused the wakeup, report the reason(s), otherwise you may
4032 * pass %NULL as the @wakeup parameter to advertise that something
4033 * else caused the wakeup.
4034 */
4035void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
4036 struct cfg80211_wowlan_wakeup *wakeup,
4037 gfp_t gfp);
4038
3855/* Logging, debugging and troubleshooting/diagnostic helpers. */ 4039/* Logging, debugging and troubleshooting/diagnostic helpers. */
3856 4040
3857/* wiphy_printk helpers, similar to dev_printk */ 4041/* wiphy_printk helpers, similar to dev_printk */