diff options
| author | David S. Miller <davem@davemloft.net> | 2015-01-02 15:58:21 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-01-02 15:58:21 -0500 |
| commit | 6c032edc8a338f7a5d7bbd3dd8a08ac80d37dd86 (patch) | |
| tree | c07d1788b0c6f3973a4afc8c61c05712cb6fa100 /include | |
| parent | a4c9ea5e8fec680134d22aa99b54d1cd8c226ebd (diff) | |
| parent | e64b4fb66cc428cef0a62ea899b671c1aad05f3a (diff) | |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg say:
====================
pull request: bluetooth-next 2014-12-31
Here's the first batch of bluetooth patches for 3.20.
- Cleanups & fixes to ieee802154 drivers
- Fix synchronization of mgmt commands with respective HCI commands
- Add self-tests for LE pairing crypto functionality
- Remove 'BlueFritz!' specific handling from core using a new quirk flag
- Public address configuration support for ath3012
- Refactor debugfs support into a dedicated file
- Initial support for LE Data Length Extension feature from Bluetooth 4.2
Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/bluetooth/hci.h | 53 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 35 | ||||
| -rw-r--r-- | include/net/bluetooth/l2cap.h | 1 | ||||
| -rw-r--r-- | include/net/bluetooth/rfcomm.h | 2 | ||||
| -rw-r--r-- | include/net/cfg802154.h | 10 | ||||
| -rw-r--r-- | include/net/ieee802154_netdev.h | 4 | ||||
| -rw-r--r-- | include/net/mac802154.h | 5 | ||||
| -rw-r--r-- | include/net/nl802154.h | 45 |
8 files changed, 121 insertions, 34 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 40129b3838b2..1849a437f6e1 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
| @@ -102,6 +102,16 @@ enum { | |||
| 102 | */ | 102 | */ |
| 103 | HCI_QUIRK_FIXUP_BUFFER_SIZE, | 103 | HCI_QUIRK_FIXUP_BUFFER_SIZE, |
| 104 | 104 | ||
| 105 | /* When this quirk is set, then the HCI Read Local Supported | ||
| 106 | * Commands command is not supported. In general Bluetooth 1.2 | ||
| 107 | * and later controllers should support this command. However | ||
| 108 | * some controllers indicate Bluetooth 1.2 support, but do | ||
| 109 | * not support this command. | ||
| 110 | * | ||
| 111 | * This quirk must be set before hci_register_dev is called. | ||
| 112 | */ | ||
| 113 | HCI_QUIRK_BROKEN_LOCAL_COMMANDS, | ||
| 114 | |||
| 105 | /* When this quirk is set, then no stored link key handling | 115 | /* When this quirk is set, then no stored link key handling |
| 106 | * is performed. This is mainly due to the fact that the | 116 | * is performed. This is mainly due to the fact that the |
| 107 | * HCI Delete Stored Link Key command is advertised, but | 117 | * HCI Delete Stored Link Key command is advertised, but |
| @@ -343,6 +353,7 @@ enum { | |||
| 343 | #define HCI_LE_ENCRYPTION 0x01 | 353 | #define HCI_LE_ENCRYPTION 0x01 |
| 344 | #define HCI_LE_CONN_PARAM_REQ_PROC 0x02 | 354 | #define HCI_LE_CONN_PARAM_REQ_PROC 0x02 |
| 345 | #define HCI_LE_PING 0x10 | 355 | #define HCI_LE_PING 0x10 |
| 356 | #define HCI_LE_DATA_LEN_EXT 0x20 | ||
| 346 | #define HCI_LE_EXT_SCAN_POLICY 0x80 | 357 | #define HCI_LE_EXT_SCAN_POLICY 0x80 |
| 347 | 358 | ||
| 348 | /* Connection modes */ | 359 | /* Connection modes */ |
| @@ -1371,6 +1382,39 @@ struct hci_cp_le_conn_param_req_neg_reply { | |||
| 1371 | __u8 reason; | 1382 | __u8 reason; |
| 1372 | } __packed; | 1383 | } __packed; |
| 1373 | 1384 | ||
| 1385 | #define HCI_OP_LE_SET_DATA_LEN 0x2022 | ||
| 1386 | struct hci_cp_le_set_data_len { | ||
| 1387 | __le16 handle; | ||
| 1388 | __le16 tx_len; | ||
| 1389 | __le16 tx_time; | ||
| 1390 | } __packed; | ||
| 1391 | struct hci_rp_le_set_data_len { | ||
| 1392 | __u8 status; | ||
| 1393 | __le16 handle; | ||
| 1394 | } __packed; | ||
| 1395 | |||
| 1396 | #define HCI_OP_LE_READ_DEF_DATA_LEN 0x2023 | ||
| 1397 | struct hci_rp_le_read_def_data_len { | ||
| 1398 | __u8 status; | ||
| 1399 | __le16 tx_len; | ||
| 1400 | __le16 tx_time; | ||
| 1401 | } __packed; | ||
| 1402 | |||
| 1403 | #define HCI_OP_LE_WRITE_DEF_DATA_LEN 0x2024 | ||
| 1404 | struct hci_cp_le_write_def_data_len { | ||
| 1405 | __le16 tx_len; | ||
| 1406 | __le16 tx_time; | ||
| 1407 | } __packed; | ||
| 1408 | |||
| 1409 | #define HCI_OP_LE_READ_MAX_DATA_LEN 0x202f | ||
| 1410 | struct hci_rp_le_read_max_data_len { | ||
| 1411 | __u8 status; | ||
| 1412 | __le16 tx_len; | ||
| 1413 | __le16 tx_time; | ||
| 1414 | __le16 rx_len; | ||
| 1415 | __le16 rx_time; | ||
| 1416 | } __packed; | ||
| 1417 | |||
| 1374 | /* ---- HCI Events ---- */ | 1418 | /* ---- HCI Events ---- */ |
| 1375 | #define HCI_EV_INQUIRY_COMPLETE 0x01 | 1419 | #define HCI_EV_INQUIRY_COMPLETE 0x01 |
| 1376 | 1420 | ||
| @@ -1796,6 +1840,15 @@ struct hci_ev_le_remote_conn_param_req { | |||
| 1796 | __le16 timeout; | 1840 | __le16 timeout; |
| 1797 | } __packed; | 1841 | } __packed; |
| 1798 | 1842 | ||
| 1843 | #define HCI_EV_LE_DATA_LEN_CHANGE 0x07 | ||
| 1844 | struct hci_ev_le_data_len_change { | ||
| 1845 | __le16 handle; | ||
| 1846 | __le16 tx_len; | ||
| 1847 | __le16 tx_time; | ||
| 1848 | __le16 rx_len; | ||
| 1849 | __le16 rx_time; | ||
| 1850 | } __packed; | ||
| 1851 | |||
| 1799 | #define HCI_EV_LE_DIRECT_ADV_REPORT 0x0B | 1852 | #define HCI_EV_LE_DIRECT_ADV_REPORT 0x0B |
| 1800 | struct hci_ev_le_direct_adv_info { | 1853 | struct hci_ev_le_direct_adv_info { |
| 1801 | __u8 evt_type; | 1854 | __u8 evt_type; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 3c7827005c25..3e7e5110f298 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -220,6 +220,12 @@ struct hci_dev { | |||
| 220 | __u16 le_conn_max_interval; | 220 | __u16 le_conn_max_interval; |
| 221 | __u16 le_conn_latency; | 221 | __u16 le_conn_latency; |
| 222 | __u16 le_supv_timeout; | 222 | __u16 le_supv_timeout; |
| 223 | __u16 le_def_tx_len; | ||
| 224 | __u16 le_def_tx_time; | ||
| 225 | __u16 le_max_tx_len; | ||
| 226 | __u16 le_max_tx_time; | ||
| 227 | __u16 le_max_rx_len; | ||
| 228 | __u16 le_max_rx_time; | ||
| 223 | __u16 discov_interleaved_timeout; | 229 | __u16 discov_interleaved_timeout; |
| 224 | __u16 conn_info_min_age; | 230 | __u16 conn_info_min_age; |
| 225 | __u16 conn_info_max_age; | 231 | __u16 conn_info_max_age; |
| @@ -434,6 +440,7 @@ struct hci_conn { | |||
| 434 | struct delayed_work le_conn_timeout; | 440 | struct delayed_work le_conn_timeout; |
| 435 | 441 | ||
| 436 | struct device dev; | 442 | struct device dev; |
| 443 | struct dentry *debugfs; | ||
| 437 | 444 | ||
| 438 | struct hci_dev *hdev; | 445 | struct hci_dev *hdev; |
| 439 | void *l2cap_data; | 446 | void *l2cap_data; |
| @@ -920,8 +927,6 @@ struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev, | |||
| 920 | bdaddr_t *addr, u8 addr_type); | 927 | bdaddr_t *addr, u8 addr_type); |
| 921 | struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev, | 928 | struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev, |
| 922 | bdaddr_t *addr, u8 addr_type); | 929 | bdaddr_t *addr, u8 addr_type); |
| 923 | int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, | ||
| 924 | u8 auto_connect); | ||
| 925 | void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); | 930 | void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); |
| 926 | void hci_conn_params_clear_all(struct hci_dev *hdev); | 931 | void hci_conn_params_clear_all(struct hci_dev *hdev); |
| 927 | void hci_conn_params_clear_disabled(struct hci_dev *hdev); | 932 | void hci_conn_params_clear_disabled(struct hci_dev *hdev); |
| @@ -930,8 +935,6 @@ struct hci_conn_params *hci_pend_le_action_lookup(struct list_head *list, | |||
| 930 | bdaddr_t *addr, | 935 | bdaddr_t *addr, |
| 931 | u8 addr_type); | 936 | u8 addr_type); |
| 932 | 937 | ||
| 933 | void hci_update_background_scan(struct hci_dev *hdev); | ||
| 934 | |||
| 935 | void hci_uuids_clear(struct hci_dev *hdev); | 938 | void hci_uuids_clear(struct hci_dev *hdev); |
| 936 | 939 | ||
| 937 | void hci_link_keys_clear(struct hci_dev *hdev); | 940 | void hci_link_keys_clear(struct hci_dev *hdev); |
| @@ -1284,30 +1287,8 @@ static inline int hci_check_conn_params(u16 min, u16 max, u16 latency, | |||
| 1284 | int hci_register_cb(struct hci_cb *hcb); | 1287 | int hci_register_cb(struct hci_cb *hcb); |
| 1285 | int hci_unregister_cb(struct hci_cb *hcb); | 1288 | int hci_unregister_cb(struct hci_cb *hcb); |
| 1286 | 1289 | ||
| 1287 | struct hci_request { | ||
| 1288 | struct hci_dev *hdev; | ||
| 1289 | struct sk_buff_head cmd_q; | ||
| 1290 | |||
| 1291 | /* If something goes wrong when building the HCI request, the error | ||
| 1292 | * value is stored in this field. | ||
| 1293 | */ | ||
| 1294 | int err; | ||
| 1295 | }; | ||
| 1296 | |||
| 1297 | void hci_req_init(struct hci_request *req, struct hci_dev *hdev); | ||
| 1298 | int hci_req_run(struct hci_request *req, hci_req_complete_t complete); | ||
| 1299 | void hci_req_add(struct hci_request *req, u16 opcode, u32 plen, | ||
| 1300 | const void *param); | ||
| 1301 | void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen, | ||
| 1302 | const void *param, u8 event); | ||
| 1303 | void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status); | ||
| 1304 | bool hci_req_pending(struct hci_dev *hdev); | 1290 | bool hci_req_pending(struct hci_dev *hdev); |
| 1305 | 1291 | ||
| 1306 | void hci_req_add_le_scan_disable(struct hci_request *req); | ||
| 1307 | void hci_req_add_le_passive_scan(struct hci_request *req); | ||
| 1308 | |||
| 1309 | void hci_update_page_scan(struct hci_dev *hdev, struct hci_request *req); | ||
| 1310 | |||
| 1311 | struct sk_buff *__hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen, | 1292 | struct sk_buff *__hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen, |
| 1312 | const void *param, u32 timeout); | 1293 | const void *param, u32 timeout); |
| 1313 | struct sk_buff *__hci_cmd_sync_ev(struct hci_dev *hdev, u16 opcode, u32 plen, | 1294 | struct sk_buff *__hci_cmd_sync_ev(struct hci_dev *hdev, u16 opcode, u32 plen, |
| @@ -1417,8 +1398,6 @@ u8 hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, u16 latency, | |||
| 1417 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand, | 1398 | void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand, |
| 1418 | __u8 ltk[16]); | 1399 | __u8 ltk[16]); |
| 1419 | 1400 | ||
| 1420 | int hci_update_random_address(struct hci_request *req, bool require_privacy, | ||
| 1421 | u8 *own_addr_type); | ||
| 1422 | void hci_copy_identity_address(struct hci_dev *hdev, bdaddr_t *bdaddr, | 1401 | void hci_copy_identity_address(struct hci_dev *hdev, bdaddr_t *bdaddr, |
| 1423 | u8 *bdaddr_type); | 1402 | u8 *bdaddr_type); |
| 1424 | 1403 | ||
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index d1bb342d083f..2239a3753092 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
| @@ -248,6 +248,7 @@ struct l2cap_conn_rsp { | |||
| 248 | #define L2CAP_PSM_SDP 0x0001 | 248 | #define L2CAP_PSM_SDP 0x0001 |
| 249 | #define L2CAP_PSM_RFCOMM 0x0003 | 249 | #define L2CAP_PSM_RFCOMM 0x0003 |
| 250 | #define L2CAP_PSM_3DSP 0x0021 | 250 | #define L2CAP_PSM_3DSP 0x0021 |
| 251 | #define L2CAP_PSM_IPSP 0x0023 /* 6LoWPAN */ | ||
| 251 | 252 | ||
| 252 | /* channel identifier */ | 253 | /* channel identifier */ |
| 253 | #define L2CAP_CID_SIGNALING 0x0001 | 254 | #define L2CAP_CID_SIGNALING 0x0001 |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 578b83127af1..4190af53a46a 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
| @@ -24,8 +24,6 @@ | |||
| 24 | #ifndef __RFCOMM_H | 24 | #ifndef __RFCOMM_H |
| 25 | #define __RFCOMM_H | 25 | #define __RFCOMM_H |
| 26 | 26 | ||
| 27 | #define RFCOMM_PSM 3 | ||
| 28 | |||
| 29 | #define RFCOMM_CONN_TIMEOUT (HZ * 30) | 27 | #define RFCOMM_CONN_TIMEOUT (HZ * 30) |
| 30 | #define RFCOMM_DISC_TIMEOUT (HZ * 20) | 28 | #define RFCOMM_DISC_TIMEOUT (HZ * 20) |
| 31 | #define RFCOMM_AUTH_TIMEOUT (HZ * 25) | 29 | #define RFCOMM_AUTH_TIMEOUT (HZ * 25) |
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index 7f713acfa106..eeda67652766 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <net/nl802154.h> | 25 | #include <net/nl802154.h> |
| 26 | 26 | ||
| 27 | struct wpan_phy; | 27 | struct wpan_phy; |
| 28 | struct wpan_phy_cca; | ||
| 28 | 29 | ||
| 29 | struct cfg802154_ops { | 30 | struct cfg802154_ops { |
| 30 | struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, | 31 | struct net_device * (*add_virtual_intf_deprecated)(struct wpan_phy *wpan_phy, |
| @@ -39,6 +40,8 @@ struct cfg802154_ops { | |||
| 39 | int (*del_virtual_intf)(struct wpan_phy *wpan_phy, | 40 | int (*del_virtual_intf)(struct wpan_phy *wpan_phy, |
| 40 | struct wpan_dev *wpan_dev); | 41 | struct wpan_dev *wpan_dev); |
| 41 | int (*set_channel)(struct wpan_phy *wpan_phy, u8 page, u8 channel); | 42 | int (*set_channel)(struct wpan_phy *wpan_phy, u8 page, u8 channel); |
| 43 | int (*set_cca_mode)(struct wpan_phy *wpan_phy, | ||
| 44 | const struct wpan_phy_cca *cca); | ||
| 42 | int (*set_pan_id)(struct wpan_phy *wpan_phy, | 45 | int (*set_pan_id)(struct wpan_phy *wpan_phy, |
| 43 | struct wpan_dev *wpan_dev, __le16 pan_id); | 46 | struct wpan_dev *wpan_dev, __le16 pan_id); |
| 44 | int (*set_short_addr)(struct wpan_phy *wpan_phy, | 47 | int (*set_short_addr)(struct wpan_phy *wpan_phy, |
| @@ -56,6 +59,11 @@ struct cfg802154_ops { | |||
| 56 | struct wpan_dev *wpan_dev, bool mode); | 59 | struct wpan_dev *wpan_dev, bool mode); |
| 57 | }; | 60 | }; |
| 58 | 61 | ||
| 62 | struct wpan_phy_cca { | ||
| 63 | enum nl802154_cca_modes mode; | ||
| 64 | enum nl802154_cca_opts opt; | ||
| 65 | }; | ||
| 66 | |||
| 59 | struct wpan_phy { | 67 | struct wpan_phy { |
| 60 | struct mutex pib_lock; | 68 | struct mutex pib_lock; |
| 61 | 69 | ||
| @@ -76,7 +84,7 @@ struct wpan_phy { | |||
| 76 | u8 current_page; | 84 | u8 current_page; |
| 77 | u32 channels_supported[IEEE802154_MAX_PAGE + 1]; | 85 | u32 channels_supported[IEEE802154_MAX_PAGE + 1]; |
| 78 | s8 transmit_power; | 86 | s8 transmit_power; |
| 79 | u8 cca_mode; | 87 | struct wpan_phy_cca cca; |
| 80 | 88 | ||
| 81 | __le64 perm_extended_addr; | 89 | __le64 perm_extended_addr; |
| 82 | 90 | ||
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index 83bb8a73d23c..94a297052442 100644 --- a/include/net/ieee802154_netdev.h +++ b/include/net/ieee802154_netdev.h | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
| 29 | #include <linux/ieee802154.h> | 29 | #include <linux/ieee802154.h> |
| 30 | 30 | ||
| 31 | #include <net/cfg802154.h> | ||
| 32 | |||
| 31 | struct ieee802154_sechdr { | 33 | struct ieee802154_sechdr { |
| 32 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 34 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| 33 | u8 level:3, | 35 | u8 level:3, |
| @@ -337,7 +339,7 @@ struct ieee802154_mac_params { | |||
| 337 | s8 frame_retries; | 339 | s8 frame_retries; |
| 338 | 340 | ||
| 339 | bool lbt; | 341 | bool lbt; |
| 340 | u8 cca_mode; | 342 | struct wpan_phy_cca cca; |
| 341 | s32 cca_ed_level; | 343 | s32 cca_ed_level; |
| 342 | }; | 344 | }; |
| 343 | 345 | ||
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index c823d910b46c..850647811749 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | #include <linux/ieee802154.h> | 20 | #include <linux/ieee802154.h> |
| 21 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
| 22 | 22 | ||
| 23 | #include <net/cfg802154.h> | ||
| 24 | |||
| 23 | /* General MAC frame format: | 25 | /* General MAC frame format: |
| 24 | * 2 bytes: Frame Control | 26 | * 2 bytes: Frame Control |
| 25 | * 1 byte: Sequence Number | 27 | * 1 byte: Sequence Number |
| @@ -212,7 +214,8 @@ struct ieee802154_ops { | |||
| 212 | unsigned long changed); | 214 | unsigned long changed); |
| 213 | int (*set_txpower)(struct ieee802154_hw *hw, int db); | 215 | int (*set_txpower)(struct ieee802154_hw *hw, int db); |
| 214 | int (*set_lbt)(struct ieee802154_hw *hw, bool on); | 216 | int (*set_lbt)(struct ieee802154_hw *hw, bool on); |
| 215 | int (*set_cca_mode)(struct ieee802154_hw *hw, u8 mode); | 217 | int (*set_cca_mode)(struct ieee802154_hw *hw, |
| 218 | const struct wpan_phy_cca *cca); | ||
| 216 | int (*set_cca_ed_level)(struct ieee802154_hw *hw, | 219 | int (*set_cca_ed_level)(struct ieee802154_hw *hw, |
| 217 | s32 level); | 220 | s32 level); |
| 218 | int (*set_csma_params)(struct ieee802154_hw *hw, | 221 | int (*set_csma_params)(struct ieee802154_hw *hw, |
diff --git a/include/net/nl802154.h b/include/net/nl802154.h index 6dbd406ca41b..f8b5bc997959 100644 --- a/include/net/nl802154.h +++ b/include/net/nl802154.h | |||
| @@ -82,7 +82,7 @@ enum nl802154_attrs { | |||
| 82 | NL802154_ATTR_TX_POWER, | 82 | NL802154_ATTR_TX_POWER, |
| 83 | 83 | ||
| 84 | NL802154_ATTR_CCA_MODE, | 84 | NL802154_ATTR_CCA_MODE, |
| 85 | NL802154_ATTR_CCA_MODE3_AND, | 85 | NL802154_ATTR_CCA_OPT, |
| 86 | NL802154_ATTR_CCA_ED_LEVEL, | 86 | NL802154_ATTR_CCA_ED_LEVEL, |
| 87 | 87 | ||
| 88 | NL802154_ATTR_MAX_FRAME_RETRIES, | 88 | NL802154_ATTR_MAX_FRAME_RETRIES, |
| @@ -119,4 +119,47 @@ enum nl802154_iftype { | |||
| 119 | NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1 | 119 | NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1 |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | /** | ||
| 123 | * enum nl802154_cca_modes - cca modes | ||
| 124 | * | ||
| 125 | * @__NL802154_CCA_INVALID: cca mode number 0 is reserved | ||
| 126 | * @NL802154_CCA_ENERGY: Energy above threshold | ||
| 127 | * @NL802154_CCA_CARRIER: Carrier sense only | ||
| 128 | * @NL802154_CCA_ENERGY_CARRIER: Carrier sense with energy above threshold | ||
| 129 | * @NL802154_CCA_ALOHA: CCA shall always report an idle medium | ||
| 130 | * @NL802154_CCA_UWB_SHR: UWB preamble sense based on the SHR of a frame | ||
| 131 | * @NL802154_CCA_UWB_MULTIPEXED: UWB preamble sense based on the packet with | ||
| 132 | * the multiplexed preamble | ||
| 133 | * @__NL802154_CCA_ATTR_AFTER_LAST: Internal | ||
| 134 | * @NL802154_CCA_ATTR_MAX: Maximum CCA attribute number | ||
| 135 | */ | ||
| 136 | enum nl802154_cca_modes { | ||
| 137 | __NL802154_CCA_INVALID, | ||
| 138 | NL802154_CCA_ENERGY, | ||
| 139 | NL802154_CCA_CARRIER, | ||
| 140 | NL802154_CCA_ENERGY_CARRIER, | ||
| 141 | NL802154_CCA_ALOHA, | ||
| 142 | NL802154_CCA_UWB_SHR, | ||
| 143 | NL802154_CCA_UWB_MULTIPEXED, | ||
| 144 | |||
| 145 | /* keep last */ | ||
| 146 | __NL802154_CCA_ATTR_AFTER_LAST, | ||
| 147 | NL802154_CCA_ATTR_MAX = __NL802154_CCA_ATTR_AFTER_LAST - 1 | ||
| 148 | }; | ||
| 149 | |||
| 150 | /** | ||
| 151 | * enum nl802154_cca_opts - additional options for cca modes | ||
| 152 | * | ||
| 153 | * @NL802154_CCA_OPT_ENERGY_CARRIER_OR: NL802154_CCA_ENERGY_CARRIER with OR | ||
| 154 | * @NL802154_CCA_OPT_ENERGY_CARRIER_AND: NL802154_CCA_ENERGY_CARRIER with AND | ||
| 155 | */ | ||
| 156 | enum nl802154_cca_opts { | ||
| 157 | NL802154_CCA_OPT_ENERGY_CARRIER_AND, | ||
| 158 | NL802154_CCA_OPT_ENERGY_CARRIER_OR, | ||
| 159 | |||
| 160 | /* keep last */ | ||
| 161 | __NL802154_CCA_OPT_ATTR_AFTER_LAST, | ||
| 162 | NL802154_CCA_OPT_ATTR_MAX = __NL802154_CCA_OPT_ATTR_AFTER_LAST - 1 | ||
| 163 | }; | ||
| 164 | |||
| 122 | #endif /* __NL802154_H */ | 165 | #endif /* __NL802154_H */ |
