diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-14 22:06:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-14 22:06:57 -0500 |
commit | b092d92a68ac4f88c637cc7ca6074646ca120193 (patch) | |
tree | e2606a69dab1e3cb944512a53aa9733a788e4950 /include | |
parent | 0b3ba0553a9ef578dd289d9eed65cbd3b4823211 (diff) | |
parent | 5bdf502dd9c8fd60dddaabfb9a3dc1671302afd2 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says:
====================
Included is a Bluetooth pull -- Gustavo says:
"These are the Bluetooth bits for inclusion in 3.8, there is basically one big
thing here which is the High Speed patches from Andrei, he did a lot of work on
A2MP and management of AMP devices. The rest are mostly clean up and bug
fixes."
Also included is an NFC pull -- Samuel says:
"With this one we have:
- pn544 p2p support.
- pn544 physical and HCI layers separation. We are getting the pn544 driver
ready to support non i2c physical layers.
- LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery
protocol.
- LLCP datagram sockets (connection less) support.
- IDR library usage for NFC devices indexes assignement.
- NFC netlink extension for setting and getting LLCP link characteristics.
- Various code style fixes and cleanups spread over the pn533, LLCP, HCI and
pn544 code."
There are a couple of mac80211 pulls as well -- Johannes says:
"Please pull my mac80211-next tree to get the first round of new features
for 3.8. We have:
* finally, the mac80211 multi-channel work
* scan improvements:
- bg scan
- scan flush
- forced AP scan
* cfg80211 tracing
* a bit of new code to allow implementing SAE (secure authentication of
equals) in managed mode
Along with a few random improvements, features and fixes."
and...
"Please pull from mac80211-next (per below pull request) to get a few
updates. Most important is probably the fix for the WDS regression that
my previous pull request introduced. Other than that, I have some
tracing code, two mesh updates and a change to allow drivers to
calculate the AES CMAC subkeys without having to implement the GF_mulx
operation themselves."
On top of that are the usual updates to iwlwifi, ath9k, rt2x00,
brcmfmac, mwifiex, and a few others here and there. Of note is the
addition of the ar5523 driver, ported from an original FreeBSD driver.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bcma/bcma.h | 2 | ||||
-rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 5 | ||||
-rw-r--r-- | include/linux/bcma/bcma_driver_mips.h | 3 | ||||
-rw-r--r-- | include/linux/bcma/bcma_regs.h | 5 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 47 | ||||
-rw-r--r-- | include/linux/ssb/ssb_driver_mips.h | 10 | ||||
-rw-r--r-- | include/net/bluetooth/a2mp.h | 24 | ||||
-rw-r--r-- | include/net/bluetooth/amp.h | 50 | ||||
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 1 | ||||
-rw-r--r-- | include/net/bluetooth/hci.h | 40 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 48 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 14 | ||||
-rw-r--r-- | include/net/cfg80211.h | 14 | ||||
-rw-r--r-- | include/net/mac80211.h | 114 | ||||
-rw-r--r-- | include/net/nfc/hci.h | 18 | ||||
-rw-r--r-- | include/net/nfc/nfc.h | 2 | ||||
-rw-r--r-- | include/uapi/linux/nfc.h | 15 | ||||
-rw-r--r-- | include/uapi/linux/nl80211.h | 48 |
18 files changed, 425 insertions, 35 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 4180eb78d575..fd15d9829705 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
@@ -251,7 +251,7 @@ struct bcma_bus { | |||
251 | u8 num; | 251 | u8 num; |
252 | 252 | ||
253 | struct bcma_drv_cc drv_cc; | 253 | struct bcma_drv_cc drv_cc; |
254 | struct bcma_drv_pci drv_pci; | 254 | struct bcma_drv_pci drv_pci[2]; |
255 | struct bcma_drv_mips drv_mips; | 255 | struct bcma_drv_mips drv_mips; |
256 | struct bcma_drv_gmac_cmn drv_gmac_cmn; | 256 | struct bcma_drv_gmac_cmn drv_gmac_cmn; |
257 | 257 | ||
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 1cf1749440ac..145f3c56227f 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -510,6 +510,7 @@ struct bcma_chipcommon_pmu { | |||
510 | 510 | ||
511 | #ifdef CONFIG_BCMA_DRIVER_MIPS | 511 | #ifdef CONFIG_BCMA_DRIVER_MIPS |
512 | struct bcma_pflash { | 512 | struct bcma_pflash { |
513 | bool present; | ||
513 | u8 buswidth; | 514 | u8 buswidth; |
514 | u32 window; | 515 | u32 window; |
515 | u32 window_size; | 516 | u32 window_size; |
@@ -532,6 +533,7 @@ struct mtd_info; | |||
532 | 533 | ||
533 | struct bcma_nflash { | 534 | struct bcma_nflash { |
534 | bool present; | 535 | bool present; |
536 | bool boot; /* This is the flash the SoC boots from */ | ||
535 | 537 | ||
536 | struct mtd_info *mtd; | 538 | struct mtd_info *mtd; |
537 | }; | 539 | }; |
@@ -552,6 +554,7 @@ struct bcma_drv_cc { | |||
552 | u32 capabilities; | 554 | u32 capabilities; |
553 | u32 capabilities_ext; | 555 | u32 capabilities_ext; |
554 | u8 setup_done:1; | 556 | u8 setup_done:1; |
557 | u8 early_setup_done:1; | ||
555 | /* Fast Powerup Delay constant */ | 558 | /* Fast Powerup Delay constant */ |
556 | u16 fast_pwrup_delay; | 559 | u16 fast_pwrup_delay; |
557 | struct bcma_chipcommon_pmu pmu; | 560 | struct bcma_chipcommon_pmu pmu; |
@@ -583,6 +586,7 @@ struct bcma_drv_cc { | |||
583 | bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set)) | 586 | bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set)) |
584 | 587 | ||
585 | extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); | 588 | extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); |
589 | extern void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc); | ||
586 | 590 | ||
587 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); | 591 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); |
588 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); | 592 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); |
@@ -606,6 +610,7 @@ u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); | |||
606 | 610 | ||
607 | /* PMU support */ | 611 | /* PMU support */ |
608 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); | 612 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); |
613 | extern void bcma_pmu_early_init(struct bcma_drv_cc *cc); | ||
609 | 614 | ||
610 | extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, | 615 | extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, |
611 | u32 value); | 616 | u32 value); |
diff --git a/include/linux/bcma/bcma_driver_mips.h b/include/linux/bcma/bcma_driver_mips.h index c0043645cdcb..0baf8a56b794 100644 --- a/include/linux/bcma/bcma_driver_mips.h +++ b/include/linux/bcma/bcma_driver_mips.h | |||
@@ -35,13 +35,16 @@ struct bcma_device; | |||
35 | struct bcma_drv_mips { | 35 | struct bcma_drv_mips { |
36 | struct bcma_device *core; | 36 | struct bcma_device *core; |
37 | u8 setup_done:1; | 37 | u8 setup_done:1; |
38 | u8 early_setup_done:1; | ||
38 | unsigned int assigned_irqs; | 39 | unsigned int assigned_irqs; |
39 | }; | 40 | }; |
40 | 41 | ||
41 | #ifdef CONFIG_BCMA_DRIVER_MIPS | 42 | #ifdef CONFIG_BCMA_DRIVER_MIPS |
42 | extern void bcma_core_mips_init(struct bcma_drv_mips *mcore); | 43 | extern void bcma_core_mips_init(struct bcma_drv_mips *mcore); |
44 | extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore); | ||
43 | #else | 45 | #else |
44 | static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { } | 46 | static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { } |
47 | static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { } | ||
45 | #endif | 48 | #endif |
46 | 49 | ||
47 | extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); | 50 | extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); |
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h index 6c9cb93ae3de..7e8104bb7a7e 100644 --- a/include/linux/bcma/bcma_regs.h +++ b/include/linux/bcma/bcma_regs.h | |||
@@ -85,6 +85,9 @@ | |||
85 | * (2 ZettaBytes), high 32 bits | 85 | * (2 ZettaBytes), high 32 bits |
86 | */ | 86 | */ |
87 | 87 | ||
88 | #define BCMA_SFLASH 0x1c000000 | 88 | #define BCMA_SOC_FLASH1 0x1fc00000 /* MIPS Flash Region 1 */ |
89 | #define BCMA_SOC_FLASH1_SZ 0x00400000 /* MIPS Size of Flash Region 1 */ | ||
90 | #define BCMA_SOC_FLASH2 0x1c000000 /* Flash Region 2 (region 1 shadowed here) */ | ||
91 | #define BCMA_SOC_FLASH2_SZ 0x02000000 /* Size of Flash Region 2 */ | ||
89 | 92 | ||
90 | #endif /* LINUX_BCMA_REGS_H_ */ | 93 | #endif /* LINUX_BCMA_REGS_H_ */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 2385119f8bb0..85764a900731 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1107,20 +1107,6 @@ struct ieee80211_ht_operation { | |||
1107 | #define WLAN_HT_SMPS_CONTROL_STATIC 1 | 1107 | #define WLAN_HT_SMPS_CONTROL_STATIC 1 |
1108 | #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 | 1108 | #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 |
1109 | 1109 | ||
1110 | #define VHT_MCS_SUPPORTED_SET_SIZE 8 | ||
1111 | |||
1112 | struct ieee80211_vht_capabilities { | ||
1113 | __le32 vht_capabilities_info; | ||
1114 | u8 vht_supported_mcs_set[VHT_MCS_SUPPORTED_SET_SIZE]; | ||
1115 | } __packed; | ||
1116 | |||
1117 | struct ieee80211_vht_operation { | ||
1118 | u8 vht_op_info_chwidth; | ||
1119 | u8 vht_op_info_chan_center_freq_seg1_idx; | ||
1120 | u8 vht_op_info_chan_center_freq_seg2_idx; | ||
1121 | __le16 vht_basic_mcs_set; | ||
1122 | } __packed; | ||
1123 | |||
1124 | /** | 1110 | /** |
1125 | * struct ieee80211_vht_mcs_info - VHT MCS information | 1111 | * struct ieee80211_vht_mcs_info - VHT MCS information |
1126 | * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams | 1112 | * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams |
@@ -1141,6 +1127,37 @@ struct ieee80211_vht_mcs_info { | |||
1141 | __le16 tx_highest; | 1127 | __le16 tx_highest; |
1142 | } __packed; | 1128 | } __packed; |
1143 | 1129 | ||
1130 | /** | ||
1131 | * struct ieee80211_vht_cap - VHT capabilities | ||
1132 | * | ||
1133 | * This structure is the "VHT capabilities element" as | ||
1134 | * described in 802.11ac D3.0 8.4.2.160 | ||
1135 | * @vht_cap_info: VHT capability info | ||
1136 | * @supp_mcs: VHT MCS supported rates | ||
1137 | */ | ||
1138 | struct ieee80211_vht_cap { | ||
1139 | __le32 vht_cap_info; | ||
1140 | struct ieee80211_vht_mcs_info supp_mcs; | ||
1141 | } __packed; | ||
1142 | |||
1143 | /** | ||
1144 | * struct ieee80211_vht_operation - VHT operation IE | ||
1145 | * | ||
1146 | * This structure is the "VHT operation element" as | ||
1147 | * described in 802.11ac D3.0 8.4.2.161 | ||
1148 | * @chan_width: Operating channel width | ||
1149 | * @center_freq_seg1_idx: center freq segment 1 index | ||
1150 | * @center_freq_seg2_idx: center freq segment 2 index | ||
1151 | * @basic_mcs_set: VHT Basic MCS rate set | ||
1152 | */ | ||
1153 | struct ieee80211_vht_operation { | ||
1154 | u8 chan_width; | ||
1155 | u8 center_freq_seg1_idx; | ||
1156 | u8 center_freq_seg2_idx; | ||
1157 | __le16 basic_mcs_set; | ||
1158 | } __packed; | ||
1159 | |||
1160 | |||
1144 | #define IEEE80211_VHT_MCS_ZERO_TO_SEVEN_SUPPORT 0 | 1161 | #define IEEE80211_VHT_MCS_ZERO_TO_SEVEN_SUPPORT 0 |
1145 | #define IEEE80211_VHT_MCS_ZERO_TO_EIGHT_SUPPORT 1 | 1162 | #define IEEE80211_VHT_MCS_ZERO_TO_EIGHT_SUPPORT 1 |
1146 | #define IEEE80211_VHT_MCS_ZERO_TO_NINE_SUPPORT 2 | 1163 | #define IEEE80211_VHT_MCS_ZERO_TO_NINE_SUPPORT 2 |
@@ -1440,8 +1457,6 @@ enum ieee80211_eid { | |||
1440 | 1457 | ||
1441 | WLAN_EID_RSN = 48, | 1458 | WLAN_EID_RSN = 48, |
1442 | WLAN_EID_MMIE = 76, | 1459 | WLAN_EID_MMIE = 76, |
1443 | WLAN_EID_WPA = 221, | ||
1444 | WLAN_EID_GENERIC = 221, | ||
1445 | WLAN_EID_VENDOR_SPECIFIC = 221, | 1460 | WLAN_EID_VENDOR_SPECIFIC = 221, |
1446 | WLAN_EID_QOS_PARAMETER = 222, | 1461 | WLAN_EID_QOS_PARAMETER = 222, |
1447 | 1462 | ||
diff --git a/include/linux/ssb/ssb_driver_mips.h b/include/linux/ssb/ssb_driver_mips.h index 5f44e9740cd2..07a9c7a2e088 100644 --- a/include/linux/ssb/ssb_driver_mips.h +++ b/include/linux/ssb/ssb_driver_mips.h | |||
@@ -13,6 +13,12 @@ struct ssb_serial_port { | |||
13 | unsigned int reg_shift; | 13 | unsigned int reg_shift; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | struct ssb_pflash { | ||
17 | bool present; | ||
18 | u8 buswidth; | ||
19 | u32 window; | ||
20 | u32 window_size; | ||
21 | }; | ||
16 | 22 | ||
17 | struct ssb_mipscore { | 23 | struct ssb_mipscore { |
18 | struct ssb_device *dev; | 24 | struct ssb_device *dev; |
@@ -20,9 +26,7 @@ struct ssb_mipscore { | |||
20 | int nr_serial_ports; | 26 | int nr_serial_ports; |
21 | struct ssb_serial_port serial_ports[4]; | 27 | struct ssb_serial_port serial_ports[4]; |
22 | 28 | ||
23 | u8 flash_buswidth; | 29 | struct ssb_pflash pflash; |
24 | u32 flash_window; | ||
25 | u32 flash_window_size; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | extern void ssb_mipscore_init(struct ssb_mipscore *mcore); | 32 | extern void ssb_mipscore_init(struct ssb_mipscore *mcore); |
diff --git a/include/net/bluetooth/a2mp.h b/include/net/bluetooth/a2mp.h index 6a76e0a0705e..42f21766c538 100644 --- a/include/net/bluetooth/a2mp.h +++ b/include/net/bluetooth/a2mp.h | |||
@@ -19,13 +19,25 @@ | |||
19 | 19 | ||
20 | #define A2MP_FEAT_EXT 0x8000 | 20 | #define A2MP_FEAT_EXT 0x8000 |
21 | 21 | ||
22 | enum amp_mgr_state { | ||
23 | READ_LOC_AMP_INFO, | ||
24 | READ_LOC_AMP_ASSOC, | ||
25 | READ_LOC_AMP_ASSOC_FINAL, | ||
26 | }; | ||
27 | |||
22 | struct amp_mgr { | 28 | struct amp_mgr { |
29 | struct list_head list; | ||
23 | struct l2cap_conn *l2cap_conn; | 30 | struct l2cap_conn *l2cap_conn; |
24 | struct l2cap_chan *a2mp_chan; | 31 | struct l2cap_chan *a2mp_chan; |
32 | struct l2cap_chan *bredr_chan; | ||
25 | struct kref kref; | 33 | struct kref kref; |
26 | __u8 ident; | 34 | __u8 ident; |
27 | __u8 handle; | 35 | __u8 handle; |
36 | enum amp_mgr_state state; | ||
28 | unsigned long flags; | 37 | unsigned long flags; |
38 | |||
39 | struct list_head amp_ctrls; | ||
40 | struct mutex amp_ctrls_lock; | ||
29 | }; | 41 | }; |
30 | 42 | ||
31 | struct a2mp_cmd { | 43 | struct a2mp_cmd { |
@@ -118,9 +130,19 @@ struct a2mp_physlink_rsp { | |||
118 | #define A2MP_STATUS_PHYS_LINK_EXISTS 0x05 | 130 | #define A2MP_STATUS_PHYS_LINK_EXISTS 0x05 |
119 | #define A2MP_STATUS_SECURITY_VIOLATION 0x06 | 131 | #define A2MP_STATUS_SECURITY_VIOLATION 0x06 |
120 | 132 | ||
121 | void amp_mgr_get(struct amp_mgr *mgr); | 133 | extern struct list_head amp_mgr_list; |
134 | extern struct mutex amp_mgr_list_lock; | ||
135 | |||
136 | struct amp_mgr *amp_mgr_get(struct amp_mgr *mgr); | ||
122 | int amp_mgr_put(struct amp_mgr *mgr); | 137 | int amp_mgr_put(struct amp_mgr *mgr); |
138 | u8 __next_ident(struct amp_mgr *mgr); | ||
123 | struct l2cap_chan *a2mp_channel_create(struct l2cap_conn *conn, | 139 | struct l2cap_chan *a2mp_channel_create(struct l2cap_conn *conn, |
124 | struct sk_buff *skb); | 140 | struct sk_buff *skb); |
141 | struct amp_mgr *amp_mgr_lookup_by_state(u8 state); | ||
142 | void a2mp_send(struct amp_mgr *mgr, u8 code, u8 ident, u16 len, void *data); | ||
143 | void a2mp_discover_amp(struct l2cap_chan *chan); | ||
144 | void a2mp_send_getinfo_rsp(struct hci_dev *hdev); | ||
145 | void a2mp_send_getampassoc_rsp(struct hci_dev *hdev, u8 status); | ||
146 | void a2mp_send_create_phy_link_req(struct hci_dev *hdev, u8 status); | ||
125 | 147 | ||
126 | #endif /* __A2MP_H */ | 148 | #endif /* __A2MP_H */ |
diff --git a/include/net/bluetooth/amp.h b/include/net/bluetooth/amp.h new file mode 100644 index 000000000000..2e7c79ea0463 --- /dev/null +++ b/include/net/bluetooth/amp.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | Copyright (c) 2011,2012 Intel Corp. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License version 2 and | ||
6 | only version 2 as published by the Free Software Foundation. | ||
7 | |||
8 | This program is distributed in the hope that it will be useful, | ||
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | GNU General Public License for more details. | ||
12 | */ | ||
13 | |||
14 | #ifndef __AMP_H | ||
15 | #define __AMP_H | ||
16 | |||
17 | struct amp_ctrl { | ||
18 | struct list_head list; | ||
19 | struct kref kref; | ||
20 | __u8 id; | ||
21 | __u16 assoc_len_so_far; | ||
22 | __u16 assoc_rem_len; | ||
23 | __u16 assoc_len; | ||
24 | __u8 *assoc; | ||
25 | }; | ||
26 | |||
27 | int amp_ctrl_put(struct amp_ctrl *ctrl); | ||
28 | void amp_ctrl_get(struct amp_ctrl *ctrl); | ||
29 | struct amp_ctrl *amp_ctrl_add(struct amp_mgr *mgr, u8 id); | ||
30 | struct amp_ctrl *amp_ctrl_lookup(struct amp_mgr *mgr, u8 id); | ||
31 | void amp_ctrl_list_flush(struct amp_mgr *mgr); | ||
32 | |||
33 | struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr, | ||
34 | u8 remote_id, bool out); | ||
35 | |||
36 | int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type); | ||
37 | |||
38 | void amp_read_loc_info(struct hci_dev *hdev, struct amp_mgr *mgr); | ||
39 | void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle); | ||
40 | void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr); | ||
41 | void amp_read_loc_assoc_final_data(struct hci_dev *hdev, | ||
42 | struct hci_conn *hcon); | ||
43 | void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr, | ||
44 | struct hci_conn *hcon); | ||
45 | void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr, | ||
46 | struct hci_conn *hcon); | ||
47 | void amp_write_remote_assoc(struct hci_dev *hdev, u8 handle); | ||
48 | void amp_write_rem_assoc_continue(struct hci_dev *hdev, u8 handle); | ||
49 | |||
50 | #endif /* __AMP_H */ | ||
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index ede036977ae8..2554b3f5222a 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -180,7 +180,6 @@ static inline void bacpy(bdaddr_t *dst, bdaddr_t *src) | |||
180 | } | 180 | } |
181 | 181 | ||
182 | void baswap(bdaddr_t *dst, bdaddr_t *src); | 182 | void baswap(bdaddr_t *dst, bdaddr_t *src); |
183 | char *batostr(bdaddr_t *ba); | ||
184 | 183 | ||
185 | /* Common socket structures and functions */ | 184 | /* Common socket structures and functions */ |
186 | 185 | ||
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 76b2b6bdcf36..88cbbda61027 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -33,6 +33,8 @@ | |||
33 | #define HCI_LINK_KEY_SIZE 16 | 33 | #define HCI_LINK_KEY_SIZE 16 |
34 | #define HCI_AMP_LINK_KEY_SIZE (2 * HCI_LINK_KEY_SIZE) | 34 | #define HCI_AMP_LINK_KEY_SIZE (2 * HCI_LINK_KEY_SIZE) |
35 | 35 | ||
36 | #define HCI_MAX_AMP_ASSOC_SIZE 672 | ||
37 | |||
36 | /* HCI dev events */ | 38 | /* HCI dev events */ |
37 | #define HCI_DEV_REG 1 | 39 | #define HCI_DEV_REG 1 |
38 | #define HCI_DEV_UNREG 2 | 40 | #define HCI_DEV_UNREG 2 |
@@ -196,6 +198,7 @@ enum { | |||
196 | #define ACL_START_NO_FLUSH 0x00 | 198 | #define ACL_START_NO_FLUSH 0x00 |
197 | #define ACL_CONT 0x01 | 199 | #define ACL_CONT 0x01 |
198 | #define ACL_START 0x02 | 200 | #define ACL_START 0x02 |
201 | #define ACL_COMPLETE 0x03 | ||
199 | #define ACL_ACTIVE_BCAST 0x04 | 202 | #define ACL_ACTIVE_BCAST 0x04 |
200 | #define ACL_PICO_BCAST 0x08 | 203 | #define ACL_PICO_BCAST 0x08 |
201 | 204 | ||
@@ -205,6 +208,7 @@ enum { | |||
205 | #define ESCO_LINK 0x02 | 208 | #define ESCO_LINK 0x02 |
206 | /* Low Energy links do not have defined link type. Use invented one */ | 209 | /* Low Energy links do not have defined link type. Use invented one */ |
207 | #define LE_LINK 0x80 | 210 | #define LE_LINK 0x80 |
211 | #define AMP_LINK 0x81 | ||
208 | 212 | ||
209 | /* LMP features */ | 213 | /* LMP features */ |
210 | #define LMP_3SLOT 0x01 | 214 | #define LMP_3SLOT 0x01 |
@@ -556,12 +560,46 @@ struct hci_cp_accept_phy_link { | |||
556 | __u8 key[HCI_AMP_LINK_KEY_SIZE]; | 560 | __u8 key[HCI_AMP_LINK_KEY_SIZE]; |
557 | } __packed; | 561 | } __packed; |
558 | 562 | ||
559 | #define HCI_OP_DISCONN_PHY_LINK 0x0437 | 563 | #define HCI_OP_DISCONN_PHY_LINK 0x0437 |
560 | struct hci_cp_disconn_phy_link { | 564 | struct hci_cp_disconn_phy_link { |
561 | __u8 phy_handle; | 565 | __u8 phy_handle; |
562 | __u8 reason; | 566 | __u8 reason; |
563 | } __packed; | 567 | } __packed; |
564 | 568 | ||
569 | struct ext_flow_spec { | ||
570 | __u8 id; | ||
571 | __u8 stype; | ||
572 | __le16 msdu; | ||
573 | __le32 sdu_itime; | ||
574 | __le32 acc_lat; | ||
575 | __le32 flush_to; | ||
576 | } __packed; | ||
577 | |||
578 | #define HCI_OP_CREATE_LOGICAL_LINK 0x0438 | ||
579 | #define HCI_OP_ACCEPT_LOGICAL_LINK 0x0439 | ||
580 | struct hci_cp_create_accept_logical_link { | ||
581 | __u8 phy_handle; | ||
582 | struct ext_flow_spec tx_flow_spec; | ||
583 | struct ext_flow_spec rx_flow_spec; | ||
584 | } __packed; | ||
585 | |||
586 | #define HCI_OP_DISCONN_LOGICAL_LINK 0x043a | ||
587 | struct hci_cp_disconn_logical_link { | ||
588 | __le16 log_handle; | ||
589 | } __packed; | ||
590 | |||
591 | #define HCI_OP_LOGICAL_LINK_CANCEL 0x043b | ||
592 | struct hci_cp_logical_link_cancel { | ||
593 | __u8 phy_handle; | ||
594 | __u8 flow_spec_id; | ||
595 | } __packed; | ||
596 | |||
597 | struct hci_rp_logical_link_cancel { | ||
598 | __u8 status; | ||
599 | __u8 phy_handle; | ||
600 | __u8 flow_spec_id; | ||
601 | } __packed; | ||
602 | |||
565 | #define HCI_OP_SNIFF_MODE 0x0803 | 603 | #define HCI_OP_SNIFF_MODE 0x0803 |
566 | struct hci_cp_sniff_mode { | 604 | struct hci_cp_sniff_mode { |
567 | __le16 handle; | 605 | __le16 handle; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index e7d454609881..9fe8e2dec870 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -73,6 +73,7 @@ struct discovery_state { | |||
73 | struct hci_conn_hash { | 73 | struct hci_conn_hash { |
74 | struct list_head list; | 74 | struct list_head list; |
75 | unsigned int acl_num; | 75 | unsigned int acl_num; |
76 | unsigned int amp_num; | ||
76 | unsigned int sco_num; | 77 | unsigned int sco_num; |
77 | unsigned int le_num; | 78 | unsigned int le_num; |
78 | }; | 79 | }; |
@@ -124,6 +125,14 @@ struct le_scan_params { | |||
124 | 125 | ||
125 | #define HCI_MAX_SHORT_NAME_LENGTH 10 | 126 | #define HCI_MAX_SHORT_NAME_LENGTH 10 |
126 | 127 | ||
128 | struct amp_assoc { | ||
129 | __u16 len; | ||
130 | __u16 offset; | ||
131 | __u16 rem_len; | ||
132 | __u16 len_so_far; | ||
133 | __u8 data[HCI_MAX_AMP_ASSOC_SIZE]; | ||
134 | }; | ||
135 | |||
127 | #define NUM_REASSEMBLY 4 | 136 | #define NUM_REASSEMBLY 4 |
128 | struct hci_dev { | 137 | struct hci_dev { |
129 | struct list_head list; | 138 | struct list_head list; |
@@ -177,6 +186,8 @@ struct hci_dev { | |||
177 | __u32 amp_max_flush_to; | 186 | __u32 amp_max_flush_to; |
178 | __u32 amp_be_flush_to; | 187 | __u32 amp_be_flush_to; |
179 | 188 | ||
189 | struct amp_assoc loc_assoc; | ||
190 | |||
180 | __u8 flow_ctl_mode; | 191 | __u8 flow_ctl_mode; |
181 | 192 | ||
182 | unsigned int auto_accept_delay; | 193 | unsigned int auto_accept_delay; |
@@ -252,8 +263,6 @@ struct hci_dev { | |||
252 | 263 | ||
253 | struct sk_buff_head driver_init; | 264 | struct sk_buff_head driver_init; |
254 | 265 | ||
255 | void *core_data; | ||
256 | |||
257 | atomic_t promisc; | 266 | atomic_t promisc; |
258 | 267 | ||
259 | struct dentry *debugfs; | 268 | struct dentry *debugfs; |
@@ -277,6 +286,8 @@ struct hci_dev { | |||
277 | int (*ioctl)(struct hci_dev *hdev, unsigned int cmd, unsigned long arg); | 286 | int (*ioctl)(struct hci_dev *hdev, unsigned int cmd, unsigned long arg); |
278 | }; | 287 | }; |
279 | 288 | ||
289 | #define HCI_PHY_HANDLE(handle) (handle & 0xff) | ||
290 | |||
280 | struct hci_conn { | 291 | struct hci_conn { |
281 | struct list_head list; | 292 | struct list_head list; |
282 | 293 | ||
@@ -310,6 +321,7 @@ struct hci_conn { | |||
310 | 321 | ||
311 | __u8 remote_cap; | 322 | __u8 remote_cap; |
312 | __u8 remote_auth; | 323 | __u8 remote_auth; |
324 | __u8 remote_id; | ||
313 | bool flush_key; | 325 | bool flush_key; |
314 | 326 | ||
315 | unsigned int sent; | 327 | unsigned int sent; |
@@ -339,7 +351,7 @@ struct hci_conn { | |||
339 | 351 | ||
340 | struct hci_chan { | 352 | struct hci_chan { |
341 | struct list_head list; | 353 | struct list_head list; |
342 | 354 | __u16 handle; | |
343 | struct hci_conn *conn; | 355 | struct hci_conn *conn; |
344 | struct sk_buff_head data_q; | 356 | struct sk_buff_head data_q; |
345 | unsigned int sent; | 357 | unsigned int sent; |
@@ -438,6 +450,9 @@ static inline void hci_conn_hash_add(struct hci_dev *hdev, struct hci_conn *c) | |||
438 | case ACL_LINK: | 450 | case ACL_LINK: |
439 | h->acl_num++; | 451 | h->acl_num++; |
440 | break; | 452 | break; |
453 | case AMP_LINK: | ||
454 | h->amp_num++; | ||
455 | break; | ||
441 | case LE_LINK: | 456 | case LE_LINK: |
442 | h->le_num++; | 457 | h->le_num++; |
443 | break; | 458 | break; |
@@ -459,6 +474,9 @@ static inline void hci_conn_hash_del(struct hci_dev *hdev, struct hci_conn *c) | |||
459 | case ACL_LINK: | 474 | case ACL_LINK: |
460 | h->acl_num--; | 475 | h->acl_num--; |
461 | break; | 476 | break; |
477 | case AMP_LINK: | ||
478 | h->amp_num--; | ||
479 | break; | ||
462 | case LE_LINK: | 480 | case LE_LINK: |
463 | h->le_num--; | 481 | h->le_num--; |
464 | break; | 482 | break; |
@@ -475,6 +493,8 @@ static inline unsigned int hci_conn_num(struct hci_dev *hdev, __u8 type) | |||
475 | switch (type) { | 493 | switch (type) { |
476 | case ACL_LINK: | 494 | case ACL_LINK: |
477 | return h->acl_num; | 495 | return h->acl_num; |
496 | case AMP_LINK: | ||
497 | return h->amp_num; | ||
478 | case LE_LINK: | 498 | case LE_LINK: |
479 | return h->le_num; | 499 | return h->le_num; |
480 | case SCO_LINK: | 500 | case SCO_LINK: |
@@ -556,6 +576,7 @@ void hci_conn_check_pending(struct hci_dev *hdev); | |||
556 | struct hci_chan *hci_chan_create(struct hci_conn *conn); | 576 | struct hci_chan *hci_chan_create(struct hci_conn *conn); |
557 | void hci_chan_del(struct hci_chan *chan); | 577 | void hci_chan_del(struct hci_chan *chan); |
558 | void hci_chan_list_flush(struct hci_conn *conn); | 578 | void hci_chan_list_flush(struct hci_conn *conn); |
579 | struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle); | ||
559 | 580 | ||
560 | struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, | 581 | struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, |
561 | __u8 dst_type, __u8 sec_level, __u8 auth_type); | 582 | __u8 dst_type, __u8 sec_level, __u8 auth_type); |
@@ -584,7 +605,10 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
584 | 605 | ||
585 | if (atomic_dec_and_test(&conn->refcnt)) { | 606 | if (atomic_dec_and_test(&conn->refcnt)) { |
586 | unsigned long timeo; | 607 | unsigned long timeo; |
587 | if (conn->type == ACL_LINK || conn->type == LE_LINK) { | 608 | |
609 | switch (conn->type) { | ||
610 | case ACL_LINK: | ||
611 | case LE_LINK: | ||
588 | del_timer(&conn->idle_timer); | 612 | del_timer(&conn->idle_timer); |
589 | if (conn->state == BT_CONNECTED) { | 613 | if (conn->state == BT_CONNECTED) { |
590 | timeo = conn->disc_timeout; | 614 | timeo = conn->disc_timeout; |
@@ -593,12 +617,20 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
593 | } else { | 617 | } else { |
594 | timeo = msecs_to_jiffies(10); | 618 | timeo = msecs_to_jiffies(10); |
595 | } | 619 | } |
596 | } else { | 620 | break; |
621 | |||
622 | case AMP_LINK: | ||
623 | timeo = conn->disc_timeout; | ||
624 | break; | ||
625 | |||
626 | default: | ||
597 | timeo = msecs_to_jiffies(10); | 627 | timeo = msecs_to_jiffies(10); |
628 | break; | ||
598 | } | 629 | } |
630 | |||
599 | cancel_delayed_work(&conn->disc_work); | 631 | cancel_delayed_work(&conn->disc_work); |
600 | queue_delayed_work(conn->hdev->workqueue, | 632 | queue_delayed_work(conn->hdev->workqueue, |
601 | &conn->disc_work, timeo); | 633 | &conn->disc_work, timeo); |
602 | } | 634 | } |
603 | } | 635 | } |
604 | 636 | ||
@@ -789,6 +821,10 @@ static inline void hci_proto_disconn_cfm(struct hci_conn *conn, __u8 reason) | |||
789 | sco_disconn_cfm(conn, reason); | 821 | sco_disconn_cfm(conn, reason); |
790 | break; | 822 | break; |
791 | 823 | ||
824 | /* L2CAP would be handled for BREDR chan */ | ||
825 | case AMP_LINK: | ||
826 | break; | ||
827 | |||
792 | default: | 828 | default: |
793 | BT_ERR("unknown link type %d", conn->type); | 829 | BT_ERR("unknown link type %d", conn->type); |
794 | break; | 830 | break; |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 7ed8e356425a..6e23afdf65c1 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -32,13 +32,14 @@ | |||
32 | /* L2CAP defaults */ | 32 | /* L2CAP defaults */ |
33 | #define L2CAP_DEFAULT_MTU 672 | 33 | #define L2CAP_DEFAULT_MTU 672 |
34 | #define L2CAP_DEFAULT_MIN_MTU 48 | 34 | #define L2CAP_DEFAULT_MIN_MTU 48 |
35 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff | 35 | #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF |
36 | #define L2CAP_EFS_DEFAULT_FLUSH_TO 0xFFFFFFFF | ||
36 | #define L2CAP_DEFAULT_TX_WINDOW 63 | 37 | #define L2CAP_DEFAULT_TX_WINDOW 63 |
37 | #define L2CAP_DEFAULT_EXT_WINDOW 0x3FFF | 38 | #define L2CAP_DEFAULT_EXT_WINDOW 0x3FFF |
38 | #define L2CAP_DEFAULT_MAX_TX 3 | 39 | #define L2CAP_DEFAULT_MAX_TX 3 |
39 | #define L2CAP_DEFAULT_RETRANS_TO 2000 /* 2 seconds */ | 40 | #define L2CAP_DEFAULT_RETRANS_TO 2000 /* 2 seconds */ |
40 | #define L2CAP_DEFAULT_MONITOR_TO 12000 /* 12 seconds */ | 41 | #define L2CAP_DEFAULT_MONITOR_TO 12000 /* 12 seconds */ |
41 | #define L2CAP_DEFAULT_MAX_PDU_SIZE 1009 /* Sized for 3-DH5 packet */ | 42 | #define L2CAP_DEFAULT_MAX_PDU_SIZE 1492 /* Sized for AMP packet */ |
42 | #define L2CAP_DEFAULT_ACK_TO 200 | 43 | #define L2CAP_DEFAULT_ACK_TO 200 |
43 | #define L2CAP_DEFAULT_MAX_SDU_SIZE 0xFFFF | 44 | #define L2CAP_DEFAULT_MAX_SDU_SIZE 0xFFFF |
44 | #define L2CAP_DEFAULT_SDU_ITIME 0xFFFFFFFF | 45 | #define L2CAP_DEFAULT_SDU_ITIME 0xFFFFFFFF |
@@ -508,6 +509,8 @@ struct l2cap_chan { | |||
508 | __u32 remote_acc_lat; | 509 | __u32 remote_acc_lat; |
509 | __u32 remote_flush_to; | 510 | __u32 remote_flush_to; |
510 | 511 | ||
512 | __u8 ctrl_id; | ||
513 | |||
511 | struct delayed_work chan_timer; | 514 | struct delayed_work chan_timer; |
512 | struct delayed_work retrans_timer; | 515 | struct delayed_work retrans_timer; |
513 | struct delayed_work monitor_timer; | 516 | struct delayed_work monitor_timer; |
@@ -538,6 +541,7 @@ struct l2cap_ops { | |||
538 | void (*state_change) (struct l2cap_chan *chan, | 541 | void (*state_change) (struct l2cap_chan *chan, |
539 | int state); | 542 | int state); |
540 | void (*ready) (struct l2cap_chan *chan); | 543 | void (*ready) (struct l2cap_chan *chan); |
544 | void (*defer) (struct l2cap_chan *chan); | ||
541 | struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, | 545 | struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, |
542 | unsigned long len, int nb); | 546 | unsigned long len, int nb); |
543 | }; | 547 | }; |
@@ -745,6 +749,10 @@ static inline void l2cap_chan_no_ready(struct l2cap_chan *chan) | |||
745 | { | 749 | { |
746 | } | 750 | } |
747 | 751 | ||
752 | static inline void l2cap_chan_no_defer(struct l2cap_chan *chan) | ||
753 | { | ||
754 | } | ||
755 | |||
748 | extern bool disable_ertm; | 756 | extern bool disable_ertm; |
749 | 757 | ||
750 | int l2cap_init_sockets(void); | 758 | int l2cap_init_sockets(void); |
@@ -767,6 +775,8 @@ int l2cap_chan_check_security(struct l2cap_chan *chan); | |||
767 | void l2cap_chan_set_defaults(struct l2cap_chan *chan); | 775 | void l2cap_chan_set_defaults(struct l2cap_chan *chan); |
768 | int l2cap_ertm_init(struct l2cap_chan *chan); | 776 | int l2cap_ertm_init(struct l2cap_chan *chan); |
769 | void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan); | 777 | void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan); |
778 | void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan); | ||
770 | void l2cap_chan_del(struct l2cap_chan *chan, int err); | 779 | void l2cap_chan_del(struct l2cap_chan *chan, int err); |
780 | void l2cap_send_conn_req(struct l2cap_chan *chan); | ||
771 | 781 | ||
772 | #endif /* __L2CAP_H */ | 782 | #endif /* __L2CAP_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 7d5b6000378b..c6964572890f 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -498,6 +498,7 @@ enum station_parameters_apply_mask { | |||
498 | * @plink_action: plink action to take | 498 | * @plink_action: plink action to take |
499 | * @plink_state: set the peer link state for a station | 499 | * @plink_state: set the peer link state for a station |
500 | * @ht_capa: HT capabilities of station | 500 | * @ht_capa: HT capabilities of station |
501 | * @vht_capa: VHT capabilities of station | ||
501 | * @uapsd_queues: bitmap of queues configured for uapsd. same format | 502 | * @uapsd_queues: bitmap of queues configured for uapsd. same format |
502 | * as the AC bitmap in the QoS info field | 503 | * as the AC bitmap in the QoS info field |
503 | * @max_sp: max Service Period. same format as the MAX_SP in the | 504 | * @max_sp: max Service Period. same format as the MAX_SP in the |
@@ -517,6 +518,7 @@ struct station_parameters { | |||
517 | u8 plink_action; | 518 | u8 plink_action; |
518 | u8 plink_state; | 519 | u8 plink_state; |
519 | struct ieee80211_ht_cap *ht_capa; | 520 | struct ieee80211_ht_cap *ht_capa; |
521 | struct ieee80211_vht_cap *vht_capa; | ||
520 | u8 uapsd_queues; | 522 | u8 uapsd_queues; |
521 | u8 max_sp; | 523 | u8 max_sp; |
522 | }; | 524 | }; |
@@ -1000,8 +1002,10 @@ struct cfg80211_ssid { | |||
1000 | * @n_channels: total number of channels to scan | 1002 | * @n_channels: total number of channels to scan |
1001 | * @ie: optional information element(s) to add into Probe Request or %NULL | 1003 | * @ie: optional information element(s) to add into Probe Request or %NULL |
1002 | * @ie_len: length of ie in octets | 1004 | * @ie_len: length of ie in octets |
1005 | * @flags: bit field of flags controlling operation | ||
1003 | * @rates: bitmap of rates to advertise for each band | 1006 | * @rates: bitmap of rates to advertise for each band |
1004 | * @wiphy: the wiphy this was for | 1007 | * @wiphy: the wiphy this was for |
1008 | * @scan_start: time (in jiffies) when the scan started | ||
1005 | * @wdev: the wireless device to scan for | 1009 | * @wdev: the wireless device to scan for |
1006 | * @aborted: (internal) scan request was notified as aborted | 1010 | * @aborted: (internal) scan request was notified as aborted |
1007 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band | 1011 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band |
@@ -1012,6 +1016,7 @@ struct cfg80211_scan_request { | |||
1012 | u32 n_channels; | 1016 | u32 n_channels; |
1013 | const u8 *ie; | 1017 | const u8 *ie; |
1014 | size_t ie_len; | 1018 | size_t ie_len; |
1019 | u32 flags; | ||
1015 | 1020 | ||
1016 | u32 rates[IEEE80211_NUM_BANDS]; | 1021 | u32 rates[IEEE80211_NUM_BANDS]; |
1017 | 1022 | ||
@@ -1019,6 +1024,7 @@ struct cfg80211_scan_request { | |||
1019 | 1024 | ||
1020 | /* internal */ | 1025 | /* internal */ |
1021 | struct wiphy *wiphy; | 1026 | struct wiphy *wiphy; |
1027 | unsigned long scan_start; | ||
1022 | bool aborted; | 1028 | bool aborted; |
1023 | bool no_cck; | 1029 | bool no_cck; |
1024 | 1030 | ||
@@ -1044,6 +1050,7 @@ struct cfg80211_match_set { | |||
1044 | * @interval: interval between each scheduled scan cycle | 1050 | * @interval: interval between each scheduled scan cycle |
1045 | * @ie: optional information element(s) to add into Probe Request or %NULL | 1051 | * @ie: optional information element(s) to add into Probe Request or %NULL |
1046 | * @ie_len: length of ie in octets | 1052 | * @ie_len: length of ie in octets |
1053 | * @flags: bit field of flags controlling operation | ||
1047 | * @match_sets: sets of parameters to be matched for a scan result | 1054 | * @match_sets: sets of parameters to be matched for a scan result |
1048 | * entry to be considered valid and to be passed to the host | 1055 | * entry to be considered valid and to be passed to the host |
1049 | * (others are filtered out). | 1056 | * (others are filtered out). |
@@ -1061,6 +1068,7 @@ struct cfg80211_sched_scan_request { | |||
1061 | u32 interval; | 1068 | u32 interval; |
1062 | const u8 *ie; | 1069 | const u8 *ie; |
1063 | size_t ie_len; | 1070 | size_t ie_len; |
1071 | u32 flags; | ||
1064 | struct cfg80211_match_set *match_sets; | 1072 | struct cfg80211_match_set *match_sets; |
1065 | int n_match_sets; | 1073 | int n_match_sets; |
1066 | s32 rssi_thold; | 1074 | s32 rssi_thold; |
@@ -1068,6 +1076,7 @@ struct cfg80211_sched_scan_request { | |||
1068 | /* internal */ | 1076 | /* internal */ |
1069 | struct wiphy *wiphy; | 1077 | struct wiphy *wiphy; |
1070 | struct net_device *dev; | 1078 | struct net_device *dev; |
1079 | unsigned long scan_start; | ||
1071 | 1080 | ||
1072 | /* keep last */ | 1081 | /* keep last */ |
1073 | struct ieee80211_channel *channels[0]; | 1082 | struct ieee80211_channel *channels[0]; |
@@ -1152,6 +1161,9 @@ const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); | |||
1152 | * @key_len: length of WEP key for shared key authentication | 1161 | * @key_len: length of WEP key for shared key authentication |
1153 | * @key_idx: index of WEP key for shared key authentication | 1162 | * @key_idx: index of WEP key for shared key authentication |
1154 | * @key: WEP key for shared key authentication | 1163 | * @key: WEP key for shared key authentication |
1164 | * @sae_data: Non-IE data to use with SAE or %NULL. This starts with | ||
1165 | * Authentication transaction sequence number field. | ||
1166 | * @sae_data_len: Length of sae_data buffer in octets | ||
1155 | */ | 1167 | */ |
1156 | struct cfg80211_auth_request { | 1168 | struct cfg80211_auth_request { |
1157 | struct cfg80211_bss *bss; | 1169 | struct cfg80211_bss *bss; |
@@ -1160,6 +1172,8 @@ struct cfg80211_auth_request { | |||
1160 | enum nl80211_auth_type auth_type; | 1172 | enum nl80211_auth_type auth_type; |
1161 | const u8 *key; | 1173 | const u8 *key; |
1162 | u8 key_len, key_idx; | 1174 | u8 key_len, key_idx; |
1175 | const u8 *sae_data; | ||
1176 | size_t sae_data_len; | ||
1163 | }; | 1177 | }; |
1164 | 1178 | ||
1165 | /** | 1179 | /** |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 82558c8decf8..00b7204708bd 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -144,6 +144,41 @@ struct ieee80211_low_level_stats { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /** | 146 | /** |
147 | * enum ieee80211_chanctx_change - change flag for channel context | ||
148 | * @IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE: The channel type was changed | ||
149 | * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed | ||
150 | */ | ||
151 | enum ieee80211_chanctx_change { | ||
152 | IEEE80211_CHANCTX_CHANGE_CHANNEL_TYPE = BIT(0), | ||
153 | IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), | ||
154 | }; | ||
155 | |||
156 | /** | ||
157 | * struct ieee80211_chanctx_conf - channel context that vifs may be tuned to | ||
158 | * | ||
159 | * This is the driver-visible part. The ieee80211_chanctx | ||
160 | * that contains it is visible in mac80211 only. | ||
161 | * | ||
162 | * @channel: the channel to tune to | ||
163 | * @channel_type: the channel (HT) type | ||
164 | * @rx_chains_static: The number of RX chains that must always be | ||
165 | * active on the channel to receive MIMO transmissions | ||
166 | * @rx_chains_dynamic: The number of RX chains that must be enabled | ||
167 | * after RTS/CTS handshake to receive SMPS MIMO transmissions; | ||
168 | * this will always be >= @rx_chains_always. | ||
169 | * @drv_priv: data area for driver use, will always be aligned to | ||
170 | * sizeof(void *), size is determined in hw information. | ||
171 | */ | ||
172 | struct ieee80211_chanctx_conf { | ||
173 | struct ieee80211_channel *channel; | ||
174 | enum nl80211_channel_type channel_type; | ||
175 | |||
176 | u8 rx_chains_static, rx_chains_dynamic; | ||
177 | |||
178 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); | ||
179 | }; | ||
180 | |||
181 | /** | ||
147 | * enum ieee80211_bss_change - BSS change notification flags | 182 | * enum ieee80211_bss_change - BSS change notification flags |
148 | * | 183 | * |
149 | * These flags are used with the bss_info_changed() callback | 184 | * These flags are used with the bss_info_changed() callback |
@@ -223,6 +258,7 @@ enum ieee80211_rssi_event { | |||
223 | * @assoc: association status | 258 | * @assoc: association status |
224 | * @ibss_joined: indicates whether this station is part of an IBSS | 259 | * @ibss_joined: indicates whether this station is part of an IBSS |
225 | * or not | 260 | * or not |
261 | * @ibss_creator: indicates if a new IBSS network is being created | ||
226 | * @aid: association ID number, valid only when @assoc is true | 262 | * @aid: association ID number, valid only when @assoc is true |
227 | * @use_cts_prot: use CTS protection | 263 | * @use_cts_prot: use CTS protection |
228 | * @use_short_preamble: use 802.11b short preamble; | 264 | * @use_short_preamble: use 802.11b short preamble; |
@@ -278,6 +314,7 @@ struct ieee80211_bss_conf { | |||
278 | const u8 *bssid; | 314 | const u8 *bssid; |
279 | /* association related data */ | 315 | /* association related data */ |
280 | bool assoc, ibss_joined; | 316 | bool assoc, ibss_joined; |
317 | bool ibss_creator; | ||
281 | u16 aid; | 318 | u16 aid; |
282 | /* erp related data */ | 319 | /* erp related data */ |
283 | bool use_cts_prot; | 320 | bool use_cts_prot; |
@@ -794,6 +831,8 @@ enum ieee80211_conf_flags { | |||
794 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed | 831 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed |
795 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed | 832 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed |
796 | * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed | 833 | * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed |
834 | * Note that this is only valid if channel contexts are not used, | ||
835 | * otherwise each channel context has the number of chains listed. | ||
797 | */ | 836 | */ |
798 | enum ieee80211_conf_changed { | 837 | enum ieee80211_conf_changed { |
799 | IEEE80211_CONF_CHANGE_SMPS = BIT(1), | 838 | IEEE80211_CONF_CHANGE_SMPS = BIT(1), |
@@ -859,7 +898,9 @@ enum ieee80211_smps_mode { | |||
859 | * | 898 | * |
860 | * @smps_mode: spatial multiplexing powersave mode; note that | 899 | * @smps_mode: spatial multiplexing powersave mode; note that |
861 | * %IEEE80211_SMPS_STATIC is used when the device is not | 900 | * %IEEE80211_SMPS_STATIC is used when the device is not |
862 | * configured for an HT channel | 901 | * configured for an HT channel. |
902 | * Note that this is only valid if channel contexts are not used, | ||
903 | * otherwise each channel context has the number of chains listed. | ||
863 | */ | 904 | */ |
864 | struct ieee80211_conf { | 905 | struct ieee80211_conf { |
865 | u32 flags; | 906 | u32 flags; |
@@ -931,6 +972,11 @@ enum ieee80211_vif_flags { | |||
931 | * at runtime, mac80211 will never touch this field | 972 | * at runtime, mac80211 will never touch this field |
932 | * @hw_queue: hardware queue for each AC | 973 | * @hw_queue: hardware queue for each AC |
933 | * @cab_queue: content-after-beacon (DTIM beacon really) queue, AP mode only | 974 | * @cab_queue: content-after-beacon (DTIM beacon really) queue, AP mode only |
975 | * @chanctx_conf: The channel context this interface is assigned to, or %NULL | ||
976 | * when it is not assigned. This pointer is RCU-protected due to the TX | ||
977 | * path needing to access it; even though the netdev carrier will always | ||
978 | * be off when it is %NULL there can still be races and packets could be | ||
979 | * processed after it switches back to %NULL. | ||
934 | * @drv_priv: data area for driver use, will always be aligned to | 980 | * @drv_priv: data area for driver use, will always be aligned to |
935 | * sizeof(void *). | 981 | * sizeof(void *). |
936 | */ | 982 | */ |
@@ -943,6 +989,8 @@ struct ieee80211_vif { | |||
943 | u8 cab_queue; | 989 | u8 cab_queue; |
944 | u8 hw_queue[IEEE80211_NUM_ACS]; | 990 | u8 hw_queue[IEEE80211_NUM_ACS]; |
945 | 991 | ||
992 | struct ieee80211_chanctx_conf __rcu *chanctx_conf; | ||
993 | |||
946 | u32 driver_flags; | 994 | u32 driver_flags; |
947 | 995 | ||
948 | /* must be last */ | 996 | /* must be last */ |
@@ -1076,6 +1124,8 @@ enum ieee80211_sta_state { | |||
1076 | * @aid: AID we assigned to the station if we're an AP | 1124 | * @aid: AID we assigned to the station if we're an AP |
1077 | * @supp_rates: Bitmap of supported rates (per band) | 1125 | * @supp_rates: Bitmap of supported rates (per band) |
1078 | * @ht_cap: HT capabilities of this STA; restricted to our own TX capabilities | 1126 | * @ht_cap: HT capabilities of this STA; restricted to our own TX capabilities |
1127 | * @vht_cap: VHT capabilities of this STA; Not restricting any capabilities | ||
1128 | * of remote STA. Taking as is. | ||
1079 | * @wme: indicates whether the STA supports WME. Only valid during AP-mode. | 1129 | * @wme: indicates whether the STA supports WME. Only valid during AP-mode. |
1080 | * @drv_priv: data area for driver use, will always be aligned to | 1130 | * @drv_priv: data area for driver use, will always be aligned to |
1081 | * sizeof(void *), size is determined in hw information. | 1131 | * sizeof(void *), size is determined in hw information. |
@@ -1088,6 +1138,7 @@ struct ieee80211_sta { | |||
1088 | u8 addr[ETH_ALEN]; | 1138 | u8 addr[ETH_ALEN]; |
1089 | u16 aid; | 1139 | u16 aid; |
1090 | struct ieee80211_sta_ht_cap ht_cap; | 1140 | struct ieee80211_sta_ht_cap ht_cap; |
1141 | struct ieee80211_sta_vht_cap vht_cap; | ||
1091 | bool wme; | 1142 | bool wme; |
1092 | u8 uapsd_queues; | 1143 | u8 uapsd_queues; |
1093 | u8 max_sp; | 1144 | u8 max_sp; |
@@ -1325,6 +1376,8 @@ enum ieee80211_hw_flags { | |||
1325 | * within &struct ieee80211_vif. | 1376 | * within &struct ieee80211_vif. |
1326 | * @sta_data_size: size (in bytes) of the drv_priv data area | 1377 | * @sta_data_size: size (in bytes) of the drv_priv data area |
1327 | * within &struct ieee80211_sta. | 1378 | * within &struct ieee80211_sta. |
1379 | * @chanctx_data_size: size (in bytes) of the drv_priv data area | ||
1380 | * within &struct ieee80211_chanctx_conf. | ||
1328 | * | 1381 | * |
1329 | * @max_rates: maximum number of alternate rate retry stages the hw | 1382 | * @max_rates: maximum number of alternate rate retry stages the hw |
1330 | * can handle. | 1383 | * can handle. |
@@ -1369,6 +1422,7 @@ struct ieee80211_hw { | |||
1369 | int channel_change_time; | 1422 | int channel_change_time; |
1370 | int vif_data_size; | 1423 | int vif_data_size; |
1371 | int sta_data_size; | 1424 | int sta_data_size; |
1425 | int chanctx_data_size; | ||
1372 | int napi_weight; | 1426 | int napi_weight; |
1373 | u16 queues; | 1427 | u16 queues; |
1374 | u16 max_listen_interval; | 1428 | u16 max_listen_interval; |
@@ -2317,6 +2371,16 @@ enum ieee80211_rate_control_changed { | |||
2317 | * The callback will be called before each transmission and upon return | 2371 | * The callback will be called before each transmission and upon return |
2318 | * mac80211 will transmit the frame right away. | 2372 | * mac80211 will transmit the frame right away. |
2319 | * The callback is optional and can (should!) sleep. | 2373 | * The callback is optional and can (should!) sleep. |
2374 | * | ||
2375 | * @add_chanctx: Notifies device driver about new channel context creation. | ||
2376 | * @remove_chanctx: Notifies device driver about channel context destruction. | ||
2377 | * @change_chanctx: Notifies device driver about channel context changes that | ||
2378 | * may happen when combining different virtual interfaces on the same | ||
2379 | * channel context with different settings | ||
2380 | * @assign_vif_chanctx: Notifies device driver about channel context being bound | ||
2381 | * to vif. Possible use is for hw queue remapping. | ||
2382 | * @unassign_vif_chanctx: Notifies device driver about channel context being | ||
2383 | * unbound from vif. | ||
2320 | */ | 2384 | */ |
2321 | struct ieee80211_ops { | 2385 | struct ieee80211_ops { |
2322 | void (*tx)(struct ieee80211_hw *hw, | 2386 | void (*tx)(struct ieee80211_hw *hw, |
@@ -2461,6 +2525,20 @@ struct ieee80211_ops { | |||
2461 | 2525 | ||
2462 | void (*mgd_prepare_tx)(struct ieee80211_hw *hw, | 2526 | void (*mgd_prepare_tx)(struct ieee80211_hw *hw, |
2463 | struct ieee80211_vif *vif); | 2527 | struct ieee80211_vif *vif); |
2528 | |||
2529 | int (*add_chanctx)(struct ieee80211_hw *hw, | ||
2530 | struct ieee80211_chanctx_conf *ctx); | ||
2531 | void (*remove_chanctx)(struct ieee80211_hw *hw, | ||
2532 | struct ieee80211_chanctx_conf *ctx); | ||
2533 | void (*change_chanctx)(struct ieee80211_hw *hw, | ||
2534 | struct ieee80211_chanctx_conf *ctx, | ||
2535 | u32 changed); | ||
2536 | int (*assign_vif_chanctx)(struct ieee80211_hw *hw, | ||
2537 | struct ieee80211_vif *vif, | ||
2538 | struct ieee80211_chanctx_conf *ctx); | ||
2539 | void (*unassign_vif_chanctx)(struct ieee80211_hw *hw, | ||
2540 | struct ieee80211_vif *vif, | ||
2541 | struct ieee80211_chanctx_conf *ctx); | ||
2464 | }; | 2542 | }; |
2465 | 2543 | ||
2466 | /** | 2544 | /** |
@@ -3145,6 +3223,19 @@ void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf, | |||
3145 | struct sk_buff *skb, u8 *p2k); | 3223 | struct sk_buff *skb, u8 *p2k); |
3146 | 3224 | ||
3147 | /** | 3225 | /** |
3226 | * ieee80211_aes_cmac_calculate_k1_k2 - calculate the AES-CMAC sub keys | ||
3227 | * | ||
3228 | * This function computes the two AES-CMAC sub-keys, based on the | ||
3229 | * previously installed master key. | ||
3230 | * | ||
3231 | * @keyconf: the parameter passed with the set key | ||
3232 | * @k1: a buffer to be filled with the 1st sub-key | ||
3233 | * @k2: a buffer to be filled with the 2nd sub-key | ||
3234 | */ | ||
3235 | void ieee80211_aes_cmac_calculate_k1_k2(struct ieee80211_key_conf *keyconf, | ||
3236 | u8 *k1, u8 *k2); | ||
3237 | |||
3238 | /** | ||
3148 | * struct ieee80211_key_seq - key sequence counter | 3239 | * struct ieee80211_key_seq - key sequence counter |
3149 | * | 3240 | * |
3150 | * @tkip: TKIP data, containing IV32 and IV16 in host byte order | 3241 | * @tkip: TKIP data, containing IV32 and IV16 in host byte order |
@@ -3524,6 +3615,27 @@ void ieee80211_iter_keys(struct ieee80211_hw *hw, | |||
3524 | void *iter_data); | 3615 | void *iter_data); |
3525 | 3616 | ||
3526 | /** | 3617 | /** |
3618 | * ieee80211_iter_chan_contexts_atomic - iterate channel contexts | ||
3619 | * @hw: pointre obtained from ieee80211_alloc_hw(). | ||
3620 | * @iter: iterator function | ||
3621 | * @iter_data: data passed to iterator function | ||
3622 | * | ||
3623 | * Iterate all active channel contexts. This function is atomic and | ||
3624 | * doesn't acquire any locks internally that might be held in other | ||
3625 | * places while calling into the driver. | ||
3626 | * | ||
3627 | * The iterator will not find a context that's being added (during | ||
3628 | * the driver callback to add it) but will find it while it's being | ||
3629 | * removed. | ||
3630 | */ | ||
3631 | void ieee80211_iter_chan_contexts_atomic( | ||
3632 | struct ieee80211_hw *hw, | ||
3633 | void (*iter)(struct ieee80211_hw *hw, | ||
3634 | struct ieee80211_chanctx_conf *chanctx_conf, | ||
3635 | void *data), | ||
3636 | void *iter_data); | ||
3637 | |||
3638 | /** | ||
3527 | * ieee80211_ap_probereq_get - retrieve a Probe Request template | 3639 | * ieee80211_ap_probereq_get - retrieve a Probe Request template |
3528 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 3640 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
3529 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 3641 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index e900072950cb..639f50af42df 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -24,6 +24,12 @@ | |||
24 | 24 | ||
25 | #include <net/nfc/nfc.h> | 25 | #include <net/nfc/nfc.h> |
26 | 26 | ||
27 | struct nfc_phy_ops { | ||
28 | int (*write)(void *dev_id, struct sk_buff *skb); | ||
29 | int (*enable)(void *dev_id); | ||
30 | void (*disable)(void *dev_id); | ||
31 | }; | ||
32 | |||
27 | struct nfc_hci_dev; | 33 | struct nfc_hci_dev; |
28 | 34 | ||
29 | struct nfc_hci_ops { | 35 | struct nfc_hci_ops { |
@@ -38,15 +44,21 @@ struct nfc_hci_ops { | |||
38 | int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb); | 44 | int (*xmit) (struct nfc_hci_dev *hdev, struct sk_buff *skb); |
39 | int (*start_poll) (struct nfc_hci_dev *hdev, | 45 | int (*start_poll) (struct nfc_hci_dev *hdev, |
40 | u32 im_protocols, u32 tm_protocols); | 46 | u32 im_protocols, u32 tm_protocols); |
47 | int (*dep_link_up)(struct nfc_hci_dev *hdev, struct nfc_target *target, | ||
48 | u8 comm_mode, u8 *gb, size_t gb_len); | ||
49 | int (*dep_link_down)(struct nfc_hci_dev *hdev); | ||
41 | int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate, | 50 | int (*target_from_gate) (struct nfc_hci_dev *hdev, u8 gate, |
42 | struct nfc_target *target); | 51 | struct nfc_target *target); |
43 | int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate, | 52 | int (*complete_target_discovered) (struct nfc_hci_dev *hdev, u8 gate, |
44 | struct nfc_target *target); | 53 | struct nfc_target *target); |
45 | int (*data_exchange) (struct nfc_hci_dev *hdev, | 54 | int (*im_transceive) (struct nfc_hci_dev *hdev, |
46 | struct nfc_target *target, struct sk_buff *skb, | 55 | struct nfc_target *target, struct sk_buff *skb, |
47 | data_exchange_cb_t cb, void *cb_context); | 56 | data_exchange_cb_t cb, void *cb_context); |
57 | int (*tm_send)(struct nfc_hci_dev *hdev, struct sk_buff *skb); | ||
48 | int (*check_presence)(struct nfc_hci_dev *hdev, | 58 | int (*check_presence)(struct nfc_hci_dev *hdev, |
49 | struct nfc_target *target); | 59 | struct nfc_target *target); |
60 | void (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | ||
61 | struct sk_buff *skb); | ||
50 | }; | 62 | }; |
51 | 63 | ||
52 | /* Pipes */ | 64 | /* Pipes */ |
@@ -114,6 +126,9 @@ struct nfc_hci_dev { | |||
114 | int async_cb_type; | 126 | int async_cb_type; |
115 | data_exchange_cb_t async_cb; | 127 | data_exchange_cb_t async_cb; |
116 | void *async_cb_context; | 128 | void *async_cb_context; |
129 | |||
130 | u8 *gb; | ||
131 | size_t gb_len; | ||
117 | }; | 132 | }; |
118 | 133 | ||
119 | /* hci device allocation */ | 134 | /* hci device allocation */ |
@@ -219,5 +234,6 @@ int nfc_hci_send_response(struct nfc_hci_dev *hdev, u8 gate, u8 response, | |||
219 | const u8 *param, size_t param_len); | 234 | const u8 *param, size_t param_len); |
220 | int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 235 | int nfc_hci_send_event(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
221 | const u8 *param, size_t param_len); | 236 | const u8 *param, size_t param_len); |
237 | int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate); | ||
222 | 238 | ||
223 | #endif /* __NET_HCI_H */ | 239 | #endif /* __NET_HCI_H */ |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index f05b10682c9d..fce80b2f9be7 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
@@ -95,7 +95,7 @@ struct nfc_genl_data { | |||
95 | }; | 95 | }; |
96 | 96 | ||
97 | struct nfc_dev { | 97 | struct nfc_dev { |
98 | unsigned int idx; | 98 | int idx; |
99 | u32 target_next_idx; | 99 | u32 target_next_idx; |
100 | struct nfc_target *targets; | 100 | struct nfc_target *targets; |
101 | int n_targets; | 101 | int n_targets; |
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index d908d17da56d..0e63cee8d810 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
@@ -60,6 +60,13 @@ | |||
60 | * target mode. | 60 | * target mode. |
61 | * @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated | 61 | * @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated |
62 | * from target mode. | 62 | * from target mode. |
63 | * @NFC_CMD_LLC_GET_PARAMS: request LTO, RW, and MIUX parameters for a device | ||
64 | * @NFC_CMD_LLC_SET_PARAMS: set one or more of LTO, RW, and MIUX parameters for | ||
65 | * a device. LTO must be set before the link is up otherwise -EINPROGRESS | ||
66 | * is returned. RW and MIUX can be set at anytime and will be passed in | ||
67 | * subsequent CONNECT and CC messages. | ||
68 | * If one of the passed parameters is wrong none is set and -EINVAL is | ||
69 | * returned. | ||
63 | */ | 70 | */ |
64 | enum nfc_commands { | 71 | enum nfc_commands { |
65 | NFC_CMD_UNSPEC, | 72 | NFC_CMD_UNSPEC, |
@@ -77,6 +84,8 @@ enum nfc_commands { | |||
77 | NFC_EVENT_TARGET_LOST, | 84 | NFC_EVENT_TARGET_LOST, |
78 | NFC_EVENT_TM_ACTIVATED, | 85 | NFC_EVENT_TM_ACTIVATED, |
79 | NFC_EVENT_TM_DEACTIVATED, | 86 | NFC_EVENT_TM_DEACTIVATED, |
87 | NFC_CMD_LLC_GET_PARAMS, | ||
88 | NFC_CMD_LLC_SET_PARAMS, | ||
80 | /* private: internal use only */ | 89 | /* private: internal use only */ |
81 | __NFC_CMD_AFTER_LAST | 90 | __NFC_CMD_AFTER_LAST |
82 | }; | 91 | }; |
@@ -102,6 +111,9 @@ enum nfc_commands { | |||
102 | * @NFC_ATTR_RF_MODE: Initiator or target | 111 | * @NFC_ATTR_RF_MODE: Initiator or target |
103 | * @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for | 112 | * @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for |
104 | * @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for | 113 | * @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for |
114 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter | ||
115 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter | ||
116 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter | ||
105 | */ | 117 | */ |
106 | enum nfc_attrs { | 118 | enum nfc_attrs { |
107 | NFC_ATTR_UNSPEC, | 119 | NFC_ATTR_UNSPEC, |
@@ -119,6 +131,9 @@ enum nfc_attrs { | |||
119 | NFC_ATTR_DEVICE_POWERED, | 131 | NFC_ATTR_DEVICE_POWERED, |
120 | NFC_ATTR_IM_PROTOCOLS, | 132 | NFC_ATTR_IM_PROTOCOLS, |
121 | NFC_ATTR_TM_PROTOCOLS, | 133 | NFC_ATTR_TM_PROTOCOLS, |
134 | NFC_ATTR_LLC_PARAM_LTO, | ||
135 | NFC_ATTR_LLC_PARAM_RW, | ||
136 | NFC_ATTR_LLC_PARAM_MIUX, | ||
122 | /* private: internal use only */ | 137 | /* private: internal use only */ |
123 | __NFC_ATTR_AFTER_LAST | 138 | __NFC_ATTR_AFTER_LAST |
124 | }; | 139 | }; |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 7df9b500c804..617d0fbfc96f 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -1273,6 +1273,14 @@ enum nl80211_commands { | |||
1273 | * the connection request from a station. nl80211_connect_failed_reason | 1273 | * the connection request from a station. nl80211_connect_failed_reason |
1274 | * enum has different reasons of connection failure. | 1274 | * enum has different reasons of connection failure. |
1275 | * | 1275 | * |
1276 | * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts | ||
1277 | * with the Authentication transaction sequence number field. | ||
1278 | * | ||
1279 | * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from | ||
1280 | * association request when used with NL80211_CMD_NEW_STATION) | ||
1281 | * | ||
1282 | * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32) | ||
1283 | * | ||
1276 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1284 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1277 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1285 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1278 | */ | 1286 | */ |
@@ -1530,6 +1538,12 @@ enum nl80211_attrs { | |||
1530 | 1538 | ||
1531 | NL80211_ATTR_CONN_FAILED_REASON, | 1539 | NL80211_ATTR_CONN_FAILED_REASON, |
1532 | 1540 | ||
1541 | NL80211_ATTR_SAE_DATA, | ||
1542 | |||
1543 | NL80211_ATTR_VHT_CAPABILITY, | ||
1544 | |||
1545 | NL80211_ATTR_SCAN_FLAGS, | ||
1546 | |||
1533 | /* add attributes here, update the policy in nl80211.c */ | 1547 | /* add attributes here, update the policy in nl80211.c */ |
1534 | 1548 | ||
1535 | __NL80211_ATTR_AFTER_LAST, | 1549 | __NL80211_ATTR_AFTER_LAST, |
@@ -1573,6 +1587,7 @@ enum nl80211_attrs { | |||
1573 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 | 1587 | #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 |
1574 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 | 1588 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
1575 | #define NL80211_HT_CAPABILITY_LEN 26 | 1589 | #define NL80211_HT_CAPABILITY_LEN 26 |
1590 | #define NL80211_VHT_CAPABILITY_LEN 12 | ||
1576 | 1591 | ||
1577 | #define NL80211_MAX_NR_CIPHER_SUITES 5 | 1592 | #define NL80211_MAX_NR_CIPHER_SUITES 5 |
1578 | #define NL80211_MAX_NR_AKM_SUITES 2 | 1593 | #define NL80211_MAX_NR_AKM_SUITES 2 |
@@ -2489,6 +2504,7 @@ enum nl80211_bss_status { | |||
2489 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | 2504 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) |
2490 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | 2505 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) |
2491 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | 2506 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) |
2507 | * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals | ||
2492 | * @__NL80211_AUTHTYPE_NUM: internal | 2508 | * @__NL80211_AUTHTYPE_NUM: internal |
2493 | * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm | 2509 | * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm |
2494 | * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by | 2510 | * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by |
@@ -2500,6 +2516,7 @@ enum nl80211_auth_type { | |||
2500 | NL80211_AUTHTYPE_SHARED_KEY, | 2516 | NL80211_AUTHTYPE_SHARED_KEY, |
2501 | NL80211_AUTHTYPE_FT, | 2517 | NL80211_AUTHTYPE_FT, |
2502 | NL80211_AUTHTYPE_NETWORK_EAP, | 2518 | NL80211_AUTHTYPE_NETWORK_EAP, |
2519 | NL80211_AUTHTYPE_SAE, | ||
2503 | 2520 | ||
2504 | /* keep last */ | 2521 | /* keep last */ |
2505 | __NL80211_AUTHTYPE_NUM, | 2522 | __NL80211_AUTHTYPE_NUM, |
@@ -3028,6 +3045,12 @@ enum nl80211_ap_sme_features { | |||
3028 | * in the interface combinations, even when it's only used for scan | 3045 | * in the interface combinations, even when it's only used for scan |
3029 | * and remain-on-channel. This could be due to, for example, the | 3046 | * and remain-on-channel. This could be due to, for example, the |
3030 | * remain-on-channel implementation requiring a channel context. | 3047 | * remain-on-channel implementation requiring a channel context. |
3048 | * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of | ||
3049 | * equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station | ||
3050 | * mode | ||
3051 | * @NL80211_FEATURE_LOW_PRIORITY_SCAN: This driver supports low priority scan | ||
3052 | * @NL80211_FEATURE_SCAN_FLUSH: Scan flush is supported | ||
3053 | * @NL80211_FEATURE_AP_SCAN: Support scanning using an AP vif | ||
3031 | */ | 3054 | */ |
3032 | enum nl80211_feature_flags { | 3055 | enum nl80211_feature_flags { |
3033 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 3056 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
@@ -3035,6 +3058,10 @@ enum nl80211_feature_flags { | |||
3035 | NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, | 3058 | NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, |
3036 | NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, | 3059 | NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, |
3037 | NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4, | 3060 | NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4, |
3061 | NL80211_FEATURE_SAE = 1 << 5, | ||
3062 | NL80211_FEATURE_LOW_PRIORITY_SCAN = 1 << 6, | ||
3063 | NL80211_FEATURE_SCAN_FLUSH = 1 << 7, | ||
3064 | NL80211_FEATURE_AP_SCAN = 1 << 8, | ||
3038 | }; | 3065 | }; |
3039 | 3066 | ||
3040 | /** | 3067 | /** |
@@ -3069,4 +3096,25 @@ enum nl80211_connect_failed_reason { | |||
3069 | NL80211_CONN_FAIL_BLOCKED_CLIENT, | 3096 | NL80211_CONN_FAIL_BLOCKED_CLIENT, |
3070 | }; | 3097 | }; |
3071 | 3098 | ||
3099 | /** | ||
3100 | * enum nl80211_scan_flags - scan request control flags | ||
3101 | * | ||
3102 | * Scan request control flags are used to control the handling | ||
3103 | * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN | ||
3104 | * requests. | ||
3105 | * | ||
3106 | * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority | ||
3107 | * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning | ||
3108 | * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured | ||
3109 | * as AP and the beaconing has already been configured. This attribute is | ||
3110 | * dangerous because will destroy stations performance as a lot of frames | ||
3111 | * will be lost while scanning off-channel, therefore it must be used only | ||
3112 | * when really needed | ||
3113 | */ | ||
3114 | enum nl80211_scan_flags { | ||
3115 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, | ||
3116 | NL80211_SCAN_FLAG_FLUSH = 1<<1, | ||
3117 | NL80211_SCAN_FLAG_AP = 1<<2, | ||
3118 | }; | ||
3119 | |||
3072 | #endif /* __LINUX_NL80211_H */ | 3120 | #endif /* __LINUX_NL80211_H */ |