aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/bluetooth.h8
-rw-r--r--include/net/bluetooth/hci.h7
-rw-r--r--include/net/bluetooth/hci_core.h10
-rw-r--r--include/net/bluetooth/sco.h1
-rw-r--r--include/net/cfg80211.h8
-rw-r--r--include/net/mac80211.h110
-rw-r--r--include/net/nfc/nfc.h3
7 files changed, 137 insertions, 10 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 10eb9b389014..10d43d8c7037 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -107,6 +107,14 @@ struct bt_power {
107 */ 107 */
108#define BT_CHANNEL_POLICY_AMP_PREFERRED 2 108#define BT_CHANNEL_POLICY_AMP_PREFERRED 2
109 109
110#define BT_VOICE 11
111struct bt_voice {
112 __u16 setting;
113};
114
115#define BT_VOICE_TRANSPARENT 0x0003
116#define BT_VOICE_CVSD_16BIT 0x0060
117
110__printf(1, 2) 118__printf(1, 2)
111int bt_info(const char *fmt, ...); 119int bt_info(const char *fmt, ...);
112__printf(1, 2) 120__printf(1, 2)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 3c592cf473da..aaeaf0938ec0 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -238,6 +238,7 @@ enum {
238#define LMP_CVSD 0x01 238#define LMP_CVSD 0x01
239#define LMP_PSCHEME 0x02 239#define LMP_PSCHEME 0x02
240#define LMP_PCONTROL 0x04 240#define LMP_PCONTROL 0x04
241#define LMP_TRANSPARENT 0x08
241 242
242#define LMP_RSSI_INQ 0x40 243#define LMP_RSSI_INQ 0x40
243#define LMP_ESCO 0x80 244#define LMP_ESCO 0x80
@@ -296,6 +297,12 @@ enum {
296#define HCI_AT_GENERAL_BONDING 0x04 297#define HCI_AT_GENERAL_BONDING 0x04
297#define HCI_AT_GENERAL_BONDING_MITM 0x05 298#define HCI_AT_GENERAL_BONDING_MITM 0x05
298 299
300/* I/O capabilities */
301#define HCI_IO_DISPLAY_ONLY 0x00
302#define HCI_IO_DISPLAY_YESNO 0x01
303#define HCI_IO_KEYBOARD_ONLY 0x02
304#define HCI_IO_NO_INPUT_OUTPUT 0x03
305
299/* Link Key types */ 306/* Link Key types */
300#define HCI_LK_COMBINATION 0x00 307#define HCI_LK_COMBINATION 0x00
301#define HCI_LK_LOCAL_UNIT 0x01 308#define HCI_LK_LOCAL_UNIT 0x01
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index f77885ea78c2..3ede820d328f 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -320,6 +320,7 @@ struct hci_conn {
320 __u32 passkey_notify; 320 __u32 passkey_notify;
321 __u8 passkey_entered; 321 __u8 passkey_entered;
322 __u16 disc_timeout; 322 __u16 disc_timeout;
323 __u16 setting;
323 unsigned long flags; 324 unsigned long flags;
324 325
325 __u8 remote_cap; 326 __u8 remote_cap;
@@ -569,7 +570,7 @@ static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
569} 570}
570 571
571void hci_disconnect(struct hci_conn *conn, __u8 reason); 572void hci_disconnect(struct hci_conn *conn, __u8 reason);
572void hci_setup_sync(struct hci_conn *conn, __u16 handle); 573bool hci_setup_sync(struct hci_conn *conn, __u16 handle);
573void hci_sco_setup(struct hci_conn *conn, __u8 status); 574void hci_sco_setup(struct hci_conn *conn, __u8 status);
574 575
575struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst); 576struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst);
@@ -584,6 +585,8 @@ struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle);
584 585
585struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, 586struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
586 __u8 dst_type, __u8 sec_level, __u8 auth_type); 587 __u8 dst_type, __u8 sec_level, __u8 auth_type);
588struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst,
589 __u16 setting);
587int hci_conn_check_link_mode(struct hci_conn *conn); 590int hci_conn_check_link_mode(struct hci_conn *conn);
588int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level); 591int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level);
589int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type); 592int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
@@ -797,6 +800,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
797#define lmp_lsto_capable(dev) ((dev)->features[0][7] & LMP_LSTO) 800#define lmp_lsto_capable(dev) ((dev)->features[0][7] & LMP_LSTO)
798#define lmp_inq_tx_pwr_capable(dev) ((dev)->features[0][7] & LMP_INQ_TX_PWR) 801#define lmp_inq_tx_pwr_capable(dev) ((dev)->features[0][7] & LMP_INQ_TX_PWR)
799#define lmp_ext_feat_capable(dev) ((dev)->features[0][7] & LMP_EXTFEATURES) 802#define lmp_ext_feat_capable(dev) ((dev)->features[0][7] & LMP_EXTFEATURES)
803#define lmp_transp_capable(dev) ((dev)->features[0][2] & LMP_TRANSPARENT)
800 804
801/* ----- Extended LMP capabilities ----- */ 805/* ----- Extended LMP capabilities ----- */
802#define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP) 806#define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP)
@@ -1213,4 +1217,8 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __u8 rand[8],
1213 1217
1214u8 bdaddr_to_le(u8 bdaddr_type); 1218u8 bdaddr_to_le(u8 bdaddr_type);
1215 1219
1220#define SCO_AIRMODE_MASK 0x0003
1221#define SCO_AIRMODE_CVSD 0x0000
1222#define SCO_AIRMODE_TRANSP 0x0003
1223
1216#endif /* __HCI_CORE_H */ 1224#endif /* __HCI_CORE_H */
diff --git a/include/net/bluetooth/sco.h b/include/net/bluetooth/sco.h
index 1e35c43657c8..e252a31ee6b6 100644
--- a/include/net/bluetooth/sco.h
+++ b/include/net/bluetooth/sco.h
@@ -73,6 +73,7 @@ struct sco_conn {
73struct sco_pinfo { 73struct sco_pinfo {
74 struct bt_sock bt; 74 struct bt_sock bt;
75 __u32 flags; 75 __u32 flags;
76 __u16 setting;
76 struct sco_conn *conn; 77 struct sco_conn *conn;
77}; 78};
78 79
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 635e396b25b2..cb710913d5c8 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2081,7 +2081,7 @@ struct cfg80211_update_ft_ies_params {
2081 * @mgmt_tx_cancel_wait: Cancel the wait time from transmitting a management 2081 * @mgmt_tx_cancel_wait: Cancel the wait time from transmitting a management
2082 * frame on another channel 2082 * frame on another channel
2083 * 2083 *
2084 * @testmode_cmd: run a test mode command 2084 * @testmode_cmd: run a test mode command; @wdev may be %NULL
2085 * @testmode_dump: Implement a test mode dump. The cb->args[2] and up may be 2085 * @testmode_dump: Implement a test mode dump. The cb->args[2] and up may be
2086 * used by the function, but 0 and 1 must not be touched. Additionally, 2086 * used by the function, but 0 and 1 must not be touched. Additionally,
2087 * return error codes other than -ENOBUFS and -ENOENT will terminate the 2087 * return error codes other than -ENOBUFS and -ENOENT will terminate the
@@ -2290,7 +2290,8 @@ struct cfg80211_ops {
2290 void (*rfkill_poll)(struct wiphy *wiphy); 2290 void (*rfkill_poll)(struct wiphy *wiphy);
2291 2291
2292#ifdef CONFIG_NL80211_TESTMODE 2292#ifdef CONFIG_NL80211_TESTMODE
2293 int (*testmode_cmd)(struct wiphy *wiphy, void *data, int len); 2293 int (*testmode_cmd)(struct wiphy *wiphy, struct wireless_dev *wdev,
2294 void *data, int len);
2294 int (*testmode_dump)(struct wiphy *wiphy, struct sk_buff *skb, 2295 int (*testmode_dump)(struct wiphy *wiphy, struct sk_buff *skb,
2295 struct netlink_callback *cb, 2296 struct netlink_callback *cb,
2296 void *data, int len); 2297 void *data, int len);
@@ -4055,6 +4056,7 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
4055 * @sig_dbm: signal strength in mBm, or 0 if unknown 4056 * @sig_dbm: signal strength in mBm, or 0 if unknown
4056 * @buf: Management frame (header + body) 4057 * @buf: Management frame (header + body)
4057 * @len: length of the frame data 4058 * @len: length of the frame data
4059 * @flags: flags, as defined in enum nl80211_rxmgmt_flags
4058 * @gfp: context flags 4060 * @gfp: context flags
4059 * 4061 *
4060 * This function is called whenever an Action frame is received for a station 4062 * This function is called whenever an Action frame is received for a station
@@ -4066,7 +4068,7 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
4066 * driver is responsible for rejecting the frame. 4068 * driver is responsible for rejecting the frame.
4067 */ 4069 */
4068bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm, 4070bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
4069 const u8 *buf, size_t len, gfp_t gfp); 4071 const u8 *buf, size_t len, u32 flags, gfp_t gfp);
4070 4072
4071/** 4073/**
4072 * cfg80211_mgmt_tx_status - notification of TX status for management frame 4074 * cfg80211_mgmt_tx_status - notification of TX status for management frame
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ab94dbc331a0..cc6035f1a2f1 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -375,7 +375,7 @@ struct ieee80211_bss_conf {
375}; 375};
376 376
377/** 377/**
378 * enum mac80211_tx_control_flags - flags to describe transmission information/status 378 * enum mac80211_tx_info_flags - flags to describe transmission information/status
379 * 379 *
380 * These flags are used with the @flags member of &ieee80211_tx_info. 380 * These flags are used with the @flags member of &ieee80211_tx_info.
381 * 381 *
@@ -471,7 +471,7 @@ struct ieee80211_bss_conf {
471 * Note: If you have to add new flags to the enumeration, then don't 471 * Note: If you have to add new flags to the enumeration, then don't
472 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. 472 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
473 */ 473 */
474enum mac80211_tx_control_flags { 474enum mac80211_tx_info_flags {
475 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 475 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
476 IEEE80211_TX_CTL_ASSIGN_SEQ = BIT(1), 476 IEEE80211_TX_CTL_ASSIGN_SEQ = BIT(1),
477 IEEE80211_TX_CTL_NO_ACK = BIT(2), 477 IEEE80211_TX_CTL_NO_ACK = BIT(2),
@@ -507,6 +507,18 @@ enum mac80211_tx_control_flags {
507 507
508#define IEEE80211_TX_CTL_STBC_SHIFT 23 508#define IEEE80211_TX_CTL_STBC_SHIFT 23
509 509
510/**
511 * enum mac80211_tx_control_flags - flags to describe transmit control
512 *
513 * @IEEE80211_TX_CTRL_PORT_CTRL_PROTO: this frame is a port control
514 * protocol frame (e.g. EAP)
515 *
516 * These flags are used in tx_info->control.flags.
517 */
518enum mac80211_tx_control_flags {
519 IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0),
520};
521
510/* 522/*
511 * This definition is used as a mask to clear all temporary flags, which are 523 * This definition is used as a mask to clear all temporary flags, which are
512 * set by the tx handlers for each transmission attempt by the mac80211 stack. 524 * set by the tx handlers for each transmission attempt by the mac80211 stack.
@@ -680,7 +692,8 @@ struct ieee80211_tx_info {
680 /* NB: vif can be NULL for injected frames */ 692 /* NB: vif can be NULL for injected frames */
681 struct ieee80211_vif *vif; 693 struct ieee80211_vif *vif;
682 struct ieee80211_key_conf *hw_key; 694 struct ieee80211_key_conf *hw_key;
683 /* 8 bytes free */ 695 u32 flags;
696 /* 4 bytes free */
684 } control; 697 } control;
685 struct { 698 struct {
686 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES]; 699 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1508,6 +1521,7 @@ enum ieee80211_hw_flags {
1508 IEEE80211_HW_SUPPORTS_RC_TABLE = 1<<24, 1521 IEEE80211_HW_SUPPORTS_RC_TABLE = 1<<24,
1509 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, 1522 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25,
1510 IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, 1523 IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26,
1524 IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27,
1511}; 1525};
1512 1526
1513/** 1527/**
@@ -2503,8 +2517,8 @@ enum ieee80211_roc_type {
2503 * in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout 2517 * in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout
2504 * accordingly. This callback is not required and may sleep. 2518 * accordingly. This callback is not required and may sleep.
2505 * 2519 *
2506 * @testmode_cmd: Implement a cfg80211 test mode command. 2520 * @testmode_cmd: Implement a cfg80211 test mode command. The passed @vif may
2507 * The callback can sleep. 2521 * be %NULL. The callback can sleep.
2508 * @testmode_dump: Implement a cfg80211 test mode dump. The callback can sleep. 2522 * @testmode_dump: Implement a cfg80211 test mode dump. The callback can sleep.
2509 * 2523 *
2510 * @flush: Flush all pending frames from the hardware queue, making sure 2524 * @flush: Flush all pending frames from the hardware queue, making sure
@@ -2765,7 +2779,8 @@ struct ieee80211_ops {
2765 void (*rfkill_poll)(struct ieee80211_hw *hw); 2779 void (*rfkill_poll)(struct ieee80211_hw *hw);
2766 void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class); 2780 void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
2767#ifdef CONFIG_NL80211_TESTMODE 2781#ifdef CONFIG_NL80211_TESTMODE
2768 int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); 2782 int (*testmode_cmd)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2783 void *data, int len);
2769 int (*testmode_dump)(struct ieee80211_hw *hw, struct sk_buff *skb, 2784 int (*testmode_dump)(struct ieee80211_hw *hw, struct sk_buff *skb,
2770 struct netlink_callback *cb, 2785 struct netlink_callback *cb,
2771 void *data, int len); 2786 void *data, int len);
@@ -3674,6 +3689,89 @@ void ieee80211_get_key_rx_seq(struct ieee80211_key_conf *keyconf,
3674 int tid, struct ieee80211_key_seq *seq); 3689 int tid, struct ieee80211_key_seq *seq);
3675 3690
3676/** 3691/**
3692 * ieee80211_set_key_tx_seq - set key TX sequence counter
3693 *
3694 * @keyconf: the parameter passed with the set key
3695 * @seq: new sequence data
3696 *
3697 * This function allows a driver to set the current TX IV/PNs for the
3698 * given key. This is useful when resuming from WoWLAN sleep and the
3699 * device may have transmitted frames using the PTK, e.g. replies to
3700 * ARP requests.
3701 *
3702 * Note that this function may only be called when no TX processing
3703 * can be done concurrently.
3704 */
3705void ieee80211_set_key_tx_seq(struct ieee80211_key_conf *keyconf,
3706 struct ieee80211_key_seq *seq);
3707
3708/**
3709 * ieee80211_set_key_rx_seq - set key RX sequence counter
3710 *
3711 * @keyconf: the parameter passed with the set key
3712 * @tid: The TID, or -1 for the management frame value (CCMP only);
3713 * the value on TID 0 is also used for non-QoS frames. For
3714 * CMAC, only TID 0 is valid.
3715 * @seq: new sequence data
3716 *
3717 * This function allows a driver to set the current RX IV/PNs for the
3718 * given key. This is useful when resuming from WoWLAN sleep and GTK
3719 * rekey may have been done while suspended. It should not be called
3720 * if IV checking is done by the device and not by mac80211.
3721 *
3722 * Note that this function may only be called when no RX processing
3723 * can be done concurrently.
3724 */
3725void ieee80211_set_key_rx_seq(struct ieee80211_key_conf *keyconf,
3726 int tid, struct ieee80211_key_seq *seq);
3727
3728/**
3729 * ieee80211_remove_key - remove the given key
3730 * @keyconf: the parameter passed with the set key
3731 *
3732 * Remove the given key. If the key was uploaded to the hardware at the
3733 * time this function is called, it is not deleted in the hardware but
3734 * instead assumed to have been removed already.
3735 *
3736 * Note that due to locking considerations this function can (currently)
3737 * only be called during key iteration (ieee80211_iter_keys().)
3738 */
3739void ieee80211_remove_key(struct ieee80211_key_conf *keyconf);
3740
3741/**
3742 * ieee80211_gtk_rekey_add - add a GTK key from rekeying during WoWLAN
3743 * @vif: the virtual interface to add the key on
3744 * @keyconf: new key data
3745 *
3746 * When GTK rekeying was done while the system was suspended, (a) new
3747 * key(s) will be available. These will be needed by mac80211 for proper
3748 * RX processing, so this function allows setting them.
3749 *
3750 * The function returns the newly allocated key structure, which will
3751 * have similar contents to the passed key configuration but point to
3752 * mac80211-owned memory. In case of errors, the function returns an
3753 * ERR_PTR(), use IS_ERR() etc.
3754 *
3755 * Note that this function assumes the key isn't added to hardware
3756 * acceleration, so no TX will be done with the key. Since it's a GTK
3757 * on managed (station) networks, this is true anyway. If the driver
3758 * calls this function from the resume callback and subsequently uses
3759 * the return code 1 to reconfigure the device, this key will be part
3760 * of the reconfiguration.
3761 *
3762 * Note that the driver should also call ieee80211_set_key_rx_seq()
3763 * for the new key for each TID to set up sequence counters properly.
3764 *
3765 * IMPORTANT: If this replaces a key that is present in the hardware,
3766 * then it will attempt to remove it during this call. In many cases
3767 * this isn't what you want, so call ieee80211_remove_key() first for
3768 * the key that's being replaced.
3769 */
3770struct ieee80211_key_conf *
3771ieee80211_gtk_rekey_add(struct ieee80211_vif *vif,
3772 struct ieee80211_key_conf *keyconf);
3773
3774/**
3677 * ieee80211_gtk_rekey_notify - notify userspace supplicant of rekeying 3775 * ieee80211_gtk_rekey_notify - notify userspace supplicant of rekeying
3678 * @vif: virtual interface the rekeying was done on 3776 * @vif: virtual interface the rekeying was done on
3679 * @bssid: The BSSID of the AP, for checking association 3777 * @bssid: The BSSID of the AP, for checking association
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 5f286b726bb6..f68ee68e4e3e 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -224,6 +224,9 @@ int nfc_set_remote_general_bytes(struct nfc_dev *dev,
224 u8 *gt, u8 gt_len); 224 u8 *gt, u8 gt_len);
225u8 *nfc_get_local_general_bytes(struct nfc_dev *dev, size_t *gb_len); 225u8 *nfc_get_local_general_bytes(struct nfc_dev *dev, size_t *gb_len);
226 226
227int nfc_fw_download_done(struct nfc_dev *dev, const char *firmware_name,
228 u32 result);
229
227int nfc_targets_found(struct nfc_dev *dev, 230int nfc_targets_found(struct nfc_dev *dev,
228 struct nfc_target *targets, int ntargets); 231 struct nfc_target *targets, int ntargets);
229int nfc_target_lost(struct nfc_dev *dev, u32 target_idx); 232int nfc_target_lost(struct nfc_dev *dev, u32 target_idx);