aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-01-28 18:21:38 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-28 18:21:38 -0500
commitce4a600e477a4da600c8056897e71e2f4a8c5ac0 (patch)
tree9b610dde96127321d986d42301cc243ee75a2fc4 /include
parent8a67b05db93688600ca330692b87668cad37e507 (diff)
parent4205e6ef4ee747aa81930537b6035086ba5f1e28 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== Included is an NFC pull. Samuel says: "It brings the following goodies: - LLCP socket timestamping (To be used e.g with the recently released nfctool application for a more efficient skb timestamping when sniffing). - A pretty big pn533 rework from Waldemar, preparing the driver to support more flavours of pn533 based devices. - HCI changes from Eric in preparation for the microread driver support. - Some LLCP memory leak fixes, cleanups and slight improvements. - pn544 and nfcwilink move to the devm_kzalloc API. - An initial Secure Element (SE) API. - An nfc.h license change from the original author, allowing non GPL application code to safely include it." Also included are a pair of mac80211 pulls. Johannes says: "We found two bugs in the previous code, so I'm sending you a pull request again this soon. This contains two regulatory bug fixes, some of Thomas's hwsim beacon timer work and a documentation fix from Bob." "Another pull request for mac80211-next. This time, I have a number of things, the patches are mostly self-explanatory. There are a few fixes from Felix and myself, and random cleanups & improvements. The biggest thing is the partial patchset from Marco preparing for mesh powersave." Additionally, there are a pair of iwlwifi pulls. Johannes says: "For iwlwifi-next, I have a few cleanups/improvements as well as a few not very important fixes and more preparations for new devices." "Please pull a few updates for iwlwifi. These are just some cleanups and a debug improvement." On top of that, there is a slew of driver updates. This includes brcmfmac, mwifiex, ath9k, carl9170, and mwl8k as well as a handful of others. The bcma and ssb busses get some attention as well. Still, I don't see any big headliners here. Also included is a pull of the wireless tree, in order to resolve some merge conflicts. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bcma/bcma_driver_mips.h4
-rw-r--r--include/linux/bcma/bcma_driver_pci.h2
-rw-r--r--include/linux/ieee80211.h100
-rw-r--r--include/net/cfg80211.h212
-rw-r--r--include/net/mac80211.h112
-rw-r--r--include/net/nfc/hci.h22
-rw-r--r--include/net/nfc/nci_core.h1
-rw-r--r--include/net/nfc/nfc.h8
-rw-r--r--include/net/regulatory.h4
-rw-r--r--include/uapi/linux/nfc.h37
-rw-r--r--include/uapi/linux/nl80211.h72
11 files changed, 409 insertions, 165 deletions
diff --git a/include/linux/bcma/bcma_driver_mips.h b/include/linux/bcma/bcma_driver_mips.h
index 0baf8a56b794..0d1ea297851a 100644
--- a/include/linux/bcma/bcma_driver_mips.h
+++ b/include/linux/bcma/bcma_driver_mips.h
@@ -28,6 +28,7 @@
28#define BCMA_MIPS_MIPS74K_GPIOEN 0x0048 28#define BCMA_MIPS_MIPS74K_GPIOEN 0x0048
29#define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0 29#define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0
30 30
31#define BCMA_MIPS_OOBSELINA74 0x004
31#define BCMA_MIPS_OOBSELOUTA30 0x100 32#define BCMA_MIPS_OOBSELOUTA30 0x100
32 33
33struct bcma_device; 34struct bcma_device;
@@ -36,7 +37,6 @@ struct bcma_drv_mips {
36 struct bcma_device *core; 37 struct bcma_device *core;
37 u8 setup_done:1; 38 u8 setup_done:1;
38 u8 early_setup_done:1; 39 u8 early_setup_done:1;
39 unsigned int assigned_irqs;
40}; 40};
41 41
42#ifdef CONFIG_BCMA_DRIVER_MIPS 42#ifdef CONFIG_BCMA_DRIVER_MIPS
@@ -49,6 +49,6 @@ static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
49 49
50extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); 50extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
51 51
52extern unsigned int bcma_core_mips_irq(struct bcma_device *dev); 52extern unsigned int bcma_core_irq(struct bcma_device *core);
53 53
54#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */ 54#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h
index c48d98d27b77..424760f01b9d 100644
--- a/include/linux/bcma/bcma_driver_pci.h
+++ b/include/linux/bcma/bcma_driver_pci.h
@@ -179,6 +179,8 @@ struct pci_dev;
179#define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */ 179#define BCMA_CORE_PCI_CFG_FUN_MASK 7 /* Function mask */
180#define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */ 180#define BCMA_CORE_PCI_CFG_OFF_MASK 0xfff /* Register mask */
181 181
182#define BCMA_CORE_PCI_CFG_DEVCTRL 0xd8
183
182/* PCIE Root Capability Register bits (Host mode only) */ 184/* PCIE Root Capability Register bits (Host mode only) */
183#define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001 185#define BCMA_CORE_PCI_RC_CRS_VISIBILITY 0x0001
184 186
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index f0859cc73861..ccf9ee1dca8c 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -180,7 +180,7 @@ struct ieee80211_hdr {
180 u8 addr3[6]; 180 u8 addr3[6];
181 __le16 seq_ctrl; 181 __le16 seq_ctrl;
182 u8 addr4[6]; 182 u8 addr4[6];
183} __attribute__ ((packed)); 183} __packed;
184 184
185struct ieee80211_hdr_3addr { 185struct ieee80211_hdr_3addr {
186 __le16 frame_control; 186 __le16 frame_control;
@@ -189,7 +189,7 @@ struct ieee80211_hdr_3addr {
189 u8 addr2[6]; 189 u8 addr2[6];
190 u8 addr3[6]; 190 u8 addr3[6];
191 __le16 seq_ctrl; 191 __le16 seq_ctrl;
192} __attribute__ ((packed)); 192} __packed;
193 193
194struct ieee80211_qos_hdr { 194struct ieee80211_qos_hdr {
195 __le16 frame_control; 195 __le16 frame_control;
@@ -199,7 +199,7 @@ struct ieee80211_qos_hdr {
199 u8 addr3[6]; 199 u8 addr3[6];
200 __le16 seq_ctrl; 200 __le16 seq_ctrl;
201 __le16 qos_ctrl; 201 __le16 qos_ctrl;
202} __attribute__ ((packed)); 202} __packed;
203 203
204/** 204/**
205 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set 205 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
@@ -576,7 +576,7 @@ struct ieee80211s_hdr {
576 __le32 seqnum; 576 __le32 seqnum;
577 u8 eaddr1[6]; 577 u8 eaddr1[6];
578 u8 eaddr2[6]; 578 u8 eaddr2[6];
579} __attribute__ ((packed)); 579} __packed;
580 580
581/* Mesh flags */ 581/* Mesh flags */
582#define MESH_FLAGS_AE_A4 0x1 582#define MESH_FLAGS_AE_A4 0x1
@@ -614,7 +614,7 @@ struct ieee80211_quiet_ie {
614 u8 period; 614 u8 period;
615 __le16 duration; 615 __le16 duration;
616 __le16 offset; 616 __le16 offset;
617} __attribute__ ((packed)); 617} __packed;
618 618
619/** 619/**
620 * struct ieee80211_msrment_ie 620 * struct ieee80211_msrment_ie
@@ -626,7 +626,7 @@ struct ieee80211_msrment_ie {
626 u8 mode; 626 u8 mode;
627 u8 type; 627 u8 type;
628 u8 request[0]; 628 u8 request[0];
629} __attribute__ ((packed)); 629} __packed;
630 630
631/** 631/**
632 * struct ieee80211_channel_sw_ie 632 * struct ieee80211_channel_sw_ie
@@ -637,7 +637,7 @@ struct ieee80211_channel_sw_ie {
637 u8 mode; 637 u8 mode;
638 u8 new_ch_num; 638 u8 new_ch_num;
639 u8 count; 639 u8 count;
640} __attribute__ ((packed)); 640} __packed;
641 641
642/** 642/**
643 * struct ieee80211_tim 643 * struct ieee80211_tim
@@ -650,7 +650,7 @@ struct ieee80211_tim_ie {
650 u8 bitmap_ctrl; 650 u8 bitmap_ctrl;
651 /* variable size: 1 - 251 bytes */ 651 /* variable size: 1 - 251 bytes */
652 u8 virtual_map[1]; 652 u8 virtual_map[1];
653} __attribute__ ((packed)); 653} __packed;
654 654
655/** 655/**
656 * struct ieee80211_meshconf_ie 656 * struct ieee80211_meshconf_ie
@@ -665,7 +665,7 @@ struct ieee80211_meshconf_ie {
665 u8 meshconf_auth; 665 u8 meshconf_auth;
666 u8 meshconf_form; 666 u8 meshconf_form;
667 u8 meshconf_cap; 667 u8 meshconf_cap;
668} __attribute__ ((packed)); 668} __packed;
669 669
670/** 670/**
671 * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags 671 * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags
@@ -695,12 +695,17 @@ struct ieee80211_rann_ie {
695 __le32 rann_seq; 695 __le32 rann_seq;
696 __le32 rann_interval; 696 __le32 rann_interval;
697 __le32 rann_metric; 697 __le32 rann_metric;
698} __attribute__ ((packed)); 698} __packed;
699 699
700enum ieee80211_rann_flags { 700enum ieee80211_rann_flags {
701 RANN_FLAG_IS_GATE = 1 << 0, 701 RANN_FLAG_IS_GATE = 1 << 0,
702}; 702};
703 703
704enum ieee80211_ht_chanwidth_values {
705 IEEE80211_HT_CHANWIDTH_20MHZ = 0,
706 IEEE80211_HT_CHANWIDTH_ANY = 1,
707};
708
704#define WLAN_SA_QUERY_TR_ID_LEN 2 709#define WLAN_SA_QUERY_TR_ID_LEN 2
705 710
706struct ieee80211_mgmt { 711struct ieee80211_mgmt {
@@ -717,33 +722,33 @@ struct ieee80211_mgmt {
717 __le16 status_code; 722 __le16 status_code;
718 /* possibly followed by Challenge text */ 723 /* possibly followed by Challenge text */
719 u8 variable[0]; 724 u8 variable[0];
720 } __attribute__ ((packed)) auth; 725 } __packed auth;
721 struct { 726 struct {
722 __le16 reason_code; 727 __le16 reason_code;
723 } __attribute__ ((packed)) deauth; 728 } __packed deauth;
724 struct { 729 struct {
725 __le16 capab_info; 730 __le16 capab_info;
726 __le16 listen_interval; 731 __le16 listen_interval;
727 /* followed by SSID and Supported rates */ 732 /* followed by SSID and Supported rates */
728 u8 variable[0]; 733 u8 variable[0];
729 } __attribute__ ((packed)) assoc_req; 734 } __packed assoc_req;
730 struct { 735 struct {
731 __le16 capab_info; 736 __le16 capab_info;
732 __le16 status_code; 737 __le16 status_code;
733 __le16 aid; 738 __le16 aid;
734 /* followed by Supported rates */ 739 /* followed by Supported rates */
735 u8 variable[0]; 740 u8 variable[0];
736 } __attribute__ ((packed)) assoc_resp, reassoc_resp; 741 } __packed assoc_resp, reassoc_resp;
737 struct { 742 struct {
738 __le16 capab_info; 743 __le16 capab_info;
739 __le16 listen_interval; 744 __le16 listen_interval;
740 u8 current_ap[6]; 745 u8 current_ap[6];
741 /* followed by SSID and Supported rates */ 746 /* followed by SSID and Supported rates */
742 u8 variable[0]; 747 u8 variable[0];
743 } __attribute__ ((packed)) reassoc_req; 748 } __packed reassoc_req;
744 struct { 749 struct {
745 __le16 reason_code; 750 __le16 reason_code;
746 } __attribute__ ((packed)) disassoc; 751 } __packed disassoc;
747 struct { 752 struct {
748 __le64 timestamp; 753 __le64 timestamp;
749 __le16 beacon_int; 754 __le16 beacon_int;
@@ -751,11 +756,11 @@ struct ieee80211_mgmt {
751 /* followed by some of SSID, Supported rates, 756 /* followed by some of SSID, Supported rates,
752 * FH Params, DS Params, CF Params, IBSS Params, TIM */ 757 * FH Params, DS Params, CF Params, IBSS Params, TIM */
753 u8 variable[0]; 758 u8 variable[0];
754 } __attribute__ ((packed)) beacon; 759 } __packed beacon;
755 struct { 760 struct {
756 /* only variable items: SSID, Supported rates */ 761 /* only variable items: SSID, Supported rates */
757 u8 variable[0]; 762 u8 variable[0];
758 } __attribute__ ((packed)) probe_req; 763 } __packed probe_req;
759 struct { 764 struct {
760 __le64 timestamp; 765 __le64 timestamp;
761 __le16 beacon_int; 766 __le16 beacon_int;
@@ -763,7 +768,7 @@ struct ieee80211_mgmt {
763 /* followed by some of SSID, Supported rates, 768 /* followed by some of SSID, Supported rates,
764 * FH Params, DS Params, CF Params, IBSS Params */ 769 * FH Params, DS Params, CF Params, IBSS Params */
765 u8 variable[0]; 770 u8 variable[0];
766 } __attribute__ ((packed)) probe_resp; 771 } __packed probe_resp;
767 struct { 772 struct {
768 u8 category; 773 u8 category;
769 union { 774 union {
@@ -772,55 +777,59 @@ struct ieee80211_mgmt {
772 u8 dialog_token; 777 u8 dialog_token;
773 u8 status_code; 778 u8 status_code;
774 u8 variable[0]; 779 u8 variable[0];
775 } __attribute__ ((packed)) wme_action; 780 } __packed wme_action;
776 struct{ 781 struct{
777 u8 action_code; 782 u8 action_code;
778 u8 element_id; 783 u8 element_id;
779 u8 length; 784 u8 length;
780 struct ieee80211_channel_sw_ie sw_elem; 785 struct ieee80211_channel_sw_ie sw_elem;
781 } __attribute__((packed)) chan_switch; 786 } __packed chan_switch;
782 struct{ 787 struct{
783 u8 action_code; 788 u8 action_code;
784 u8 dialog_token; 789 u8 dialog_token;
785 u8 element_id; 790 u8 element_id;
786 u8 length; 791 u8 length;
787 struct ieee80211_msrment_ie msr_elem; 792 struct ieee80211_msrment_ie msr_elem;
788 } __attribute__((packed)) measurement; 793 } __packed measurement;
789 struct{ 794 struct{
790 u8 action_code; 795 u8 action_code;
791 u8 dialog_token; 796 u8 dialog_token;
792 __le16 capab; 797 __le16 capab;
793 __le16 timeout; 798 __le16 timeout;
794 __le16 start_seq_num; 799 __le16 start_seq_num;
795 } __attribute__((packed)) addba_req; 800 } __packed addba_req;
796 struct{ 801 struct{
797 u8 action_code; 802 u8 action_code;
798 u8 dialog_token; 803 u8 dialog_token;
799 __le16 status; 804 __le16 status;
800 __le16 capab; 805 __le16 capab;
801 __le16 timeout; 806 __le16 timeout;
802 } __attribute__((packed)) addba_resp; 807 } __packed addba_resp;
803 struct{ 808 struct{
804 u8 action_code; 809 u8 action_code;
805 __le16 params; 810 __le16 params;
806 __le16 reason_code; 811 __le16 reason_code;
807 } __attribute__((packed)) delba; 812 } __packed delba;
808 struct { 813 struct {
809 u8 action_code; 814 u8 action_code;
810 u8 variable[0]; 815 u8 variable[0];
811 } __attribute__((packed)) self_prot; 816 } __packed self_prot;
812 struct{ 817 struct{
813 u8 action_code; 818 u8 action_code;
814 u8 variable[0]; 819 u8 variable[0];
815 } __attribute__((packed)) mesh_action; 820 } __packed mesh_action;
816 struct { 821 struct {
817 u8 action; 822 u8 action;
818 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 823 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
819 } __attribute__ ((packed)) sa_query; 824 } __packed sa_query;
820 struct { 825 struct {
821 u8 action; 826 u8 action;
822 u8 smps_control; 827 u8 smps_control;
823 } __attribute__ ((packed)) ht_smps; 828 } __packed ht_smps;
829 struct {
830 u8 action_code;
831 u8 chanwidth;
832 } __packed ht_notify_cw;
824 struct { 833 struct {
825 u8 action_code; 834 u8 action_code;
826 u8 dialog_token; 835 u8 dialog_token;
@@ -828,9 +837,9 @@ struct ieee80211_mgmt {
828 u8 variable[0]; 837 u8 variable[0];
829 } __packed tdls_discover_resp; 838 } __packed tdls_discover_resp;
830 } u; 839 } u;
831 } __attribute__ ((packed)) action; 840 } __packed action;
832 } u; 841 } u;
833} __attribute__ ((packed)); 842} __packed;
834 843
835/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */ 844/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
836#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 845#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
@@ -846,7 +855,7 @@ struct ieee80211_mmie {
846 __le16 key_id; 855 __le16 key_id;
847 u8 sequence_number[6]; 856 u8 sequence_number[6];
848 u8 mic[8]; 857 u8 mic[8];
849} __attribute__ ((packed)); 858} __packed;
850 859
851struct ieee80211_vendor_ie { 860struct ieee80211_vendor_ie {
852 u8 element_id; 861 u8 element_id;
@@ -861,20 +870,20 @@ struct ieee80211_rts {
861 __le16 duration; 870 __le16 duration;
862 u8 ra[6]; 871 u8 ra[6];
863 u8 ta[6]; 872 u8 ta[6];
864} __attribute__ ((packed)); 873} __packed;
865 874
866struct ieee80211_cts { 875struct ieee80211_cts {
867 __le16 frame_control; 876 __le16 frame_control;
868 __le16 duration; 877 __le16 duration;
869 u8 ra[6]; 878 u8 ra[6];
870} __attribute__ ((packed)); 879} __packed;
871 880
872struct ieee80211_pspoll { 881struct ieee80211_pspoll {
873 __le16 frame_control; 882 __le16 frame_control;
874 __le16 aid; 883 __le16 aid;
875 u8 bssid[6]; 884 u8 bssid[6];
876 u8 ta[6]; 885 u8 ta[6];
877} __attribute__ ((packed)); 886} __packed;
878 887
879/* TDLS */ 888/* TDLS */
880 889
@@ -967,7 +976,7 @@ struct ieee80211_bar {
967 __u8 ta[6]; 976 __u8 ta[6];
968 __le16 control; 977 __le16 control;
969 __le16 start_seq_num; 978 __le16 start_seq_num;
970} __attribute__((packed)); 979} __packed;
971 980
972/* 802.11 BAR control masks */ 981/* 802.11 BAR control masks */
973#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 982#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
@@ -992,7 +1001,7 @@ struct ieee80211_mcs_info {
992 __le16 rx_highest; 1001 __le16 rx_highest;
993 u8 tx_params; 1002 u8 tx_params;
994 u8 reserved[3]; 1003 u8 reserved[3];
995} __attribute__((packed)); 1004} __packed;
996 1005
997/* 802.11n HT capability MSC set */ 1006/* 802.11n HT capability MSC set */
998#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff 1007#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
@@ -1031,7 +1040,7 @@ struct ieee80211_ht_cap {
1031 __le16 extended_ht_cap_info; 1040 __le16 extended_ht_cap_info;
1032 __le32 tx_BF_cap_info; 1041 __le32 tx_BF_cap_info;
1033 u8 antenna_selection_info; 1042 u8 antenna_selection_info;
1034} __attribute__ ((packed)); 1043} __packed;
1035 1044
1036/* 802.11n HT capabilities masks (for cap_info) */ 1045/* 802.11n HT capabilities masks (for cap_info) */
1037#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 1046#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
@@ -1102,7 +1111,7 @@ struct ieee80211_ht_operation {
1102 __le16 operation_mode; 1111 __le16 operation_mode;
1103 __le16 stbc_param; 1112 __le16 stbc_param;
1104 u8 basic_set[16]; 1113 u8 basic_set[16];
1105} __attribute__ ((packed)); 1114} __packed;
1106 1115
1107/* for ht_param */ 1116/* for ht_param */
1108#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03 1117#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
@@ -1311,16 +1320,21 @@ struct ieee80211_vht_operation {
1311#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) 1320#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
1312#define WLAN_CAPABILITY_QOS (1<<9) 1321#define WLAN_CAPABILITY_QOS (1<<9)
1313#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) 1322#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
1323#define WLAN_CAPABILITY_APSD (1<<11)
1324#define WLAN_CAPABILITY_RADIO_MEASURE (1<<12)
1314#define WLAN_CAPABILITY_DSSS_OFDM (1<<13) 1325#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
1326#define WLAN_CAPABILITY_DEL_BACK (1<<14)
1327#define WLAN_CAPABILITY_IMM_BACK (1<<15)
1315 1328
1316/* DMG (60gHz) 802.11ad */ 1329/* DMG (60gHz) 802.11ad */
1317/* type - bits 0..1 */ 1330/* type - bits 0..1 */
1331#define WLAN_CAPABILITY_DMG_TYPE_MASK (3<<0)
1318#define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */ 1332#define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */
1319#define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */ 1333#define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */
1320#define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */ 1334#define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */
1321 1335
1322#define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2) 1336#define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2)
1323#define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3) 1337#define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3)
1324#define WLAN_CAPABILITY_DMG_PRIVACY (1<<4) 1338#define WLAN_CAPABILITY_DMG_PRIVACY (1<<4)
1325#define WLAN_CAPABILITY_DMG_ECPAC (1<<5) 1339#define WLAN_CAPABILITY_DMG_ECPAC (1<<5)
1326 1340
@@ -1834,14 +1848,14 @@ struct ieee80211_country_ie_triplet {
1834 u8 first_channel; 1848 u8 first_channel;
1835 u8 num_channels; 1849 u8 num_channels;
1836 s8 max_power; 1850 s8 max_power;
1837 } __attribute__ ((packed)) chans; 1851 } __packed chans;
1838 struct { 1852 struct {
1839 u8 reg_extension_id; 1853 u8 reg_extension_id;
1840 u8 reg_class; 1854 u8 reg_class;
1841 u8 coverage_class; 1855 u8 coverage_class;
1842 } __attribute__ ((packed)) ext; 1856 } __packed ext;
1843 }; 1857 };
1844} __attribute__ ((packed)); 1858} __packed;
1845 1859
1846enum ieee80211_timeout_interval_type { 1860enum ieee80211_timeout_interval_type {
1847 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */, 1861 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f78fa19a07b0..1b9830ebe6c6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -281,9 +281,13 @@ struct ieee80211_supported_band {
281/** 281/**
282 * struct vif_params - describes virtual interface parameters 282 * struct vif_params - describes virtual interface parameters
283 * @use_4addr: use 4-address frames 283 * @use_4addr: use 4-address frames
284 * @macaddr: address to use for this virtual interface. This will only
285 * be used for non-netdevice interfaces. If this parameter is set
286 * to zero address the driver may determine the address as needed.
284 */ 287 */
285struct vif_params { 288struct vif_params {
286 int use_4addr; 289 int use_4addr;
290 u8 macaddr[ETH_ALEN];
287}; 291};
288 292
289/** 293/**
@@ -326,7 +330,7 @@ struct cfg80211_chan_def {
326 * cfg80211_get_chandef_type - return old channel type from chandef 330 * cfg80211_get_chandef_type - return old channel type from chandef
327 * @chandef: the channel definition 331 * @chandef: the channel definition
328 * 332 *
329 * Returns the old channel type (NOHT, HT20, HT40+/-) from a given 333 * Return: The old channel type (NOHT, HT20, HT40+/-) from a given
330 * chandef, which must have a bandwidth allowing this conversion. 334 * chandef, which must have a bandwidth allowing this conversion.
331 */ 335 */
332static inline enum nl80211_channel_type 336static inline enum nl80211_channel_type
@@ -364,7 +368,7 @@ void cfg80211_chandef_create(struct cfg80211_chan_def *chandef,
364 * @chandef1: first channel definition 368 * @chandef1: first channel definition
365 * @chandef2: second channel definition 369 * @chandef2: second channel definition
366 * 370 *
367 * Returns %true if the channels defined by the channel definitions are 371 * Return: %true if the channels defined by the channel definitions are
368 * identical, %false otherwise. 372 * identical, %false otherwise.
369 */ 373 */
370static inline bool 374static inline bool
@@ -382,7 +386,7 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
382 * @chandef1: first channel definition 386 * @chandef1: first channel definition
383 * @chandef2: second channel definition 387 * @chandef2: second channel definition
384 * 388 *
385 * Returns %NULL if the given channel definitions are incompatible, 389 * Return: %NULL if the given channel definitions are incompatible,
386 * chandef1 or chandef2 otherwise. 390 * chandef1 or chandef2 otherwise.
387 */ 391 */
388const struct cfg80211_chan_def * 392const struct cfg80211_chan_def *
@@ -392,6 +396,7 @@ cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1,
392/** 396/**
393 * cfg80211_chandef_valid - check if a channel definition is valid 397 * cfg80211_chandef_valid - check if a channel definition is valid
394 * @chandef: the channel definition to check 398 * @chandef: the channel definition to check
399 * Return: %true if the channel definition is valid. %false otherwise.
395 */ 400 */
396bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef); 401bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef);
397 402
@@ -399,7 +404,8 @@ bool cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef);
399 * cfg80211_chandef_usable - check if secondary channels can be used 404 * cfg80211_chandef_usable - check if secondary channels can be used
400 * @wiphy: the wiphy to validate against 405 * @wiphy: the wiphy to validate against
401 * @chandef: the channel definition to check 406 * @chandef: the channel definition to check
402 * @prohibited_flags: the regulatory chanenl flags that must not be set 407 * @prohibited_flags: the regulatory channel flags that must not be set
408 * Return: %true if secondary channels are usable. %false otherwise.
403 */ 409 */
404bool cfg80211_chandef_usable(struct wiphy *wiphy, 410bool cfg80211_chandef_usable(struct wiphy *wiphy,
405 const struct cfg80211_chan_def *chandef, 411 const struct cfg80211_chan_def *chandef,
@@ -608,6 +614,8 @@ enum station_parameters_apply_mask {
608 * @sta_modify_mask: bitmap indicating which parameters changed 614 * @sta_modify_mask: bitmap indicating which parameters changed
609 * (for those that don't have a natural "no change" value), 615 * (for those that don't have a natural "no change" value),
610 * see &enum station_parameters_apply_mask 616 * see &enum station_parameters_apply_mask
617 * @local_pm: local link-specific mesh power save mode (no change when set
618 * to unknown)
611 */ 619 */
612struct station_parameters { 620struct station_parameters {
613 u8 *supported_rates; 621 u8 *supported_rates;
@@ -623,6 +631,7 @@ struct station_parameters {
623 struct ieee80211_vht_cap *vht_capa; 631 struct ieee80211_vht_cap *vht_capa;
624 u8 uapsd_queues; 632 u8 uapsd_queues;
625 u8 max_sp; 633 u8 max_sp;
634 enum nl80211_mesh_power_mode local_pm;
626}; 635};
627 636
628/** 637/**
@@ -653,6 +662,9 @@ struct station_parameters {
653 * @STATION_INFO_STA_FLAGS: @sta_flags filled 662 * @STATION_INFO_STA_FLAGS: @sta_flags filled
654 * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled 663 * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled
655 * @STATION_INFO_T_OFFSET: @t_offset filled 664 * @STATION_INFO_T_OFFSET: @t_offset filled
665 * @STATION_INFO_LOCAL_PM: @local_pm filled
666 * @STATION_INFO_PEER_PM: @peer_pm filled
667 * @STATION_INFO_NONPEER_PM: @nonpeer_pm filled
656 */ 668 */
657enum station_info_flags { 669enum station_info_flags {
658 STATION_INFO_INACTIVE_TIME = 1<<0, 670 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -676,6 +688,9 @@ enum station_info_flags {
676 STATION_INFO_STA_FLAGS = 1<<18, 688 STATION_INFO_STA_FLAGS = 1<<18,
677 STATION_INFO_BEACON_LOSS_COUNT = 1<<19, 689 STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
678 STATION_INFO_T_OFFSET = 1<<20, 690 STATION_INFO_T_OFFSET = 1<<20,
691 STATION_INFO_LOCAL_PM = 1<<21,
692 STATION_INFO_PEER_PM = 1<<22,
693 STATION_INFO_NONPEER_PM = 1<<23,
679}; 694};
680 695
681/** 696/**
@@ -789,6 +804,9 @@ struct sta_bss_parameters {
789 * @sta_flags: station flags mask & values 804 * @sta_flags: station flags mask & values
790 * @beacon_loss_count: Number of times beacon loss event has triggered. 805 * @beacon_loss_count: Number of times beacon loss event has triggered.
791 * @t_offset: Time offset of the station relative to this host. 806 * @t_offset: Time offset of the station relative to this host.
807 * @local_pm: local mesh STA power save mode
808 * @peer_pm: peer mesh STA power save mode
809 * @nonpeer_pm: non-peer mesh STA power save mode
792 */ 810 */
793struct station_info { 811struct station_info {
794 u32 filled; 812 u32 filled;
@@ -818,6 +836,9 @@ struct station_info {
818 836
819 u32 beacon_loss_count; 837 u32 beacon_loss_count;
820 s64 t_offset; 838 s64 t_offset;
839 enum nl80211_mesh_power_mode local_pm;
840 enum nl80211_mesh_power_mode peer_pm;
841 enum nl80211_mesh_power_mode nonpeer_pm;
821 842
822 /* 843 /*
823 * Note: Add a new enum station_info_flags value for each new field and 844 * Note: Add a new enum station_info_flags value for each new field and
@@ -993,6 +1014,10 @@ struct bss_parameters {
993 * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs) 1014 * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs)
994 * during which a mesh STA can send only one Action frame containing 1015 * during which a mesh STA can send only one Action frame containing
995 * a PREQ element for root path confirmation. 1016 * a PREQ element for root path confirmation.
1017 * @power_mode: The default mesh power save mode which will be the initial
1018 * setting for new peer links.
1019 * @dot11MeshAwakeWindowDuration: The duration in TUs the STA will remain awake
1020 * after transmitting its beacon.
996 */ 1021 */
997struct mesh_config { 1022struct mesh_config {
998 u16 dot11MeshRetryTimeout; 1023 u16 dot11MeshRetryTimeout;
@@ -1020,6 +1045,8 @@ struct mesh_config {
1020 u32 dot11MeshHWMPactivePathToRootTimeout; 1045 u32 dot11MeshHWMPactivePathToRootTimeout;
1021 u16 dot11MeshHWMProotInterval; 1046 u16 dot11MeshHWMProotInterval;
1022 u16 dot11MeshHWMPconfirmationInterval; 1047 u16 dot11MeshHWMPconfirmationInterval;
1048 enum nl80211_mesh_power_mode power_mode;
1049 u16 dot11MeshAwakeWindowDuration;
1023}; 1050};
1024 1051
1025/** 1052/**
@@ -1034,6 +1061,8 @@ struct mesh_config {
1034 * @ie_len: length of vendor information elements 1061 * @ie_len: length of vendor information elements
1035 * @is_authenticated: this mesh requires authentication 1062 * @is_authenticated: this mesh requires authentication
1036 * @is_secure: this mesh uses security 1063 * @is_secure: this mesh uses security
1064 * @dtim_period: DTIM period to use
1065 * @beacon_interval: beacon interval to use
1037 * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a] 1066 * @mcast_rate: multicat rate for Mesh Node [6Mbps is the default for 802.11a]
1038 * 1067 *
1039 * These parameters are fixed when the mesh is created. 1068 * These parameters are fixed when the mesh is created.
@@ -1049,6 +1078,8 @@ struct mesh_setup {
1049 u8 ie_len; 1078 u8 ie_len;
1050 bool is_authenticated; 1079 bool is_authenticated;
1051 bool is_secure; 1080 bool is_secure;
1081 u8 dtim_period;
1082 u16 beacon_interval;
1052 int mcast_rate[IEEE80211_NUM_BANDS]; 1083 int mcast_rate[IEEE80211_NUM_BANDS];
1053}; 1084};
1054 1085
@@ -1256,7 +1287,7 @@ struct cfg80211_bss {
1256 1287
1257 u8 bssid[ETH_ALEN]; 1288 u8 bssid[ETH_ALEN];
1258 1289
1259 u8 priv[0] __attribute__((__aligned__(sizeof(void *)))); 1290 u8 priv[0] __aligned(sizeof(void *));
1260}; 1291};
1261 1292
1262/** 1293/**
@@ -1266,7 +1297,7 @@ struct cfg80211_bss {
1266 * 1297 *
1267 * Note that the return value is an RCU-protected pointer, so 1298 * Note that the return value is an RCU-protected pointer, so
1268 * rcu_read_lock() must be held when calling this function. 1299 * rcu_read_lock() must be held when calling this function.
1269 * Returns %NULL if not found. 1300 * Return: %NULL if not found.
1270 */ 1301 */
1271const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); 1302const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
1272 1303
@@ -1434,6 +1465,7 @@ struct cfg80211_ibss_params {
1434 * @ie: IEs for association request 1465 * @ie: IEs for association request
1435 * @ie_len: Length of assoc_ie in octets 1466 * @ie_len: Length of assoc_ie in octets
1436 * @privacy: indicates whether privacy-enabled APs should be used 1467 * @privacy: indicates whether privacy-enabled APs should be used
1468 * @mfp: indicate whether management frame protection is used
1437 * @crypto: crypto settings 1469 * @crypto: crypto settings
1438 * @key_len: length of WEP key for shared key authentication 1470 * @key_len: length of WEP key for shared key authentication
1439 * @key_idx: index of WEP key for shared key authentication 1471 * @key_idx: index of WEP key for shared key authentication
@@ -1454,6 +1486,7 @@ struct cfg80211_connect_params {
1454 u8 *ie; 1486 u8 *ie;
1455 size_t ie_len; 1487 size_t ie_len;
1456 bool privacy; 1488 bool privacy;
1489 enum nl80211_mfp mfp;
1457 struct cfg80211_crypto_settings crypto; 1490 struct cfg80211_crypto_settings crypto;
1458 const u8 *key; 1491 const u8 *key;
1459 u8 key_len, key_idx; 1492 u8 key_len, key_idx;
@@ -2092,6 +2125,7 @@ struct ieee80211_iface_limit {
2092 * @beacon_int_infra_match: In this combination, the beacon intervals 2125 * @beacon_int_infra_match: In this combination, the beacon intervals
2093 * between infrastructure and AP types must match. This is required 2126 * between infrastructure and AP types must match. This is required
2094 * only in special cases. 2127 * only in special cases.
2128 * @radar_detect_widths: bitmap of channel widths supported for radar detection
2095 * 2129 *
2096 * These examples can be expressed as follows: 2130 * These examples can be expressed as follows:
2097 * 2131 *
@@ -2144,6 +2178,7 @@ struct ieee80211_iface_combination {
2144 u16 max_interfaces; 2178 u16 max_interfaces;
2145 u8 n_limits; 2179 u8 n_limits;
2146 bool beacon_int_infra_match; 2180 bool beacon_int_infra_match;
2181 u8 radar_detect_widths;
2147}; 2182};
2148 2183
2149struct mac_address { 2184struct mac_address {
@@ -2364,12 +2399,12 @@ struct wiphy {
2364 struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; 2399 struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS];
2365 2400
2366 /* Lets us get back the wiphy on the callback */ 2401 /* Lets us get back the wiphy on the callback */
2367 int (*reg_notifier)(struct wiphy *wiphy, 2402 void (*reg_notifier)(struct wiphy *wiphy,
2368 struct regulatory_request *request); 2403 struct regulatory_request *request);
2369 2404
2370 /* fields below are read-only, assigned by cfg80211 */ 2405 /* fields below are read-only, assigned by cfg80211 */
2371 2406
2372 const struct ieee80211_regdomain *regd; 2407 const struct ieee80211_regdomain __rcu *regd;
2373 2408
2374 /* the item in /sys/class/ieee80211/ points to this, 2409 /* the item in /sys/class/ieee80211/ points to this,
2375 * you need use set_wiphy_dev() (see below) */ 2410 * you need use set_wiphy_dev() (see below) */
@@ -2392,7 +2427,7 @@ struct wiphy {
2392 const struct iw_handler_def *wext; 2427 const struct iw_handler_def *wext;
2393#endif 2428#endif
2394 2429
2395 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); 2430 char priv[0] __aligned(NETDEV_ALIGN);
2396}; 2431};
2397 2432
2398static inline struct net *wiphy_net(struct wiphy *wiphy) 2433static inline struct net *wiphy_net(struct wiphy *wiphy)
@@ -2409,6 +2444,7 @@ static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net)
2409 * wiphy_priv - return priv from wiphy 2444 * wiphy_priv - return priv from wiphy
2410 * 2445 *
2411 * @wiphy: the wiphy whose priv pointer to return 2446 * @wiphy: the wiphy whose priv pointer to return
2447 * Return: The priv of @wiphy.
2412 */ 2448 */
2413static inline void *wiphy_priv(struct wiphy *wiphy) 2449static inline void *wiphy_priv(struct wiphy *wiphy)
2414{ 2450{
@@ -2420,6 +2456,7 @@ static inline void *wiphy_priv(struct wiphy *wiphy)
2420 * priv_to_wiphy - return the wiphy containing the priv 2456 * priv_to_wiphy - return the wiphy containing the priv
2421 * 2457 *
2422 * @priv: a pointer previously returned by wiphy_priv 2458 * @priv: a pointer previously returned by wiphy_priv
2459 * Return: The wiphy of @priv.
2423 */ 2460 */
2424static inline struct wiphy *priv_to_wiphy(void *priv) 2461static inline struct wiphy *priv_to_wiphy(void *priv)
2425{ 2462{
@@ -2442,6 +2479,7 @@ static inline void set_wiphy_dev(struct wiphy *wiphy, struct device *dev)
2442 * wiphy_dev - get wiphy dev pointer 2479 * wiphy_dev - get wiphy dev pointer
2443 * 2480 *
2444 * @wiphy: The wiphy whose device struct to look up 2481 * @wiphy: The wiphy whose device struct to look up
2482 * Return: The dev of @wiphy.
2445 */ 2483 */
2446static inline struct device *wiphy_dev(struct wiphy *wiphy) 2484static inline struct device *wiphy_dev(struct wiphy *wiphy)
2447{ 2485{
@@ -2452,6 +2490,7 @@ static inline struct device *wiphy_dev(struct wiphy *wiphy)
2452 * wiphy_name - get wiphy name 2490 * wiphy_name - get wiphy name
2453 * 2491 *
2454 * @wiphy: The wiphy whose name to return 2492 * @wiphy: The wiphy whose name to return
2493 * Return: The name of @wiphy.
2455 */ 2494 */
2456static inline const char *wiphy_name(const struct wiphy *wiphy) 2495static inline const char *wiphy_name(const struct wiphy *wiphy)
2457{ 2496{
@@ -2467,8 +2506,8 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
2467 * Create a new wiphy and associate the given operations with it. 2506 * Create a new wiphy and associate the given operations with it.
2468 * @sizeof_priv bytes are allocated for private use. 2507 * @sizeof_priv bytes are allocated for private use.
2469 * 2508 *
2470 * The returned pointer must be assigned to each netdev's 2509 * Return: A pointer to the new wiphy. This pointer must be
2471 * ieee80211_ptr for proper operation. 2510 * assigned to each netdev's ieee80211_ptr for proper operation.
2472 */ 2511 */
2473struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv); 2512struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
2474 2513
@@ -2477,7 +2516,7 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
2477 * 2516 *
2478 * @wiphy: The wiphy to register. 2517 * @wiphy: The wiphy to register.
2479 * 2518 *
2480 * Returns a non-negative wiphy index or a negative error code. 2519 * Return: A non-negative wiphy index or a negative error code.
2481 */ 2520 */
2482extern int wiphy_register(struct wiphy *wiphy); 2521extern int wiphy_register(struct wiphy *wiphy);
2483 2522
@@ -2626,6 +2665,7 @@ static inline u8 *wdev_address(struct wireless_dev *wdev)
2626 * wdev_priv - return wiphy priv from wireless_dev 2665 * wdev_priv - return wiphy priv from wireless_dev
2627 * 2666 *
2628 * @wdev: The wireless device whose wiphy's priv pointer to return 2667 * @wdev: The wireless device whose wiphy's priv pointer to return
2668 * Return: The wiphy priv of @wdev.
2629 */ 2669 */
2630static inline void *wdev_priv(struct wireless_dev *wdev) 2670static inline void *wdev_priv(struct wireless_dev *wdev)
2631{ 2671{
@@ -2643,12 +2683,14 @@ static inline void *wdev_priv(struct wireless_dev *wdev)
2643 * ieee80211_channel_to_frequency - convert channel number to frequency 2683 * ieee80211_channel_to_frequency - convert channel number to frequency
2644 * @chan: channel number 2684 * @chan: channel number
2645 * @band: band, necessary due to channel number overlap 2685 * @band: band, necessary due to channel number overlap
2686 * Return: The corresponding frequency (in MHz), or 0 if the conversion failed.
2646 */ 2687 */
2647extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); 2688extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
2648 2689
2649/** 2690/**
2650 * ieee80211_frequency_to_channel - convert frequency to channel number 2691 * ieee80211_frequency_to_channel - convert frequency to channel number
2651 * @freq: center frequency 2692 * @freq: center frequency
2693 * Return: The corresponding channel, or 0 if the conversion failed.
2652 */ 2694 */
2653extern int ieee80211_frequency_to_channel(int freq); 2695extern int ieee80211_frequency_to_channel(int freq);
2654 2696
@@ -2665,6 +2707,7 @@ extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
2665 * ieee80211_get_channel - get channel struct from wiphy for specified frequency 2707 * ieee80211_get_channel - get channel struct from wiphy for specified frequency
2666 * @wiphy: the struct wiphy to get the channel for 2708 * @wiphy: the struct wiphy to get the channel for
2667 * @freq: the center frequency of the channel 2709 * @freq: the center frequency of the channel
2710 * Return: The channel struct from @wiphy at @freq.
2668 */ 2711 */
2669static inline struct ieee80211_channel * 2712static inline struct ieee80211_channel *
2670ieee80211_get_channel(struct wiphy *wiphy, int freq) 2713ieee80211_get_channel(struct wiphy *wiphy, int freq)
@@ -2679,10 +2722,10 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq)
2679 * @basic_rates: bitmap of basic rates 2722 * @basic_rates: bitmap of basic rates
2680 * @bitrate: the bitrate for which to find the basic rate 2723 * @bitrate: the bitrate for which to find the basic rate
2681 * 2724 *
2682 * This function returns the basic rate corresponding to a given 2725 * Return: The basic rate corresponding to a given bitrate, that
2683 * bitrate, that is the next lower bitrate contained in the basic 2726 * is the next lower bitrate contained in the basic rate map,
2684 * rate map, which is, for this function, given as a bitmap of 2727 * which is, for this function, given as a bitmap of indices of
2685 * indices of rates in the band's bitrate table. 2728 * rates in the band's bitrate table.
2686 */ 2729 */
2687struct ieee80211_rate * 2730struct ieee80211_rate *
2688ieee80211_get_response_rate(struct ieee80211_supported_band *sband, 2731ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
@@ -2775,18 +2818,21 @@ extern const unsigned char bridge_tunnel_header[6];
2775/** 2818/**
2776 * ieee80211_get_hdrlen_from_skb - get header length from data 2819 * ieee80211_get_hdrlen_from_skb - get header length from data
2777 * 2820 *
2821 * @skb: the frame
2822 *
2778 * Given an skb with a raw 802.11 header at the data pointer this function 2823 * Given an skb with a raw 802.11 header at the data pointer this function
2779 * returns the 802.11 header length in bytes (not including encryption 2824 * returns the 802.11 header length.
2780 * headers). If the data in the sk_buff is too short to contain a valid 802.11
2781 * header the function returns 0.
2782 * 2825 *
2783 * @skb: the frame 2826 * Return: The 802.11 header length in bytes (not including encryption
2827 * headers). Or 0 if the data in the sk_buff is too short to contain a valid
2828 * 802.11 header.
2784 */ 2829 */
2785unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); 2830unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
2786 2831
2787/** 2832/**
2788 * ieee80211_hdrlen - get header length in bytes from frame control 2833 * ieee80211_hdrlen - get header length in bytes from frame control
2789 * @fc: frame control field in little-endian format 2834 * @fc: frame control field in little-endian format
2835 * Return: The header length in bytes.
2790 */ 2836 */
2791unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc); 2837unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc);
2792 2838
@@ -2794,7 +2840,7 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc);
2794 * ieee80211_get_mesh_hdrlen - get mesh extension header length 2840 * ieee80211_get_mesh_hdrlen - get mesh extension header length
2795 * @meshhdr: the mesh extension header, only the flags field 2841 * @meshhdr: the mesh extension header, only the flags field
2796 * (first byte) will be accessed 2842 * (first byte) will be accessed
2797 * Returns the length of the extension header, which is always at 2843 * Return: The length of the extension header, which is always at
2798 * least 6 bytes and at most 18 if address 5 and 6 are present. 2844 * least 6 bytes and at most 18 if address 5 and 6 are present.
2799 */ 2845 */
2800unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr); 2846unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr);
@@ -2812,6 +2858,7 @@ unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr);
2812 * @skb: the 802.11 data frame 2858 * @skb: the 802.11 data frame
2813 * @addr: the device MAC address 2859 * @addr: the device MAC address
2814 * @iftype: the virtual interface type 2860 * @iftype: the virtual interface type
2861 * Return: 0 on success. Non-zero on error.
2815 */ 2862 */
2816int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, 2863int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
2817 enum nl80211_iftype iftype); 2864 enum nl80211_iftype iftype);
@@ -2823,6 +2870,7 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
2823 * @iftype: the virtual interface type 2870 * @iftype: the virtual interface type
2824 * @bssid: the network bssid (used only for iftype STATION and ADHOC) 2871 * @bssid: the network bssid (used only for iftype STATION and ADHOC)
2825 * @qos: build 802.11 QoS data frame 2872 * @qos: build 802.11 QoS data frame
2873 * Return: 0 on success, or a negative error code.
2826 */ 2874 */
2827int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, 2875int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
2828 enum nl80211_iftype iftype, u8 *bssid, bool qos); 2876 enum nl80211_iftype iftype, u8 *bssid, bool qos);
@@ -2850,6 +2898,7 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
2850/** 2898/**
2851 * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame 2899 * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
2852 * @skb: the data frame 2900 * @skb: the data frame
2901 * Return: The 802.1p/1d tag.
2853 */ 2902 */
2854unsigned int cfg80211_classify8021d(struct sk_buff *skb); 2903unsigned int cfg80211_classify8021d(struct sk_buff *skb);
2855 2904
@@ -2860,12 +2909,13 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb);
2860 * @ies: data consisting of IEs 2909 * @ies: data consisting of IEs
2861 * @len: length of data 2910 * @len: length of data
2862 * 2911 *
2863 * This function will return %NULL if the element ID could 2912 * Return: %NULL if the element ID could not be found or if
2864 * not be found or if the element is invalid (claims to be 2913 * the element is invalid (claims to be longer than the given
2865 * longer than the given data), or a pointer to the first byte 2914 * data), or a pointer to the first byte of the requested
2866 * of the requested element, that is the byte containing the 2915 * element, that is the byte containing the element ID.
2867 * element ID. There are no checks on the element length 2916 *
2868 * other than having to fit into the given data. 2917 * Note: There are no checks on the element length other than
2918 * having to fit into the given data.
2869 */ 2919 */
2870const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); 2920const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len);
2871 2921
@@ -2877,12 +2927,13 @@ const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len);
2877 * @ies: data consisting of IEs 2927 * @ies: data consisting of IEs
2878 * @len: length of data 2928 * @len: length of data
2879 * 2929 *
2880 * This function will return %NULL if the vendor specific element ID 2930 * Return: %NULL if the vendor specific element ID could not be found or if the
2881 * could not be found or if the element is invalid (claims to be 2931 * element is invalid (claims to be longer than the given data), or a pointer to
2882 * longer than the given data), or a pointer to the first byte 2932 * the first byte of the requested element, that is the byte containing the
2883 * of the requested element, that is the byte containing the 2933 * element ID.
2884 * element ID. There are no checks on the element length 2934 *
2885 * other than having to fit into the given data. 2935 * Note: There are no checks on the element length other than having to fit into
2936 * the given data.
2886 */ 2937 */
2887const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, 2938const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
2888 const u8 *ies, int len); 2939 const u8 *ies, int len);
@@ -2915,6 +2966,8 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
2915 * 2966 *
2916 * Drivers should check the return value, its possible you can get 2967 * Drivers should check the return value, its possible you can get
2917 * an -ENOMEM. 2968 * an -ENOMEM.
2969 *
2970 * Return: 0 on success. -ENOMEM.
2918 */ 2971 */
2919extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); 2972extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
2920 2973
@@ -2938,28 +2991,22 @@ extern void wiphy_apply_custom_regulatory(
2938 * freq_reg_info - get regulatory information for the given frequency 2991 * freq_reg_info - get regulatory information for the given frequency
2939 * @wiphy: the wiphy for which we want to process this rule for 2992 * @wiphy: the wiphy for which we want to process this rule for
2940 * @center_freq: Frequency in KHz for which we want regulatory information for 2993 * @center_freq: Frequency in KHz for which we want regulatory information for
2941 * @desired_bw_khz: the desired max bandwidth you want to use per
2942 * channel. Note that this is still 20 MHz if you want to use HT40
2943 * as HT40 makes use of two channels for its 40 MHz width bandwidth.
2944 * If set to 0 we'll assume you want the standard 20 MHz.
2945 * @reg_rule: the regulatory rule which we have for this frequency
2946 * 2994 *
2947 * Use this function to get the regulatory rule for a specific frequency on 2995 * Use this function to get the regulatory rule for a specific frequency on
2948 * a given wireless device. If the device has a specific regulatory domain 2996 * a given wireless device. If the device has a specific regulatory domain
2949 * it wants to follow we respect that unless a country IE has been received 2997 * it wants to follow we respect that unless a country IE has been received
2950 * and processed already. 2998 * and processed already.
2951 * 2999 *
2952 * Returns 0 if it was able to find a valid regulatory rule which does 3000 * Return: A valid pointer, or, when an error occurs, for example if no rule
2953 * apply to the given center_freq otherwise it returns non-zero. It will 3001 * can be found, the return value is encoded using ERR_PTR(). Use IS_ERR() to
2954 * also return -ERANGE if we determine the given center_freq does not even have 3002 * check and PTR_ERR() to obtain the numeric return value. The numeric return
2955 * a regulatory rule for a frequency range in the center_freq's band. See 3003 * value will be -ERANGE if we determine the given center_freq does not even
2956 * freq_in_rule_band() for our current definition of a band -- this is purely 3004 * have a regulatory rule for a frequency range in the center_freq's band.
2957 * subjective and right now its 802.11 specific. 3005 * See freq_in_rule_band() for our current definition of a band -- this is
3006 * purely subjective and right now it's 802.11 specific.
2958 */ 3007 */
2959extern int freq_reg_info(struct wiphy *wiphy, 3008const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy,
2960 u32 center_freq, 3009 u32 center_freq);
2961 u32 desired_bw_khz,
2962 const struct ieee80211_reg_rule **reg_rule);
2963 3010
2964/* 3011/*
2965 * callbacks for asynchronous cfg80211 methods, notification 3012 * callbacks for asynchronous cfg80211 methods, notification
@@ -3006,7 +3053,8 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
3006 * This informs cfg80211 that BSS information was found and 3053 * This informs cfg80211 that BSS information was found and
3007 * the BSS should be updated/added. 3054 * the BSS should be updated/added.
3008 * 3055 *
3009 * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! 3056 * Return: A referenced struct, must be released with cfg80211_put_bss()!
3057 * Or %NULL on error.
3010 */ 3058 */
3011struct cfg80211_bss * __must_check 3059struct cfg80211_bss * __must_check
3012cfg80211_inform_bss_frame(struct wiphy *wiphy, 3060cfg80211_inform_bss_frame(struct wiphy *wiphy,
@@ -3031,7 +3079,8 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
3031 * This informs cfg80211 that BSS information was found and 3079 * This informs cfg80211 that BSS information was found and
3032 * the BSS should be updated/added. 3080 * the BSS should be updated/added.
3033 * 3081 *
3034 * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()! 3082 * Return: A referenced struct, must be released with cfg80211_put_bss()!
3083 * Or %NULL on error.
3035 */ 3084 */
3036struct cfg80211_bss * __must_check 3085struct cfg80211_bss * __must_check
3037cfg80211_inform_bss(struct wiphy *wiphy, 3086cfg80211_inform_bss(struct wiphy *wiphy,
@@ -3308,16 +3357,18 @@ void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
3308 * the testmode command. Since it is intended for a reply, calling 3357 * the testmode command. Since it is intended for a reply, calling
3309 * it outside of the @testmode_cmd operation is invalid. 3358 * it outside of the @testmode_cmd operation is invalid.
3310 * 3359 *
3311 * The returned skb (or %NULL if any errors happen) is pre-filled 3360 * The returned skb is pre-filled with the wiphy index and set up in
3312 * with the wiphy index and set up in a way that any data that is 3361 * a way that any data that is put into the skb (with skb_put(),
3313 * put into the skb (with skb_put(), nla_put() or similar) will end 3362 * nla_put() or similar) will end up being within the
3314 * up being within the %NL80211_ATTR_TESTDATA attribute, so all that 3363 * %NL80211_ATTR_TESTDATA attribute, so all that needs to be done
3315 * needs to be done with the skb is adding data for the corresponding 3364 * with the skb is adding data for the corresponding userspace tool
3316 * userspace tool which can then read that data out of the testdata 3365 * which can then read that data out of the testdata attribute. You
3317 * attribute. You must not modify the skb in any other way. 3366 * must not modify the skb in any other way.
3318 * 3367 *
3319 * When done, call cfg80211_testmode_reply() with the skb and return 3368 * When done, call cfg80211_testmode_reply() with the skb and return
3320 * its error code as the result of the @testmode_cmd operation. 3369 * its error code as the result of the @testmode_cmd operation.
3370 *
3371 * Return: An allocated and pre-filled skb. %NULL if any errors happen.
3321 */ 3372 */
3322struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, 3373struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
3323 int approxlen); 3374 int approxlen);
@@ -3327,11 +3378,12 @@ struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
3327 * @skb: The skb, must have been allocated with 3378 * @skb: The skb, must have been allocated with
3328 * cfg80211_testmode_alloc_reply_skb() 3379 * cfg80211_testmode_alloc_reply_skb()
3329 * 3380 *
3330 * Returns an error code or 0 on success, since calling this 3381 * Since calling this function will usually be the last thing
3331 * function will usually be the last thing before returning 3382 * before returning from the @testmode_cmd you should return
3332 * from the @testmode_cmd you should return the error code. 3383 * the error code. Note that this function consumes the skb
3333 * Note that this function consumes the skb regardless of the 3384 * regardless of the return value.
3334 * return value. 3385 *
3386 * Return: An error code or 0 on success.
3335 */ 3387 */
3336int cfg80211_testmode_reply(struct sk_buff *skb); 3388int cfg80211_testmode_reply(struct sk_buff *skb);
3337 3389
@@ -3345,14 +3397,16 @@ int cfg80211_testmode_reply(struct sk_buff *skb);
3345 * This function allocates and pre-fills an skb for an event on the 3397 * This function allocates and pre-fills an skb for an event on the
3346 * testmode multicast group. 3398 * testmode multicast group.
3347 * 3399 *
3348 * The returned skb (or %NULL if any errors happen) is set up in the 3400 * The returned skb is set up in the same way as with
3349 * same way as with cfg80211_testmode_alloc_reply_skb() but prepared 3401 * cfg80211_testmode_alloc_reply_skb() but prepared for an event. As
3350 * for an event. As there, you should simply add data to it that will 3402 * there, you should simply add data to it that will then end up in the
3351 * then end up in the %NL80211_ATTR_TESTDATA attribute. Again, you must 3403 * %NL80211_ATTR_TESTDATA attribute. Again, you must not modify the skb
3352 * not modify the skb in any other way. 3404 * in any other way.
3353 * 3405 *
3354 * When done filling the skb, call cfg80211_testmode_event() with the 3406 * When done filling the skb, call cfg80211_testmode_event() with the
3355 * skb to send the event. 3407 * skb to send the event.
3408 *
3409 * Return: An allocated and pre-filled skb. %NULL if any errors happen.
3356 */ 3410 */
3357struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, 3411struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy,
3358 int approxlen, gfp_t gfp); 3412 int approxlen, gfp_t gfp);
@@ -3533,13 +3587,13 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
3533 * @len: length of the frame data 3587 * @len: length of the frame data
3534 * @gfp: context flags 3588 * @gfp: context flags
3535 * 3589 *
3536 * Returns %true if a user space application has registered for this frame. 3590 * This function is called whenever an Action frame is received for a station
3591 * mode interface, but is not processed in kernel.
3592 *
3593 * Return: %true if a user space application has registered for this frame.
3537 * For action frames, that makes it responsible for rejecting unrecognized 3594 * For action frames, that makes it responsible for rejecting unrecognized
3538 * action frames; %false otherwise, in which case for action frames the 3595 * action frames; %false otherwise, in which case for action frames the
3539 * driver is responsible for rejecting the frame. 3596 * driver is responsible for rejecting the frame.
3540 *
3541 * This function is called whenever an Action frame is received for a station
3542 * mode interface, but is not processed in kernel.
3543 */ 3597 */
3544bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, 3598bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
3545 const u8 *buf, size_t len, gfp_t gfp); 3599 const u8 *buf, size_t len, gfp_t gfp);
@@ -3631,7 +3685,7 @@ void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
3631 * This function is used in AP mode (only!) to inform userspace that 3685 * This function is used in AP mode (only!) to inform userspace that
3632 * a spurious class 3 frame was received, to be able to deauth the 3686 * a spurious class 3 frame was received, to be able to deauth the
3633 * sender. 3687 * sender.
3634 * Returns %true if the frame was passed to userspace (or this failed 3688 * Return: %true if the frame was passed to userspace (or this failed
3635 * for a reason other than not having a subscription.) 3689 * for a reason other than not having a subscription.)
3636 */ 3690 */
3637bool cfg80211_rx_spurious_frame(struct net_device *dev, 3691bool cfg80211_rx_spurious_frame(struct net_device *dev,
@@ -3647,7 +3701,7 @@ bool cfg80211_rx_spurious_frame(struct net_device *dev,
3647 * an associated station sent a 4addr frame but that wasn't expected. 3701 * an associated station sent a 4addr frame but that wasn't expected.
3648 * It is allowed and desirable to send this event only once for each 3702 * It is allowed and desirable to send this event only once for each
3649 * station to avoid event flooding. 3703 * station to avoid event flooding.
3650 * Returns %true if the frame was passed to userspace (or this failed 3704 * Return: %true if the frame was passed to userspace (or this failed
3651 * for a reason other than not having a subscription.) 3705 * for a reason other than not having a subscription.)
3652 */ 3706 */
3653bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev, 3707bool cfg80211_rx_unexpected_4addr_frame(struct net_device *dev,
@@ -3685,8 +3739,8 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy,
3685 * @wiphy: the wiphy 3739 * @wiphy: the wiphy
3686 * @chandef: the channel definition 3740 * @chandef: the channel definition
3687 * 3741 *
3688 * This function returns true if there is no secondary channel or the secondary 3742 * Return: %true if there is no secondary channel or the secondary channel(s)
3689 * channel(s) can be used for beaconing (i.e. is not a radar channel etc.) 3743 * can be used for beaconing (i.e. is not a radar channel etc.)
3690 */ 3744 */
3691bool cfg80211_reg_can_beacon(struct wiphy *wiphy, 3745bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
3692 struct cfg80211_chan_def *chandef); 3746 struct cfg80211_chan_def *chandef);
@@ -3756,9 +3810,9 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev);
3756 * The function finds a given P2P attribute in the (vendor) IEs and 3810 * The function finds a given P2P attribute in the (vendor) IEs and
3757 * copies its contents to the given buffer. 3811 * copies its contents to the given buffer.
3758 * 3812 *
3759 * The return value is a negative error code (-%EILSEQ or -%ENOENT) if 3813 * Return: A negative error code (-%EILSEQ or -%ENOENT) if the data is
3760 * the data is malformed or the attribute can't be found (respectively), 3814 * malformed or the attribute can't be found (respectively), or the
3761 * or the length of the found attribute (which can be zero). 3815 * length of the found attribute (which can be zero).
3762 */ 3816 */
3763int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, 3817int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
3764 enum ieee80211_p2p_attr_id attr, 3818 enum ieee80211_p2p_attr_id attr,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ee50c5eba50c..3037f49e51c8 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -173,7 +173,7 @@ struct ieee80211_chanctx_conf {
173 173
174 u8 rx_chains_static, rx_chains_dynamic; 174 u8 rx_chains_static, rx_chains_dynamic;
175 175
176 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 176 u8 drv_priv[0] __aligned(sizeof(void *));
177}; 177};
178 178
179/** 179/**
@@ -1059,7 +1059,7 @@ struct ieee80211_vif {
1059 u32 driver_flags; 1059 u32 driver_flags;
1060 1060
1061 /* must be last */ 1061 /* must be last */
1062 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 1062 u8 drv_priv[0] __aligned(sizeof(void *));
1063}; 1063};
1064 1064
1065static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) 1065static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
@@ -1209,7 +1209,7 @@ struct ieee80211_sta {
1209 u8 max_sp; 1209 u8 max_sp;
1210 1210
1211 /* must be last */ 1211 /* must be last */
1212 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 1212 u8 drv_priv[0] __aligned(sizeof(void *));
1213}; 1213};
1214 1214
1215/** 1215/**
@@ -1522,6 +1522,8 @@ struct ieee80211_hw {
1522 * structure can then access it via hw->priv. Note that mac802111 drivers should 1522 * structure can then access it via hw->priv. Note that mac802111 drivers should
1523 * not use wiphy_priv() to try to get their private driver structure as this 1523 * not use wiphy_priv() to try to get their private driver structure as this
1524 * is already used internally by mac80211. 1524 * is already used internally by mac80211.
1525 *
1526 * Return: The mac80211 driver hw struct of @wiphy.
1525 */ 1527 */
1526struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy); 1528struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy);
1527 1529
@@ -2033,17 +2035,29 @@ enum ieee80211_filter_flags {
2033 * calling ieee80211_start_tx_ba_cb_irqsafe, because the peer 2035 * calling ieee80211_start_tx_ba_cb_irqsafe, because the peer
2034 * might receive the addBA frame and send a delBA right away! 2036 * might receive the addBA frame and send a delBA right away!
2035 * 2037 *
2036 * @IEEE80211_AMPDU_RX_START: start Rx aggregation 2038 * @IEEE80211_AMPDU_RX_START: start RX aggregation
2037 * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation 2039 * @IEEE80211_AMPDU_RX_STOP: stop RX aggregation
2038 * @IEEE80211_AMPDU_TX_START: start Tx aggregation 2040 * @IEEE80211_AMPDU_TX_START: start TX aggregation
2039 * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
2040 * @IEEE80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational 2041 * @IEEE80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational
2042 * @IEEE80211_AMPDU_TX_STOP_CONT: stop TX aggregation but continue transmitting
2043 * queued packets, now unaggregated. After all packets are transmitted the
2044 * driver has to call ieee80211_stop_tx_ba_cb_irqsafe().
2045 * @IEEE80211_AMPDU_TX_STOP_FLUSH: stop TX aggregation and flush all packets,
2046 * called when the station is removed. There's no need or reason to call
2047 * ieee80211_stop_tx_ba_cb_irqsafe() in this case as mac80211 assumes the
2048 * session is gone and removes the station.
2049 * @IEEE80211_AMPDU_TX_STOP_FLUSH_CONT: called when TX aggregation is stopped
2050 * but the driver hasn't called ieee80211_stop_tx_ba_cb_irqsafe() yet and
2051 * now the connection is dropped and the station will be removed. Drivers
2052 * should clean up and drop remaining packets when this is called.
2041 */ 2053 */
2042enum ieee80211_ampdu_mlme_action { 2054enum ieee80211_ampdu_mlme_action {
2043 IEEE80211_AMPDU_RX_START, 2055 IEEE80211_AMPDU_RX_START,
2044 IEEE80211_AMPDU_RX_STOP, 2056 IEEE80211_AMPDU_RX_STOP,
2045 IEEE80211_AMPDU_TX_START, 2057 IEEE80211_AMPDU_TX_START,
2046 IEEE80211_AMPDU_TX_STOP, 2058 IEEE80211_AMPDU_TX_STOP_CONT,
2059 IEEE80211_AMPDU_TX_STOP_FLUSH,
2060 IEEE80211_AMPDU_TX_STOP_FLUSH_CONT,
2047 IEEE80211_AMPDU_TX_OPERATIONAL, 2061 IEEE80211_AMPDU_TX_OPERATIONAL,
2048}; 2062};
2049 2063
@@ -2474,7 +2488,10 @@ enum ieee80211_rate_control_changed {
2474 * 2488 *
2475 * @restart_complete: Called after a call to ieee80211_restart_hw(), when the 2489 * @restart_complete: Called after a call to ieee80211_restart_hw(), when the
2476 * reconfiguration has completed. This can help the driver implement the 2490 * reconfiguration has completed. This can help the driver implement the
2477 * reconfiguration step. This callback may sleep. 2491 * reconfiguration step. Also called when reconfiguring because the
2492 * driver's resume function returned 1, as this is just like an "inline"
2493 * hardware restart. This callback may sleep.
2494 *
2478 */ 2495 */
2479struct ieee80211_ops { 2496struct ieee80211_ops {
2480 void (*tx)(struct ieee80211_hw *hw, 2497 void (*tx)(struct ieee80211_hw *hw,
@@ -2661,6 +2678,8 @@ struct ieee80211_ops {
2661 * 2678 *
2662 * @priv_data_len: length of private data 2679 * @priv_data_len: length of private data
2663 * @ops: callbacks for this device 2680 * @ops: callbacks for this device
2681 *
2682 * Return: A pointer to the new hardware device, or %NULL on error.
2664 */ 2683 */
2665struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, 2684struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
2666 const struct ieee80211_ops *ops); 2685 const struct ieee80211_ops *ops);
@@ -2673,6 +2692,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
2673 * need to fill the contained wiphy's information. 2692 * need to fill the contained wiphy's information.
2674 * 2693 *
2675 * @hw: the device to register as returned by ieee80211_alloc_hw() 2694 * @hw: the device to register as returned by ieee80211_alloc_hw()
2695 *
2696 * Return: 0 on success. An error code otherwise.
2676 */ 2697 */
2677int ieee80211_register_hw(struct ieee80211_hw *hw); 2698int ieee80211_register_hw(struct ieee80211_hw *hw);
2678 2699
@@ -2719,6 +2740,8 @@ extern char *__ieee80211_create_tpt_led_trigger(
2719 * of the trigger so you can automatically link the LED device. 2740 * of the trigger so you can automatically link the LED device.
2720 * 2741 *
2721 * @hw: the hardware to get the LED trigger name for 2742 * @hw: the hardware to get the LED trigger name for
2743 *
2744 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2722 */ 2745 */
2723static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw) 2746static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
2724{ 2747{
@@ -2738,6 +2761,8 @@ static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
2738 * of the trigger so you can automatically link the LED device. 2761 * of the trigger so you can automatically link the LED device.
2739 * 2762 *
2740 * @hw: the hardware to get the LED trigger name for 2763 * @hw: the hardware to get the LED trigger name for
2764 *
2765 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2741 */ 2766 */
2742static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw) 2767static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
2743{ 2768{
@@ -2757,6 +2782,8 @@ static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
2757 * of the trigger so you can automatically link the LED device. 2782 * of the trigger so you can automatically link the LED device.
2758 * 2783 *
2759 * @hw: the hardware to get the LED trigger name for 2784 * @hw: the hardware to get the LED trigger name for
2785 *
2786 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2760 */ 2787 */
2761static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw) 2788static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
2762{ 2789{
@@ -2776,6 +2803,8 @@ static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
2776 * of the trigger so you can automatically link the LED device. 2803 * of the trigger so you can automatically link the LED device.
2777 * 2804 *
2778 * @hw: the hardware to get the LED trigger name for 2805 * @hw: the hardware to get the LED trigger name for
2806 *
2807 * Return: The name of the LED trigger. %NULL if not configured for LEDs.
2779 */ 2808 */
2780static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw) 2809static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
2781{ 2810{
@@ -2793,9 +2822,10 @@ static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
2793 * @blink_table: the blink table -- needs to be ordered by throughput 2822 * @blink_table: the blink table -- needs to be ordered by throughput
2794 * @blink_table_len: size of the blink table 2823 * @blink_table_len: size of the blink table
2795 * 2824 *
2796 * This function returns %NULL (in case of error, or if no LED 2825 * Return: %NULL (in case of error, or if no LED triggers are
2797 * triggers are configured) or the name of the new trigger. 2826 * configured) or the name of the new trigger.
2798 * This function must be called before ieee80211_register_hw(). 2827 *
2828 * Note: This function must be called before ieee80211_register_hw().
2799 */ 2829 */
2800static inline char * 2830static inline char *
2801ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags, 2831ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags,
@@ -2928,10 +2958,10 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
2928 * Calls to this function for a single hardware must be synchronized against 2958 * Calls to this function for a single hardware must be synchronized against
2929 * each other. 2959 * each other.
2930 * 2960 *
2931 * The function returns -EINVAL when the requested PS mode is already set.
2932 *
2933 * @sta: currently connected sta 2961 * @sta: currently connected sta
2934 * @start: start or stop PS 2962 * @start: start or stop PS
2963 *
2964 * Return: 0 on success. -EINVAL when the requested PS mode is already set.
2935 */ 2965 */
2936int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start); 2966int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
2937 2967
@@ -2945,6 +2975,8 @@ int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
2945 * 2975 *
2946 * @sta: currently connected sta 2976 * @sta: currently connected sta
2947 * @start: start or stop PS 2977 * @start: start or stop PS
2978 *
2979 * Return: Like ieee80211_sta_ps_transition().
2948 */ 2980 */
2949static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, 2981static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2950 bool start) 2982 bool start)
@@ -3082,6 +3114,8 @@ void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
3082 * according to the current DTIM parameters/TIM bitmap. 3114 * according to the current DTIM parameters/TIM bitmap.
3083 * 3115 *
3084 * The driver is responsible for freeing the returned skb. 3116 * The driver is responsible for freeing the returned skb.
3117 *
3118 * Return: The beacon template. %NULL on error.
3085 */ 3119 */
3086struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, 3120struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
3087 struct ieee80211_vif *vif, 3121 struct ieee80211_vif *vif,
@@ -3093,6 +3127,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
3093 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3127 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3094 * 3128 *
3095 * See ieee80211_beacon_get_tim(). 3129 * See ieee80211_beacon_get_tim().
3130 *
3131 * Return: See ieee80211_beacon_get_tim().
3096 */ 3132 */
3097static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, 3133static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
3098 struct ieee80211_vif *vif) 3134 struct ieee80211_vif *vif)
@@ -3109,6 +3145,8 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
3109 * hardware. The destination address should be set by the caller. 3145 * hardware. The destination address should be set by the caller.
3110 * 3146 *
3111 * Can only be called in AP mode. 3147 * Can only be called in AP mode.
3148 *
3149 * Return: The Probe Response template. %NULL on error.
3112 */ 3150 */
3113struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw, 3151struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
3114 struct ieee80211_vif *vif); 3152 struct ieee80211_vif *vif);
@@ -3124,6 +3162,8 @@ struct sk_buff *ieee80211_proberesp_get(struct ieee80211_hw *hw,
3124 * 3162 *
3125 * Note: Caller (or hardware) is responsible for setting the 3163 * Note: Caller (or hardware) is responsible for setting the
3126 * &IEEE80211_FCTL_PM bit. 3164 * &IEEE80211_FCTL_PM bit.
3165 *
3166 * Return: The PS Poll template. %NULL on error.
3127 */ 3167 */
3128struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, 3168struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
3129 struct ieee80211_vif *vif); 3169 struct ieee80211_vif *vif);
@@ -3139,6 +3179,8 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
3139 * 3179 *
3140 * Note: Caller (or hardware) is responsible for setting the 3180 * Note: Caller (or hardware) is responsible for setting the
3141 * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields. 3181 * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields.
3182 *
3183 * Return: The nullfunc template. %NULL on error.
3142 */ 3184 */
3143struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw, 3185struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
3144 struct ieee80211_vif *vif); 3186 struct ieee80211_vif *vif);
@@ -3153,6 +3195,8 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
3153 * 3195 *
3154 * Creates a Probe Request template which can, for example, be uploaded to 3196 * Creates a Probe Request template which can, for example, be uploaded to
3155 * hardware. 3197 * hardware.
3198 *
3199 * Return: The Probe Request template. %NULL on error.
3156 */ 3200 */
3157struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, 3201struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
3158 struct ieee80211_vif *vif, 3202 struct ieee80211_vif *vif,
@@ -3188,6 +3232,8 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3188 * If the RTS is generated in firmware, but the host system must provide 3232 * If the RTS is generated in firmware, but the host system must provide
3189 * the duration field, the low-level driver uses this function to receive 3233 * the duration field, the low-level driver uses this function to receive
3190 * the duration field value in little-endian byteorder. 3234 * the duration field value in little-endian byteorder.
3235 *
3236 * Return: The duration.
3191 */ 3237 */
3192__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, 3238__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
3193 struct ieee80211_vif *vif, size_t frame_len, 3239 struct ieee80211_vif *vif, size_t frame_len,
@@ -3223,6 +3269,8 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
3223 * If the CTS-to-self is generated in firmware, but the host system must provide 3269 * If the CTS-to-self is generated in firmware, but the host system must provide
3224 * the duration field, the low-level driver uses this function to receive 3270 * the duration field, the low-level driver uses this function to receive
3225 * the duration field value in little-endian byteorder. 3271 * the duration field value in little-endian byteorder.
3272 *
3273 * Return: The duration.
3226 */ 3274 */
3227__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, 3275__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
3228 struct ieee80211_vif *vif, 3276 struct ieee80211_vif *vif,
@@ -3239,6 +3287,8 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
3239 * 3287 *
3240 * Calculate the duration field of some generic frame, given its 3288 * Calculate the duration field of some generic frame, given its
3241 * length and transmission rate (in 100kbps). 3289 * length and transmission rate (in 100kbps).
3290 *
3291 * Return: The duration.
3242 */ 3292 */
3243__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, 3293__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
3244 struct ieee80211_vif *vif, 3294 struct ieee80211_vif *vif,
@@ -3255,9 +3305,10 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
3255 * hardware/firmware does not implement buffering of broadcast/multicast 3305 * hardware/firmware does not implement buffering of broadcast/multicast
3256 * frames when power saving is used, 802.11 code buffers them in the host 3306 * frames when power saving is used, 802.11 code buffers them in the host
3257 * memory. The low-level driver uses this function to fetch next buffered 3307 * memory. The low-level driver uses this function to fetch next buffered
3258 * frame. In most cases, this is used when generating beacon frame. This 3308 * frame. In most cases, this is used when generating beacon frame.
3259 * function returns a pointer to the next buffered skb or NULL if no more 3309 *
3260 * buffered frames are available. 3310 * Return: A pointer to the next buffered skb or NULL if no more buffered
3311 * frames are available.
3261 * 3312 *
3262 * Note: buffered frames are returned only after DTIM beacon frame was 3313 * Note: buffered frames are returned only after DTIM beacon frame was
3263 * generated with ieee80211_beacon_get() and the low-level driver must thus 3314 * generated with ieee80211_beacon_get() and the low-level driver must thus
@@ -3437,6 +3488,8 @@ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
3437 * @queue: queue number (counted from zero). 3488 * @queue: queue number (counted from zero).
3438 * 3489 *
3439 * Drivers should use this function instead of netif_stop_queue. 3490 * Drivers should use this function instead of netif_stop_queue.
3491 *
3492 * Return: %true if the queue is stopped. %false otherwise.
3440 */ 3493 */
3441 3494
3442int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue); 3495int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue);
@@ -3634,7 +3687,9 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
3634 * @vif: virtual interface to look for station on 3687 * @vif: virtual interface to look for station on
3635 * @addr: station's address 3688 * @addr: station's address
3636 * 3689 *
3637 * This function must be called under RCU lock and the 3690 * Return: The station, if found. %NULL otherwise.
3691 *
3692 * Note: This function must be called under RCU lock and the
3638 * resulting pointer is only valid under RCU lock as well. 3693 * resulting pointer is only valid under RCU lock as well.
3639 */ 3694 */
3640struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif, 3695struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
@@ -3647,7 +3702,9 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
3647 * @addr: remote station's address 3702 * @addr: remote station's address
3648 * @localaddr: local address (vif->sdata->vif.addr). Use NULL for 'any'. 3703 * @localaddr: local address (vif->sdata->vif.addr). Use NULL for 'any'.
3649 * 3704 *
3650 * This function must be called under RCU lock and the 3705 * Return: The station, if found. %NULL otherwise.
3706 *
3707 * Note: This function must be called under RCU lock and the
3651 * resulting pointer is only valid under RCU lock as well. 3708 * resulting pointer is only valid under RCU lock as well.
3652 * 3709 *
3653 * NOTE: You may pass NULL for localaddr, but then you will just get 3710 * NOTE: You may pass NULL for localaddr, but then you will just get
@@ -3754,6 +3811,11 @@ void ieee80211_iter_keys(struct ieee80211_hw *hw,
3754 * The iterator will not find a context that's being added (during 3811 * The iterator will not find a context that's being added (during
3755 * the driver callback to add it) but will find it while it's being 3812 * the driver callback to add it) but will find it while it's being
3756 * removed. 3813 * removed.
3814 *
3815 * Note that during hardware restart, all contexts that existed
3816 * before the restart are considered already present so will be
3817 * found while iterating, whether they've been re-added already
3818 * or not.
3757 */ 3819 */
3758void ieee80211_iter_chan_contexts_atomic( 3820void ieee80211_iter_chan_contexts_atomic(
3759 struct ieee80211_hw *hw, 3821 struct ieee80211_hw *hw,
@@ -3772,7 +3834,9 @@ void ieee80211_iter_chan_contexts_atomic(
3772 * information. This function must only be called from within the 3834 * information. This function must only be called from within the
3773 * .bss_info_changed callback function and only in managed mode. The function 3835 * .bss_info_changed callback function and only in managed mode. The function
3774 * is only useful when the interface is associated, otherwise it will return 3836 * is only useful when the interface is associated, otherwise it will return
3775 * NULL. 3837 * %NULL.
3838 *
3839 * Return: The Probe Request template. %NULL on error.
3776 */ 3840 */
3777struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, 3841struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
3778 struct ieee80211_vif *vif); 3842 struct ieee80211_vif *vif);
@@ -4119,12 +4183,14 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
4119void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); 4183void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
4120 4184
4121/** 4185/**
4122 * ieee80211_ave_rssi - report the average rssi for the specified interface 4186 * ieee80211_ave_rssi - report the average RSSI for the specified interface
4123 * 4187 *
4124 * @vif: the specified virtual interface 4188 * @vif: the specified virtual interface
4125 * 4189 *
4126 * This function return the average rssi value for the requested interface. 4190 * Note: This function assumes that the given vif is valid.
4127 * It assumes that the given vif is valid. 4191 *
4192 * Return: The average RSSI value for the requested interface, or 0 if not
4193 * applicable.
4128 */ 4194 */
4129int ieee80211_ave_rssi(struct ieee80211_vif *vif); 4195int ieee80211_ave_rssi(struct ieee80211_vif *vif);
4130 4196
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index 671953e11575..b87a1692b086 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -57,8 +57,10 @@ struct nfc_hci_ops {
57 int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb); 57 int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb);
58 int (*check_presence)(struct nfc_hci_dev *hdev, 58 int (*check_presence)(struct nfc_hci_dev *hdev,
59 struct nfc_target *target); 59 struct nfc_target *target);
60 void (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, 60 int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event,
61 struct sk_buff *skb); 61 struct sk_buff *skb);
62 int (*enable_se)(struct nfc_dev *dev, u32 secure_element);
63 int (*disable_se)(struct nfc_dev *dev, u32 secure_element);
62}; 64};
63 65
64/* Pipes */ 66/* Pipes */
@@ -82,11 +84,23 @@ typedef int (*xmit) (struct sk_buff *skb, void *cb_data);
82 84
83#define NFC_HCI_MAX_GATES 256 85#define NFC_HCI_MAX_GATES 256
84 86
87/*
88 * These values can be specified by a driver to indicate it requires some
89 * adaptation of the HCI standard.
90 *
91 * NFC_HCI_QUIRK_SHORT_CLEAR - send HCI_ADM_CLEAR_ALL_PIPE cmd with no params
92 */
93enum {
94 NFC_HCI_QUIRK_SHORT_CLEAR = 0,
95};
96
85struct nfc_hci_dev { 97struct nfc_hci_dev {
86 struct nfc_dev *ndev; 98 struct nfc_dev *ndev;
87 99
88 u32 max_data_link_payload; 100 u32 max_data_link_payload;
89 101
102 bool shutting_down;
103
90 struct mutex msg_tx_mutex; 104 struct mutex msg_tx_mutex;
91 105
92 struct list_head msg_tx_queue; 106 struct list_head msg_tx_queue;
@@ -129,12 +143,16 @@ struct nfc_hci_dev {
129 143
130 u8 *gb; 144 u8 *gb;
131 size_t gb_len; 145 size_t gb_len;
146
147 unsigned long quirks;
132}; 148};
133 149
134/* hci device allocation */ 150/* hci device allocation */
135struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, 151struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops,
136 struct nfc_hci_init_data *init_data, 152 struct nfc_hci_init_data *init_data,
153 unsigned long quirks,
137 u32 protocols, 154 u32 protocols,
155 u32 supported_se,
138 const char *llc_name, 156 const char *llc_name,
139 int tx_headroom, 157 int tx_headroom,
140 int tx_tailroom, 158 int tx_tailroom,
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index d705d8674949..5bc0c460edc0 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -147,6 +147,7 @@ struct nci_dev {
147/* ----- NCI Devices ----- */ 147/* ----- NCI Devices ----- */
148struct nci_dev *nci_allocate_device(struct nci_ops *ops, 148struct nci_dev *nci_allocate_device(struct nci_ops *ops,
149 __u32 supported_protocols, 149 __u32 supported_protocols,
150 __u32 supported_se,
150 int tx_headroom, 151 int tx_headroom,
151 int tx_tailroom); 152 int tx_tailroom);
152void nci_free_device(struct nci_dev *ndev); 153void nci_free_device(struct nci_dev *ndev);
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index fce80b2f9be7..87a6417fc934 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -68,6 +68,8 @@ struct nfc_ops {
68 void *cb_context); 68 void *cb_context);
69 int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); 69 int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb);
70 int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); 70 int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target);
71 int (*enable_se)(struct nfc_dev *dev, u32 secure_element);
72 int (*disable_se)(struct nfc_dev *dev, u32 secure_element);
71}; 73};
72 74
73#define NFC_TARGET_IDX_ANY -1 75#define NFC_TARGET_IDX_ANY -1
@@ -109,12 +111,17 @@ struct nfc_dev {
109 struct nfc_genl_data genl_data; 111 struct nfc_genl_data genl_data;
110 u32 supported_protocols; 112 u32 supported_protocols;
111 113
114 u32 supported_se;
115 u32 active_se;
116
112 int tx_headroom; 117 int tx_headroom;
113 int tx_tailroom; 118 int tx_tailroom;
114 119
115 struct timer_list check_pres_timer; 120 struct timer_list check_pres_timer;
116 struct work_struct check_pres_work; 121 struct work_struct check_pres_work;
117 122
123 bool shutting_down;
124
118 struct nfc_ops *ops; 125 struct nfc_ops *ops;
119}; 126};
120#define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev) 127#define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev)
@@ -123,6 +130,7 @@ extern struct class nfc_class;
123 130
124struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, 131struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
125 u32 supported_protocols, 132 u32 supported_protocols,
133 u32 supported_se,
126 int tx_headroom, 134 int tx_headroom,
127 int tx_tailroom); 135 int tx_tailroom);
128 136
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index 7dcaa2794fde..f17ed590d64a 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -18,6 +18,7 @@
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 */ 19 */
20 20
21#include <linux/rcupdate.h>
21 22
22/** 23/**
23 * enum environment_cap - Environment parsed from country IE 24 * enum environment_cap - Environment parsed from country IE
@@ -35,6 +36,7 @@ enum environment_cap {
35/** 36/**
36 * struct regulatory_request - used to keep track of regulatory requests 37 * struct regulatory_request - used to keep track of regulatory requests
37 * 38 *
39 * @rcu_head: RCU head struct used to free the request
38 * @wiphy_idx: this is set if this request's initiator is 40 * @wiphy_idx: this is set if this request's initiator is
39 * %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This 41 * %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This
40 * can be used by the wireless core to deal with conflicts 42 * can be used by the wireless core to deal with conflicts
@@ -72,6 +74,7 @@ enum environment_cap {
72 * @list: used to insert into the reg_requests_list linked list 74 * @list: used to insert into the reg_requests_list linked list
73 */ 75 */
74struct regulatory_request { 76struct regulatory_request {
77 struct rcu_head rcu_head;
75 int wiphy_idx; 78 int wiphy_idx;
76 enum nl80211_reg_initiator initiator; 79 enum nl80211_reg_initiator initiator;
77 enum nl80211_user_reg_hint_type user_reg_hint_type; 80 enum nl80211_user_reg_hint_type user_reg_hint_type;
@@ -101,6 +104,7 @@ struct ieee80211_reg_rule {
101}; 104};
102 105
103struct ieee80211_regdomain { 106struct ieee80211_regdomain {
107 struct rcu_head rcu_head;
104 u32 n_reg_rules; 108 u32 n_reg_rules;
105 char alpha2[2]; 109 char alpha2[2];
106 u8 dfs_region; 110 u8 dfs_region;
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 0e63cee8d810..7969f46f1bb3 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -5,20 +5,17 @@
5 * Lauro Ramos Venancio <lauro.venancio@openbossa.org> 5 * Lauro Ramos Venancio <lauro.venancio@openbossa.org>
6 * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> 6 * Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Permission to use, copy, modify, and/or distribute this software for any
9 * it under the terms of the GNU General Public License as published by 9 * purpose with or without fee is hereby granted, provided that the above
10 * the Free Software Foundation; either version 2 of the License, or 10 * copyright notice and this permission notice appear in all copies.
11 * (at your option) any later version.
12 * 11 *
13 * This program is distributed in the hope that it will be useful, 12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 * GNU General Public License for more details. 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * You should have received a copy of the GNU General Public License 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 * along with this program; if not, write to the 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 * Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 19 */
23 20
24#ifndef __LINUX_NFC_H 21#ifndef __LINUX_NFC_H
@@ -67,6 +64,11 @@
67 * subsequent CONNECT and CC messages. 64 * subsequent CONNECT and CC messages.
68 * If one of the passed parameters is wrong none is set and -EINVAL is 65 * If one of the passed parameters is wrong none is set and -EINVAL is
69 * returned. 66 * returned.
67 * @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element.
68 * Once enabled a secure element will handle card emulation mode, i.e.
69 * starting a poll from a device which has a secure element enabled means
70 * we want to do SE based card emulation.
71 * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element.
70 */ 72 */
71enum nfc_commands { 73enum nfc_commands {
72 NFC_CMD_UNSPEC, 74 NFC_CMD_UNSPEC,
@@ -86,6 +88,8 @@ enum nfc_commands {
86 NFC_EVENT_TM_DEACTIVATED, 88 NFC_EVENT_TM_DEACTIVATED,
87 NFC_CMD_LLC_GET_PARAMS, 89 NFC_CMD_LLC_GET_PARAMS,
88 NFC_CMD_LLC_SET_PARAMS, 90 NFC_CMD_LLC_SET_PARAMS,
91 NFC_CMD_ENABLE_SE,
92 NFC_CMD_DISABLE_SE,
89/* private: internal use only */ 93/* private: internal use only */
90 __NFC_CMD_AFTER_LAST 94 __NFC_CMD_AFTER_LAST
91}; 95};
@@ -114,6 +118,7 @@ enum nfc_commands {
114 * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter 118 * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter
115 * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter 119 * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter
116 * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter 120 * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter
121 * @NFC_ATTR_SE: Available Secure Elements
117 */ 122 */
118enum nfc_attrs { 123enum nfc_attrs {
119 NFC_ATTR_UNSPEC, 124 NFC_ATTR_UNSPEC,
@@ -134,6 +139,7 @@ enum nfc_attrs {
134 NFC_ATTR_LLC_PARAM_LTO, 139 NFC_ATTR_LLC_PARAM_LTO,
135 NFC_ATTR_LLC_PARAM_RW, 140 NFC_ATTR_LLC_PARAM_RW,
136 NFC_ATTR_LLC_PARAM_MIUX, 141 NFC_ATTR_LLC_PARAM_MIUX,
142 NFC_ATTR_SE,
137/* private: internal use only */ 143/* private: internal use only */
138 __NFC_ATTR_AFTER_LAST 144 __NFC_ATTR_AFTER_LAST
139}; 145};
@@ -172,6 +178,11 @@ enum nfc_attrs {
172#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) 178#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
173#define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) 179#define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B)
174 180
181/* NFC Secure Elements */
182#define NFC_SE_NONE 0x0
183#define NFC_SE_UICC 0x1
184#define NFC_SE_EMBEDDED 0x2
185
175struct sockaddr_nfc { 186struct sockaddr_nfc {
176 sa_family_t sa_family; 187 sa_family_t sa_family;
177 __u32 dev_idx; 188 __u32 dev_idx;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index e3e19f8b16f2..e6eeb4ba5dc5 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -374,8 +374,8 @@
374 * requests to connect to a specified network but without separating 374 * requests to connect to a specified network but without separating
375 * auth and assoc steps. For this, you need to specify the SSID in a 375 * auth and assoc steps. For this, you need to specify the SSID in a
376 * %NL80211_ATTR_SSID attribute, and can optionally specify the association 376 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
377 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, 377 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
378 * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, 378 * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
379 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and 379 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
380 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. 380 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
381 * Background scan period can optionally be 381 * Background scan period can optionally be
@@ -958,7 +958,7 @@ enum nl80211_commands {
958 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is 958 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
959 * used for the association (&enum nl80211_mfp, represented as a u32); 959 * used for the association (&enum nl80211_mfp, represented as a u32);
960 * this attribute can be used 960 * this attribute can be used
961 * with %NL80211_CMD_ASSOCIATE request 961 * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests
962 * 962 *
963 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a 963 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
964 * &struct nl80211_sta_flag_update. 964 * &struct nl80211_sta_flag_update.
@@ -1310,6 +1310,9 @@ enum nl80211_commands {
1310 * if not given in START_AP 0 is assumed, if not given in SET_BSS 1310 * if not given in START_AP 0 is assumed, if not given in SET_BSS
1311 * no change is made. 1311 * no change is made.
1312 * 1312 *
1313 * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
1314 * defined in &enum nl80211_mesh_power_mode.
1315 *
1313 * @NL80211_ATTR_MAX: highest attribute number currently defined 1316 * @NL80211_ATTR_MAX: highest attribute number currently defined
1314 * @__NL80211_ATTR_AFTER_LAST: internal use 1317 * @__NL80211_ATTR_AFTER_LAST: internal use
1315 */ 1318 */
@@ -1580,6 +1583,8 @@ enum nl80211_attrs {
1580 NL80211_ATTR_P2P_CTWINDOW, 1583 NL80211_ATTR_P2P_CTWINDOW,
1581 NL80211_ATTR_P2P_OPPPS, 1584 NL80211_ATTR_P2P_OPPPS,
1582 1585
1586 NL80211_ATTR_LOCAL_MESH_POWER_MODE,
1587
1583 /* add attributes here, update the policy in nl80211.c */ 1588 /* add attributes here, update the policy in nl80211.c */
1584 1589
1585 __NL80211_ATTR_AFTER_LAST, 1590 __NL80211_ATTR_AFTER_LAST,
@@ -1697,6 +1702,9 @@ enum nl80211_iftype {
1697 * flag can't be changed, it is only valid while adding a station, and 1702 * flag can't be changed, it is only valid while adding a station, and
1698 * attempts to change it will silently be ignored (rather than rejected 1703 * attempts to change it will silently be ignored (rather than rejected
1699 * as errors.) 1704 * as errors.)
1705 * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers
1706 * that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a
1707 * previously added station into associated state
1700 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined 1708 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
1701 * @__NL80211_STA_FLAG_AFTER_LAST: internal use 1709 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
1702 */ 1710 */
@@ -1708,6 +1716,7 @@ enum nl80211_sta_flags {
1708 NL80211_STA_FLAG_MFP, 1716 NL80211_STA_FLAG_MFP,
1709 NL80211_STA_FLAG_AUTHENTICATED, 1717 NL80211_STA_FLAG_AUTHENTICATED,
1710 NL80211_STA_FLAG_TDLS_PEER, 1718 NL80211_STA_FLAG_TDLS_PEER,
1719 NL80211_STA_FLAG_ASSOCIATED,
1711 1720
1712 /* keep last */ 1721 /* keep last */
1713 __NL80211_STA_FLAG_AFTER_LAST, 1722 __NL80211_STA_FLAG_AFTER_LAST,
@@ -1834,6 +1843,10 @@ enum nl80211_sta_bss_param {
1834 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. 1843 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
1835 * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) 1844 * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
1836 * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) 1845 * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
1846 * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode
1847 * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
1848 * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
1849 * non-peer STA
1837 * @__NL80211_STA_INFO_AFTER_LAST: internal 1850 * @__NL80211_STA_INFO_AFTER_LAST: internal
1838 * @NL80211_STA_INFO_MAX: highest possible station info attribute 1851 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1839 */ 1852 */
@@ -1858,6 +1871,9 @@ enum nl80211_sta_info {
1858 NL80211_STA_INFO_STA_FLAGS, 1871 NL80211_STA_INFO_STA_FLAGS,
1859 NL80211_STA_INFO_BEACON_LOSS, 1872 NL80211_STA_INFO_BEACON_LOSS,
1860 NL80211_STA_INFO_T_OFFSET, 1873 NL80211_STA_INFO_T_OFFSET,
1874 NL80211_STA_INFO_LOCAL_PM,
1875 NL80211_STA_INFO_PEER_PM,
1876 NL80211_STA_INFO_NONPEER_PM,
1861 1877
1862 /* keep last */ 1878 /* keep last */
1863 __NL80211_STA_INFO_AFTER_LAST, 1879 __NL80211_STA_INFO_AFTER_LAST,
@@ -2249,6 +2265,34 @@ enum nl80211_mntr_flags {
2249}; 2265};
2250 2266
2251/** 2267/**
2268 * enum nl80211_mesh_power_mode - mesh power save modes
2269 *
2270 * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is
2271 * not known or has not been set yet.
2272 * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is
2273 * in Awake state all the time.
2274 * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will
2275 * alternate between Active and Doze states, but will wake up for
2276 * neighbor's beacons.
2277 * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will
2278 * alternate between Active and Doze states, but may not wake up
2279 * for neighbor's beacons.
2280 *
2281 * @__NL80211_MESH_POWER_AFTER_LAST - internal use
2282 * @NL80211_MESH_POWER_MAX - highest possible power save level
2283 */
2284
2285enum nl80211_mesh_power_mode {
2286 NL80211_MESH_POWER_UNKNOWN,
2287 NL80211_MESH_POWER_ACTIVE,
2288 NL80211_MESH_POWER_LIGHT_SLEEP,
2289 NL80211_MESH_POWER_DEEP_SLEEP,
2290
2291 __NL80211_MESH_POWER_AFTER_LAST,
2292 NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
2293};
2294
2295/**
2252 * enum nl80211_meshconf_params - mesh configuration parameters 2296 * enum nl80211_meshconf_params - mesh configuration parameters
2253 * 2297 *
2254 * Mesh configuration parameters. These can be changed while the mesh is 2298 * Mesh configuration parameters. These can be changed while the mesh is
@@ -2342,6 +2386,11 @@ enum nl80211_mntr_flags {
2342 * (in TUs) during which a mesh STA can send only one Action frame 2386 * (in TUs) during which a mesh STA can send only one Action frame
2343 * containing a PREQ element for root path confirmation. 2387 * containing a PREQ element for root path confirmation.
2344 * 2388 *
2389 * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links.
2390 * type &enum nl80211_mesh_power_mode (u32)
2391 *
2392 * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
2393 *
2345 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use 2394 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
2346 */ 2395 */
2347enum nl80211_meshconf_params { 2396enum nl80211_meshconf_params {
@@ -2371,6 +2420,8 @@ enum nl80211_meshconf_params {
2371 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, 2420 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
2372 NL80211_MESHCONF_HWMP_ROOT_INTERVAL, 2421 NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
2373 NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, 2422 NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
2423 NL80211_MESHCONF_POWER_MODE,
2424 NL80211_MESHCONF_AWAKE_WINDOW,
2374 2425
2375 /* keep last */ 2426 /* keep last */
2376 __NL80211_MESHCONF_ATTR_AFTER_LAST, 2427 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -2933,6 +2984,8 @@ enum nl80211_iface_limit_attrs {
2933 * the infrastructure network's beacon interval. 2984 * the infrastructure network's beacon interval.
2934 * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many 2985 * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many
2935 * different channels may be used within this group. 2986 * different channels may be used within this group.
2987 * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
2988 * of supported channel widths for radar detection.
2936 * @NUM_NL80211_IFACE_COMB: number of attributes 2989 * @NUM_NL80211_IFACE_COMB: number of attributes
2937 * @MAX_NL80211_IFACE_COMB: highest attribute number 2990 * @MAX_NL80211_IFACE_COMB: highest attribute number
2938 * 2991 *
@@ -2965,6 +3018,7 @@ enum nl80211_if_combination_attrs {
2965 NL80211_IFACE_COMB_MAXNUM, 3018 NL80211_IFACE_COMB_MAXNUM,
2966 NL80211_IFACE_COMB_STA_AP_BI_MATCH, 3019 NL80211_IFACE_COMB_STA_AP_BI_MATCH,
2967 NL80211_IFACE_COMB_NUM_CHANNELS, 3020 NL80211_IFACE_COMB_NUM_CHANNELS,
3021 NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
2968 3022
2969 /* keep last */ 3023 /* keep last */
2970 NUM_NL80211_IFACE_COMB, 3024 NUM_NL80211_IFACE_COMB,
@@ -3140,6 +3194,17 @@ enum nl80211_ap_sme_features {
3140 * setting 3194 * setting
3141 * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic 3195 * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic
3142 * powersave 3196 * powersave
3197 * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state
3198 * transitions for AP clients. Without this flag (and if the driver
3199 * doesn't have the AP SME in the device) the driver supports adding
3200 * stations only when they're associated and adds them in associated
3201 * state (to later be transitioned into authorized), with this flag
3202 * they should be added before even sending the authentication reply
3203 * and then transitioned into authenticated, associated and authorized
3204 * states using station flags.
3205 * Note that even for drivers that support this, the default is to add
3206 * stations in authenticated/associated state, so to add unauthenticated
3207 * stations the authenticated/associated bits have to be set in the mask.
3143 */ 3208 */
3144enum nl80211_feature_flags { 3209enum nl80211_feature_flags {
3145 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 3210 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3155,6 +3220,7 @@ enum nl80211_feature_flags {
3155 NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, 3220 NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10,
3156 NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, 3221 NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11,
3157 NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12, 3222 NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12,
3223 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 13,
3158}; 3224};
3159 3225
3160/** 3226/**