Message ID | 20221031220205.91975-1-brian.gix@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RFC] Bluetooth: Convert MSFT filter HCI cmd to hci_sync | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/checkpatch | success | Checkpatch PASS |
tedd_an/gitlint | success | Gitlint PASS |
tedd_an/subjectprefix | success | PASS |
tedd_an/buildkernel | success | Build Kernel PASS |
tedd_an/buildkernel32 | success | Build Kernel32 PASS |
tedd_an/incremental_build | success | Pass |
tedd_an/testrunnersetup | success | Test Runner Setup PASS |
tedd_an/testrunnerl2cap-tester | success | Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunneriso-tester | success | Total: 55, Passed: 55 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerbnep-tester | success | Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnermgmt-tester | success | Total: 494, Passed: 494 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerrfcomm-tester | success | Total: 11, Passed: 11 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersco-tester | success | Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnerioctl-tester | success | Total: 28, Passed: 28 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnermesh-tester | success | Total: 10, Passed: 10 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunnersmp-tester | success | Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/testrunneruserchan-tester | success | Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0 |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/BuildKernel32 | success | BuildKernel32 PASS |
tedd_an/TestRunnerSetup | success | TestRunnerSetup PASS |
tedd_an/TestRunner_l2cap-tester | success | TestRunner PASS |
tedd_an/TestRunner_iso-tester | success | TestRunner PASS |
tedd_an/TestRunner_bnep-tester | success | TestRunner PASS |
tedd_an/TestRunner_mgmt-tester | success | TestRunner PASS |
tedd_an/TestRunner_rfcomm-tester | success | TestRunner PASS |
tedd_an/TestRunner_sco-tester | success | TestRunner PASS |
tedd_an/TestRunner_ioctl-tester | success | TestRunner PASS |
tedd_an/TestRunner_mesh-tester | success | TestRunner PASS |
tedd_an/TestRunner_smp-tester | success | TestRunner PASS |
tedd_an/TestRunner_userchan-tester | success | TestRunner PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
Hi Mateusz, Please note that this is UNTESTED, hence the RFC tag. I don't have any code that exercises this particular part of the code, but if it works, it should solve your: Bluetooth: hci0: HCI_REQ-0xfcf0 error. --Brian On Mon, 2022-10-31 at 15:02 -0700, Brian Gix wrote: > The msft_set_filter_enable() command was using the deprecated > hci_request mechanism rather than hci_sync. This caused the warning > error: > hci0: HCI_REQ-0xfcf0 > > Signed-off-by: Brian Gix <brian.gix@intel.com> > --- > net/bluetooth/msft.c | 36 +++++++++++------------------------- > 1 file changed, 11 insertions(+), 25 deletions(-) > > diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c > index bee6a4c656be..bf5cee48916c 100644 > --- a/net/bluetooth/msft.c > +++ b/net/bluetooth/msft.c > @@ -743,17 +743,12 @@ __u64 msft_get_features(struct hci_dev *hdev) > } > > static void msft_le_set_advertisement_filter_enable_cb(struct > hci_dev *hdev, > - u8 status, u16 > opcode, > - struct sk_buff > *skb) > + void > *user_data, > + u8 status) > { > - struct msft_cp_le_set_advertisement_filter_enable *cp; > - struct msft_rp_le_set_advertisement_filter_enable *rp; > + struct msft_cp_le_set_advertisement_filter_enable *cp = > user_data; > struct msft_data *msft = hdev->msft_data; > > - rp = (struct msft_rp_le_set_advertisement_filter_enable > *)skb->data; > - if (skb->len < sizeof(*rp)) > - return; > - > /* Error 0x0C would be returned if the filter enabled status > is > * already set to whatever we were trying to set. > * Although the default state should be disabled, some > controller set > @@ -766,7 +761,6 @@ static void > msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev, > > hci_dev_lock(hdev); > > - cp = hci_sent_cmd_data(hdev, hdev->msft_opcode); > msft->filter_enabled = cp->enable; > > if (status == 0x0C) > @@ -804,31 +798,23 @@ int msft_remove_monitor(struct hci_dev *hdev, > struct adv_monitor *monitor) > return msft_remove_monitor_sync(hdev, monitor); > } > > -void msft_req_add_set_filter_enable(struct hci_request *req, bool > enable) > -{ > - struct hci_dev *hdev = req->hdev; > - struct msft_cp_le_set_advertisement_filter_enable cp; > - > - cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; > - cp.enable = enable; > - > - hci_req_add(req, hdev->msft_opcode, sizeof(cp), &cp); > -} > - > int msft_set_filter_enable(struct hci_dev *hdev, bool enable) > { > - struct hci_request req; > + struct msft_cp_le_set_advertisement_filter_enable cp; > struct msft_data *msft = hdev->msft_data; > int err; > > if (!msft) > return -EOPNOTSUPP; > > - hci_req_init(&req, hdev); > - msft_req_add_set_filter_enable(&req, enable); > - err = hci_req_run_skb(&req, > msft_le_set_advertisement_filter_enable_cb); > + cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; > + cp.enable = enable; > + err = __hci_cmd_sync_status(hdev, hdev->msft_opcode, > sizeof(cp), &cp, > + HCI_CMD_TIMEOUT); > + > + msft_le_set_advertisement_filter_enable_cb(hdev, &cp, err); > > - return err; > + return 0; > } > > bool msft_curve_validity(struct hci_dev *hdev)
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=690652 ---Test result--- Test Summary: CheckPatch PASS 1.37 seconds GitLint PASS 0.79 seconds SubjectPrefix PASS 0.73 seconds BuildKernel PASS 36.28 seconds BuildKernel32 PASS 32.91 seconds Incremental Build with patchesPASS 48.56 seconds TestRunner: Setup PASS 547.33 seconds TestRunner: l2cap-tester PASS 18.57 seconds TestRunner: iso-tester PASS 17.49 seconds TestRunner: bnep-tester PASS 6.79 seconds TestRunner: mgmt-tester PASS 111.09 seconds TestRunner: rfcomm-tester PASS 10.77 seconds TestRunner: sco-tester PASS 10.26 seconds TestRunner: ioctl-tester PASS 11.48 seconds TestRunner: mesh-tester PASS 8.26 seconds TestRunner: smp-tester PASS 9.99 seconds TestRunner: userchan-tester PASS 6.98 seconds --- Regards, Linux Bluetooth
Hi Brian, On Mon, Oct 31, 2022 at 3:02 PM Brian Gix <brian.gix@intel.com> wrote: > > The msft_set_filter_enable() command was using the deprecated > hci_request mechanism rather than hci_sync. This caused the warning error: > hci0: HCI_REQ-0xfcf0 > > Signed-off-by: Brian Gix <brian.gix@intel.com> > --- > net/bluetooth/msft.c | 36 +++++++++++------------------------- > 1 file changed, 11 insertions(+), 25 deletions(-) > > diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c > index bee6a4c656be..bf5cee48916c 100644 > --- a/net/bluetooth/msft.c > +++ b/net/bluetooth/msft.c > @@ -743,17 +743,12 @@ __u64 msft_get_features(struct hci_dev *hdev) > } > > static void msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev, > - u8 status, u16 opcode, > - struct sk_buff *skb) > + void *user_data, > + u8 status) > { > - struct msft_cp_le_set_advertisement_filter_enable *cp; > - struct msft_rp_le_set_advertisement_filter_enable *rp; > + struct msft_cp_le_set_advertisement_filter_enable *cp = user_data; > struct msft_data *msft = hdev->msft_data; > > - rp = (struct msft_rp_le_set_advertisement_filter_enable *)skb->data; > - if (skb->len < sizeof(*rp)) > - return; > - > /* Error 0x0C would be returned if the filter enabled status is > * already set to whatever we were trying to set. > * Although the default state should be disabled, some controller set > @@ -766,7 +761,6 @@ static void msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev, > > hci_dev_lock(hdev); > > - cp = hci_sent_cmd_data(hdev, hdev->msft_opcode); > msft->filter_enabled = cp->enable; > > if (status == 0x0C) > @@ -804,31 +798,23 @@ int msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor) > return msft_remove_monitor_sync(hdev, monitor); > } > > -void msft_req_add_set_filter_enable(struct hci_request *req, bool enable) > -{ > - struct hci_dev *hdev = req->hdev; > - struct msft_cp_le_set_advertisement_filter_enable cp; > - > - cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; > - cp.enable = enable; > - > - hci_req_add(req, hdev->msft_opcode, sizeof(cp), &cp); > -} > - > int msft_set_filter_enable(struct hci_dev *hdev, bool enable) > { > - struct hci_request req; > + struct msft_cp_le_set_advertisement_filter_enable cp; > struct msft_data *msft = hdev->msft_data; > int err; > > if (!msft) > return -EOPNOTSUPP; > > - hci_req_init(&req, hdev); > - msft_req_add_set_filter_enable(&req, enable); > - err = hci_req_run_skb(&req, msft_le_set_advertisement_filter_enable_cb); > + cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; > + cp.enable = enable; > + err = __hci_cmd_sync_status(hdev, hdev->msft_opcode, sizeof(cp), &cp, > + HCI_CMD_TIMEOUT); > + > + msft_le_set_advertisement_filter_enable_cb(hdev, &cp, err); Except if this function is only supposed to be called for a safe context (which can block) we should actually use hci_cmd_sync_queue. > > - return err; > + return 0; > } > > bool msft_curve_validity(struct hci_dev *hdev) > -- > 2.38.1 >
Hi Luiz, On Mon, 2022-10-31 at 16:25 -0700, Luiz Augusto von Dentz wrote: > Hi Brian, > > On Mon, Oct 31, 2022 at 3:02 PM Brian Gix <brian.gix@intel.com> > wrote: > > > > The msft_set_filter_enable() command was using the deprecated > > hci_request mechanism rather than hci_sync. This caused the warning > > error: > > hci0: HCI_REQ-0xfcf0 > > > > Signed-off-by: Brian Gix <brian.gix@intel.com> > > --- > > net/bluetooth/msft.c | 36 +++++++++++------------------------- > > 1 file changed, 11 insertions(+), 25 deletions(-) > > > > diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c > > index bee6a4c656be..bf5cee48916c 100644 > > --- a/net/bluetooth/msft.c > > +++ b/net/bluetooth/msft.c > > @@ -743,17 +743,12 @@ __u64 msft_get_features(struct hci_dev *hdev) > > } > > > > static void msft_le_set_advertisement_filter_enable_cb(struct > > hci_dev *hdev, > > - u8 status, > > u16 opcode, > > - struct > > sk_buff *skb) > > + void > > *user_data, > > + u8 status) > > { > > - struct msft_cp_le_set_advertisement_filter_enable *cp; > > - struct msft_rp_le_set_advertisement_filter_enable *rp; > > + struct msft_cp_le_set_advertisement_filter_enable *cp = > > user_data; > > struct msft_data *msft = hdev->msft_data; > > > > - rp = (struct msft_rp_le_set_advertisement_filter_enable > > *)skb->data; > > - if (skb->len < sizeof(*rp)) > > - return; > > - > > /* Error 0x0C would be returned if the filter enabled > > status is > > * already set to whatever we were trying to set. > > * Although the default state should be disabled, some > > controller set > > @@ -766,7 +761,6 @@ static void > > msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev, > > > > hci_dev_lock(hdev); > > > > - cp = hci_sent_cmd_data(hdev, hdev->msft_opcode); > > msft->filter_enabled = cp->enable; > > > > if (status == 0x0C) > > @@ -804,31 +798,23 @@ int msft_remove_monitor(struct hci_dev *hdev, > > struct adv_monitor *monitor) > > return msft_remove_monitor_sync(hdev, monitor); > > } > > > > -void msft_req_add_set_filter_enable(struct hci_request *req, bool > > enable) > > -{ > > - struct hci_dev *hdev = req->hdev; > > - struct msft_cp_le_set_advertisement_filter_enable cp; > > - > > - cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; > > - cp.enable = enable; > > - > > - hci_req_add(req, hdev->msft_opcode, sizeof(cp), &cp); > > -} > > - > > int msft_set_filter_enable(struct hci_dev *hdev, bool enable) > > { > > - struct hci_request req; > > + struct msft_cp_le_set_advertisement_filter_enable cp; > > struct msft_data *msft = hdev->msft_data; > > int err; > > > > if (!msft) > > return -EOPNOTSUPP; > > > > - hci_req_init(&req, hdev); > > - msft_req_add_set_filter_enable(&req, enable); > > - err = hci_req_run_skb(&req, > > msft_le_set_advertisement_filter_enable_cb); > > + cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; > > + cp.enable = enable; > > + err = __hci_cmd_sync_status(hdev, hdev->msft_opcode, > > sizeof(cp), &cp, > > + HCI_CMD_TIMEOUT); > > + > > + msft_le_set_advertisement_filter_enable_cb(hdev, &cp, err); > > Except if this function is only supposed to be called for a safe > context (which can block) we should actually use hci_cmd_sync_queue. This call is made from msft_do_open() which has one call: from hci_dev_init_sync(), which also calls aosp_do_open(). From within aosp_do_open(), we are also calling __hci_cmd_sync(), and if we assume that that has been tested and is working, then making what is essentially the identical call here should be fine. Otherwise, we should also recode aosp_do_open to use the hci_cmd_sync_queue as well. > > > > - return err; > > + return 0; > > } > > > > bool msft_curve_validity(struct hci_dev *hdev) > > -- > > 2.38.1 > > > >
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.77 seconds GitLint PASS 0.38 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 41.72 seconds BuildKernel32 PASS 38.33 seconds TestRunnerSetup PASS 507.69 seconds TestRunner_l2cap-tester PASS 18.20 seconds TestRunner_iso-tester PASS 18.34 seconds TestRunner_bnep-tester PASS 6.43 seconds TestRunner_mgmt-tester PASS 121.16 seconds TestRunner_rfcomm-tester PASS 10.91 seconds TestRunner_sco-tester PASS 10.17 seconds TestRunner_ioctl-tester PASS 11.67 seconds TestRunner_mesh-tester PASS 8.12 seconds TestRunner_smp-tester PASS 10.05 seconds TestRunner_userchan-tester PASS 6.88 seconds IncrementalBuild PASS 38.73 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.59 seconds GitLint PASS 0.28 seconds SubjectPrefix PASS 0.09 seconds BuildKernel PASS 34.10 seconds BuildKernel32 PASS 30.42 seconds TestRunnerSetup PASS 420.82 seconds TestRunner_l2cap-tester PASS 15.66 seconds TestRunner_iso-tester PASS 14.89 seconds TestRunner_bnep-tester PASS 5.26 seconds TestRunner_mgmt-tester PASS 106.33 seconds TestRunner_rfcomm-tester PASS 9.09 seconds TestRunner_sco-tester PASS 8.65 seconds TestRunner_ioctl-tester PASS 9.89 seconds TestRunner_mesh-tester PASS 6.66 seconds TestRunner_smp-tester PASS 8.39 seconds TestRunner_userchan-tester PASS 5.53 seconds IncrementalBuild PASS 30.62 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.66 seconds GitLint PASS 0.33 seconds SubjectPrefix PASS 0.11 seconds BuildKernel PASS 34.17 seconds BuildKernel32 PASS 29.89 seconds TestRunnerSetup PASS 420.10 seconds TestRunner_l2cap-tester PASS 16.04 seconds TestRunner_iso-tester PASS 15.41 seconds TestRunner_bnep-tester PASS 5.39 seconds TestRunner_mgmt-tester PASS 104.21 seconds TestRunner_rfcomm-tester PASS 9.14 seconds TestRunner_sco-tester PASS 8.54 seconds TestRunner_ioctl-tester PASS 9.80 seconds TestRunner_mesh-tester PASS 6.65 seconds TestRunner_smp-tester PASS 8.38 seconds TestRunner_userchan-tester PASS 5.65 seconds IncrementalBuild PASS 30.65 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.67 seconds GitLint PASS 0.33 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 34.29 seconds BuildKernel32 PASS 30.36 seconds TestRunnerSetup PASS 420.04 seconds TestRunner_l2cap-tester PASS 15.69 seconds TestRunner_iso-tester PASS 15.03 seconds TestRunner_bnep-tester PASS 5.35 seconds TestRunner_mgmt-tester PASS 103.66 seconds TestRunner_rfcomm-tester PASS 9.17 seconds TestRunner_sco-tester PASS 8.64 seconds TestRunner_ioctl-tester PASS 9.88 seconds TestRunner_mesh-tester PASS 6.70 seconds TestRunner_smp-tester PASS 8.43 seconds TestRunner_userchan-tester PASS 5.64 seconds IncrementalBuild PASS 31.45 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.75 seconds GitLint PASS 0.38 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 38.69 seconds BuildKernel32 PASS 34.79 seconds TestRunnerSetup PASS 489.22 seconds TestRunner_l2cap-tester PASS 17.50 seconds TestRunner_iso-tester PASS 17.58 seconds TestRunner_bnep-tester PASS 6.30 seconds TestRunner_mgmt-tester PASS 118.97 seconds TestRunner_rfcomm-tester PASS 10.72 seconds TestRunner_sco-tester PASS 10.03 seconds TestRunner_ioctl-tester PASS 11.72 seconds TestRunner_mesh-tester PASS 8.04 seconds TestRunner_smp-tester PASS 9.84 seconds TestRunner_userchan-tester PASS 6.84 seconds IncrementalBuild PASS 37.34 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.67 seconds GitLint PASS 0.33 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 33.73 seconds BuildKernel32 PASS 29.94 seconds TestRunnerSetup PASS 418.97 seconds TestRunner_l2cap-tester PASS 16.05 seconds TestRunner_iso-tester PASS 15.06 seconds TestRunner_bnep-tester PASS 5.36 seconds TestRunner_mgmt-tester PASS 104.08 seconds TestRunner_rfcomm-tester PASS 9.08 seconds TestRunner_sco-tester PASS 8.57 seconds TestRunner_ioctl-tester PASS 9.68 seconds TestRunner_mesh-tester PASS 6.72 seconds TestRunner_smp-tester PASS 8.43 seconds TestRunner_userchan-tester PASS 5.54 seconds IncrementalBuild PASS 30.81 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.70 seconds GitLint PASS 0.35 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 33.82 seconds BuildKernel32 PASS 30.51 seconds TestRunnerSetup PASS 425.75 seconds TestRunner_l2cap-tester PASS 16.35 seconds TestRunner_iso-tester PASS 15.92 seconds TestRunner_bnep-tester PASS 5.60 seconds TestRunner_mgmt-tester PASS 105.95 seconds TestRunner_rfcomm-tester PASS 9.50 seconds TestRunner_sco-tester PASS 8.96 seconds TestRunner_ioctl-tester PASS 10.28 seconds TestRunner_mesh-tester PASS 6.99 seconds TestRunner_smp-tester PASS 8.75 seconds TestRunner_userchan-tester PASS 5.89 seconds IncrementalBuild PASS 31.59 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.69 seconds GitLint PASS 0.34 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 33.65 seconds BuildKernel32 PASS 30.66 seconds TestRunnerSetup PASS 425.34 seconds TestRunner_l2cap-tester PASS 16.09 seconds TestRunner_iso-tester PASS 15.58 seconds TestRunner_bnep-tester PASS 5.55 seconds TestRunner_mgmt-tester PASS 106.91 seconds TestRunner_rfcomm-tester PASS 9.47 seconds TestRunner_sco-tester PASS 8.97 seconds TestRunner_ioctl-tester PASS 10.18 seconds TestRunner_mesh-tester PASS 7.08 seconds TestRunner_smp-tester PASS 8.77 seconds TestRunner_userchan-tester PASS 5.83 seconds IncrementalBuild PASS 31.51 seconds --- Regards, Linux Bluetooth
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=690652 ---Test result--- Test Summary: CheckPatch PASS 0.60 seconds GitLint PASS 0.29 seconds SubjectPrefix PASS 0.10 seconds BuildKernel PASS 33.72 seconds BuildKernel32 PASS 30.16 seconds TestRunnerSetup PASS 420.94 seconds TestRunner_l2cap-tester PASS 15.68 seconds TestRunner_iso-tester PASS 15.07 seconds TestRunner_bnep-tester PASS 5.26 seconds TestRunner_mgmt-tester PASS 103.94 seconds TestRunner_rfcomm-tester PASS 9.08 seconds TestRunner_sco-tester PASS 8.59 seconds TestRunner_ioctl-tester PASS 9.86 seconds TestRunner_mesh-tester PASS 6.69 seconds TestRunner_smp-tester PASS 8.41 seconds TestRunner_userchan-tester PASS 5.52 seconds IncrementalBuild PASS 31.24 seconds --- Regards, Linux Bluetooth
diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c index bee6a4c656be..bf5cee48916c 100644 --- a/net/bluetooth/msft.c +++ b/net/bluetooth/msft.c @@ -743,17 +743,12 @@ __u64 msft_get_features(struct hci_dev *hdev) } static void msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev, - u8 status, u16 opcode, - struct sk_buff *skb) + void *user_data, + u8 status) { - struct msft_cp_le_set_advertisement_filter_enable *cp; - struct msft_rp_le_set_advertisement_filter_enable *rp; + struct msft_cp_le_set_advertisement_filter_enable *cp = user_data; struct msft_data *msft = hdev->msft_data; - rp = (struct msft_rp_le_set_advertisement_filter_enable *)skb->data; - if (skb->len < sizeof(*rp)) - return; - /* Error 0x0C would be returned if the filter enabled status is * already set to whatever we were trying to set. * Although the default state should be disabled, some controller set @@ -766,7 +761,6 @@ static void msft_le_set_advertisement_filter_enable_cb(struct hci_dev *hdev, hci_dev_lock(hdev); - cp = hci_sent_cmd_data(hdev, hdev->msft_opcode); msft->filter_enabled = cp->enable; if (status == 0x0C) @@ -804,31 +798,23 @@ int msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor) return msft_remove_monitor_sync(hdev, monitor); } -void msft_req_add_set_filter_enable(struct hci_request *req, bool enable) -{ - struct hci_dev *hdev = req->hdev; - struct msft_cp_le_set_advertisement_filter_enable cp; - - cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; - cp.enable = enable; - - hci_req_add(req, hdev->msft_opcode, sizeof(cp), &cp); -} - int msft_set_filter_enable(struct hci_dev *hdev, bool enable) { - struct hci_request req; + struct msft_cp_le_set_advertisement_filter_enable cp; struct msft_data *msft = hdev->msft_data; int err; if (!msft) return -EOPNOTSUPP; - hci_req_init(&req, hdev); - msft_req_add_set_filter_enable(&req, enable); - err = hci_req_run_skb(&req, msft_le_set_advertisement_filter_enable_cb); + cp.sub_opcode = MSFT_OP_LE_SET_ADVERTISEMENT_FILTER_ENABLE; + cp.enable = enable; + err = __hci_cmd_sync_status(hdev, hdev->msft_opcode, sizeof(cp), &cp, + HCI_CMD_TIMEOUT); + + msft_le_set_advertisement_filter_enable_cb(hdev, &cp, err); - return err; + return 0; } bool msft_curve_validity(struct hci_dev *hdev)
The msft_set_filter_enable() command was using the deprecated hci_request mechanism rather than hci_sync. This caused the warning error: hci0: HCI_REQ-0xfcf0 Signed-off-by: Brian Gix <brian.gix@intel.com> --- net/bluetooth/msft.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-)