aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-03-08 15:52:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-03-08 15:52:21 -0500
commit3d5c203272b25c4391397247cdb0059a04fccddf (patch)
tree1cf51dc656c10fd7ea0c84c86afea1d73f3f76bc /include
parent7da060c1c01b103d181dba39bce9bd141a945f99 (diff)
parent87f59c70ce6d1abeaaf97594835be29f746b81a0 (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211.h52
-rw-r--r--include/net/cfg80211.h126
-rw-r--r--include/net/mac80211.h29
-rw-r--r--include/uapi/linux/nl80211.h117
4 files changed, 272 insertions, 52 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 7e24fe0cfbcd..4cf0c9e4dd99 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -113,6 +113,34 @@
113#define IEEE80211_CTL_EXT_SSW_FBACK 0x9000 113#define IEEE80211_CTL_EXT_SSW_FBACK 0x9000
114#define IEEE80211_CTL_EXT_SSW_ACK 0xa000 114#define IEEE80211_CTL_EXT_SSW_ACK 0xa000
115 115
116
117#define IEEE80211_SN_MASK ((IEEE80211_SCTL_SEQ) >> 4)
118#define IEEE80211_MAX_SN IEEE80211_SN_MASK
119#define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1)
120
121static inline int ieee80211_sn_less(u16 sn1, u16 sn2)
122{
123 return ((sn1 - sn2) & IEEE80211_SN_MASK) > (IEEE80211_SN_MODULO >> 1);
124}
125
126static inline u16 ieee80211_sn_add(u16 sn1, u16 sn2)
127{
128 return (sn1 + sn2) & IEEE80211_SN_MASK;
129}
130
131static inline u16 ieee80211_sn_inc(u16 sn)
132{
133 return ieee80211_sn_add(sn, 1);
134}
135
136static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
137{
138 return (sn1 - sn2) & IEEE80211_SN_MASK;
139}
140
141#define IEEE80211_SEQ_TO_SN(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4)
142#define IEEE80211_SN_TO_SEQ(ssn) (((ssn) << 4) & IEEE80211_SCTL_SEQ)
143
116/* miscellaneous IEEE 802.11 constants */ 144/* miscellaneous IEEE 802.11 constants */
117#define IEEE80211_MAX_FRAG_THRESHOLD 2352 145#define IEEE80211_MAX_FRAG_THRESHOLD 2352
118#define IEEE80211_MAX_RTS_THRESHOLD 2353 146#define IEEE80211_MAX_RTS_THRESHOLD 2353
@@ -185,7 +213,7 @@ struct ieee80211_hdr {
185 u8 addr3[6]; 213 u8 addr3[6];
186 __le16 seq_ctrl; 214 __le16 seq_ctrl;
187 u8 addr4[6]; 215 u8 addr4[6];
188} __packed; 216} __packed __aligned(2);
189 217
190struct ieee80211_hdr_3addr { 218struct ieee80211_hdr_3addr {
191 __le16 frame_control; 219 __le16 frame_control;
@@ -194,7 +222,7 @@ struct ieee80211_hdr_3addr {
194 u8 addr2[6]; 222 u8 addr2[6];
195 u8 addr3[6]; 223 u8 addr3[6];
196 __le16 seq_ctrl; 224 __le16 seq_ctrl;
197} __packed; 225} __packed __aligned(2);
198 226
199struct ieee80211_qos_hdr { 227struct ieee80211_qos_hdr {
200 __le16 frame_control; 228 __le16 frame_control;
@@ -204,7 +232,7 @@ struct ieee80211_qos_hdr {
204 u8 addr3[6]; 232 u8 addr3[6];
205 __le16 seq_ctrl; 233 __le16 seq_ctrl;
206 __le16 qos_ctrl; 234 __le16 qos_ctrl;
207} __packed; 235} __packed __aligned(2);
208 236
209/** 237/**
210 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set 238 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
@@ -581,7 +609,7 @@ struct ieee80211s_hdr {
581 __le32 seqnum; 609 __le32 seqnum;
582 u8 eaddr1[6]; 610 u8 eaddr1[6];
583 u8 eaddr2[6]; 611 u8 eaddr2[6];
584} __packed; 612} __packed __aligned(2);
585 613
586/* Mesh flags */ 614/* Mesh flags */
587#define MESH_FLAGS_AE_A4 0x1 615#define MESH_FLAGS_AE_A4 0x1
@@ -875,7 +903,7 @@ struct ieee80211_mgmt {
875 } u; 903 } u;
876 } __packed action; 904 } __packed action;
877 } u; 905 } u;
878} __packed; 906} __packed __aligned(2);
879 907
880/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */ 908/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
881#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 909#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
@@ -906,20 +934,20 @@ struct ieee80211_rts {
906 __le16 duration; 934 __le16 duration;
907 u8 ra[6]; 935 u8 ra[6];
908 u8 ta[6]; 936 u8 ta[6];
909} __packed; 937} __packed __aligned(2);
910 938
911struct ieee80211_cts { 939struct ieee80211_cts {
912 __le16 frame_control; 940 __le16 frame_control;
913 __le16 duration; 941 __le16 duration;
914 u8 ra[6]; 942 u8 ra[6];
915} __packed; 943} __packed __aligned(2);
916 944
917struct ieee80211_pspoll { 945struct ieee80211_pspoll {
918 __le16 frame_control; 946 __le16 frame_control;
919 __le16 aid; 947 __le16 aid;
920 u8 bssid[6]; 948 u8 bssid[6];
921 u8 ta[6]; 949 u8 ta[6];
922} __packed; 950} __packed __aligned(2);
923 951
924/* TDLS */ 952/* TDLS */
925 953
@@ -1290,11 +1318,6 @@ struct ieee80211_vht_operation {
1290} __packed; 1318} __packed;
1291 1319
1292 1320
1293#define IEEE80211_VHT_MCS_ZERO_TO_SEVEN_SUPPORT 0
1294#define IEEE80211_VHT_MCS_ZERO_TO_EIGHT_SUPPORT 1
1295#define IEEE80211_VHT_MCS_ZERO_TO_NINE_SUPPORT 2
1296#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3
1297
1298/* 802.11ac VHT Capabilities */ 1321/* 802.11ac VHT Capabilities */
1299#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000 1322#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000
1300#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001 1323#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001
@@ -1310,10 +1333,11 @@ struct ieee80211_vht_operation {
1310#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200 1333#define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200
1311#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 1334#define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300
1312#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 1335#define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400
1336#define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700
1313#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 1337#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800
1314#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 1338#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000
1315#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000 1339#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000
1316#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX 0x00030000 1340#define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MAX 0x00030000
1317#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000 1341#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000
1318#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000 1342#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000
1319#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000 1343#define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d581c6de5d64..bdba9b619064 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -611,22 +611,10 @@ struct cfg80211_ap_settings {
611}; 611};
612 612
613/** 613/**
614 * enum plink_action - actions to perform in mesh peers
615 *
616 * @PLINK_ACTION_INVALID: action 0 is reserved
617 * @PLINK_ACTION_OPEN: start mesh peer link establishment
618 * @PLINK_ACTION_BLOCK: block traffic from this mesh peer
619 */
620enum plink_actions {
621 PLINK_ACTION_INVALID,
622 PLINK_ACTION_OPEN,
623 PLINK_ACTION_BLOCK,
624};
625
626/**
627 * enum station_parameters_apply_mask - station parameter values to apply 614 * enum station_parameters_apply_mask - station parameter values to apply
628 * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) 615 * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp)
629 * @STATION_PARAM_APPLY_CAPABILITY: apply new capability 616 * @STATION_PARAM_APPLY_CAPABILITY: apply new capability
617 * @STATION_PARAM_APPLY_PLINK_STATE: apply new plink state
630 * 618 *
631 * Not all station parameters have in-band "no change" signalling, 619 * Not all station parameters have in-band "no change" signalling,
632 * for those that don't these flags will are used. 620 * for those that don't these flags will are used.
@@ -634,6 +622,7 @@ enum plink_actions {
634enum station_parameters_apply_mask { 622enum station_parameters_apply_mask {
635 STATION_PARAM_APPLY_UAPSD = BIT(0), 623 STATION_PARAM_APPLY_UAPSD = BIT(0),
636 STATION_PARAM_APPLY_CAPABILITY = BIT(1), 624 STATION_PARAM_APPLY_CAPABILITY = BIT(1),
625 STATION_PARAM_APPLY_PLINK_STATE = BIT(2),
637}; 626};
638 627
639/** 628/**
@@ -669,7 +658,7 @@ enum station_parameters_apply_mask {
669 * @ext_capab_len: number of extended capabilities 658 * @ext_capab_len: number of extended capabilities
670 */ 659 */
671struct station_parameters { 660struct station_parameters {
672 u8 *supported_rates; 661 const u8 *supported_rates;
673 struct net_device *vlan; 662 struct net_device *vlan;
674 u32 sta_flags_mask, sta_flags_set; 663 u32 sta_flags_mask, sta_flags_set;
675 u32 sta_modify_mask; 664 u32 sta_modify_mask;
@@ -678,17 +667,60 @@ struct station_parameters {
678 u8 supported_rates_len; 667 u8 supported_rates_len;
679 u8 plink_action; 668 u8 plink_action;
680 u8 plink_state; 669 u8 plink_state;
681 struct ieee80211_ht_cap *ht_capa; 670 const struct ieee80211_ht_cap *ht_capa;
682 struct ieee80211_vht_cap *vht_capa; 671 const struct ieee80211_vht_cap *vht_capa;
683 u8 uapsd_queues; 672 u8 uapsd_queues;
684 u8 max_sp; 673 u8 max_sp;
685 enum nl80211_mesh_power_mode local_pm; 674 enum nl80211_mesh_power_mode local_pm;
686 u16 capability; 675 u16 capability;
687 u8 *ext_capab; 676 const u8 *ext_capab;
688 u8 ext_capab_len; 677 u8 ext_capab_len;
689}; 678};
690 679
691/** 680/**
681 * enum cfg80211_station_type - the type of station being modified
682 * @CFG80211_STA_AP_CLIENT: client of an AP interface
683 * @CFG80211_STA_AP_MLME_CLIENT: client of an AP interface that has
684 * the AP MLME in the device
685 * @CFG80211_STA_AP_STA: AP station on managed interface
686 * @CFG80211_STA_IBSS: IBSS station
687 * @CFG80211_STA_TDLS_PEER_SETUP: TDLS peer on managed interface (dummy entry
688 * while TDLS setup is in progress, it moves out of this state when
689 * being marked authorized; use this only if TDLS with external setup is
690 * supported/used)
691 * @CFG80211_STA_TDLS_PEER_ACTIVE: TDLS peer on managed interface (active
692 * entry that is operating, has been marked authorized by userspace)
693 * @CFG80211_STA_MESH_PEER_KERNEL: peer on mesh interface (kernel managed)
694 * @CFG80211_STA_MESH_PEER_USER: peer on mesh interface (user managed)
695 */
696enum cfg80211_station_type {
697 CFG80211_STA_AP_CLIENT,
698 CFG80211_STA_AP_MLME_CLIENT,
699 CFG80211_STA_AP_STA,
700 CFG80211_STA_IBSS,
701 CFG80211_STA_TDLS_PEER_SETUP,
702 CFG80211_STA_TDLS_PEER_ACTIVE,
703 CFG80211_STA_MESH_PEER_KERNEL,
704 CFG80211_STA_MESH_PEER_USER,
705};
706
707/**
708 * cfg80211_check_station_change - validate parameter changes
709 * @wiphy: the wiphy this operates on
710 * @params: the new parameters for a station
711 * @statype: the type of station being modified
712 *
713 * Utility function for the @change_station driver method. Call this function
714 * with the appropriate station type looking up the station (and checking that
715 * it exists). It will verify whether the station change is acceptable, and if
716 * not will return an error code. Note that it may modify the parameters for
717 * backward compatibility reasons, so don't use them before calling this.
718 */
719int cfg80211_check_station_change(struct wiphy *wiphy,
720 struct station_parameters *params,
721 enum cfg80211_station_type statype);
722
723/**
692 * enum station_info_flags - station information flags 724 * enum station_info_flags - station information flags
693 * 725 *
694 * Used by the driver to indicate which info in &struct station_info 726 * Used by the driver to indicate which info in &struct station_info
@@ -1119,6 +1151,7 @@ struct mesh_config {
1119 * @ie_len: length of vendor information elements 1151 * @ie_len: length of vendor information elements
1120 * @is_authenticated: this mesh requires authentication 1152 * @is_authenticated: this mesh requires authentication
1121 * @is_secure: this mesh uses security 1153 * @is_secure: this mesh uses security
1154 * @user_mpm: userspace handles all MPM functions
1122 * @dtim_period: DTIM period to use 1155 * @dtim_period: DTIM period to use
1123 * @beacon_interval: beacon interval to use 1156 * @beacon_interval: beacon interval to use
1124 * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] 1157 * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a]
@@ -1136,6 +1169,7 @@ struct mesh_setup {
1136 u8 ie_len; 1169 u8 ie_len;
1137 bool is_authenticated; 1170 bool is_authenticated;
1138 bool is_secure; 1171 bool is_secure;
1172 bool user_mpm;
1139 u8 dtim_period; 1173 u8 dtim_period;
1140 u16 beacon_interval; 1174 u16 beacon_interval;
1141 int mcast_rate[IEEE80211_NUM_BANDS]; 1175 int mcast_rate[IEEE80211_NUM_BANDS];
@@ -1398,9 +1432,11 @@ struct cfg80211_auth_request {
1398 * enum cfg80211_assoc_req_flags - Over-ride default behaviour in association. 1432 * enum cfg80211_assoc_req_flags - Over-ride default behaviour in association.
1399 * 1433 *
1400 * @ASSOC_REQ_DISABLE_HT: Disable HT (802.11n) 1434 * @ASSOC_REQ_DISABLE_HT: Disable HT (802.11n)
1435 * @ASSOC_REQ_DISABLE_VHT: Disable VHT
1401 */ 1436 */
1402enum cfg80211_assoc_req_flags { 1437enum cfg80211_assoc_req_flags {
1403 ASSOC_REQ_DISABLE_HT = BIT(0), 1438 ASSOC_REQ_DISABLE_HT = BIT(0),
1439 ASSOC_REQ_DISABLE_VHT = BIT(1),
1404}; 1440};
1405 1441
1406/** 1442/**
@@ -1422,6 +1458,8 @@ enum cfg80211_assoc_req_flags {
1422 * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask 1458 * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask
1423 * will be used in ht_capa. Un-supported values will be ignored. 1459 * will be used in ht_capa. Un-supported values will be ignored.
1424 * @ht_capa_mask: The bits of ht_capa which are to be used. 1460 * @ht_capa_mask: The bits of ht_capa which are to be used.
1461 * @vht_capa: VHT capability override
1462 * @vht_capa_mask: VHT capability mask indicating which fields to use
1425 */ 1463 */
1426struct cfg80211_assoc_request { 1464struct cfg80211_assoc_request {
1427 struct cfg80211_bss *bss; 1465 struct cfg80211_bss *bss;
@@ -1432,6 +1470,7 @@ struct cfg80211_assoc_request {
1432 u32 flags; 1470 u32 flags;
1433 struct ieee80211_ht_cap ht_capa; 1471 struct ieee80211_ht_cap ht_capa;
1434 struct ieee80211_ht_cap ht_capa_mask; 1472 struct ieee80211_ht_cap ht_capa_mask;
1473 struct ieee80211_vht_cap vht_capa, vht_capa_mask;
1435}; 1474};
1436 1475
1437/** 1476/**
@@ -1542,6 +1581,8 @@ struct cfg80211_ibss_params {
1542 * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask 1581 * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask
1543 * will be used in ht_capa. Un-supported values will be ignored. 1582 * will be used in ht_capa. Un-supported values will be ignored.
1544 * @ht_capa_mask: The bits of ht_capa which are to be used. 1583 * @ht_capa_mask: The bits of ht_capa which are to be used.
1584 * @vht_capa: VHT Capability overrides
1585 * @vht_capa_mask: The bits of vht_capa which are to be used.
1545 */ 1586 */
1546struct cfg80211_connect_params { 1587struct cfg80211_connect_params {
1547 struct ieee80211_channel *channel; 1588 struct ieee80211_channel *channel;
@@ -1560,6 +1601,8 @@ struct cfg80211_connect_params {
1560 int bg_scan_period; 1601 int bg_scan_period;
1561 struct ieee80211_ht_cap ht_capa; 1602 struct ieee80211_ht_cap ht_capa;
1562 struct ieee80211_ht_cap ht_capa_mask; 1603 struct ieee80211_ht_cap ht_capa_mask;
1604 struct ieee80211_vht_cap vht_capa;
1605 struct ieee80211_vht_cap vht_capa_mask;
1563}; 1606};
1564 1607
1565/** 1608/**
@@ -1722,6 +1765,21 @@ struct cfg80211_gtk_rekey_data {
1722}; 1765};
1723 1766
1724/** 1767/**
1768 * struct cfg80211_update_ft_ies_params - FT IE Information
1769 *
1770 * This structure provides information needed to update the fast transition IE
1771 *
1772 * @md: The Mobility Domain ID, 2 Octet value
1773 * @ie: Fast Transition IEs
1774 * @ie_len: Length of ft_ie in octets
1775 */
1776struct cfg80211_update_ft_ies_params {
1777 u16 md;
1778 const u8 *ie;
1779 size_t ie_len;
1780};
1781
1782/**
1725 * struct cfg80211_ops - backend description for wireless configuration 1783 * struct cfg80211_ops - backend description for wireless configuration
1726 * 1784 *
1727 * This struct is registered by fullmac card drivers and/or wireless stacks 1785 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -1781,9 +1839,8 @@ struct cfg80211_gtk_rekey_data {
1781 * @change_station: Modify a given station. Note that flags changes are not much 1839 * @change_station: Modify a given station. Note that flags changes are not much
1782 * validated in cfg80211, in particular the auth/assoc/authorized flags 1840 * validated in cfg80211, in particular the auth/assoc/authorized flags
1783 * might come to the driver in invalid combinations -- make sure to check 1841 * might come to the driver in invalid combinations -- make sure to check
1784 * them, also against the existing state! Also, supported_rates changes are 1842 * them, also against the existing state! Drivers must call
1785 * not checked in station mode -- drivers need to reject (or ignore) them 1843 * cfg80211_check_station_change() to validate the information.
1786 * for anything but TDLS peers.
1787 * @get_station: get station information for the station identified by @mac 1844 * @get_station: get station information for the station identified by @mac
1788 * @dump_station: dump station callback -- resume dump at index @idx 1845 * @dump_station: dump station callback -- resume dump at index @idx
1789 * 1846 *
@@ -2168,6 +2225,8 @@ struct cfg80211_ops {
2168 int (*start_radar_detection)(struct wiphy *wiphy, 2225 int (*start_radar_detection)(struct wiphy *wiphy,
2169 struct net_device *dev, 2226 struct net_device *dev,
2170 struct cfg80211_chan_def *chandef); 2227 struct cfg80211_chan_def *chandef);
2228 int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev,
2229 struct cfg80211_update_ft_ies_params *ftie);
2171}; 2230};
2172 2231
2173/* 2232/*
@@ -2485,6 +2544,8 @@ struct wiphy_wowlan_support {
2485 * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features. 2544 * @ap_sme_capa: AP SME capabilities, flags from &enum nl80211_ap_sme_features.
2486 * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden. 2545 * @ht_capa_mod_mask: Specify what ht_cap values can be over-ridden.
2487 * If null, then none can be over-ridden. 2546 * If null, then none can be over-ridden.
2547 * @vht_capa_mod_mask: Specify what VHT capabilities can be over-ridden.
2548 * If null, then none can be over-ridden.
2488 * 2549 *
2489 * @max_acl_mac_addrs: Maximum number of MAC addresses that the device 2550 * @max_acl_mac_addrs: Maximum number of MAC addresses that the device
2490 * supports for ACL. 2551 * supports for ACL.
@@ -2593,6 +2654,7 @@ struct wiphy {
2593 struct dentry *debugfsdir; 2654 struct dentry *debugfsdir;
2594 2655
2595 const struct ieee80211_ht_cap *ht_capa_mod_mask; 2656 const struct ieee80211_ht_cap *ht_capa_mod_mask;
2657 const struct ieee80211_vht_cap *vht_capa_mod_mask;
2596 2658
2597#ifdef CONFIG_NET_NS 2659#ifdef CONFIG_NET_NS
2598 /* the network namespace this phy lives in currently */ 2660 /* the network namespace this phy lives in currently */
@@ -4002,6 +4064,30 @@ u32 cfg80211_calculate_bitrate(struct rate_info *rate);
4002void cfg80211_unregister_wdev(struct wireless_dev *wdev); 4064void cfg80211_unregister_wdev(struct wireless_dev *wdev);
4003 4065
4004/** 4066/**
4067 * struct cfg80211_ft_event - FT Information Elements
4068 * @ies: FT IEs
4069 * @ies_len: length of the FT IE in bytes
4070 * @target_ap: target AP's MAC address
4071 * @ric_ies: RIC IE
4072 * @ric_ies_len: length of the RIC IE in bytes
4073 */
4074struct cfg80211_ft_event_params {
4075 const u8 *ies;
4076 size_t ies_len;
4077 const u8 *target_ap;
4078 const u8 *ric_ies;
4079 size_t ric_ies_len;
4080};
4081
4082/**
4083 * cfg80211_ft_event - notify userspace about FT IE and RIC IE
4084 * @netdev: network device
4085 * @ft_event: IE information
4086 */
4087void cfg80211_ft_event(struct net_device *netdev,
4088 struct cfg80211_ft_event_params *ft_event);
4089
4090/**
4005 * cfg80211_get_p2p_attr - find and copy a P2P attribute from IE buffer 4091 * cfg80211_get_p2p_attr - find and copy a P2P attribute from IE buffer
4006 * @ies: the input IE buffer 4092 * @ies: the input IE buffer
4007 * @len: the input length 4093 * @len: the input length
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f7eba1300d82..cdd7cea1fd4c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1101,8 +1101,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
1101 * These flags are used for communication about keys between the driver 1101 * These flags are used for communication about keys between the driver
1102 * and mac80211, with the @flags parameter of &struct ieee80211_key_conf. 1102 * and mac80211, with the @flags parameter of &struct ieee80211_key_conf.
1103 * 1103 *
1104 * @IEEE80211_KEY_FLAG_WMM_STA: Set by mac80211, this flag indicates
1105 * that the STA this key will be used with could be using QoS.
1106 * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the 1104 * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the
1107 * driver to indicate that it requires IV generation for this 1105 * driver to indicate that it requires IV generation for this
1108 * particular key. 1106 * particular key.
@@ -1127,7 +1125,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
1127 * %IEEE80211_KEY_FLAG_SW_MGMT_TX flag to encrypt such frames in SW. 1125 * %IEEE80211_KEY_FLAG_SW_MGMT_TX flag to encrypt such frames in SW.
1128 */ 1126 */
1129enum ieee80211_key_flags { 1127enum ieee80211_key_flags {
1130 IEEE80211_KEY_FLAG_WMM_STA = 1<<0,
1131 IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1, 1128 IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1,
1132 IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2, 1129 IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
1133 IEEE80211_KEY_FLAG_PAIRWISE = 1<<3, 1130 IEEE80211_KEY_FLAG_PAIRWISE = 1<<3,
@@ -1231,9 +1228,8 @@ enum ieee80211_sta_rx_bandwidth {
1231 * @addr: MAC address 1228 * @addr: MAC address
1232 * @aid: AID we assigned to the station if we're an AP 1229 * @aid: AID we assigned to the station if we're an AP
1233 * @supp_rates: Bitmap of supported rates (per band) 1230 * @supp_rates: Bitmap of supported rates (per band)
1234 * @ht_cap: HT capabilities of this STA; restricted to our own TX capabilities 1231 * @ht_cap: HT capabilities of this STA; restricted to our own capabilities
1235 * @vht_cap: VHT capabilities of this STA; Not restricting any capabilities 1232 * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities
1236 * of remote STA. Taking as is.
1237 * @wme: indicates whether the STA supports WME. Only valid during AP-mode. 1233 * @wme: indicates whether the STA supports WME. Only valid during AP-mode.
1238 * @drv_priv: data area for driver use, will always be aligned to 1234 * @drv_priv: data area for driver use, will always be aligned to
1239 * sizeof(void *), size is determined in hw information. 1235 * sizeof(void *), size is determined in hw information.
@@ -2135,6 +2131,24 @@ enum ieee80211_rate_control_changed {
2135}; 2131};
2136 2132
2137/** 2133/**
2134 * enum ieee80211_roc_type - remain on channel type
2135 *
2136 * With the support for multi channel contexts and multi channel operations,
2137 * remain on channel operations might be limited/deferred/aborted by other
2138 * flows/operations which have higher priority (and vise versa).
2139 * Specifying the ROC type can be used by devices to prioritize the ROC
2140 * operations compared to other operations/flows.
2141 *
2142 * @IEEE80211_ROC_TYPE_NORMAL: There are no special requirements for this ROC.
2143 * @IEEE80211_ROC_TYPE_MGMT_TX: The remain on channel request is required
2144 * for sending managment frames offchannel.
2145 */
2146enum ieee80211_roc_type {
2147 IEEE80211_ROC_TYPE_NORMAL = 0,
2148 IEEE80211_ROC_TYPE_MGMT_TX,
2149};
2150
2151/**
2138 * struct ieee80211_ops - callbacks from mac80211 to the driver 2152 * struct ieee80211_ops - callbacks from mac80211 to the driver
2139 * 2153 *
2140 * This structure contains various callbacks that the driver may 2154 * This structure contains various callbacks that the driver may
@@ -2687,7 +2701,8 @@ struct ieee80211_ops {
2687 int (*remain_on_channel)(struct ieee80211_hw *hw, 2701 int (*remain_on_channel)(struct ieee80211_hw *hw,
2688 struct ieee80211_vif *vif, 2702 struct ieee80211_vif *vif,
2689 struct ieee80211_channel *chan, 2703 struct ieee80211_channel *chan,
2690 int duration); 2704 int duration,
2705 enum ieee80211_roc_type type);
2691 int (*cancel_remain_on_channel)(struct ieee80211_hw *hw); 2706 int (*cancel_remain_on_channel)(struct ieee80211_hw *hw);
2692 int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); 2707 int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx);
2693 void (*get_ringparam)(struct ieee80211_hw *hw, 2708 void (*get_ringparam)(struct ieee80211_hw *hw,
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index c46bb016f4e4..79da8710448e 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -36,7 +36,21 @@
36 * The station is still assumed to belong to the AP interface it was added 36 * The station is still assumed to belong to the AP interface it was added
37 * to. 37 * to.
38 * 38 *
39 * TODO: need more info? 39 * Station handling varies per interface type and depending on the driver's
40 * capabilities.
41 *
42 * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS
43 * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows:
44 * - a setup station entry is added, not yet authorized, without any rate
45 * or capability information, this just exists to avoid race conditions
46 * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid
47 * to add rate and capability information to the station and at the same
48 * time mark it authorized.
49 * - %NL80211_TDLS_ENABLE_LINK is then used
50 * - after this, the only valid operation is to remove it by tearing down
51 * the TDLS link (%NL80211_TDLS_DISABLE_LINK)
52 *
53 * TODO: need more info for other interface types
40 */ 54 */
41 55
42/** 56/**
@@ -499,9 +513,11 @@
499 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a 513 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
500 * beacon or probe response from a compatible mesh peer. This is only 514 * beacon or probe response from a compatible mesh peer. This is only
501 * sent while no station information (sta_info) exists for the new peer 515 * sent while no station information (sta_info) exists for the new peer
502 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On 516 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH,
503 * reception of this notification, userspace may decide to create a new 517 * @NL80211_MESH_SETUP_USERSPACE_AMPE, or
504 * station (@NL80211_CMD_NEW_STATION). To stop this notification from 518 * @NL80211_MESH_SETUP_USERSPACE_MPM is set. On reception of this
519 * notification, userspace may decide to create a new station
520 * (@NL80211_CMD_NEW_STATION). To stop this notification from
505 * reoccurring, the userspace authentication daemon may want to create the 521 * reoccurring, the userspace authentication daemon may want to create the
506 * new station with the AUTHENTICATED flag unset and maybe change it later 522 * new station with the AUTHENTICATED flag unset and maybe change it later
507 * depending on the authentication result. 523 * depending on the authentication result.
@@ -611,6 +627,18 @@
611 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the 627 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
612 * event. 628 * event.
613 * 629 *
630 * @NL80211_CMD_GET_PROTOCOL_FEATURES: Get global nl80211 protocol features,
631 * i.e. features for the nl80211 protocol rather than device features.
632 * Returns the features in the %NL80211_ATTR_PROTOCOL_FEATURES bitmap.
633 *
634 * @NL80211_CMD_UPDATE_FT_IES: Pass down the most up-to-date Fast Transition
635 * Information Element to the WLAN driver
636 *
637 * @NL80211_CMD_FT_EVENT: Send a Fast transition event from the WLAN driver
638 * to the supplicant. This will carry the target AP's MAC address along
639 * with the relevant Information Elements. This event is used to report
640 * received FT IEs (MDIE, FTIE, RSN IE, TIE, RICIE).
641 *
614 * @NL80211_CMD_MAX: highest used command number 642 * @NL80211_CMD_MAX: highest used command number
615 * @__NL80211_CMD_AFTER_LAST: internal use 643 * @__NL80211_CMD_AFTER_LAST: internal use
616 */ 644 */
@@ -765,6 +793,11 @@ enum nl80211_commands {
765 793
766 NL80211_CMD_RADAR_DETECT, 794 NL80211_CMD_RADAR_DETECT,
767 795
796 NL80211_CMD_GET_PROTOCOL_FEATURES,
797
798 NL80211_CMD_UPDATE_FT_IES,
799 NL80211_CMD_FT_EVENT,
800
768 /* add new commands above here */ 801 /* add new commands above here */
769 802
770 /* used to define NL80211_CMD_MAX below */ 803 /* used to define NL80211_CMD_MAX below */
@@ -884,7 +917,8 @@ enum nl80211_commands {
884 * consisting of a nested array. 917 * consisting of a nested array.
885 * 918 *
886 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). 919 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes).
887 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link. 920 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link
921 * (see &enum nl80211_plink_action).
888 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. 922 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
889 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path 923 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
890 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at 924 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at
@@ -1167,10 +1201,10 @@ enum nl80211_commands {
1167 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver 1201 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver
1168 * allows auth frames in a mesh to be passed to userspace for processing via 1202 * allows auth frames in a mesh to be passed to userspace for processing via
1169 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag. 1203 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag.
1170 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as 1204 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as defined in
1171 * defined in &enum nl80211_plink_state. Used when userspace is 1205 * &enum nl80211_plink_state. Used when userspace is driving the peer link
1172 * driving the peer link management state machine. 1206 * management state machine. @NL80211_MESH_SETUP_USERSPACE_AMPE or
1173 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. 1207 * @NL80211_MESH_SETUP_USERSPACE_MPM must be enabled.
1174 * 1208 *
1175 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy 1209 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy
1176 * capabilities, the supported WoWLAN triggers 1210 * capabilities, the supported WoWLAN triggers
@@ -1368,6 +1402,18 @@ enum nl80211_commands {
1368 * advertised to the driver, e.g., to enable TDLS off channel operations 1402 * advertised to the driver, e.g., to enable TDLS off channel operations
1369 * and PU-APSD. 1403 * and PU-APSD.
1370 * 1404 *
1405 * @NL80211_ATTR_PROTOCOL_FEATURES: global nl80211 feature flags, see
1406 * &enum nl80211_protocol_features, the attribute is a u32.
1407 *
1408 * @NL80211_ATTR_SPLIT_WIPHY_DUMP: flag attribute, userspace supports
1409 * receiving the data for a single wiphy split across multiple
1410 * messages, given with wiphy dump message
1411 *
1412 * @NL80211_ATTR_MDID: Mobility Domain Identifier
1413 *
1414 * @NL80211_ATTR_IE_RIC: Resource Information Container Information
1415 * Element
1416 *
1371 * @NL80211_ATTR_MAX: highest attribute number currently defined 1417 * @NL80211_ATTR_MAX: highest attribute number currently defined
1372 * @__NL80211_ATTR_AFTER_LAST: internal use 1418 * @__NL80211_ATTR_AFTER_LAST: internal use
1373 */ 1419 */
@@ -1654,6 +1700,15 @@ enum nl80211_attrs {
1654 NL80211_ATTR_STA_CAPABILITY, 1700 NL80211_ATTR_STA_CAPABILITY,
1655 NL80211_ATTR_STA_EXT_CAPABILITY, 1701 NL80211_ATTR_STA_EXT_CAPABILITY,
1656 1702
1703 NL80211_ATTR_PROTOCOL_FEATURES,
1704 NL80211_ATTR_SPLIT_WIPHY_DUMP,
1705
1706 NL80211_ATTR_DISABLE_VHT,
1707 NL80211_ATTR_VHT_CAPABILITY_MASK,
1708
1709 NL80211_ATTR_MDID,
1710 NL80211_ATTR_IE_RIC,
1711
1657 /* add attributes here, update the policy in nl80211.c */ 1712 /* add attributes here, update the policy in nl80211.c */
1658 1713
1659 __NL80211_ATTR_AFTER_LAST, 1714 __NL80211_ATTR_AFTER_LAST,
@@ -2412,8 +2467,10 @@ enum nl80211_mesh_power_mode {
2412 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh 2467 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
2413 * point. 2468 * point.
2414 * 2469 *
2415 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically 2470 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically open
2416 * open peer links when we detect compatible mesh peers. 2471 * peer links when we detect compatible mesh peers. Disabled if
2472 * @NL80211_MESH_SETUP_USERSPACE_MPM or @NL80211_MESH_SETUP_USERSPACE_AMPE are
2473 * set.
2417 * 2474 *
2418 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames 2475 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
2419 * containing a PREQ that an MP can send to a particular destination (path 2476 * containing a PREQ that an MP can send to a particular destination (path
@@ -2559,6 +2616,9 @@ enum nl80211_meshconf_params {
2559 * vendor specific synchronization method or disable it to use the default 2616 * vendor specific synchronization method or disable it to use the default
2560 * neighbor offset synchronization 2617 * neighbor offset synchronization
2561 * 2618 *
2619 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
2620 * implement an MPM which handles peer allocation and state.
2621 *
2562 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 2622 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
2563 * 2623 *
2564 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 2624 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -2571,6 +2631,7 @@ enum nl80211_mesh_setup_params {
2571 NL80211_MESH_SETUP_USERSPACE_AUTH, 2631 NL80211_MESH_SETUP_USERSPACE_AUTH,
2572 NL80211_MESH_SETUP_USERSPACE_AMPE, 2632 NL80211_MESH_SETUP_USERSPACE_AMPE,
2573 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, 2633 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
2634 NL80211_MESH_SETUP_USERSPACE_MPM,
2574 2635
2575 /* keep last */ 2636 /* keep last */
2576 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 2637 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -3307,6 +3368,23 @@ enum nl80211_plink_state {
3307 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 3368 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1
3308}; 3369};
3309 3370
3371/**
3372 * enum nl80211_plink_action - actions to perform in mesh peers
3373 *
3374 * @NL80211_PLINK_ACTION_NO_ACTION: perform no action
3375 * @NL80211_PLINK_ACTION_OPEN: start mesh peer link establishment
3376 * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer
3377 * @NUM_NL80211_PLINK_ACTIONS: number of possible actions
3378 */
3379enum plink_actions {
3380 NL80211_PLINK_ACTION_NO_ACTION,
3381 NL80211_PLINK_ACTION_OPEN,
3382 NL80211_PLINK_ACTION_BLOCK,
3383
3384 NUM_NL80211_PLINK_ACTIONS,
3385};
3386
3387
3310#define NL80211_KCK_LEN 16 3388#define NL80211_KCK_LEN 16
3311#define NL80211_KEK_LEN 16 3389#define NL80211_KEK_LEN 16
3312#define NL80211_REPLAY_CTR_LEN 8 3390#define NL80211_REPLAY_CTR_LEN 8
@@ -3456,6 +3534,10 @@ enum nl80211_ap_sme_features {
3456 * stations the authenticated/associated bits have to be set in the mask. 3534 * stations the authenticated/associated bits have to be set in the mask.
3457 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits 3535 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
3458 * (HT40, VHT 80/160 MHz) if this flag is set 3536 * (HT40, VHT 80/160 MHz) if this flag is set
3537 * @NL80211_FEATURE_USERSPACE_MPM: This driver supports a userspace Mesh
3538 * Peering Management entity which may be implemented by registering for
3539 * beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is
3540 * still generated by the driver.
3459 */ 3541 */
3460enum nl80211_feature_flags { 3542enum nl80211_feature_flags {
3461 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 3543 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3474,6 +3556,7 @@ enum nl80211_feature_flags {
3474 /* bit 13 is reserved */ 3556 /* bit 13 is reserved */
3475 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, 3557 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
3476 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, 3558 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
3559 NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
3477}; 3560};
3478 3561
3479/** 3562/**
@@ -3587,4 +3670,16 @@ enum nl80211_dfs_state {
3587 NL80211_DFS_AVAILABLE, 3670 NL80211_DFS_AVAILABLE,
3588}; 3671};
3589 3672
3673/**
3674 * enum enum nl80211_protocol_features - nl80211 protocol features
3675 * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
3676 * wiphy dumps (if requested by the application with the attribute
3677 * %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
3678 * wiphy dump by %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFINDEX or
3679 * %NL80211_ATTR_WDEV.
3680 */
3681enum nl80211_protocol_features {
3682 NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
3683};
3684
3590#endif /* __LINUX_NL80211_H */ 3685#endif /* __LINUX_NL80211_H */