diff options
-rw-r--r-- | include/net/bluetooth/hci.h | 4 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 3 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 9 |
3 files changed, 12 insertions, 4 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 73e48be5bbb3..664fe1ebf2c7 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -1514,6 +1514,10 @@ struct hci_cp_le_set_default_phy { | |||
1514 | __u8 rx_phys; | 1514 | __u8 rx_phys; |
1515 | } __packed; | 1515 | } __packed; |
1516 | 1516 | ||
1517 | #define HCI_LE_SET_PHY_1M 0x01 | ||
1518 | #define HCI_LE_SET_PHY_2M 0x02 | ||
1519 | #define HCI_LE_SET_PHY_CODED 0x04 | ||
1520 | |||
1517 | #define HCI_OP_LE_SET_EXT_SCAN_PARAMS 0x2041 | 1521 | #define HCI_OP_LE_SET_EXT_SCAN_PARAMS 0x2041 |
1518 | struct hci_cp_le_set_ext_scan_params { | 1522 | struct hci_cp_le_set_ext_scan_params { |
1519 | __u8 own_addr_type; | 1523 | __u8 own_addr_type; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index a74453571264..71f79df9ee05 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -315,6 +315,9 @@ struct hci_dev { | |||
315 | unsigned long sco_last_tx; | 315 | unsigned long sco_last_tx; |
316 | unsigned long le_last_tx; | 316 | unsigned long le_last_tx; |
317 | 317 | ||
318 | __u8 le_tx_def_phys; | ||
319 | __u8 le_rx_def_phys; | ||
320 | |||
318 | struct workqueue_struct *workqueue; | 321 | struct workqueue_struct *workqueue; |
319 | struct workqueue_struct *req_workqueue; | 322 | struct workqueue_struct *req_workqueue; |
320 | 323 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f5c21004186c..432f89f390c0 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -830,10 +830,9 @@ static int hci_init4_req(struct hci_request *req, unsigned long opt) | |||
830 | if (hdev->commands[35] & 0x20) { | 830 | if (hdev->commands[35] & 0x20) { |
831 | struct hci_cp_le_set_default_phy cp; | 831 | struct hci_cp_le_set_default_phy cp; |
832 | 832 | ||
833 | /* No transmitter PHY or receiver PHY preferences */ | 833 | cp.all_phys = 0x00; |
834 | cp.all_phys = 0x03; | 834 | cp.tx_phys = hdev->le_tx_def_phys; |
835 | cp.tx_phys = 0; | 835 | cp.rx_phys = hdev->le_rx_def_phys; |
836 | cp.rx_phys = 0; | ||
837 | 836 | ||
838 | hci_req_add(req, HCI_OP_LE_SET_DEFAULT_PHY, sizeof(cp), &cp); | 837 | hci_req_add(req, HCI_OP_LE_SET_DEFAULT_PHY, sizeof(cp), &cp); |
839 | } | 838 | } |
@@ -3027,6 +3026,8 @@ struct hci_dev *hci_alloc_dev(void) | |||
3027 | hdev->le_max_tx_time = 0x0148; | 3026 | hdev->le_max_tx_time = 0x0148; |
3028 | hdev->le_max_rx_len = 0x001b; | 3027 | hdev->le_max_rx_len = 0x001b; |
3029 | hdev->le_max_rx_time = 0x0148; | 3028 | hdev->le_max_rx_time = 0x0148; |
3029 | hdev->le_tx_def_phys = HCI_LE_SET_PHY_1M; | ||
3030 | hdev->le_rx_def_phys = HCI_LE_SET_PHY_1M; | ||
3030 | 3031 | ||
3031 | hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT; | 3032 | hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT; |
3032 | hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT; | 3033 | hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT; |