Re: [PATCH v4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2021-02-11 Thread Miao-chen Chou
Hi Marcel, A friendly ping on this patch. :) Regards, Miao On Wed, Jan 27, 2021 at 9:17 AM Miao-chen Chou wrote: > > This moves msft_do_close() from hci_dev_do_close() to > hci_unregister_dev() to avoid clearing MSFT extension info. This also > re-reads MSFT info upon every msft_do

[PATCH v4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2021-01-27 Thread Miao-chen Chou
MSFT support debug log in syslog (2) restart bluetoothd and verify msft_do_close() doesn't get invoked and msft_do_open re-reads the MSFT support. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka Reviewed-by: Alain Michaud --- Changes in v4:

Re: [PATCH v3] Bluetooth: Keep MSFT ext info throughout ahci_dev's life cycle

2021-01-25 Thread Miao-chen Chou
do_open() if MSFT extension > > has been initialized. > > > > The following test steps were performed. > > (1) boot the test device and verify the MSFT support debug log in syslog > > (2) restart bluetoothd and verify msft_do_close() doesn't get invoked > >

[PATCH v3] Bluetooth: Keep MSFT ext info throughout ahci_dev's life cycle

2021-01-21 Thread Miao-chen Chou
the MSFT support debug log in syslog (2) restart bluetoothd and verify msft_do_close() doesn't get invoked Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- Hi Maintainers, This patch fixes the life cycle of MSFT HCI extension. The current symm

Re: [PATCH v2 1/4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2021-01-14 Thread Miao-chen Chou
Hi Marcel, On Fri, Dec 18, 2020 at 1:39 PM Marcel Holtmann wrote: > > Hi Miao-chen, > > > This moves msft_do_close() from hci_dev_do_close() to > > hci_unregister_dev() to avoid clearing MSFT extension info. This also > > avoids retrieving MSFT info upon every msft_do_open() if MSFT extension > >

[PATCH v2 1/4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2020-12-17 Thread Miao-chen Chou
the MSFT support debug log in syslog (2) restart bluetoothd and verify msft_do_close() doesn't get invoked Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- (no changes since v1) net/bluetooth/hci_core.c | 4 ++-- net/bluetooth/msft.c

[PATCH v1 1/4] Bluetooth: Keep MSFT extension info throughout a hci_dev's life cycle

2020-12-16 Thread Miao-chen Chou
the MSFT support debug log in syslog (2) restart bluetoothd and verify msft_do_close() doesn't get invoked Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka --- net/bluetooth/hci_core.c | 4 ++-- net/bluetooth/msft.c | 3 ++- 2 files chang

[PATCH] Bluetooth: Use whitelist for scan policy when suspending

2020-07-07 Thread Miao-chen Chou
the host was not awaken by random advertisements. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi --- net/bluetooth/hci_request.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index

Re: [PATCH v1] Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear()

2020-07-06 Thread Miao-chen Chou
Hi Marcel, In case you missed this thread, my suggestion is to revert the previous patch and apply this patch. Please see my earlier email for the reason. Thanks. Regards, Miao On Tue, Jun 30, 2020 at 2:55 PM Miao-chen Chou wrote: > > Hi Marcel, > > hci_unregister_dev() is invo

Re: [PATCH v1] Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear()

2020-06-30 Thread Miao-chen Chou
nd verify that no kernel oops is triggered. > > > > Signed-off-by: Miao-chen Chou > > Reviewed-by: Abhishek Pandit-Subedi > > Reviewed-by: Alain Michaud > > --- > > > > net/bluetooth/hci_core.c | 2 -- > > 1 file changed, 2 deletions(-) > > >

[PATCH v1] Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear()

2020-06-29 Thread Miao-chen Chou
This fixes the kernel oops by removing unnecessary background scan update from hci_adv_monitors_clear() which shouldn't invoke any work queue. The following test was performed. - Run "rmmod btusb" and verify that no kernel oops is triggered. Signed-off-by: Miao-chen Chou Review

Re: [PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-15 Thread Miao-chen Chou
Hi Marcel, https://patchwork.kernel.org/patch/11606491/ was uploaded for review. Thanks, Miao On Fri, Jun 12, 2020 at 11:17 PM Marcel Holtmann wrote: > > Hi Miao-chen, > > > The name in the mgmt-api.txt doc is "Add Advertisement Patterns > > Monitor Command", and Luiz changed the name from > >

[PATCH v5 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-15 Thread Miao-chen Chou
with valid and invalid handles. Signed-off-by: Miao-chen Chou --- Changes in v5: - Fix warnings. Changes in v4: - Fix warnings. Changes in v3: - Update the opcode in the mgmt table. - Convert the endianness of the returned handle. Changes in v2: None include/net/bluetooth/hci_core.h | 1

[PATCH v5 5/7] Bluetooth: Notify adv monitor added event

2020-06-15 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- Changes in v5: None

[PATCH v5 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-06-15 Thread Miao-chen Chou
-chen Chou --- Changes in v5: None Changes in v4: None Changes in v3: - Update the opcode in the mgmt table. Changes in v2: - Convert the values from little-endian to CPU order. - Fix comment style and improve readability. include/net/bluetooth/hci_core.h | 24 ++ net/bluetooth

[PATCH v5 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-06-15 Thread Miao-chen Chou
LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: Miao-chen Chou --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None include/net

[PATCH v5 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-06-15 Thread Miao-chen Chou
advmon-add with valid and invalid inputs. - Issue btmgmt advmon-add more the allowed number of monitors. Signed-off-by: Miao-chen Chou --- Changes in v5: None Changes in v4: None Changes in v3: - Update the opcode in the mgmt table. - Convert the endianness of the returned handle. Changes in v2

[PATCH v5 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-15 Thread Miao-chen Chou
-off-by: Miao-chen Chou --- Changes in v5: None Changes in v4: None Changes in v3: - Update command/event opcodes. - Correct data types. Changes in v2: None include/net/bluetooth/mgmt.h | 49 1 file changed, 49 insertions(+) diff --git a/include/net

[PATCH v5 6/7] Bluetooth: Notify adv monitor removed event

2020-06-15 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- Changes in

Re: [PATCH v3 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-12 Thread Miao-chen Chou
Hi Jakub, I uploaded v4 to address these. Thanks for the reminder. Regards, Miao On Fri, Jun 12, 2020 at 10:49 AM Jakub Kicinski wrote: > > On Thu, 11 Jun 2020 23:15:26 -0700 Miao-chen Chou wrote: > > This adds the request handler of MGMT_OP_REMOVE_ADV_MONITOR command. >

[PATCH v4 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-06-12 Thread Miao-chen Chou
LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: Miao-chen Chou --- Changes in v4: None Changes in v3: None Changes in v2: None include/net/bluetooth

[PATCH v4 6/7] Bluetooth: Notify adv monitor removed event

2020-06-12 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- Changes in

[PATCH v4 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-12 Thread Miao-chen Chou
with valid and invalid handles. Signed-off-by: Miao-chen Chou --- Changes in v4: - Fix warnings. Changes in v3: - Update the opcode in the mgmt table. - Convert the endianness of the returned handle. Changes in v2: None include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c

[PATCH v4 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-06-12 Thread Miao-chen Chou
-chen Chou --- Changes in v4: None Changes in v3: - Update the opcode in the mgmt table. Changes in v2: - Convert the values from little-endian to CPU order. - Fix comment style and improve readability. include/net/bluetooth/hci_core.h | 24 ++ net/bluetooth/hci_core.c | 10

[PATCH v4 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-06-12 Thread Miao-chen Chou
advmon-add with valid and invalid inputs. - Issue btmgmt advmon-add more the allowed number of monitors. Signed-off-by: Miao-chen Chou --- Changes in v4: None Changes in v3: - Update the opcode in the mgmt table. - Convert the endianness of the returned handle. Changes in v2: None include/net

[PATCH v4 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-12 Thread Miao-chen Chou
-off-by: Miao-chen Chou --- Changes in v4: None Changes in v3: - Update command/event opcodes. - Correct data types. Changes in v2: None include/net/bluetooth/mgmt.h | 49 1 file changed, 49 insertions(+) diff --git a/include/net/bluetooth/mgmt.h b/include

[PATCH v4 5/7] Bluetooth: Notify adv monitor added event

2020-06-12 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- Changes in v4: None

Re: [PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-12 Thread Miao-chen Chou
Hi Marcel, The name in the mgmt-api.txt doc is "Add Advertisement Patterns Monitor Command", and Luiz changed the name from MGMT_OP_ADD_ADV_PATTERNS_MONITOR to MGMT_OP_ADD_ADV_MONITOR before applied. So we either change the doc or change the header file to match. Based on the outcome I may need to

Re: [PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-11 Thread Miao-chen Chou
> > - Advertisement Monitor Added event > > - Advertisement Monitor Removed event > > > > Signed-off-by: Miao-chen Chou > > --- > > > > Changes in v2: None > > > > include/net/bluetooth/mgmt.h | 49 > > 1

[PATCH v3 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-06-11 Thread Miao-chen Chou
advmon-add with valid and invalid inputs. - Issue btmgmt advmon-add more the allowed number of monitors. Signed-off-by: Miao-chen Chou --- Changes in v3: - Update the opcode in the mgmt table. - Convert the endianness of the returned handle. Changes in v2: None include/net/bluetooth

[PATCH v3 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-11 Thread Miao-chen Chou
-off-by: Miao-chen Chou --- Changes in v3: - Update command/event opcodes. - Correct data types. Changes in v2: None include/net/bluetooth/mgmt.h | 49 1 file changed, 49 insertions(+) diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h

[PATCH v3 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-11 Thread Miao-chen Chou
with valid and invalid handles. Signed-off-by: Miao-chen Chou --- Changes in v3: - Update the opcode in the mgmt table. - Convert the endianness of the returned handle. Changes in v2: None include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 31

[PATCH v3 5/7] Bluetooth: Notify adv monitor added event

2020-06-11 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- Changes in v3

[PATCH v3 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-06-11 Thread Miao-chen Chou
LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: Miao-chen Chou --- Changes in v3: None Changes in v2: None include/net/bluetooth/hci_core.h | 1 + net

[PATCH v3 6/7] Bluetooth: Notify adv monitor removed event

2020-06-11 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- Changes in

[PATCH v3 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-06-11 Thread Miao-chen Chou
-chen Chou --- Changes in v3: - Update the opcode in the mgmt table. Changes in v2: - Convert the values from little-endian to CPU order. - Fix comment style and improve readability. include/net/bluetooth/hci_core.h | 24 ++ net/bluetooth/hci_core.c | 10 +- net/bluetooth

Re: [PATCH v1 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-06-03 Thread Miao-chen Chou
r-based monitoring is not yet in place, this > > report only the supported features but not the enabled features. > > > > The following test was performed. > > - Issuing btmgmt advmon-features. > > > > Signed-off-by: Miao-chen Chou > > --- > > > >

[PATCH v2 6/7] Bluetooth: Notify adv monitor removed event

2020-06-03 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- Changes in

[PATCH v2 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-06-03 Thread Miao-chen Chou
-off-by: Miao-chen Chou --- Changes in v2: None include/net/bluetooth/mgmt.h | 49 1 file changed, 49 insertions(+) diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 16e0d87bd8fae..df36c50d15f53 100644 --- a/include/net/bluetooth

[PATCH v2 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-06-03 Thread Miao-chen Chou
-chen Chou --- Changes in v2: - Convert the values from little-endian to CPU order. - Fix comment style and improve readability. include/net/bluetooth/hci_core.h | 24 net/bluetooth/hci_core.c | 10 ++- net/bluetooth/mgmt.c | 48

[PATCH v2 5/7] Bluetooth: Notify adv monitor added event

2020-06-03 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- Changes in v2: None

[PATCH v2 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-06-03 Thread Miao-chen Chou
with valid and invalid handles. Signed-off-by: Miao-chen Chou --- Changes in v2: None include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 31 +++ net/bluetooth/mgmt.c | 32 3 files changed, 64

[PATCH v2 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-06-03 Thread Miao-chen Chou
advmon-add with valid and invalid inputs. - Issue btmgmt advmon-add more the allowed number of monitors. Signed-off-by: Miao-chen Chou --- Changes in v2: None include/net/bluetooth/hci_core.h | 2 + net/bluetooth/hci_core.c | 40 + net/bluetooth/mgmt.c | 100

[PATCH v2 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-06-03 Thread Miao-chen Chou
LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: Miao-chen Chou --- Changes in v2: None include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c

[PATCH v1 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

2020-05-28 Thread Miao-chen Chou
advmon-add with valid and invalid inputs. - Issue btmgmt advmon-add more the allowed number of monitors. Signed-off-by: Miao-chen Chou --- include/net/bluetooth/hci_core.h | 2 + net/bluetooth/hci_core.c | 40 + net/bluetooth/mgmt.c | 100

[PATCH v1 2/7] Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES

2020-05-28 Thread Miao-chen Chou
-chen Chou --- include/net/bluetooth/hci_core.h | 24 + net/bluetooth/hci_core.c | 10 ++- net/bluetooth/mgmt.c | 46 net/bluetooth/msft.c | 7 + net/bluetooth/msft.h | 9 +++ 5 files changed

[PATCH v1 4/7] Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR

2020-05-28 Thread Miao-chen Chou
with valid and invalid handles. Signed-off-by: Miao-chen Chou --- include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 31 +++ net/bluetooth/mgmt.c | 32 3 files changed, 64 insertions(+) diff --git

[PATCH v1 5/7] Bluetooth: Notify adv monitor added event

2020-05-28 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou --- net/bluetooth

[PATCH v1 1/7] Bluetooth: Add definitions for advertisement monitor features

2020-05-28 Thread Miao-chen Chou
-off-by: Miao-chen Chou --- include/net/bluetooth/mgmt.h | 49 1 file changed, 49 insertions(+) diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 16e0d87bd8fae..df36c50d15f53 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include

[PATCH v1 6/7] Bluetooth: Notify adv monitor removed event

2020-05-28 Thread Miao-chen Chou
This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou --- net

[PATCH v1 7/7] Bluetooth: Update background scan and report device based on advertisement monitors

2020-05-28 Thread Miao-chen Chou
LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: Miao-chen Chou --- include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 13