diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-11-08 09:03:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-11-08 09:03:10 -0500 |
commit | c1f3bb6bd317994beb3af7bbec4bf54ed0035509 (patch) | |
tree | 878833c714ddcb35f1574f2b11e1f69d1130d206 /include | |
parent | dcd607718385d02ce3741de225927a57f528f93b (diff) | |
parent | 3c57e865cfb2dcbb48fdfa08e7d4e3479e9b40f0 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 20 | ||||
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 1 | ||||
-rw-r--r-- | include/net/bluetooth/hci.h | 35 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 89 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 20 | ||||
-rw-r--r-- | include/net/cfg80211.h | 14 | ||||
-rw-r--r-- | include/net/mac80211.h | 18 | ||||
-rw-r--r-- | include/uapi/linux/nl80211.h | 27 |
8 files changed, 146 insertions, 78 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 7c1e1ebc0e23..8c3b26a21574 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -697,6 +697,18 @@ struct ieee80211_sec_chan_offs_ie { | |||
697 | } __packed; | 697 | } __packed; |
698 | 698 | ||
699 | /** | 699 | /** |
700 | * struct ieee80211_mesh_chansw_params_ie - mesh channel switch parameters IE | ||
701 | * | ||
702 | * This structure represents the "Mesh Channel Switch Paramters element" | ||
703 | */ | ||
704 | struct ieee80211_mesh_chansw_params_ie { | ||
705 | u8 mesh_ttl; | ||
706 | u8 mesh_flags; | ||
707 | __le16 mesh_reason; | ||
708 | __le16 mesh_pre_value; | ||
709 | } __packed; | ||
710 | |||
711 | /** | ||
700 | * struct ieee80211_wide_bw_chansw_ie - wide bandwidth channel switch IE | 712 | * struct ieee80211_wide_bw_chansw_ie - wide bandwidth channel switch IE |
701 | */ | 713 | */ |
702 | struct ieee80211_wide_bw_chansw_ie { | 714 | struct ieee80211_wide_bw_chansw_ie { |
@@ -751,6 +763,14 @@ enum mesh_config_capab_flags { | |||
751 | }; | 763 | }; |
752 | 764 | ||
753 | /** | 765 | /** |
766 | * mesh channel switch parameters element's flag indicator | ||
767 | * | ||
768 | */ | ||
769 | #define WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT BIT(0) | ||
770 | #define WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR BIT(1) | ||
771 | #define WLAN_EID_CHAN_SWITCH_PARAM_REASON BIT(2) | ||
772 | |||
773 | /** | ||
754 | * struct ieee80211_rann_ie | 774 | * struct ieee80211_rann_ie |
755 | * | 775 | * |
756 | * This structure refers to "Root Announcement information element" | 776 | * This structure refers to "Root Announcement information element" |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 2cc9517fb0d5..2a628b28249f 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -282,6 +282,7 @@ struct bt_skb_cb { | |||
282 | __u8 incoming; | 282 | __u8 incoming; |
283 | __u16 expect; | 283 | __u16 expect; |
284 | __u8 force_active; | 284 | __u8 force_active; |
285 | struct l2cap_chan *chan; | ||
285 | struct l2cap_ctrl control; | 286 | struct l2cap_ctrl control; |
286 | struct hci_req_ctrl req; | 287 | struct hci_req_ctrl req; |
287 | bdaddr_t bdaddr; | 288 | bdaddr_t bdaddr; |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index b096f5f73789..1784c48699f0 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -115,6 +115,7 @@ enum { | |||
115 | HCI_PAIRABLE, | 115 | HCI_PAIRABLE, |
116 | HCI_SERVICE_CACHE, | 116 | HCI_SERVICE_CACHE, |
117 | HCI_DEBUG_KEYS, | 117 | HCI_DEBUG_KEYS, |
118 | HCI_DUT_MODE, | ||
118 | HCI_UNREGISTER, | 119 | HCI_UNREGISTER, |
119 | HCI_USER_CHANNEL, | 120 | HCI_USER_CHANNEL, |
120 | 121 | ||
@@ -125,6 +126,7 @@ enum { | |||
125 | HCI_ADVERTISING, | 126 | HCI_ADVERTISING, |
126 | HCI_CONNECTABLE, | 127 | HCI_CONNECTABLE, |
127 | HCI_DISCOVERABLE, | 128 | HCI_DISCOVERABLE, |
129 | HCI_LIMITED_DISCOVERABLE, | ||
128 | HCI_LINK_SECURITY, | 130 | HCI_LINK_SECURITY, |
129 | HCI_PERIODIC_INQ, | 131 | HCI_PERIODIC_INQ, |
130 | HCI_FAST_CONNECTABLE, | 132 | HCI_FAST_CONNECTABLE, |
@@ -823,6 +825,12 @@ struct hci_rp_read_num_supported_iac { | |||
823 | 825 | ||
824 | #define HCI_OP_READ_CURRENT_IAC_LAP 0x0c39 | 826 | #define HCI_OP_READ_CURRENT_IAC_LAP 0x0c39 |
825 | 827 | ||
828 | #define HCI_OP_WRITE_CURRENT_IAC_LAP 0x0c3a | ||
829 | struct hci_cp_write_current_iac_lap { | ||
830 | __u8 num_iac; | ||
831 | __u8 iac_lap[6]; | ||
832 | } __packed; | ||
833 | |||
826 | #define HCI_OP_WRITE_INQUIRY_MODE 0x0c45 | 834 | #define HCI_OP_WRITE_INQUIRY_MODE 0x0c45 |
827 | 835 | ||
828 | #define HCI_MAX_EIR_LENGTH 240 | 836 | #define HCI_MAX_EIR_LENGTH 240 |
@@ -1036,6 +1044,10 @@ struct hci_rp_write_remote_amp_assoc { | |||
1036 | __u8 phy_handle; | 1044 | __u8 phy_handle; |
1037 | } __packed; | 1045 | } __packed; |
1038 | 1046 | ||
1047 | #define HCI_OP_ENABLE_DUT_MODE 0x1803 | ||
1048 | |||
1049 | #define HCI_OP_WRITE_SSP_DEBUG_MODE 0x1804 | ||
1050 | |||
1039 | #define HCI_OP_LE_SET_EVENT_MASK 0x2001 | 1051 | #define HCI_OP_LE_SET_EVENT_MASK 0x2001 |
1040 | struct hci_cp_le_set_event_mask { | 1052 | struct hci_cp_le_set_event_mask { |
1041 | __u8 mask[8]; | 1053 | __u8 mask[8]; |
@@ -1056,11 +1068,6 @@ struct hci_rp_le_read_local_features { | |||
1056 | 1068 | ||
1057 | #define HCI_OP_LE_SET_RANDOM_ADDR 0x2005 | 1069 | #define HCI_OP_LE_SET_RANDOM_ADDR 0x2005 |
1058 | 1070 | ||
1059 | #define LE_ADV_IND 0x00 | ||
1060 | #define LE_ADV_DIRECT_IND 0x01 | ||
1061 | #define LE_ADV_SCAN_IND 0x02 | ||
1062 | #define LE_ADV_NONCONN_IND 0x03 | ||
1063 | |||
1064 | #define HCI_OP_LE_SET_ADV_PARAM 0x2006 | 1071 | #define HCI_OP_LE_SET_ADV_PARAM 0x2006 |
1065 | struct hci_cp_le_set_adv_param { | 1072 | struct hci_cp_le_set_adv_param { |
1066 | __le16 min_interval; | 1073 | __le16 min_interval; |
@@ -1087,6 +1094,12 @@ struct hci_cp_le_set_adv_data { | |||
1087 | __u8 data[HCI_MAX_AD_LENGTH]; | 1094 | __u8 data[HCI_MAX_AD_LENGTH]; |
1088 | } __packed; | 1095 | } __packed; |
1089 | 1096 | ||
1097 | #define HCI_OP_LE_SET_SCAN_RSP_DATA 0x2009 | ||
1098 | struct hci_cp_le_set_scan_rsp_data { | ||
1099 | __u8 length; | ||
1100 | __u8 data[HCI_MAX_AD_LENGTH]; | ||
1101 | } __packed; | ||
1102 | |||
1090 | #define HCI_OP_LE_SET_ADV_ENABLE 0x200a | 1103 | #define HCI_OP_LE_SET_ADV_ENABLE 0x200a |
1091 | 1104 | ||
1092 | #define LE_SCAN_PASSIVE 0x00 | 1105 | #define LE_SCAN_PASSIVE 0x00 |
@@ -1567,11 +1580,11 @@ struct hci_ev_le_ltk_req { | |||
1567 | } __packed; | 1580 | } __packed; |
1568 | 1581 | ||
1569 | /* Advertising report event types */ | 1582 | /* Advertising report event types */ |
1570 | #define ADV_IND 0x00 | 1583 | #define LE_ADV_IND 0x00 |
1571 | #define ADV_DIRECT_IND 0x01 | 1584 | #define LE_ADV_DIRECT_IND 0x01 |
1572 | #define ADV_SCAN_IND 0x02 | 1585 | #define LE_ADV_SCAN_IND 0x02 |
1573 | #define ADV_NONCONN_IND 0x03 | 1586 | #define LE_ADV_NONCONN_IND 0x03 |
1574 | #define ADV_SCAN_RSP 0x04 | 1587 | #define LE_ADV_SCAN_RSP 0x04 |
1575 | 1588 | ||
1576 | #define ADDR_LE_DEV_PUBLIC 0x00 | 1589 | #define ADDR_LE_DEV_PUBLIC 0x00 |
1577 | #define ADDR_LE_DEV_RANDOM 0x01 | 1590 | #define ADDR_LE_DEV_RANDOM 0x01 |
@@ -1779,6 +1792,4 @@ struct hci_inquiry_req { | |||
1779 | }; | 1792 | }; |
1780 | #define IREQ_CACHE_FLUSH 0x0001 | 1793 | #define IREQ_CACHE_FLUSH 0x0001 |
1781 | 1794 | ||
1782 | extern bool enable_hs; | ||
1783 | |||
1784 | #endif /* __HCI_H */ | 1795 | #endif /* __HCI_H */ |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 2dc467939be7..f8555ad7b104 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -81,6 +81,7 @@ struct hci_conn_hash { | |||
81 | struct bdaddr_list { | 81 | struct bdaddr_list { |
82 | struct list_head list; | 82 | struct list_head list; |
83 | bdaddr_t bdaddr; | 83 | bdaddr_t bdaddr; |
84 | u8 bdaddr_type; | ||
84 | }; | 85 | }; |
85 | 86 | ||
86 | struct bt_uuid { | 87 | struct bt_uuid { |
@@ -141,6 +142,7 @@ struct hci_dev { | |||
141 | __u8 dev_type; | 142 | __u8 dev_type; |
142 | bdaddr_t bdaddr; | 143 | bdaddr_t bdaddr; |
143 | bdaddr_t static_addr; | 144 | bdaddr_t static_addr; |
145 | __u8 own_addr_type; | ||
144 | __u8 dev_name[HCI_MAX_NAME_LENGTH]; | 146 | __u8 dev_name[HCI_MAX_NAME_LENGTH]; |
145 | __u8 short_name[HCI_MAX_SHORT_NAME_LENGTH]; | 147 | __u8 short_name[HCI_MAX_SHORT_NAME_LENGTH]; |
146 | __u8 eir[HCI_MAX_EIR_LENGTH]; | 148 | __u8 eir[HCI_MAX_EIR_LENGTH]; |
@@ -167,6 +169,9 @@ struct hci_dev { | |||
167 | __u8 page_scan_type; | 169 | __u8 page_scan_type; |
168 | __u16 le_scan_interval; | 170 | __u16 le_scan_interval; |
169 | __u16 le_scan_window; | 171 | __u16 le_scan_window; |
172 | __u16 le_conn_min_interval; | ||
173 | __u16 le_conn_max_interval; | ||
174 | __u8 ssp_debug_mode; | ||
170 | 175 | ||
171 | __u16 devid_source; | 176 | __u16 devid_source; |
172 | __u16 devid_vendor; | 177 | __u16 devid_vendor; |
@@ -283,6 +288,8 @@ struct hci_dev { | |||
283 | __s8 adv_tx_power; | 288 | __s8 adv_tx_power; |
284 | __u8 adv_data[HCI_MAX_AD_LENGTH]; | 289 | __u8 adv_data[HCI_MAX_AD_LENGTH]; |
285 | __u8 adv_data_len; | 290 | __u8 adv_data_len; |
291 | __u8 scan_rsp_data[HCI_MAX_AD_LENGTH]; | ||
292 | __u8 scan_rsp_data_len; | ||
286 | 293 | ||
287 | int (*open)(struct hci_dev *hdev); | 294 | int (*open)(struct hci_dev *hdev); |
288 | int (*close)(struct hci_dev *hdev); | 295 | int (*close)(struct hci_dev *hdev); |
@@ -311,7 +318,6 @@ struct hci_conn { | |||
311 | __u8 attempt; | 318 | __u8 attempt; |
312 | __u8 dev_class[3]; | 319 | __u8 dev_class[3]; |
313 | __u8 features[HCI_MAX_PAGES][8]; | 320 | __u8 features[HCI_MAX_PAGES][8]; |
314 | __u16 interval; | ||
315 | __u16 pkt_type; | 321 | __u16 pkt_type; |
316 | __u16 link_policy; | 322 | __u16 link_policy; |
317 | __u32 link_mode; | 323 | __u32 link_mode; |
@@ -339,8 +345,8 @@ struct hci_conn { | |||
339 | struct list_head chan_list; | 345 | struct list_head chan_list; |
340 | 346 | ||
341 | struct delayed_work disc_work; | 347 | struct delayed_work disc_work; |
342 | struct timer_list idle_timer; | 348 | struct delayed_work auto_accept_work; |
343 | struct timer_list auto_accept_timer; | 349 | struct delayed_work idle_work; |
344 | 350 | ||
345 | struct device dev; | 351 | struct device dev; |
346 | 352 | ||
@@ -648,7 +654,7 @@ static inline void hci_conn_drop(struct hci_conn *conn) | |||
648 | switch (conn->type) { | 654 | switch (conn->type) { |
649 | case ACL_LINK: | 655 | case ACL_LINK: |
650 | case LE_LINK: | 656 | case LE_LINK: |
651 | del_timer(&conn->idle_timer); | 657 | cancel_delayed_work(&conn->idle_work); |
652 | if (conn->state == BT_CONNECTED) { | 658 | if (conn->state == BT_CONNECTED) { |
653 | timeo = conn->disc_timeout; | 659 | timeo = conn->disc_timeout; |
654 | if (!conn->out) | 660 | if (!conn->out) |
@@ -729,7 +735,7 @@ int hci_get_auth_info(struct hci_dev *hdev, void __user *arg); | |||
729 | int hci_inquiry(void __user *arg); | 735 | int hci_inquiry(void __user *arg); |
730 | 736 | ||
731 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, | 737 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, |
732 | bdaddr_t *bdaddr); | 738 | bdaddr_t *bdaddr, u8 type); |
733 | int hci_blacklist_clear(struct hci_dev *hdev); | 739 | int hci_blacklist_clear(struct hci_dev *hdev); |
734 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 740 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
735 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 741 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
@@ -764,8 +770,6 @@ int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); | |||
764 | int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count); | 770 | int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count); |
765 | 771 | ||
766 | void hci_init_sysfs(struct hci_dev *hdev); | 772 | void hci_init_sysfs(struct hci_dev *hdev); |
767 | int hci_add_sysfs(struct hci_dev *hdev); | ||
768 | void hci_del_sysfs(struct hci_dev *hdev); | ||
769 | void hci_conn_init_sysfs(struct hci_conn *conn); | 773 | void hci_conn_init_sysfs(struct hci_conn *conn); |
770 | void hci_conn_add_sysfs(struct hci_conn *conn); | 774 | void hci_conn_add_sysfs(struct hci_conn *conn); |
771 | void hci_conn_del_sysfs(struct hci_conn *conn); | 775 | void hci_conn_del_sysfs(struct hci_conn *conn); |
@@ -1008,34 +1012,6 @@ static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) | |||
1008 | return false; | 1012 | return false; |
1009 | } | 1013 | } |
1010 | 1014 | ||
1011 | static inline size_t eir_get_length(u8 *eir, size_t eir_len) | ||
1012 | { | ||
1013 | size_t parsed = 0; | ||
1014 | |||
1015 | while (parsed < eir_len) { | ||
1016 | u8 field_len = eir[0]; | ||
1017 | |||
1018 | if (field_len == 0) | ||
1019 | return parsed; | ||
1020 | |||
1021 | parsed += field_len + 1; | ||
1022 | eir += field_len + 1; | ||
1023 | } | ||
1024 | |||
1025 | return eir_len; | ||
1026 | } | ||
1027 | |||
1028 | static inline u16 eir_append_data(u8 *eir, u16 eir_len, u8 type, u8 *data, | ||
1029 | u8 data_len) | ||
1030 | { | ||
1031 | eir[eir_len++] = sizeof(type) + data_len; | ||
1032 | eir[eir_len++] = type; | ||
1033 | memcpy(&eir[eir_len], data, data_len); | ||
1034 | eir_len += data_len; | ||
1035 | |||
1036 | return eir_len; | ||
1037 | } | ||
1038 | |||
1039 | int hci_register_cb(struct hci_cb *hcb); | 1015 | int hci_register_cb(struct hci_cb *hcb); |
1040 | int hci_unregister_cb(struct hci_cb *hcb); | 1016 | int hci_unregister_cb(struct hci_cb *hcb); |
1041 | 1017 | ||
@@ -1099,11 +1075,12 @@ void mgmt_index_added(struct hci_dev *hdev); | |||
1099 | void mgmt_index_removed(struct hci_dev *hdev); | 1075 | void mgmt_index_removed(struct hci_dev *hdev); |
1100 | void mgmt_set_powered_failed(struct hci_dev *hdev, int err); | 1076 | void mgmt_set_powered_failed(struct hci_dev *hdev, int err); |
1101 | int mgmt_powered(struct hci_dev *hdev, u8 powered); | 1077 | int mgmt_powered(struct hci_dev *hdev, u8 powered); |
1102 | int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable); | 1078 | void mgmt_discoverable_timeout(struct hci_dev *hdev); |
1103 | int mgmt_connectable(struct hci_dev *hdev, u8 connectable); | 1079 | void mgmt_discoverable(struct hci_dev *hdev, u8 discoverable); |
1104 | int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); | 1080 | void mgmt_connectable(struct hci_dev *hdev, u8 connectable); |
1105 | int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, | 1081 | void mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); |
1106 | bool persistent); | 1082 | void mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, |
1083 | bool persistent); | ||
1107 | void mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1084 | void mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
1108 | u8 addr_type, u32 flags, u8 *name, u8 name_len, | 1085 | u8 addr_type, u32 flags, u8 *name, u8 name_len, |
1109 | u8 *dev_class); | 1086 | u8 *dev_class); |
@@ -1113,11 +1090,11 @@ void mgmt_disconnect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, | |||
1113 | u8 link_type, u8 addr_type, u8 status); | 1090 | u8 link_type, u8 addr_type, u8 status); |
1114 | void mgmt_connect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1091 | void mgmt_connect_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
1115 | u8 addr_type, u8 status); | 1092 | u8 addr_type, u8 status); |
1116 | int mgmt_pin_code_request(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 secure); | 1093 | void mgmt_pin_code_request(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 secure); |
1117 | int mgmt_pin_code_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1094 | void mgmt_pin_code_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1118 | u8 status); | 1095 | u8 status); |
1119 | int mgmt_pin_code_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1096 | void mgmt_pin_code_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1120 | u8 status); | 1097 | u8 status); |
1121 | int mgmt_user_confirm_request(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1098 | int mgmt_user_confirm_request(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1122 | u8 link_type, u8 addr_type, __le32 value, | 1099 | u8 link_type, u8 addr_type, __le32 value, |
1123 | u8 confirm_hint); | 1100 | u8 confirm_hint); |
@@ -1134,15 +1111,15 @@ int mgmt_user_passkey_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, | |||
1134 | int mgmt_user_passkey_notify(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1111 | int mgmt_user_passkey_notify(struct hci_dev *hdev, bdaddr_t *bdaddr, |
1135 | u8 link_type, u8 addr_type, u32 passkey, | 1112 | u8 link_type, u8 addr_type, u32 passkey, |
1136 | u8 entered); | 1113 | u8 entered); |
1137 | int mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1114 | void mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
1138 | u8 addr_type, u8 status); | 1115 | u8 addr_type, u8 status); |
1139 | int mgmt_auth_enable_complete(struct hci_dev *hdev, u8 status); | 1116 | void mgmt_auth_enable_complete(struct hci_dev *hdev, u8 status); |
1140 | int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status); | 1117 | void mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status); |
1141 | int mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class, | 1118 | void mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class, |
1142 | u8 status); | 1119 | u8 status); |
1143 | int mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status); | 1120 | void mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status); |
1144 | int mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash, | 1121 | void mgmt_read_local_oob_data_reply_complete(struct hci_dev *hdev, u8 *hash, |
1145 | u8 *randomizer, u8 status); | 1122 | u8 *randomizer, u8 status); |
1146 | void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 1123 | void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
1147 | u8 addr_type, u8 *dev_class, s8 rssi, u8 cfm_name, | 1124 | u8 addr_type, u8 *dev_class, s8 rssi, u8 cfm_name, |
1148 | u8 ssp, u8 *eir, u16 eir_len); | 1125 | u8 ssp, u8 *eir, u16 eir_len); |
@@ -1151,7 +1128,7 @@ void mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
1151 | void mgmt_discovering(struct hci_dev *hdev, u8 discovering); | 1128 | void mgmt_discovering(struct hci_dev *hdev, u8 discovering); |
1152 | int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 1129 | int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
1153 | int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 1130 | int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
1154 | int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent); | 1131 | void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent); |
1155 | void mgmt_reenable_advertising(struct hci_dev *hdev); | 1132 | void mgmt_reenable_advertising(struct hci_dev *hdev); |
1156 | 1133 | ||
1157 | /* HCI info for socket */ | 1134 | /* HCI info for socket */ |
@@ -1182,8 +1159,6 @@ struct hci_sec_filter { | |||
1182 | #define hci_req_lock(d) mutex_lock(&d->req_lock) | 1159 | #define hci_req_lock(d) mutex_lock(&d->req_lock) |
1183 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) | 1160 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) |
1184 | 1161 | ||
1185 | void hci_update_ad(struct hci_request *req); | ||
1186 | |||
1187 | void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, | 1162 | void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, |
1188 | u16 latency, u16 to_multiplier); | 1163 | u16 latency, u16 to_multiplier); |
1189 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], | 1164 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 07757a2af942..51329905bfaa 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -435,8 +435,6 @@ struct l2cap_seq_list { | |||
435 | #define L2CAP_SEQ_LIST_TAIL 0x8000 | 435 | #define L2CAP_SEQ_LIST_TAIL 0x8000 |
436 | 436 | ||
437 | struct l2cap_chan { | 437 | struct l2cap_chan { |
438 | struct sock *sk; | ||
439 | |||
440 | struct l2cap_conn *conn; | 438 | struct l2cap_conn *conn; |
441 | struct hci_conn *hs_hcon; | 439 | struct hci_conn *hs_hcon; |
442 | struct hci_chan *hs_hchan; | 440 | struct hci_chan *hs_hchan; |
@@ -551,10 +549,12 @@ struct l2cap_ops { | |||
551 | void (*teardown) (struct l2cap_chan *chan, int err); | 549 | void (*teardown) (struct l2cap_chan *chan, int err); |
552 | void (*close) (struct l2cap_chan *chan); | 550 | void (*close) (struct l2cap_chan *chan); |
553 | void (*state_change) (struct l2cap_chan *chan, | 551 | void (*state_change) (struct l2cap_chan *chan, |
554 | int state); | 552 | int state, int err); |
555 | void (*ready) (struct l2cap_chan *chan); | 553 | void (*ready) (struct l2cap_chan *chan); |
556 | void (*defer) (struct l2cap_chan *chan); | 554 | void (*defer) (struct l2cap_chan *chan); |
557 | void (*resume) (struct l2cap_chan *chan); | 555 | void (*resume) (struct l2cap_chan *chan); |
556 | void (*set_shutdown) (struct l2cap_chan *chan); | ||
557 | long (*get_sndtimeo) (struct l2cap_chan *chan); | ||
558 | struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, | 558 | struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, |
559 | unsigned long len, int nb); | 559 | unsigned long len, int nb); |
560 | }; | 560 | }; |
@@ -795,6 +795,19 @@ static inline void l2cap_chan_no_defer(struct l2cap_chan *chan) | |||
795 | { | 795 | { |
796 | } | 796 | } |
797 | 797 | ||
798 | static inline void l2cap_chan_no_resume(struct l2cap_chan *chan) | ||
799 | { | ||
800 | } | ||
801 | |||
802 | static inline void l2cap_chan_no_set_shutdown(struct l2cap_chan *chan) | ||
803 | { | ||
804 | } | ||
805 | |||
806 | static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan) | ||
807 | { | ||
808 | return 0; | ||
809 | } | ||
810 | |||
798 | extern bool disable_ertm; | 811 | extern bool disable_ertm; |
799 | 812 | ||
800 | int l2cap_init_sockets(void); | 813 | int l2cap_init_sockets(void); |
@@ -802,7 +815,6 @@ void l2cap_cleanup_sockets(void); | |||
802 | bool l2cap_is_socket(struct socket *sock); | 815 | bool l2cap_is_socket(struct socket *sock); |
803 | 816 | ||
804 | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan); | 817 | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan); |
805 | int __l2cap_wait_ack(struct sock *sk); | ||
806 | 818 | ||
807 | int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm); | 819 | int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm); |
808 | int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); | 820 | int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 419202ce3f95..3eae46cb1acf 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -744,6 +744,10 @@ enum station_parameters_apply_mask { | |||
744 | * @capability: station capability | 744 | * @capability: station capability |
745 | * @ext_capab: extended capabilities of the station | 745 | * @ext_capab: extended capabilities of the station |
746 | * @ext_capab_len: number of extended capabilities | 746 | * @ext_capab_len: number of extended capabilities |
747 | * @supported_channels: supported channels in IEEE 802.11 format | ||
748 | * @supported_channels_len: number of supported channels | ||
749 | * @supported_oper_classes: supported oper classes in IEEE 802.11 format | ||
750 | * @supported_oper_classes_len: number of supported operating classes | ||
747 | */ | 751 | */ |
748 | struct station_parameters { | 752 | struct station_parameters { |
749 | const u8 *supported_rates; | 753 | const u8 *supported_rates; |
@@ -763,6 +767,10 @@ struct station_parameters { | |||
763 | u16 capability; | 767 | u16 capability; |
764 | const u8 *ext_capab; | 768 | const u8 *ext_capab; |
765 | u8 ext_capab_len; | 769 | u8 ext_capab_len; |
770 | const u8 *supported_channels; | ||
771 | u8 supported_channels_len; | ||
772 | const u8 *supported_oper_classes; | ||
773 | u8 supported_oper_classes_len; | ||
766 | }; | 774 | }; |
767 | 775 | ||
768 | /** | 776 | /** |
@@ -1656,6 +1664,9 @@ struct cfg80211_disassoc_request { | |||
1656 | * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is | 1664 | * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is |
1657 | * required to assume that the port is unauthorized until authorized by | 1665 | * required to assume that the port is unauthorized until authorized by |
1658 | * user space. Otherwise, port is marked authorized by default. | 1666 | * user space. Otherwise, port is marked authorized by default. |
1667 | * @userspace_handles_dfs: whether user space controls DFS operation, i.e. | ||
1668 | * changes the channel when a radar is detected. This is required | ||
1669 | * to operate on DFS channels. | ||
1659 | * @basic_rates: bitmap of basic rates to use when creating the IBSS | 1670 | * @basic_rates: bitmap of basic rates to use when creating the IBSS |
1660 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) | 1671 | * @mcast_rate: per-band multicast rate index + 1 (0: disabled) |
1661 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask | 1672 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask |
@@ -1673,6 +1684,7 @@ struct cfg80211_ibss_params { | |||
1673 | bool channel_fixed; | 1684 | bool channel_fixed; |
1674 | bool privacy; | 1685 | bool privacy; |
1675 | bool control_port; | 1686 | bool control_port; |
1687 | bool userspace_handles_dfs; | ||
1676 | int mcast_rate[IEEE80211_NUM_BANDS]; | 1688 | int mcast_rate[IEEE80211_NUM_BANDS]; |
1677 | struct ieee80211_ht_cap ht_capa; | 1689 | struct ieee80211_ht_cap ht_capa; |
1678 | struct ieee80211_ht_cap ht_capa_mask; | 1690 | struct ieee80211_ht_cap ht_capa_mask; |
@@ -3053,6 +3065,7 @@ struct cfg80211_cached_keys; | |||
3053 | * @conn: (private) cfg80211 software SME connection state machine data | 3065 | * @conn: (private) cfg80211 software SME connection state machine data |
3054 | * @connect_keys: (private) keys to set after connection is established | 3066 | * @connect_keys: (private) keys to set after connection is established |
3055 | * @ibss_fixed: (private) IBSS is using fixed BSSID | 3067 | * @ibss_fixed: (private) IBSS is using fixed BSSID |
3068 | * @ibss_dfs_possible: (private) IBSS may change to a DFS channel | ||
3056 | * @event_list: (private) list for internal event processing | 3069 | * @event_list: (private) list for internal event processing |
3057 | * @event_lock: (private) lock for event list | 3070 | * @event_lock: (private) lock for event list |
3058 | */ | 3071 | */ |
@@ -3091,6 +3104,7 @@ struct wireless_dev { | |||
3091 | struct ieee80211_channel *channel; | 3104 | struct ieee80211_channel *channel; |
3092 | 3105 | ||
3093 | bool ibss_fixed; | 3106 | bool ibss_fixed; |
3107 | bool ibss_dfs_possible; | ||
3094 | 3108 | ||
3095 | bool ps; | 3109 | bool ps; |
3096 | int ps_timeout; | 3110 | int ps_timeout; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index f386c480e134..7ceed99a05bc 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1503,6 +1503,10 @@ struct ieee80211_tx_control { | |||
1503 | * @IEEE80211_HW_TIMING_BEACON_ONLY: Use sync timing from beacon frames | 1503 | * @IEEE80211_HW_TIMING_BEACON_ONLY: Use sync timing from beacon frames |
1504 | * only, to allow getting TBTT of a DTIM beacon. | 1504 | * only, to allow getting TBTT of a DTIM beacon. |
1505 | * | 1505 | * |
1506 | * @IEEE80211_HW_SUPPORTS_HT_CCK_RATES: Hardware supports mixing HT/CCK rates | ||
1507 | * and can cope with CCK rates in an aggregation session (e.g. by not | ||
1508 | * using aggregation for such frames.) | ||
1509 | * | ||
1506 | * @IEEE80211_HW_CHANCTX_STA_CSA: Support 802.11h based channel-switch (CSA) | 1510 | * @IEEE80211_HW_CHANCTX_STA_CSA: Support 802.11h based channel-switch (CSA) |
1507 | * for a single active channel while using channel contexts. When support | 1511 | * for a single active channel while using channel contexts. When support |
1508 | * is not enabled the default action is to disconnect when getting the | 1512 | * is not enabled the default action is to disconnect when getting the |
@@ -4567,4 +4571,18 @@ void ieee80211_report_wowlan_wakeup(struct ieee80211_vif *vif, | |||
4567 | struct cfg80211_wowlan_wakeup *wakeup, | 4571 | struct cfg80211_wowlan_wakeup *wakeup, |
4568 | gfp_t gfp); | 4572 | gfp_t gfp); |
4569 | 4573 | ||
4574 | /** | ||
4575 | * ieee80211_tx_prepare_skb - prepare an 802.11 skb for transmission | ||
4576 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
4577 | * @vif: virtual interface | ||
4578 | * @skb: frame to be sent from within the driver | ||
4579 | * @band: the band to transmit on | ||
4580 | * @sta: optional pointer to get the station to send the frame to | ||
4581 | * | ||
4582 | * Note: must be called under RCU lock | ||
4583 | */ | ||
4584 | bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, | ||
4585 | struct ieee80211_vif *vif, struct sk_buff *skb, | ||
4586 | int band, struct ieee80211_sta **sta); | ||
4587 | |||
4570 | #endif /* MAC80211_H */ | 4588 | #endif /* MAC80211_H */ |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index fde2c021b26d..f752e9821e71 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -988,7 +988,7 @@ enum nl80211_commands { | |||
988 | * to query the CRDA to retrieve one regulatory domain. This attribute can | 988 | * to query the CRDA to retrieve one regulatory domain. This attribute can |
989 | * also be used by userspace to query the kernel for the currently set | 989 | * also be used by userspace to query the kernel for the currently set |
990 | * regulatory domain. We chose an alpha2 as that is also used by the | 990 | * regulatory domain. We chose an alpha2 as that is also used by the |
991 | * IEEE-802.11d country information element to identify a country. | 991 | * IEEE-802.11 country information element to identify a country. |
992 | * Users can also simply ask the wireless core to set regulatory domain | 992 | * Users can also simply ask the wireless core to set regulatory domain |
993 | * to a specific alpha2. | 993 | * to a specific alpha2. |
994 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory | 994 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory |
@@ -1496,6 +1496,18 @@ enum nl80211_commands { | |||
1496 | * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. | 1496 | * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. |
1497 | * As specified in the &enum nl80211_rxmgmt_flags. | 1497 | * As specified in the &enum nl80211_rxmgmt_flags. |
1498 | * | 1498 | * |
1499 | * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels. | ||
1500 | * | ||
1501 | * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported | ||
1502 | * supported operating classes. | ||
1503 | * | ||
1504 | * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space | ||
1505 | * controls DFS operation in IBSS mode. If the flag is included in | ||
1506 | * %NL80211_CMD_JOIN_IBSS request, the driver will allow use of DFS | ||
1507 | * channels and reports radar events to userspace. Userspace is required | ||
1508 | * to react to radar events, e.g. initiate a channel switch or leave the | ||
1509 | * IBSS network. | ||
1510 | * | ||
1499 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1511 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1500 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1512 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1501 | */ | 1513 | */ |
@@ -1806,6 +1818,12 @@ enum nl80211_attrs { | |||
1806 | 1818 | ||
1807 | NL80211_ATTR_RXMGMT_FLAGS, | 1819 | NL80211_ATTR_RXMGMT_FLAGS, |
1808 | 1820 | ||
1821 | NL80211_ATTR_STA_SUPPORTED_CHANNELS, | ||
1822 | |||
1823 | NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES, | ||
1824 | |||
1825 | NL80211_ATTR_HANDLE_DFS, | ||
1826 | |||
1809 | /* add attributes here, update the policy in nl80211.c */ | 1827 | /* add attributes here, update the policy in nl80211.c */ |
1810 | 1828 | ||
1811 | __NL80211_ATTR_AFTER_LAST, | 1829 | __NL80211_ATTR_AFTER_LAST, |
@@ -3860,13 +3878,12 @@ enum nl80211_radar_event { | |||
3860 | * | 3878 | * |
3861 | * Channel states used by the DFS code. | 3879 | * Channel states used by the DFS code. |
3862 | * | 3880 | * |
3863 | * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability | 3881 | * @NL80211_DFS_USABLE: The channel can be used, but channel availability |
3864 | * check (CAC) must be performed before using it for AP or IBSS. | 3882 | * check (CAC) must be performed before using it for AP or IBSS. |
3865 | * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it | 3883 | * @NL80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it |
3866 | * is therefore marked as not available. | 3884 | * is therefore marked as not available. |
3867 | * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available. | 3885 | * @NL80211_DFS_AVAILABLE: The channel has been CAC checked and is available. |
3868 | */ | 3886 | */ |
3869 | |||
3870 | enum nl80211_dfs_state { | 3887 | enum nl80211_dfs_state { |
3871 | NL80211_DFS_USABLE, | 3888 | NL80211_DFS_USABLE, |
3872 | NL80211_DFS_UNAVAILABLE, | 3889 | NL80211_DFS_UNAVAILABLE, |