aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-07-01 16:21:17 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-01 16:21:17 -0400
commite62bc9e55f75ecb41dac3e68cd4b61f9d9501f72 (patch)
tree0437bf3c50de5e1b1ef2b9d73cd802223158232a /include/net
parentfb825a550a1af75323cee9d62d6fb818384c8c95 (diff)
parent57ed5cd695d7373b8ae0ae9f10fe945e774d58f0 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== Yet one more pull request for wireless updates intended for 3.11... For the mac80211 bits, Johannes says: "Here we have a few memory leak fixes related to BSS struct handling mostly from Ben, including a fix for a more theoretical problem (associating while a BSS struct times out) from myself, a compilation warning fix from Arend, mesh fixes from Thomas, tracking the beacon bitrate (Alex), a bandwidth change event fix (Ilan) and some initial work for 5/10 MHz channels from Simon." Regarding the iwlwifi bits, Johannes says: "Emmanuel removed some unneeded/unsupported module parameters and adds a Bluetooth 1x1 lookup-table for some upcoming products. From Alex I have an older patch to add low-power receive support, this depended on a mac80211 commit that only just came in with the merge from wireless-next I did. Ilan made beacon timings better, and Eytan added some debug statements for thermal throttling. I have a few cleanups, a fix for a long-standing but rare warning, and, arguably the most important patch here, the firmware API version bump for the 7260/3160 devices." Also included is a Bluetooth pull -- Gustavo says: "Here goes a set of patches to 3.11. The biggest work here is from Andre Guedes on the move of the Discovery to use the new request framework. Other than that Johan provided a bunch of fixes to the L2CAP code. The rest are just small fixes and clean ups." On top of all that, there are a variety of updates and fixes to brcmfmac, rt2x00, wil6210, ath9k, ath10k, and a few others here and there. This also includes a pull of the wireless tree, in order to prevent some merge conflicts. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h1
-rw-r--r--include/net/bluetooth/hci_core.h29
-rw-r--r--include/net/bluetooth/l2cap.h2
-rw-r--r--include/net/cfg80211.h46
-rw-r--r--include/net/mac80211.h2
5 files changed, 52 insertions, 28 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index e0512aaef4b8..3c592cf473da 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -107,7 +107,6 @@ enum {
107 HCI_MGMT, 107 HCI_MGMT,
108 HCI_PAIRABLE, 108 HCI_PAIRABLE,
109 HCI_SERVICE_CACHE, 109 HCI_SERVICE_CACHE,
110 HCI_LINK_KEYS,
111 HCI_DEBUG_KEYS, 110 HCI_DEBUG_KEYS,
112 HCI_UNREGISTER, 111 HCI_UNREGISTER,
113 112
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 7cb6d360d147..f77885ea78c2 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -117,13 +117,6 @@ struct oob_data {
117 u8 randomizer[16]; 117 u8 randomizer[16];
118}; 118};
119 119
120struct le_scan_params {
121 u8 type;
122 u16 interval;
123 u16 window;
124 int timeout;
125};
126
127#define HCI_MAX_SHORT_NAME_LENGTH 10 120#define HCI_MAX_SHORT_NAME_LENGTH 10
128 121
129struct amp_assoc { 122struct amp_assoc {
@@ -283,9 +276,6 @@ struct hci_dev {
283 276
284 struct delayed_work le_scan_disable; 277 struct delayed_work le_scan_disable;
285 278
286 struct work_struct le_scan;
287 struct le_scan_params le_scan_params;
288
289 __s8 adv_tx_power; 279 __s8 adv_tx_power;
290 __u8 adv_data[HCI_MAX_AD_LENGTH]; 280 __u8 adv_data[HCI_MAX_AD_LENGTH];
291 __u8 adv_data_len; 281 __u8 adv_data_len;
@@ -432,6 +422,7 @@ void hci_inquiry_cache_update_resolve(struct hci_dev *hdev,
432 struct inquiry_entry *ie); 422 struct inquiry_entry *ie);
433bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, 423bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
434 bool name_known, bool *ssp); 424 bool name_known, bool *ssp);
425void hci_inquiry_cache_flush(struct hci_dev *hdev);
435 426
436/* ----- HCI Connections ----- */ 427/* ----- HCI Connections ----- */
437enum { 428enum {
@@ -1114,6 +1105,16 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event);
1114 BIT(BDADDR_LE_PUBLIC) | \ 1105 BIT(BDADDR_LE_PUBLIC) | \
1115 BIT(BDADDR_LE_RANDOM)) 1106 BIT(BDADDR_LE_RANDOM))
1116 1107
1108/* These LE scan and inquiry parameters were chosen according to LE General
1109 * Discovery Procedure specification.
1110 */
1111#define DISCOV_LE_SCAN_WIN 0x12
1112#define DISCOV_LE_SCAN_INT 0x12
1113#define DISCOV_LE_TIMEOUT msecs_to_jiffies(10240)
1114#define DISCOV_INTERLEAVED_TIMEOUT msecs_to_jiffies(5120)
1115#define DISCOV_INTERLEAVED_INQUIRY_LEN 0x04
1116#define DISCOV_BREDR_INQUIRY_LEN 0x08
1117
1117int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); 1118int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len);
1118int mgmt_index_added(struct hci_dev *hdev); 1119int mgmt_index_added(struct hci_dev *hdev);
1119int mgmt_index_removed(struct hci_dev *hdev); 1120int mgmt_index_removed(struct hci_dev *hdev);
@@ -1169,10 +1170,7 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
1169 u8 ssp, u8 *eir, u16 eir_len); 1170 u8 ssp, u8 *eir, u16 eir_len);
1170int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, 1171int mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
1171 u8 addr_type, s8 rssi, u8 *name, u8 name_len); 1172 u8 addr_type, s8 rssi, u8 *name, u8 name_len);
1172int mgmt_start_discovery_failed(struct hci_dev *hdev, u8 status);
1173int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status);
1174int mgmt_discovering(struct hci_dev *hdev, u8 discovering); 1173int mgmt_discovering(struct hci_dev *hdev, u8 discovering);
1175int mgmt_interleaved_discovery(struct hci_dev *hdev);
1176int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 1174int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
1177int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 1175int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
1178bool mgmt_valid_hdev(struct hci_dev *hdev); 1176bool mgmt_valid_hdev(struct hci_dev *hdev);
@@ -1212,11 +1210,6 @@ void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max,
1212 u16 latency, u16 to_multiplier); 1210 u16 latency, u16 to_multiplier);
1213void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8], 1211void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
1214 __u8 ltk[16]); 1212 __u8 ltk[16]);
1215int hci_do_inquiry(struct hci_dev *hdev, u8 length);
1216int hci_cancel_inquiry(struct hci_dev *hdev);
1217int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window,
1218 int timeout);
1219int hci_cancel_le_scan(struct hci_dev *hdev);
1220 1213
1221u8 bdaddr_to_le(u8 bdaddr_type); 1214u8 bdaddr_to_le(u8 bdaddr_type);
1222 1215
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index fb94cf13c777..1a966afbbfa8 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -242,7 +242,7 @@ struct l2cap_conn_rsp {
242#define L2CAP_CID_SIGNALING 0x0001 242#define L2CAP_CID_SIGNALING 0x0001
243#define L2CAP_CID_CONN_LESS 0x0002 243#define L2CAP_CID_CONN_LESS 0x0002
244#define L2CAP_CID_A2MP 0x0003 244#define L2CAP_CID_A2MP 0x0003
245#define L2CAP_CID_LE_DATA 0x0004 245#define L2CAP_CID_ATT 0x0004
246#define L2CAP_CID_LE_SIGNALING 0x0005 246#define L2CAP_CID_LE_SIGNALING 0x0005
247#define L2CAP_CID_SMP 0x0006 247#define L2CAP_CID_SMP 0x0006
248#define L2CAP_CID_DYN_START 0x0040 248#define L2CAP_CID_DYN_START 0x0040
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6a43c34ce96f..7b0730aeb892 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -188,6 +188,8 @@ struct ieee80211_channel {
188 * when used with 802.11g (on the 2.4 GHz band); filled by the 188 * when used with 802.11g (on the 2.4 GHz band); filled by the
189 * core code when registering the wiphy. 189 * core code when registering the wiphy.
190 * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode. 190 * @IEEE80211_RATE_ERP_G: This is an ERP rate in 802.11g mode.
191 * @IEEE80211_RATE_SUPPORTS_5MHZ: Rate can be used in 5 MHz mode
192 * @IEEE80211_RATE_SUPPORTS_10MHZ: Rate can be used in 10 MHz mode
191 */ 193 */
192enum ieee80211_rate_flags { 194enum ieee80211_rate_flags {
193 IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, 195 IEEE80211_RATE_SHORT_PREAMBLE = 1<<0,
@@ -195,6 +197,8 @@ enum ieee80211_rate_flags {
195 IEEE80211_RATE_MANDATORY_B = 1<<2, 197 IEEE80211_RATE_MANDATORY_B = 1<<2,
196 IEEE80211_RATE_MANDATORY_G = 1<<3, 198 IEEE80211_RATE_MANDATORY_G = 1<<3,
197 IEEE80211_RATE_ERP_G = 1<<4, 199 IEEE80211_RATE_ERP_G = 1<<4,
200 IEEE80211_RATE_SUPPORTS_5MHZ = 1<<5,
201 IEEE80211_RATE_SUPPORTS_10MHZ = 1<<6,
198}; 202};
199 203
200/** 204/**
@@ -433,6 +437,30 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
433 u32 prohibited_flags); 437 u32 prohibited_flags);
434 438
435/** 439/**
440 * ieee80211_chandef_rate_flags - returns rate flags for a channel
441 *
442 * In some channel types, not all rates may be used - for example CCK
443 * rates may not be used in 5/10 MHz channels.
444 *
445 * @chandef: channel definition for the channel
446 *
447 * Returns: rate flags which apply for this channel
448 */
449static inline enum ieee80211_rate_flags
450ieee80211_chandef_rate_flags(struct cfg80211_chan_def *chandef)
451{
452 switch (chandef->width) {
453 case NL80211_CHAN_WIDTH_5:
454 return IEEE80211_RATE_SUPPORTS_5MHZ;
455 case NL80211_CHAN_WIDTH_10:
456 return IEEE80211_RATE_SUPPORTS_10MHZ;
457 default:
458 break;
459 }
460 return 0;
461}
462
463/**
436 * enum survey_info_flags - survey information flags 464 * enum survey_info_flags - survey information flags
437 * 465 *
438 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in 466 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in
@@ -1431,7 +1459,8 @@ const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
1431 * This structure provides information needed to complete IEEE 802.11 1459 * This structure provides information needed to complete IEEE 802.11
1432 * authentication. 1460 * authentication.
1433 * 1461 *
1434 * @bss: The BSS to authenticate with. 1462 * @bss: The BSS to authenticate with, the callee must obtain a reference
1463 * to it if it needs to keep it.
1435 * @auth_type: Authentication type (algorithm) 1464 * @auth_type: Authentication type (algorithm)
1436 * @ie: Extra IEs to add to Authentication frame or %NULL 1465 * @ie: Extra IEs to add to Authentication frame or %NULL
1437 * @ie_len: Length of ie buffer in octets 1466 * @ie_len: Length of ie buffer in octets
@@ -1469,11 +1498,10 @@ enum cfg80211_assoc_req_flags {
1469 * 1498 *
1470 * This structure provides information needed to complete IEEE 802.11 1499 * This structure provides information needed to complete IEEE 802.11
1471 * (re)association. 1500 * (re)association.
1472 * @bss: The BSS to associate with. If the call is successful the driver 1501 * @bss: The BSS to associate with. If the call is successful the driver is
1473 * is given a reference that it must release, normally via a call to 1502 * given a reference that it must give back to cfg80211_send_rx_assoc()
1474 * cfg80211_send_rx_assoc(), or, if association timed out, with a 1503 * or to cfg80211_assoc_timeout(). To ensure proper refcounting, new
1475 * call to cfg80211_put_bss() (in addition to calling 1504 * association requests while already associating must be rejected.
1476 * cfg80211_send_assoc_timeout())
1477 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL 1505 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL
1478 * @ie_len: Length of ie buffer in octets 1506 * @ie_len: Length of ie buffer in octets
1479 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association 1507 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association
@@ -2342,6 +2370,7 @@ struct cfg80211_ops {
2342 * responds to probe-requests in hardware. 2370 * responds to probe-requests in hardware.
2343 * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX. 2371 * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX.
2344 * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call. 2372 * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call.
2373 * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels.
2345 */ 2374 */
2346enum wiphy_flags { 2375enum wiphy_flags {
2347 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 2376 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -2365,6 +2394,7 @@ enum wiphy_flags {
2365 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), 2394 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19),
2366 WIPHY_FLAG_OFFCHAN_TX = BIT(20), 2395 WIPHY_FLAG_OFFCHAN_TX = BIT(20),
2367 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21), 2396 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL = BIT(21),
2397 WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22),
2368}; 2398};
2369 2399
2370/** 2400/**
@@ -3492,11 +3522,11 @@ void cfg80211_rx_assoc_resp(struct net_device *dev,
3492/** 3522/**
3493 * cfg80211_assoc_timeout - notification of timed out association 3523 * cfg80211_assoc_timeout - notification of timed out association
3494 * @dev: network device 3524 * @dev: network device
3495 * @addr: The MAC address of the device with which the association timed out 3525 * @bss: The BSS entry with which association timed out.
3496 * 3526 *
3497 * This function may sleep. The caller must hold the corresponding wdev's mutex. 3527 * This function may sleep. The caller must hold the corresponding wdev's mutex.
3498 */ 3528 */
3499void cfg80211_assoc_timeout(struct net_device *dev, const u8 *addr); 3529void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss);
3500 3530
3501/** 3531/**
3502 * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame 3532 * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a405a7a9775c..5b7a3dadadde 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -305,6 +305,7 @@ enum ieee80211_rssi_event {
305 * @basic_rates: bitmap of basic rates, each bit stands for an 305 * @basic_rates: bitmap of basic rates, each bit stands for an
306 * index into the rate table configured by the driver in 306 * index into the rate table configured by the driver in
307 * the current band. 307 * the current band.
308 * @beacon_rate: associated AP's beacon TX rate
308 * @mcast_rate: per-band multicast rate index + 1 (0: disabled) 309 * @mcast_rate: per-band multicast rate index + 1 (0: disabled)
309 * @bssid: The BSSID for this BSS 310 * @bssid: The BSSID for this BSS
310 * @enable_beacon: whether beaconing should be enabled or not 311 * @enable_beacon: whether beaconing should be enabled or not
@@ -352,6 +353,7 @@ struct ieee80211_bss_conf {
352 u32 sync_device_ts; 353 u32 sync_device_ts;
353 u8 sync_dtim_count; 354 u8 sync_dtim_count;
354 u32 basic_rates; 355 u32 basic_rates;
356 struct ieee80211_rate *beacon_rate;
355 int mcast_rate[IEEE80211_NUM_BANDS]; 357 int mcast_rate[IEEE80211_NUM_BANDS];
356 u16 ht_operation_mode; 358 u16 ht_operation_mode;
357 s32 cqm_rssi_thold; 359 s32 cqm_rssi_thold;