aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-09 18:12:03 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-09 18:12:03 -0500
commitb5f185f33d0432cef6ff78765e033dfa8f4de068 (patch)
tree33179c016b8fc3b4d57ed7a7786079ba00b6ef4a /include/net
parent450fa21942fe2c37f0c9f52d1a33bbc081eee288 (diff)
parent81c412600f946fc1c8731685cb6c6fae8002043a (diff)
Merge tag 'master-2014-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== pull request: wireless-next 2014-12-08 Please pull this last batch of pending wireless updates for the 3.19 tree... For the wireless bits, Johannes says: "This time I have Felix's no-status rate control work, which will allow drivers to work better with rate control even if they don't have perfect status reporting. In addition to this, a small hwsim fix from Patrik, one of the regulatory patches from Arik, and a number of cleanups and fixes I did myself. Of note is a patch where I disable CFG80211_WEXT so that compatibility is no longer selectable - this is intended as a wake-up call for anyone who's still using it, and is still easily worked around (it's a one-line patch) before we fully remove the code as well in the future." For the Bluetooth bits, Johan says: "Here's one more bluetooth-next pull request for 3.19: - Minor cleanups for ieee802154 & mac802154 - Fix for the kernel warning with !TASK_RUNNING reported by Kirill A. Shutemov - Support for another ath3k device - Fix for tracking link key based security level - Device tree bindings for btmrvl + a state update fix - Fix for wrong ACL flags on LE links" And... "In addition to the previous one this contains two more cleanups to mac802154 as well as support for some new HCI features from the Bluetooth 4.2 specification. From the original request: 'Here's what should be the last bluetooth-next pull request for 3.19. It's rather large but the majority of it is the Low Energy Secure Connections feature that's part of the Bluetooth 4.2 specification. The specification went public only this week so we couldn't publish the corresponding code before that. The code itself can nevertheless be considered fairly mature as it's been in development for over 6 months and gone through several interoperability test events. Besides LE SC the pull request contains an important fix for command complete events for mgmt sockets which also fixes some leaks of hci_conn objects when powering off or unplugging Bluetooth adapters. A smaller feature that's part of the pull request is service discovery support. This is like normal device discovery except that devices not matching specific UUIDs or strong enough RSSI are filtered out. Other changes that the pull request contains are firmware dump support to the btmrvl driver, firmware download support for Broadcom BCM20702A0 variants, as well as some coding style cleanups in 6lowpan & ieee802154/mac802154 code.'" For the NFC bits, Samuel says: "With this one we get: - NFC digital improvements for DEP support: Chaining, NACK and ATN support added. - NCI improvements: Support for p2p target, SE IO operand addition, SE operands extensions to support proprietary implementations, and a few fixes. - NFC HCI improvements: OPEN_PIPE and NOTIFY_ALL_CLEARED support, and SE IO operand addition. - A bunch of minor improvements and fixes for STMicro st21nfcb and st21nfca" For the iwlwifi bits, Emmanuel says: "Major works are CSA and TDLS. On top of that I have a new firmware API for scan and a few rate control improvements. Johannes find a few tricks to improve our CPU utilization and adds support for a new spin of 7265 called 7265D. Along with this a few random things that don't stand out." And... "I deprecate here -8.ucode since -9 has been published long ago. Along with that I have a new activity, we have now better a infrastructure for firmware debugging. This will allow to have configurable probes insides the firmware. Luca continues his work on NetDetect, this feature is now complete. All the rest is minor fixes here and there." For the Atheros bits, Kalle says: "Only ath10k changes this time and no major changes. Most visible are: o new debugfs interface for runtime firmware debugging (Yanbo) o fix shared WEP (Sujith) o don't rebuild whenever kernel version changes (Johannes) o lots of refactoring to make it easier to add new hw support (Michal) There's also smaller fixes and improvements with no point of listing here." In addition, there are a few last minute updates to ath5k, ath9k, brcmfmac, brcmsmac, mwifiex, rt2x00, rtlwifi, and wil6210. Also included is a pull of the wireless tree to pick-up the fixes originally included in "pull request: wireless 2014-12-03"... Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h41
-rw-r--r--include/net/bluetooth/hci_core.h39
-rw-r--r--include/net/bluetooth/l2cap.h6
-rw-r--r--include/net/bluetooth/mgmt.h12
-rw-r--r--include/net/cfg80211.h63
-rw-r--r--include/net/mac80211.h32
-rw-r--r--include/net/nfc/digital.h13
-rw-r--r--include/net/nfc/hci.h4
-rw-r--r--include/net/nfc/nci.h37
-rw-r--r--include/net/nfc/nci_core.h9
-rw-r--r--include/net/nfc/nfc.h2
-rw-r--r--include/net/regulatory.h12
12 files changed, 212 insertions, 58 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index e56f9099f8e3..40129b3838b2 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -163,6 +163,7 @@ enum {
163enum { 163enum {
164 HCI_DUT_MODE, 164 HCI_DUT_MODE,
165 HCI_FORCE_SC, 165 HCI_FORCE_SC,
166 HCI_FORCE_LESC,
166 HCI_FORCE_STATIC_ADDR, 167 HCI_FORCE_STATIC_ADDR,
167}; 168};
168 169
@@ -342,6 +343,7 @@ enum {
342#define HCI_LE_ENCRYPTION 0x01 343#define HCI_LE_ENCRYPTION 0x01
343#define HCI_LE_CONN_PARAM_REQ_PROC 0x02 344#define HCI_LE_CONN_PARAM_REQ_PROC 0x02
344#define HCI_LE_PING 0x10 345#define HCI_LE_PING 0x10
346#define HCI_LE_EXT_SCAN_POLICY 0x80
345 347
346/* Connection modes */ 348/* Connection modes */
347#define HCI_CM_ACTIVE 0x0000 349#define HCI_CM_ACTIVE 0x0000
@@ -411,6 +413,7 @@ enum {
411 413
412/* The core spec defines 127 as the "not available" value */ 414/* The core spec defines 127 as the "not available" value */
413#define HCI_TX_POWER_INVALID 127 415#define HCI_TX_POWER_INVALID 127
416#define HCI_RSSI_INVALID 127
414 417
415#define HCI_ROLE_MASTER 0x00 418#define HCI_ROLE_MASTER 0x00
416#define HCI_ROLE_SLAVE 0x01 419#define HCI_ROLE_SLAVE 0x01
@@ -1749,6 +1752,25 @@ struct hci_ev_le_conn_complete {
1749 __u8 clk_accurancy; 1752 __u8 clk_accurancy;
1750} __packed; 1753} __packed;
1751 1754
1755/* Advertising report event types */
1756#define LE_ADV_IND 0x00
1757#define LE_ADV_DIRECT_IND 0x01
1758#define LE_ADV_SCAN_IND 0x02
1759#define LE_ADV_NONCONN_IND 0x03
1760#define LE_ADV_SCAN_RSP 0x04
1761
1762#define ADDR_LE_DEV_PUBLIC 0x00
1763#define ADDR_LE_DEV_RANDOM 0x01
1764
1765#define HCI_EV_LE_ADVERTISING_REPORT 0x02
1766struct hci_ev_le_advertising_info {
1767 __u8 evt_type;
1768 __u8 bdaddr_type;
1769 bdaddr_t bdaddr;
1770 __u8 length;
1771 __u8 data[0];
1772} __packed;
1773
1752#define HCI_EV_LE_CONN_UPDATE_COMPLETE 0x03 1774#define HCI_EV_LE_CONN_UPDATE_COMPLETE 0x03
1753struct hci_ev_le_conn_update_complete { 1775struct hci_ev_le_conn_update_complete {
1754 __u8 status; 1776 __u8 status;
@@ -1774,23 +1796,14 @@ struct hci_ev_le_remote_conn_param_req {
1774 __le16 timeout; 1796 __le16 timeout;
1775} __packed; 1797} __packed;
1776 1798
1777/* Advertising report event types */ 1799#define HCI_EV_LE_DIRECT_ADV_REPORT 0x0B
1778#define LE_ADV_IND 0x00 1800struct hci_ev_le_direct_adv_info {
1779#define LE_ADV_DIRECT_IND 0x01
1780#define LE_ADV_SCAN_IND 0x02
1781#define LE_ADV_NONCONN_IND 0x03
1782#define LE_ADV_SCAN_RSP 0x04
1783
1784#define ADDR_LE_DEV_PUBLIC 0x00
1785#define ADDR_LE_DEV_RANDOM 0x01
1786
1787#define HCI_EV_LE_ADVERTISING_REPORT 0x02
1788struct hci_ev_le_advertising_info {
1789 __u8 evt_type; 1801 __u8 evt_type;
1790 __u8 bdaddr_type; 1802 __u8 bdaddr_type;
1791 bdaddr_t bdaddr; 1803 bdaddr_t bdaddr;
1792 __u8 length; 1804 __u8 direct_addr_type;
1793 __u8 data[0]; 1805 bdaddr_t direct_addr;
1806 __s8 rssi;
1794} __packed; 1807} __packed;
1795 1808
1796/* Internal events generated by Bluetooth stack */ 1809/* Internal events generated by Bluetooth stack */
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index a805b3d97c0b..3c7827005c25 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -75,6 +75,10 @@ struct discovery_state {
75 u32 last_adv_flags; 75 u32 last_adv_flags;
76 u8 last_adv_data[HCI_MAX_AD_LENGTH]; 76 u8 last_adv_data[HCI_MAX_AD_LENGTH];
77 u8 last_adv_data_len; 77 u8 last_adv_data_len;
78 bool report_invalid_rssi;
79 s8 rssi;
80 u16 uuid_count;
81 u8 (*uuids)[16];
78}; 82};
79 83
80struct hci_conn_hash { 84struct hci_conn_hash {
@@ -130,6 +134,7 @@ struct smp_irk {
130 134
131struct link_key { 135struct link_key {
132 struct list_head list; 136 struct list_head list;
137 struct rcu_head rcu;
133 bdaddr_t bdaddr; 138 bdaddr_t bdaddr;
134 u8 type; 139 u8 type;
135 u8 val[HCI_LINK_KEY_SIZE]; 140 u8 val[HCI_LINK_KEY_SIZE];
@@ -139,6 +144,7 @@ struct link_key {
139struct oob_data { 144struct oob_data {
140 struct list_head list; 145 struct list_head list;
141 bdaddr_t bdaddr; 146 bdaddr_t bdaddr;
147 u8 bdaddr_type;
142 u8 hash192[16]; 148 u8 hash192[16];
143 u8 rand192[16]; 149 u8 rand192[16];
144 u8 hash256[16]; 150 u8 hash256[16];
@@ -305,6 +311,7 @@ struct hci_dev {
305 __u32 req_result; 311 __u32 req_result;
306 312
307 void *smp_data; 313 void *smp_data;
314 void *smp_bredr_data;
308 315
309 struct discovery_state discovery; 316 struct discovery_state discovery;
310 struct hci_conn_hash conn_hash; 317 struct hci_conn_hash conn_hash;
@@ -500,6 +507,17 @@ static inline void discovery_init(struct hci_dev *hdev)
500 INIT_LIST_HEAD(&hdev->discovery.all); 507 INIT_LIST_HEAD(&hdev->discovery.all);
501 INIT_LIST_HEAD(&hdev->discovery.unknown); 508 INIT_LIST_HEAD(&hdev->discovery.unknown);
502 INIT_LIST_HEAD(&hdev->discovery.resolve); 509 INIT_LIST_HEAD(&hdev->discovery.resolve);
510 hdev->discovery.report_invalid_rssi = true;
511 hdev->discovery.rssi = HCI_RSSI_INVALID;
512}
513
514static inline void hci_discovery_filter_clear(struct hci_dev *hdev)
515{
516 hdev->discovery.report_invalid_rssi = true;
517 hdev->discovery.rssi = HCI_RSSI_INVALID;
518 hdev->discovery.uuid_count = 0;
519 kfree(hdev->discovery.uuids);
520 hdev->discovery.uuids = NULL;
503} 521}
504 522
505bool hci_discovery_active(struct hci_dev *hdev); 523bool hci_discovery_active(struct hci_dev *hdev);
@@ -558,6 +576,7 @@ enum {
558 HCI_CONN_AUTH_INITIATOR, 576 HCI_CONN_AUTH_INITIATOR,
559 HCI_CONN_DROP, 577 HCI_CONN_DROP,
560 HCI_CONN_PARAM_REMOVAL_PEND, 578 HCI_CONN_PARAM_REMOVAL_PEND,
579 HCI_CONN_NEW_LINK_KEY,
561}; 580};
562 581
563static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) 582static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
@@ -920,13 +939,11 @@ struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
920struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, 939struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn,
921 bdaddr_t *bdaddr, u8 *val, u8 type, 940 bdaddr_t *bdaddr, u8 *val, u8 type,
922 u8 pin_len, bool *persistent); 941 u8 pin_len, bool *persistent);
923struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, __le64 rand,
924 u8 role);
925struct smp_ltk *hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, 942struct smp_ltk *hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr,
926 u8 addr_type, u8 type, u8 authenticated, 943 u8 addr_type, u8 type, u8 authenticated,
927 u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand); 944 u8 tk[16], u8 enc_size, __le16 ediv, __le64 rand);
928struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, 945struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr,
929 u8 addr_type, u8 role); 946 u8 addr_type, u8 role);
930int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 bdaddr_type); 947int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 bdaddr_type);
931void hci_smp_ltks_clear(struct hci_dev *hdev); 948void hci_smp_ltks_clear(struct hci_dev *hdev);
932int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); 949int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
@@ -941,13 +958,12 @@ void hci_smp_irks_clear(struct hci_dev *hdev);
941 958
942void hci_remote_oob_data_clear(struct hci_dev *hdev); 959void hci_remote_oob_data_clear(struct hci_dev *hdev);
943struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, 960struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev,
944 bdaddr_t *bdaddr); 961 bdaddr_t *bdaddr, u8 bdaddr_type);
945int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, 962int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr,
946 u8 *hash, u8 *rand); 963 u8 bdaddr_type, u8 *hash192, u8 *rand192,
947int hci_add_remote_oob_ext_data(struct hci_dev *hdev, bdaddr_t *bdaddr, 964 u8 *hash256, u8 *rand256);
948 u8 *hash192, u8 *rand192, 965int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr,
949 u8 *hash256, u8 *rand256); 966 u8 bdaddr_type);
950int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr);
951 967
952void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); 968void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
953 969
@@ -998,6 +1014,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
998 1014
999#define hdev_is_powered(hdev) (test_bit(HCI_UP, &hdev->flags) && \ 1015#define hdev_is_powered(hdev) (test_bit(HCI_UP, &hdev->flags) && \
1000 !test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) 1016 !test_bit(HCI_AUTO_OFF, &hdev->dev_flags))
1017#define bredr_sc_enabled(dev) ((lmp_sc_capable(dev) || \
1018 test_bit(HCI_FORCE_SC, &(dev)->dbg_flags)) && \
1019 test_bit(HCI_SC_ENABLED, &(dev)->dev_flags))
1001 1020
1002/* ----- HCI protocols ----- */ 1021/* ----- HCI protocols ----- */
1003#define HCI_PROTO_DEFER 0x01 1022#define HCI_PROTO_DEFER 0x01
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 061e648052c8..eee3ef530e79 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -141,6 +141,7 @@ struct l2cap_conninfo {
141#define L2CAP_FC_ATT 0x10 141#define L2CAP_FC_ATT 0x10
142#define L2CAP_FC_SIG_LE 0x20 142#define L2CAP_FC_SIG_LE 0x20
143#define L2CAP_FC_SMP_LE 0x40 143#define L2CAP_FC_SMP_LE 0x40
144#define L2CAP_FC_SMP_BREDR 0x80
144 145
145/* L2CAP Control Field bit masks */ 146/* L2CAP Control Field bit masks */
146#define L2CAP_CTRL_SAR 0xC000 147#define L2CAP_CTRL_SAR 0xC000
@@ -255,6 +256,7 @@ struct l2cap_conn_rsp {
255#define L2CAP_CID_ATT 0x0004 256#define L2CAP_CID_ATT 0x0004
256#define L2CAP_CID_LE_SIGNALING 0x0005 257#define L2CAP_CID_LE_SIGNALING 0x0005
257#define L2CAP_CID_SMP 0x0006 258#define L2CAP_CID_SMP 0x0006
259#define L2CAP_CID_SMP_BREDR 0x0007
258#define L2CAP_CID_DYN_START 0x0040 260#define L2CAP_CID_DYN_START 0x0040
259#define L2CAP_CID_DYN_END 0xffff 261#define L2CAP_CID_DYN_END 0xffff
260#define L2CAP_CID_LE_DYN_END 0x007f 262#define L2CAP_CID_LE_DYN_END 0x007f
@@ -619,8 +621,8 @@ struct l2cap_conn {
619 unsigned int mtu; 621 unsigned int mtu;
620 622
621 __u32 feat_mask; 623 __u32 feat_mask;
622 __u8 fixed_chan_mask; 624 __u8 remote_fixed_chan;
623 bool hs_enabled; 625 __u8 local_fixed_chan;
624 626
625 __u8 info_state; 627 __u8 info_state;
626 __u8 info_ident; 628 __u8 info_ident;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index b391fd663468..95c34d5180fa 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -184,6 +184,9 @@ struct mgmt_cp_load_link_keys {
184 184
185#define MGMT_LTK_UNAUTHENTICATED 0x00 185#define MGMT_LTK_UNAUTHENTICATED 0x00
186#define MGMT_LTK_AUTHENTICATED 0x01 186#define MGMT_LTK_AUTHENTICATED 0x01
187#define MGMT_LTK_P256_UNAUTH 0x02
188#define MGMT_LTK_P256_AUTH 0x03
189#define MGMT_LTK_P256_DEBUG 0x04
187 190
188struct mgmt_ltk_info { 191struct mgmt_ltk_info {
189 struct mgmt_addr_info addr; 192 struct mgmt_addr_info addr;
@@ -495,6 +498,15 @@ struct mgmt_cp_set_public_address {
495} __packed; 498} __packed;
496#define MGMT_SET_PUBLIC_ADDRESS_SIZE 6 499#define MGMT_SET_PUBLIC_ADDRESS_SIZE 6
497 500
501#define MGMT_OP_START_SERVICE_DISCOVERY 0x003A
502struct mgmt_cp_start_service_discovery {
503 __u8 type;
504 __s8 rssi;
505 __le16 uuid_count;
506 __u8 uuids[0][16];
507} __packed;
508#define MGMT_START_SERVICE_DISCOVERY_SIZE 4
509
498#define MGMT_EV_CMD_COMPLETE 0x0001 510#define MGMT_EV_CMD_COMPLETE 0x0001
499struct mgmt_ev_cmd_complete { 511struct mgmt_ev_cmd_complete {
500 __le16 opcode; 512 __le16 opcode;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index bb748c4da5af..4ebb816241fa 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4643,33 +4643,6 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
4643 gfp_t gfp); 4643 gfp_t gfp);
4644 4644
4645/** 4645/**
4646 * cfg80211_radar_event - radar detection event
4647 * @wiphy: the wiphy
4648 * @chandef: chandef for the current channel
4649 * @gfp: context flags
4650 *
4651 * This function is called when a radar is detected on the current chanenl.
4652 */
4653void cfg80211_radar_event(struct wiphy *wiphy,
4654 struct cfg80211_chan_def *chandef, gfp_t gfp);
4655
4656/**
4657 * cfg80211_cac_event - Channel availability check (CAC) event
4658 * @netdev: network device
4659 * @chandef: chandef for the current channel
4660 * @event: type of event
4661 * @gfp: context flags
4662 *
4663 * This function is called when a Channel availability check (CAC) is finished
4664 * or aborted. This must be called to notify the completion of a CAC process,
4665 * also by full-MAC drivers.
4666 */
4667void cfg80211_cac_event(struct net_device *netdev,
4668 const struct cfg80211_chan_def *chandef,
4669 enum nl80211_radar_event event, gfp_t gfp);
4670
4671
4672/**
4673 * cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer 4646 * cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer
4674 * @dev: network device 4647 * @dev: network device
4675 * @peer: peer's MAC address 4648 * @peer: peer's MAC address
@@ -4697,6 +4670,42 @@ void cfg80211_cqm_txe_notify(struct net_device *dev, const u8 *peer,
4697 u32 num_packets, u32 rate, u32 intvl, gfp_t gfp); 4670 u32 num_packets, u32 rate, u32 intvl, gfp_t gfp);
4698 4671
4699/** 4672/**
4673 * cfg80211_cqm_beacon_loss_notify - beacon loss event
4674 * @dev: network device
4675 * @gfp: context flags
4676 *
4677 * Notify userspace about beacon loss from the connected AP.
4678 */
4679void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp);
4680
4681/**
4682 * cfg80211_radar_event - radar detection event
4683 * @wiphy: the wiphy
4684 * @chandef: chandef for the current channel
4685 * @gfp: context flags
4686 *
4687 * This function is called when a radar is detected on the current chanenl.
4688 */
4689void cfg80211_radar_event(struct wiphy *wiphy,
4690 struct cfg80211_chan_def *chandef, gfp_t gfp);
4691
4692/**
4693 * cfg80211_cac_event - Channel availability check (CAC) event
4694 * @netdev: network device
4695 * @chandef: chandef for the current channel
4696 * @event: type of event
4697 * @gfp: context flags
4698 *
4699 * This function is called when a Channel availability check (CAC) is finished
4700 * or aborted. This must be called to notify the completion of a CAC process,
4701 * also by full-MAC drivers.
4702 */
4703void cfg80211_cac_event(struct net_device *netdev,
4704 const struct cfg80211_chan_def *chandef,
4705 enum nl80211_radar_event event, gfp_t gfp);
4706
4707
4708/**
4700 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying 4709 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
4701 * @dev: network device 4710 * @dev: network device
4702 * @bssid: BSSID of AP (to avoid races) 4711 * @bssid: BSSID of AP (to avoid races)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cff3a26a9dae..58d719ddaa60 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3619,6 +3619,26 @@ void ieee80211_tx_status(struct ieee80211_hw *hw,
3619 struct sk_buff *skb); 3619 struct sk_buff *skb);
3620 3620
3621/** 3621/**
3622 * ieee80211_tx_status_noskb - transmit status callback without skb
3623 *
3624 * This function can be used as a replacement for ieee80211_tx_status
3625 * in drivers that cannot reliably map tx status information back to
3626 * specific skbs.
3627 *
3628 * Calls to this function for a single hardware must be synchronized
3629 * against each other. Calls to this function, ieee80211_tx_status_ni()
3630 * and ieee80211_tx_status_irqsafe() may not be mixed for a single hardware.
3631 *
3632 * @hw: the hardware the frame was transmitted by
3633 * @sta: the receiver station to which this packet is sent
3634 * (NULL for multicast packets)
3635 * @info: tx status information
3636 */
3637void ieee80211_tx_status_noskb(struct ieee80211_hw *hw,
3638 struct ieee80211_sta *sta,
3639 struct ieee80211_tx_info *info);
3640
3641/**
3622 * ieee80211_tx_status_ni - transmit status callback (in process context) 3642 * ieee80211_tx_status_ni - transmit status callback (in process context)
3623 * 3643 *
3624 * Like ieee80211_tx_status() but can be called in process context. 3644 * Like ieee80211_tx_status() but can be called in process context.
@@ -4672,6 +4692,14 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
4672 gfp_t gfp); 4692 gfp_t gfp);
4673 4693
4674/** 4694/**
4695 * ieee80211_cqm_beacon_loss_notify - inform CQM of beacon loss
4696 *
4697 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
4698 * @gfp: context flags
4699 */
4700void ieee80211_cqm_beacon_loss_notify(struct ieee80211_vif *vif, gfp_t gfp);
4701
4702/**
4675 * ieee80211_radar_detected - inform that a radar was detected 4703 * ieee80211_radar_detected - inform that a radar was detected
4676 * 4704 *
4677 * @hw: pointer as obtained from ieee80211_alloc_hw() 4705 * @hw: pointer as obtained from ieee80211_alloc_hw()
@@ -4829,6 +4857,10 @@ struct rate_control_ops {
4829 void (*free_sta)(void *priv, struct ieee80211_sta *sta, 4857 void (*free_sta)(void *priv, struct ieee80211_sta *sta,
4830 void *priv_sta); 4858 void *priv_sta);
4831 4859
4860 void (*tx_status_noskb)(void *priv,
4861 struct ieee80211_supported_band *sband,
4862 struct ieee80211_sta *sta, void *priv_sta,
4863 struct ieee80211_tx_info *info);
4832 void (*tx_status)(void *priv, struct ieee80211_supported_band *sband, 4864 void (*tx_status)(void *priv, struct ieee80211_supported_band *sband,
4833 struct ieee80211_sta *sta, void *priv_sta, 4865 struct ieee80211_sta *sta, void *priv_sta,
4834 struct sk_buff *skb); 4866 struct sk_buff *skb);
diff --git a/include/net/nfc/digital.h b/include/net/nfc/digital.h
index d9a5cf7ac1c4..0ae101eef0f4 100644
--- a/include/net/nfc/digital.h
+++ b/include/net/nfc/digital.h
@@ -225,6 +225,19 @@ struct nfc_digital_dev {
225 u8 curr_protocol; 225 u8 curr_protocol;
226 u8 curr_rf_tech; 226 u8 curr_rf_tech;
227 u8 curr_nfc_dep_pni; 227 u8 curr_nfc_dep_pni;
228 u8 did;
229
230 u8 local_payload_max;
231 u8 remote_payload_max;
232
233 struct sk_buff *chaining_skb;
234 struct digital_data_exch *data_exch;
235
236 int atn_count;
237 int nack_count;
238
239 struct sk_buff *saved_skb;
240 unsigned int saved_skb_len;
228 241
229 u16 target_fsc; 242 u16 target_fsc;
230 243
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index 7ee8f4cc610b..14bd0e1c47fa 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -57,10 +57,14 @@ struct nfc_hci_ops {
57 int (*discover_se)(struct nfc_hci_dev *dev); 57 int (*discover_se)(struct nfc_hci_dev *dev);
58 int (*enable_se)(struct nfc_hci_dev *dev, u32 se_idx); 58 int (*enable_se)(struct nfc_hci_dev *dev, u32 se_idx);
59 int (*disable_se)(struct nfc_hci_dev *dev, u32 se_idx); 59 int (*disable_se)(struct nfc_hci_dev *dev, u32 se_idx);
60 int (*se_io)(struct nfc_hci_dev *dev, u32 se_idx,
61 u8 *apdu, size_t apdu_length,
62 se_io_cb_t cb, void *cb_context);
60}; 63};
61 64
62/* Pipes */ 65/* Pipes */
63#define NFC_HCI_INVALID_PIPE 0x80 66#define NFC_HCI_INVALID_PIPE 0x80
67#define NFC_HCI_DO_NOT_CREATE_PIPE 0x81
64#define NFC_HCI_LINK_MGMT_PIPE 0x00 68#define NFC_HCI_LINK_MGMT_PIPE 0x00
65#define NFC_HCI_ADMIN_PIPE 0x01 69#define NFC_HCI_ADMIN_PIPE 0x01
66 70
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h
index 9eca9ae2280c..e7257a4653b4 100644
--- a/include/net/nfc/nci.h
+++ b/include/net/nfc/nci.h
@@ -28,6 +28,8 @@
28#ifndef __NCI_H 28#ifndef __NCI_H
29#define __NCI_H 29#define __NCI_H
30 30
31#include <net/nfc/nfc.h>
32
31/* NCI constants */ 33/* NCI constants */
32#define NCI_MAX_NUM_MAPPING_CONFIGS 10 34#define NCI_MAX_NUM_MAPPING_CONFIGS 10
33#define NCI_MAX_NUM_RF_CONFIGS 10 35#define NCI_MAX_NUM_RF_CONFIGS 10
@@ -73,6 +75,8 @@
73#define NCI_NFC_A_ACTIVE_LISTEN_MODE 0x83 75#define NCI_NFC_A_ACTIVE_LISTEN_MODE 0x83
74#define NCI_NFC_F_ACTIVE_LISTEN_MODE 0x85 76#define NCI_NFC_F_ACTIVE_LISTEN_MODE 0x85
75 77
78#define NCI_RF_TECH_MODE_LISTEN_MASK 0x80
79
76/* NCI RF Technologies */ 80/* NCI RF Technologies */
77#define NCI_NFC_RF_TECHNOLOGY_A 0x00 81#define NCI_NFC_RF_TECHNOLOGY_A 0x00
78#define NCI_NFC_RF_TECHNOLOGY_B 0x01 82#define NCI_NFC_RF_TECHNOLOGY_B 0x01
@@ -106,6 +110,17 @@
106 110
107/* NCI Configuration Parameter Tags */ 111/* NCI Configuration Parameter Tags */
108#define NCI_PN_ATR_REQ_GEN_BYTES 0x29 112#define NCI_PN_ATR_REQ_GEN_BYTES 0x29
113#define NCI_LN_ATR_RES_GEN_BYTES 0x61
114#define NCI_LA_SEL_INFO 0x32
115#define NCI_LF_PROTOCOL_TYPE 0x50
116#define NCI_LF_CON_BITR_F 0x54
117
118/* NCI Configuration Parameters masks */
119#define NCI_LA_SEL_INFO_ISO_DEP_MASK 0x20
120#define NCI_LA_SEL_INFO_NFC_DEP_MASK 0x40
121#define NCI_LF_PROTOCOL_TYPE_NFC_DEP_MASK 0x02
122#define NCI_LF_CON_BITR_F_212 0x02
123#define NCI_LF_CON_BITR_F_424 0x04
109 124
110/* NCI Reset types */ 125/* NCI Reset types */
111#define NCI_RESET_TYPE_KEEP_CONFIG 0x00 126#define NCI_RESET_TYPE_KEEP_CONFIG 0x00
@@ -314,26 +329,31 @@ struct nci_core_intf_error_ntf {
314struct rf_tech_specific_params_nfca_poll { 329struct rf_tech_specific_params_nfca_poll {
315 __u16 sens_res; 330 __u16 sens_res;
316 __u8 nfcid1_len; /* 0, 4, 7, or 10 Bytes */ 331 __u8 nfcid1_len; /* 0, 4, 7, or 10 Bytes */
317 __u8 nfcid1[10]; 332 __u8 nfcid1[NFC_NFCID1_MAXSIZE];
318 __u8 sel_res_len; /* 0 or 1 Bytes */ 333 __u8 sel_res_len; /* 0 or 1 Bytes */
319 __u8 sel_res; 334 __u8 sel_res;
320} __packed; 335} __packed;
321 336
322struct rf_tech_specific_params_nfcb_poll { 337struct rf_tech_specific_params_nfcb_poll {
323 __u8 sensb_res_len; 338 __u8 sensb_res_len;
324 __u8 sensb_res[12]; /* 11 or 12 Bytes */ 339 __u8 sensb_res[NFC_SENSB_RES_MAXSIZE]; /* 11 or 12 Bytes */
325} __packed; 340} __packed;
326 341
327struct rf_tech_specific_params_nfcf_poll { 342struct rf_tech_specific_params_nfcf_poll {
328 __u8 bit_rate; 343 __u8 bit_rate;
329 __u8 sensf_res_len; 344 __u8 sensf_res_len;
330 __u8 sensf_res[18]; /* 16 or 18 Bytes */ 345 __u8 sensf_res[NFC_SENSF_RES_MAXSIZE]; /* 16 or 18 Bytes */
331} __packed; 346} __packed;
332 347
333struct rf_tech_specific_params_nfcv_poll { 348struct rf_tech_specific_params_nfcv_poll {
334 __u8 res_flags; 349 __u8 res_flags;
335 __u8 dsfid; 350 __u8 dsfid;
336 __u8 uid[8]; /* 8 Bytes */ 351 __u8 uid[NFC_ISO15693_UID_MAXSIZE]; /* 8 Bytes */
352} __packed;
353
354struct rf_tech_specific_params_nfcf_listen {
355 __u8 local_nfcid2_len;
356 __u8 local_nfcid2[NFC_NFCID2_MAXSIZE]; /* 0 or 8 Bytes */
337} __packed; 357} __packed;
338 358
339struct nci_rf_discover_ntf { 359struct nci_rf_discover_ntf {
@@ -365,7 +385,12 @@ struct activation_params_nfcb_poll_iso_dep {
365 385
366struct activation_params_poll_nfc_dep { 386struct activation_params_poll_nfc_dep {
367 __u8 atr_res_len; 387 __u8 atr_res_len;
368 __u8 atr_res[63]; 388 __u8 atr_res[NFC_ATR_RES_MAXSIZE - 2]; /* ATR_RES from byte 3 */
389};
390
391struct activation_params_listen_nfc_dep {
392 __u8 atr_req_len;
393 __u8 atr_req[NFC_ATR_REQ_MAXSIZE - 2]; /* ATR_REQ from byte 3 */
369}; 394};
370 395
371struct nci_rf_intf_activated_ntf { 396struct nci_rf_intf_activated_ntf {
@@ -382,6 +407,7 @@ struct nci_rf_intf_activated_ntf {
382 struct rf_tech_specific_params_nfcb_poll nfcb_poll; 407 struct rf_tech_specific_params_nfcb_poll nfcb_poll;
383 struct rf_tech_specific_params_nfcf_poll nfcf_poll; 408 struct rf_tech_specific_params_nfcf_poll nfcf_poll;
384 struct rf_tech_specific_params_nfcv_poll nfcv_poll; 409 struct rf_tech_specific_params_nfcv_poll nfcv_poll;
410 struct rf_tech_specific_params_nfcf_listen nfcf_listen;
385 } rf_tech_specific_params; 411 } rf_tech_specific_params;
386 412
387 __u8 data_exch_rf_tech_and_mode; 413 __u8 data_exch_rf_tech_and_mode;
@@ -393,6 +419,7 @@ struct nci_rf_intf_activated_ntf {
393 struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep; 419 struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep;
394 struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep; 420 struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep;
395 struct activation_params_poll_nfc_dep poll_nfc_dep; 421 struct activation_params_poll_nfc_dep poll_nfc_dep;
422 struct activation_params_listen_nfc_dep listen_nfc_dep;
396 } activation_params; 423 } activation_params;
397 424
398} __packed; 425} __packed;
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 75d10e625c49..9e51bb4d841e 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (C) 2011 Texas Instruments, Inc. 5 * Copyright (C) 2011 Texas Instruments, Inc.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * Copyright (C) 2014 Marvell International Ltd.
7 * 8 *
8 * Written by Ilan Elias <ilane@ti.com> 9 * Written by Ilan Elias <ilane@ti.com>
9 * 10 *
@@ -49,6 +50,8 @@ enum nci_state {
49 NCI_W4_ALL_DISCOVERIES, 50 NCI_W4_ALL_DISCOVERIES,
50 NCI_W4_HOST_SELECT, 51 NCI_W4_HOST_SELECT,
51 NCI_POLL_ACTIVE, 52 NCI_POLL_ACTIVE,
53 NCI_LISTEN_ACTIVE,
54 NCI_LISTEN_SLEEP,
52}; 55};
53 56
54/* NCI timeouts */ 57/* NCI timeouts */
@@ -69,6 +72,12 @@ struct nci_ops {
69 int (*send)(struct nci_dev *ndev, struct sk_buff *skb); 72 int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
70 int (*setup)(struct nci_dev *ndev); 73 int (*setup)(struct nci_dev *ndev);
71 __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol); 74 __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
75 int (*discover_se)(struct nci_dev *ndev);
76 int (*disable_se)(struct nci_dev *ndev, u32 se_idx);
77 int (*enable_se)(struct nci_dev *ndev, u32 se_idx);
78 int (*se_io)(struct nci_dev *ndev, u32 se_idx,
79 u8 *apdu, size_t apdu_length,
80 se_io_cb_t cb, void *cb_context);
72}; 81};
73 82
74#define NCI_MAX_SUPPORTED_RF_INTERFACES 4 83#define NCI_MAX_SUPPORTED_RF_INTERFACES 4
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 6c583e244de2..12adb817c27a 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2011 Instituto Nokia de Tecnologia 2 * Copyright (C) 2011 Instituto Nokia de Tecnologia
3 * Copyright (C) 2014 Marvell International Ltd.
3 * 4 *
4 * Authors: 5 * Authors:
5 * Lauro Ramos Venancio <lauro.venancio@openbossa.org> 6 * Lauro Ramos Venancio <lauro.venancio@openbossa.org>
@@ -87,6 +88,7 @@ struct nfc_ops {
87#define NFC_TARGET_IDX_ANY -1 88#define NFC_TARGET_IDX_ANY -1
88#define NFC_MAX_GT_LEN 48 89#define NFC_MAX_GT_LEN 48
89#define NFC_ATR_RES_GT_OFFSET 15 90#define NFC_ATR_RES_GT_OFFSET 15
91#define NFC_ATR_REQ_GT_OFFSET 14
90 92
91/** 93/**
92 * struct nfc_target - NFC target descriptiom 94 * struct nfc_target - NFC target descriptiom
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index dad7ab20a8cb..b776d72d84be 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -136,6 +136,17 @@ struct regulatory_request {
136 * otherwise initiating radiation is not allowed. This will enable the 136 * otherwise initiating radiation is not allowed. This will enable the
137 * relaxations enabled under the CFG80211_REG_RELAX_NO_IR configuration 137 * relaxations enabled under the CFG80211_REG_RELAX_NO_IR configuration
138 * option 138 * option
139 * @REGULATORY_IGNORE_STALE_KICKOFF: the regulatory core will _not_ make sure
140 * all interfaces on this wiphy reside on allowed channels. If this flag
141 * is not set, upon a regdomain change, the interfaces are given a grace
142 * period (currently 60 seconds) to disconnect or move to an allowed
143 * channel. Interfaces on forbidden channels are forcibly disconnected.
144 * Currently these types of interfaces are supported for enforcement:
145 * NL80211_IFTYPE_ADHOC, NL80211_IFTYPE_STATION, NL80211_IFTYPE_AP,
146 * NL80211_IFTYPE_AP_VLAN, NL80211_IFTYPE_MONITOR,
147 * NL80211_IFTYPE_P2P_CLIENT, NL80211_IFTYPE_P2P_GO,
148 * NL80211_IFTYPE_P2P_DEVICE. The flag will be set by default if a device
149 * includes any modes unsupported for enforcement checking.
139 */ 150 */
140enum ieee80211_regulatory_flags { 151enum ieee80211_regulatory_flags {
141 REGULATORY_CUSTOM_REG = BIT(0), 152 REGULATORY_CUSTOM_REG = BIT(0),
@@ -144,6 +155,7 @@ enum ieee80211_regulatory_flags {
144 REGULATORY_COUNTRY_IE_FOLLOW_POWER = BIT(3), 155 REGULATORY_COUNTRY_IE_FOLLOW_POWER = BIT(3),
145 REGULATORY_COUNTRY_IE_IGNORE = BIT(4), 156 REGULATORY_COUNTRY_IE_IGNORE = BIT(4),
146 REGULATORY_ENABLE_RELAX_NO_IR = BIT(5), 157 REGULATORY_ENABLE_RELAX_NO_IR = BIT(5),
158 REGULATORY_IGNORE_STALE_KICKOFF = BIT(6),
147}; 159};
148 160
149struct ieee80211_freq_range { 161struct ieee80211_freq_range {