Bluetooth: Enable LE 2M PHY by default
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 Bluetooth: Enable LE 2M PHY by default
From: Luiz Augusto von Dentz <[email protected]>
This enables 2M PHY by default and in case the controller doesn't support HCI_OP_LE_SET_DEFAULT_PHY then default to just 1M PHY.
Signed-off-by Luiz Augusto von Dentz <[email protected]>
--- net/bluetooth/hci_core.c | 4 ++-- net/bluetooth/hci_sync.c | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-)
net/bluetooth/hci_core.c +2 -2
@@ -2469,8 +2469,8 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv) hdev->le_max_rx_time =0x0148 ; hdev->le_max_key_size =SMP_MAX_ENC_KEY_SIZE ; hdev->le_min_key_size =SMP_MIN_ENC_KEY_SIZE ; - hdev->le_tx_def_phys =HCI_LE_SET_PHY_1M ; - hdev->le_rx_def_phys =HCI_LE_SET_PHY_1M ; + hdev->le_tx_def_phys =HCI_LE_SET_PHY_1M |HCI_LE_SET_PHY_2M ; + hdev->le_rx_def_phys =HCI_LE_SET_PHY_1M |HCI_LE_SET_PHY_2M ; hdev->le_num_of_adv_sets =HCI_MAX_ADV_INSTANCES ; hdev->def_multi_adv_rotation_duration =HCI_DEFAULT_ADV_DURATION ; hdev->def_le_autoconnect_timeout =HCI_LE_AUTOCONN_TIMEOUT ;
net/bluetooth/hci_sync.c +7 -2
@@ -4348,13 +4348,18 @@ static int hci_le_set_write_def_data_len_sync(struct hci_dev *hdev) sizeof(cp), &cp, HCI_CMD_TIMEOUT); } -/* Set Default PHY parameters if command is supported */ +/* Set Default PHY parameters if command is supported, if not supported default +* to 1M. +*/ static int hci_le_set_default_phy_sync (struct hci_dev *hdev) {struct hci_cp_le_set_default_phy cp; -if (!(hdev->commands[35 ] &0x20 )) +if (!(hdev->commands[35 ] &0x20 )) { + hdev->le_tx_def_phys =HCI_LE_SET_PHY_1M ; + hdev->le_rx_def_phys =HCI_LE_SET_PHY_1M ;return 0 ; + }memset (&cp,0 ,sizeof (cp)); cp.all_phys =0x00 ;
Signature · 1 line
2.37.2
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=674664
---Test result---
Test Summary:
CheckPatch PASS 1.77 seconds GitLint PASS 0.98 seconds SubjectPrefix PASS 0.87 seconds BuildKernel PASS 36.43 seconds BuildKernel32 PASS 32.20 seconds Incremental Build with patchesPASS 48.59 seconds TestRunner: Setup PASS 529.00 seconds TestRunner: l2cap-tester PASS 17.66 seconds TestRunner: iso-tester PASS 16.81 seconds TestRunner: bnep-tester PASS 6.67 seconds TestRunner: mgmt-tester FAIL 108.08 seconds TestRunner: rfcomm-tester PASS 10.39 seconds TestRunner: sco-tester PASS 9.98 seconds TestRunner: smp-tester PASS 9.92 seconds TestRunner: userchan-tester PASS 6.90 seconds
Details
##############################
Test: TestRunner: mgmt-tester - FAIL - 108.08 seconds Run test-runner with mgmt-tester
Total: 494, Passed: 492 (99.6%), Failed: 2, Not Run: 0
Failed Test Cases
Get PHY Success Failed 0.120 seconds Set PHY 2m Success Timed out 2.402 seconds
---
Regards,
Linux Bluetooth