Re: [PATCH v3 2/2] Bluetooth: Support the vendor specific debug events

2021-04-13 Thread Marcel Holtmann
g(hdev, "enable %d", enable); > + > + /* Read the Intel supported features and if new exception formats > + * supported, need to load the additional DDC config to enable. > + */ > + err = btintel_read_debug_features(hdev, ); > + if (err) > +

Re: [PATCH v3 1/2] Bluetooth: btusb: support link statistics telemetry events

2021-04-13 Thread Marcel Holtmann
Hi Joseph, > This patch supports the link statistics telemetry events for > Intel controllers > > To avoid the overhead, this debug feature is disabled by default. > > Reviewed-by: Miao-chen Chou > Signed-off-by: Chethan T N > Signed-off-by: Kiran K > Signed-off-by: Joseph Hwang > --- > >

Re: [PATCH] Bluetooth: btusb: fix memory leak

2021-04-13 Thread Marcel Holtmann
Hi Muhammad, > If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and > then error should be returned to prevent memory leak. > > Addresses-Coverity: ("Prevent memory leak") > Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for > Mediatek Chip.") >

Re: [PATCH 2/2] Bluetooth: btusb: Add support for Lite-On Mediatek Chip

2021-04-12 Thread Marcel Holtmann
Hi Mark, > Add support for Lite-On Mediatek Chip (MT7921) > Lite On VID = 04CA. > > * /sys/kernel/debug/usb/devices > T: Bus=01 Lev=03 Prnt=04 Port=01 Cnt=02 Dev#= 8 Spd=480 MxCh= 0 > D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=04ca ProdID=3802 Rev= 1.00 > S:

Re: [PATCH 1/2] Bluetooth: btusb: Fixed too many in-token issue for Mediatek Chip.

2021-04-12 Thread Marcel Holtmann
Hi Mark, > This patch reduce in-token during download patch procedure. > Don't submit urb for polling event before sending hci command. > > Signed-off-by: mark-yw.chen > --- > drivers/bluetooth/btusb.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) patch has been applied to

Re: [PATCH][next] Bluetooth: virtio_bt: add missing null pointer check on alloc_skb call return

2021-04-11 Thread Marcel Holtmann
Hi Colin, > The call to alloc_skb with the GFP_KERNEL flag can return a null sk_buff > pointer, so add a null check to avoid any null pointer deference issues. > > Addresses-Coverity: ("Dereference null return value") > Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver") >

Re: [PATCH v2] Bluetooth: Return whether a connection is outbound

2021-04-11 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by:

Re: [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array

2021-04-11 Thread Marcel Holtmann
Hi Qiheng, > Fix the following coccicheck warning: > > net/bluetooth/msft.c:37:6-13: WARNING use flexible-array member instead > net/bluetooth/msft.c:42:6-10: WARNING use flexible-array member instead > net/bluetooth/msft.c:52:6-10: WARNING use flexible-array member instead > > Signed-off-by:

Re: [PATCH v2] Bluetooth: hci_h5: btrtl: Add quirk for keep power in suspend/resume

2021-04-09 Thread Marcel Holtmann
Hi Hilda, > RTL8822C devices support BT wakeup Host. Add a quirk for these specific > devices did not power off during suspend and resume. > By this change, if the Host support that received BT device signal then > it can be wakeup. > > Signed-off-by: hildawu > --- > Changes in v2: > - Add

Re: [PATCH v1] Bluetooth: Return whether a connection is outbound

2021-04-09 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by:

Re: [PATCH] net/Bluetooth - delete unneeded variable initialization

2021-04-09 Thread Marcel Holtmann
Hi Kai, > Delete unneeded variable initialization. > > Signed-off-by: Kai Ye > --- > net/bluetooth/6lowpan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH v2] Bluetooth: Add ncmd=0 recovery handling

2021-04-08 Thread Marcel Holtmann
Hi Manish, > During command status or command complete event, the controller may set > ncmd=0 indicating that it is not accepting any more commands. In such a > case, host holds off sending any more commands to the controller. If the > controller doesn't recover from such condition, host will

Re: [PATCH 0/2] Bluetooth: Avoid centralized adv handle tracking for extended features

2021-04-06 Thread Marcel Holtmann
Hi Daniel, > This series addresses a race condition where an advertisement > registration can conflict with a software rotation advertisement > refresh. I found that this issue was only occurring with the new > extended MGMT advertising interface. A bad use of the > hdev->cur_adv_instance caused

Re: [PATCH] net/Bluetooth - use the correct print format

2021-04-06 Thread Marcel Holtmann
Hi Kai, > Use the correct print format. Printing an unsigned int value should use %u > instead of %d. For details, please read document: > Documentation/core-api/printk-formats.rst > > Signed-off-by: Kai Ye > --- > net/bluetooth/l2cap_core.c | 16 > 1 file changed, 8

Re: [PATCH 1/1] Bluetooth: btusb: Enable quirk boolean flag for Mediatek Chip.

2021-04-02 Thread Marcel Holtmann
Hi Mark, > Adding support LE scatternet and WBS for Mediatek Chip > > Signed-off-by: mark-yw.chen > --- > drivers/bluetooth/btusb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: Check inquiry status before sending one

2021-04-02 Thread Marcel Holtmann
Hi Archie, > There is a possibility where HCI_INQUIRY flag is set but we still > send HCI_OP_INQUIRY anyway. > > Such a case can be reproduced by connecting to an LE device while > active scanning. When the device is discovered, we initiate a > connection, stop LE Scan, and send Discovery MGMT

Re: [PATCH 0/2] net/Blutooth - Coding style fix

2021-04-02 Thread Marcel Holtmann
Hi Meng, > Remove 'return' in void function and fix some coding style > > Meng Yu (2): > Bluetooth: Remove 'return' in void function > Bluetooth: Coding style fix > > net/bluetooth/6lowpan.c | 5 + > net/bluetooth/hci_debugfs.c | 8 > net/bluetooth/hci_event.c | 2 +- >

Re: [PATCH] Bluetooth: L2CAP: Rudimentary typo fixes

2021-03-26 Thread Marcel Holtmann
Hi Bhaskar, > s/minium/minimum/ > s/procdure/procedure/ > > Signed-off-by: Bhaskar Chowdhury > --- > net/bluetooth/l2cap_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH v2] Bluetooth: SCO - Remove trailing semicolon in macros

2021-03-24 Thread Marcel Holtmann
Hi Meng, > Macros should not use a trailing semicolon. > > Signed-off-by: Meng Yu > --- > > Changes in v2 > -Modify comments > > net/bluetooth/sco.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: Always call advertising disable before setting params

2021-03-24 Thread Marcel Holtmann
Hi Daniel, > In __hci_req_enable_advertising, the HCI_LE_ADV hdev flag is temporarily > cleared to allow the random address to be set, which exposes a race > condition when an advertisement is configured immediately (<10ms) after > software rotation starts to refresh an advertisement. > > In

Re: [PATCH v1] Bluetooth: Return whether a connection is outbound

2021-03-23 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by:

Re: [PATCH v2] Bluetooth: Remove trailing semicolon in macros

2021-03-23 Thread Marcel Holtmann
Hi Meng, > remove trailing semicolon in macros and coding style fix. > > Signed-off-by: Meng Yu > --- > > Changes in v2 > -Re-base in bluetooth-next > > net/bluetooth/smp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards

Re: [PATCH v2] Bluetooth: check for zapped sk before connecting

2021-03-23 Thread Marcel Holtmann
Hi Archie, > There is a possibility of receiving a zapped sock on > l2cap_sock_connect(). This could lead to interesting crashes, one > such case is tearing down an already tore l2cap_sock as is happened > with this call trace: > > __dump_stack lib/dump_stack.c:15 [inline] >

Re: [PATCH] bluetooth: fix set_ecdh_privkey() prototype

2021-03-22 Thread Marcel Holtmann
Hi Arnd, > gcc-11 points out that the declaration does not match the definition: > > net/bluetooth/ecdh_helper.c:122:55: error: argument 2 of type ‘const u8[32]’ > {aka ‘const unsigned char[32]’} with mismatched bound > [-Werror=array-parameter=] > 122 | int set_ecdh_privkey(struct crypto_kpp

Re: [PATCH] Bluetooth: Remove trailing semicolon in macros

2021-03-22 Thread Marcel Holtmann
Hi Meng, > 1. remove trailing semicolon in macros; > 2. fix some coding style. > > Signed-off-by: Meng Yu > --- > net/bluetooth/smp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) the patch doesn’t apply to bluetooth-next, please re-base and send again. Regards Marcel

Re: [PATCH] Bluetooth: hci_qca: Mundane typo fix

2021-03-22 Thread Marcel Holtmann
Hi Bhaskar, > s/packat/packet/ > > Signed-off-by: Bhaskar Chowdhury > --- > drivers/bluetooth/hci_qca.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: verify AMP hci_chan before amp_destroy

2021-03-22 Thread Marcel Holtmann
Hi Archie, > hci_chan can be created in 2 places: hci_loglink_complete_evt() if > it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, > Only AMP hci_chan should be removed by a call to > hci_disconn_loglink_complete_evt(). However, the controller might mess > up, call that function,

Re: [PATCH] Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default

2021-03-22 Thread Marcel Holtmann
Hi Archie, > Currently l2cap_chan_set_defaults() reset chan->conf_state to zero. > However, there is a flag CONF_NOT_COMPLETE which is set when > creating the l2cap_chan. It is suggested that the flag should be > cleared when l2cap_chan is ready, but when l2cap_chan_set_defaults() > is called,

Re: [PATCH] Bluetooth: check for zapped sk before connecting

2021-03-22 Thread Marcel Holtmann
Hi Archie, > There is a possibility of receiving a zapped sock on > l2cap_sock_connect(). This could lead to interesting crashes, one > such case is tearing down an already tore l2cap_sock as is happened > with this call trace: > > __dump_stack lib/dump_stack.c:15 [inline] >

Re: [PATCH v1] Bluetooth: Add ncmd=0 recovery handling

2021-03-20 Thread Marcel Holtmann
Hi Manish, > During command status or command complete event, the controller may set > ncmd=0 indicating that it is not accepting any more commands. In such a > case, host holds off sending any more commands to the controller. If the > controller doesn't recover from such condition, host will

Re: [PATCH] Bluetooth: avoid deadlock between hci_dev->lock and socket lock

2021-03-16 Thread Marcel Holtmann
Hi Jiri, > Commit eab2404ba798 ("Bluetooth: Add BT_PHY socket option") added a > dependency between socket lock and hci_dev->lock that could lead to > deadlock. > > It turns out that hci_conn_get_phy() is not in any way relying on hdev > being immutable during the runtime of this function,

Re: [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support

2021-03-11 Thread Marcel Holtmann
Hi Venkata, > Based on device may wakeup status, Bluez stack will enable/disable > passive scanning with whitelist in BT controller while suspending. > As interrupt from BT SoC is handled by UART driver,we need to use > device handle of UART driver to get the status of device may wakeup > >

Re: [PATCH] Bluetooth: Allow scannable adv with extended MGMT APIs

2021-03-03 Thread Marcel Holtmann
Hi Daniel, > An issue was found, where if a bluetooth client requests a broadcast > advertisement with scan response data, it will not be properly > registered with the controller. This is because at the time that the > hci_cp_le_set_scan_param structure is created, the scan response will > not

Re: [PATCH v3 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED >

Re: [PATCH v2 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED >

Re: [PATCH 2/2] Bluetooth: Remove unneeded commands for suspend

2021-03-02 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED >

Re: [PATCH 1/2] Bluetooth: Notify suspend on le conn failed

2021-03-02 Thread Marcel Holtmann
Hi Abhishek, > When suspending, Bluetooth disconnects all connected peers devices. If > an LE connection is started but isn't completed, we will see an LE > Create Connection Cancel instead of an HCI disconnect. This just adds > a check to see if an LE cancel was the last disconnected device and

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

2021-02-26 Thread Marcel Holtmann
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 > re-reads MSFT info upon every msft_do_open() even if MSFT extension has > been initialized. > > The following test steps were performed. > (1) boot the

Re: [PATCH 1/1] Bluetooth: btusb: Fix incorrect type in assignment and uninitialized symbol

2021-02-26 Thread Marcel Holtmann
Hi Mark, > Warnings: drivers/bluetooth/btusb.c:3775 btusb_mtk_setup() error: > uninitialized symbol 'fw_version'. > -> add initial value for fw_version. > > Warnings: sparse: sparse: incorrect type in assignment (different base > types) > -> add le32_to_cpu to fix incorrect type in assignment. >

Re: [PATCH v1] Bluetooth: hci_qca:Fixed issue during suspend

2021-02-08 Thread Marcel Holtmann
Hi Venkata, > If BT SoC is running with ROM FW then just return in > qca_suspend function as ROM FW does not support > in-band sleep. > > Fixes: 2be43abac5a8 ("Bluetooth: hci_qca: Wait for timeout during suspend") > Signed-off-by: Venkata Lakshmi Narayana Gubba > --- >

Re: [PATCH] Bluetooth: btusb: fix excessive stack usage

2021-02-04 Thread Marcel Holtmann
Hi Arnd, > Enlarging the size of 'struct btmtk_hci_wmt_cmd' makes it no longer > fit on the kernel stack, as seen from this compiler warning: > > drivers/bluetooth/btusb.c:3365:12: error: stack frame size of 1036 bytes in > function 'btusb_mtk_hci_wmt_sync' [-Werror,-Wframe-larger-than=] > >

Re: [PATCH] Bluetooth: btusb: remove set but not used variable in btusb_mtk_setup_firmware_79xx

2021-02-04 Thread Marcel Holtmann
Hi Ye, > Fix follow warning: > drivers/bluetooth/btusb.c:3479:9: warning: variable ‘fw_size’ set but not > used [-Wunused-but-set-variable] > size_t fw_size; > ^~~ > drivers/bluetooth/btusb.c:3473:29: warning: variable ‘patchhdr’ set but not > used [-Wunused-but-set-variable] >

Re: [PATCH v4] Bluetooth: btusb: Fix typo and correct the log print

2021-02-03 Thread Marcel Holtmann
Hi Jupeng, > Change "deivice" to "device" > > Correct "Unsupported support hardware variant (%08x)" to > "Unsupported hardware variant (%08x)" > > Signed-off-by: Jupeng Zhong > --- > v4: update bluetooth-next tree and regenerate the patch again > v3: update bluetooth-next tree and regenerate

Re: [PATCH v1] Bluetooth: Fix crash in mgmt_add_adv_patterns_monitor_complete

2021-02-03 Thread Marcel Holtmann
Hi Howard, > If hci_add_adv_monitor is a pending command(e.g. forward to > msft_add_monitor_pattern), it is possible that > mgmt_add_adv_patterns_monitor_complete gets called before > cmd->user_data gets set, which will cause a crash when we > try to get the moniter handle through cmd->user_data

Re: [PATCH v3] Bluetooth: btusb: Fix typo and correct the log print

2021-02-03 Thread Marcel Holtmann
Hi Jupeng, > Change "deivice" to "device" > > Correct "Unsupported support hardware variant (%08x)" to > "Unsupported hardware variant (%08x)" > > Signed-off-by: Jupeng Zhong > --- > v3: update bluetooth-next tree and regenerate the patch > v2: correct the log print and update the patch From:

Re: [PATCH v2] Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv

2021-02-02 Thread Marcel Holtmann
Hi Jupeng, > In btusb_mtk_wmt_recv if skb_clone fails, the alocated skb should be > released. > > Omit the labels “err_out” and “err_free_skb” in this function > implementation so that the desired exception handling code > would be directly specified in the affected if branches. > > Fixes:

Re: [PATCH v2] Bluetooth: btusb: Fix typo and correct the log print

2021-02-02 Thread Marcel Holtmann
Hi Jupeng, > Change "deivice" to "device" > > Correct "Unsupported support hardware variant (%08x)" to > "Unsupported hardware variant (%08x)" > > Signed-off-by: Jupeng Zhong > --- > drivers/bluetooth/btusb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch doesn’t not apply

Re: [PATCH v4 0/2] Bluetooth: btusb: Add protocol for MediaTek bluetooth devices

2021-02-02 Thread Marcel Holtmann
Hi Mark, > v4: > 1. add read chip info. from MediaTek bluetooth devices. > 2. support download firmware for MT7921U. > > mark-yw.chen (2): > Bluetooth: btusb: Fine-tune mt7663 mechanism. > Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB >devices > >

Re: [PATCH v2] Bluetooth: hci_qca: check for SSR triggered flag while suspend

2021-02-02 Thread Marcel Holtmann
Hi Venkata, > QCA_IBS_DISABLED flag will be set after memorydump started from > controller.Currently qca_suspend() is waiting for SSR to complete > based on flag QCA_IBS_DISABLED.Added to check for QCA_SSR_TRIGGERED > flag too. > > Fixes: 2be43abac5a8 ("Bluetooth: hci_qca: Wait for timeout

Re: [PATCH v3] Bluetooth: Skip eSCO 2M params when not supported

2021-02-01 Thread Marcel Holtmann
Hi Yu, > If a peer device doesn't support eSCO 2M we should skip the params that > use it when setting up sync connection since they will always fail. > > Signed-off-by: Yu Liu > Reviewed-by: Abhishek Pandit-Subedi > --- > > Changes in v3: > - Use pkt_type instead of adding new field > >

Re: [PATCH] bluetooth: fix memory leak in btusb_mtk_wmt_recv

2021-02-01 Thread Marcel Holtmann
Hi Jupeng, In btusb_mtk_wmt_recv if skb_clone fails, the alocated skb should be released. Signed-off-by: zhongjupeng >>> >>> please provide a proper From: and Signed-off-by line with full name. >>> >>> Regards >>> >>> Marcel >> >> Hi, >> >> >>Update the

Re: [PATCH v4] Bluetooth: btrtl: Enable WBS for the specific Realtek devices

2021-01-26 Thread Marcel Holtmann
Hi Max, > By this change, it will enable WBS supported on the specific Realtek BT > devices, such as RTL8822C and RTL8852A. > In the future, it's able to maintain what the Realtek devices support WBS > here. > > Tested-by: Hilda Wu > Reviewed-by: Abhishek Pandit-Subedi > Signed-off-by: Max

Re: [PATCH v5] Bluetooth: btrtl: Enable WBS for the specific Realtek devices

2021-01-26 Thread Marcel Holtmann
Hi Max, > By this change, it will enable WBS supported on the specific Realtek BT > devices, such as RTL8822C and RTL8852A. > In the future, it's able to maintain what the Realtek devices support WBS > here. > > Tested-by: Hilda Wu > Reviewed-by: Abhishek Pandit-Subedi > Signed-off-by: Max

Re: [PATCH] net/bluetooth: Fix the follow coccicheck warnings

2021-01-25 Thread Marcel Holtmann
Hi Jiapeng, > ./net/bluetooth/hci_debugfs.c: WARNING: sniff_min_interval_fops > should be defined with DEFINE_DEBUGFS_ATTRIBUTE > > Signed-off-by: Jiapeng Zhong > Reported-by: Abaci Robot > --- > net/bluetooth/hci_debugfs.c | 38 +++--- > 1 file changed, 19

Re: [PATCH v3] Bluetooth: btrtl: Enable WBS for the specific Realtek devices

2021-01-25 Thread Marcel Holtmann
Hi Max, > By this change, it will enable WBS supported on the specific Realtek BT > devices, such as RTL8822C and RTL8852A. > In the future, it's able to maintain what the Realtek devices support WBS > here. > > Tested-by: Hilda Wu > Reviewed-by: Abhishek Pandit-Subedi > Signed-off-by: Max

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

2021-01-25 Thread Marcel Holtmann
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 > has been initialized. > > The following test steps were performed. > (1) boot

Re: [PATCH] Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl

2021-01-25 Thread Marcel Holtmann
Hi Claire, > Realtek Bluetooth controllers can do both LE scan and BR/EDR inquiry > at once, need to set HCI_QUIRK_SIMULTANEOUS_DISCOVERY quirk. > > Signed-off-by: Claire Chang > --- > drivers/bluetooth/hci_h5.c | 5 + > 1 file changed, 5 insertions(+) patch has been applied to

Re: [PATCH] Bluetooth: btusb: Add a Kconfig option to disable USB wakeup by default

2021-01-25 Thread Marcel Holtmann
Hi Max, > For the original commit of 9e45524a011107a73bc2cdde8370c61e82e93a4d, > wakeup is always disabled for Realtek Bluetooth devices. > However, there's the capability for Realtek Bluetooth devices to > apply USB wakeup. Otherwise, there's the better power consumption > without USB wakeup

Re: [PATCH v2] Bluetooth: btusb: fix memory leak on suspend and resume

2021-01-25 Thread Marcel Holtmann
Hi Vamshi, > kmemleak report: > unreferenced object 0x9b1127f00500 (size 208): > comm "kworker/u17:2", pid 500, jiffies 4294937470 (age 580.136s) > hex dump (first 32 bytes): >00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >00 60 ed 05 11 9b ff ff 00 00 00 00 00

Re: [PATCH v5 trivial/resend] dt-bindings: net: btusb: DT fix s/interrupt-name/interrupt-names/

2021-01-25 Thread Marcel Holtmann
Hi Geert, > The standard DT property name is "interrupt-names". > > Fixes: fd913ef7ce619467 ("Bluetooth: btusb: Add out-of-band wakeup support") > Signed-off-by: Geert Uytterhoeven > Acked-by: Rob Herring > Reviewed-by: Brian Norris > Acked-by: Rajat Jain > --- > Who takes this patch, before

Re: [PATCH 3/3] Bluetooth: btusb: Expose reset gpio to debugfs

2021-01-25 Thread Marcel Holtmann
s/bluetooth/btusb.c | 46 +++ > 1 file changed, 46 insertions(+) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 880e9cd4ee713..702be1871ed88 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -6,6 +6,7 @@ &

Re: [PATCH] Bluetooth: drop HCI device reference before return

2021-01-25 Thread Marcel Holtmann
Hi Pan, > Call hci_dev_put() to decrement reference count of HCI device hdev if > fails to duplicate memory. > > Fixes: 0b26ab9dce74 ("Bluetooth: AMP: Handle Accept phylink command status > evt") > Signed-off-by: Pan Bian > --- > net/bluetooth/a2mp.c | 1 + > 1 file changed, 1 insertion(+)

Re: [PATCH 1/3] Bluetooth: btusb: Refactor gpio reset

2021-01-25 Thread Marcel Holtmann
Hi Abhishek, > Refactor gpio reset to use a common gpio reset function. > > Signed-off-by: Abhishek Pandit-Subedi > Reviewed-by: Miao-chen Chou > --- > > drivers/bluetooth/btusb.c | 59 +-- > 1 file changed, 19 insertions(+), 40 deletions(-) > > diff --git

Re: [PATCH] Bluetooth: Put HCI device if inquiry procedure interrupts

2021-01-25 Thread Marcel Holtmann
Hi Pan, > Jump to the label done to decrement the reference count of HCI device > hdev on path that the Inquiry procedure is interrupted. > > Fixes: 3e13fa1e1fab ("Bluetooth: Fix hci_inquiry ioctl usage") > Signed-off-by: Pan Bian > --- > net/bluetooth/hci_core.c | 6 -- > 1 file changed, 4

Re: [PATCH v6 0/7] MSFT offloading support for advertisement monitor

2021-01-25 Thread Marcel Holtmann
Hi Archie, > This series of patches manages the hardware offloading part of MSFT > extension API. The full documentation can be accessed by this link: > https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands-and-events > > Only four of the

Re: [PATCH v2] Bluetooth: btrtl: Add null check in setup

2021-01-05 Thread Marcel Holtmann
Hi Abhishek, > btrtl_dev->ic_info is only available from the controller on cold boot > (the lmp subversion matches the device model and this is used to look up > the ic_info). On warm boots (firmware already loaded), > btrtl_dev->ic_info is null. > > Fixes: 05672a2c14a4 (Bluetooth: btrtl: Enable

Re: [PATCH v1] Bluetooth: hci_qca: Wait for SSR completion during suspend

2021-01-05 Thread Marcel Holtmann
Hi Venkata, > During SSR after memory dump collection,BT controller will be powered off, > powered on and then FW will be downloaded.During suspend if BT controller > is powered off due to SSR then we should wait until SSR is completed and > then suspend. > > Fixes: 2be43abac5a8 ("Bluetooth:

Re: [PATCH] Bluetooth: hci_qca: Fix memleak in qca_controller_memdump

2021-01-05 Thread Marcel Holtmann
Hi Dinghao, > When __le32_to_cpu() fails, qca_memdump should be freed > just like when vmalloc() fails. > > Fixes: d841502c79e3f ("Bluetooth: hci_qca: Collect controller memory dump > during SSR") > Signed-off-by: Dinghao Liu > --- > drivers/bluetooth/hci_qca.c | 2 ++ > 1 file changed, 2

Re: [PATCH] Bluetooth: avoid u128_xor() on potentially misaligned inputs

2021-01-05 Thread Marcel Holtmann
Hi Ard, > u128_xor() takes pointers to quantities that are assumed to be at least > 64-bit aligned, which is not guaranteed to be the case in the smp_c1() > routine. So switch to crypto_xor() instead. > > Signed-off-by: Ard Biesheuvel > --- > net/bluetooth/smp.c | 5 ++--- > 1 file changed, 2

Re: [PATCH 2/2] Bluetooth: hci_h5: Add support for binding RTL8723DS with device tree

2021-01-05 Thread Marcel Holtmann
Hi John-Eric, > RTL8723DS could be handled by btrtl-driver, so add ability to bind it > using device tree. > > Signed-off-by: John-Eric Kamps > --- > drivers/bluetooth/hci_h5.c | 2 ++ > 1 file changed, 2 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH 1/1] [Add support Mediatek mt7921U]

2020-12-26 Thread Marcel Holtmann
Hi Mark, > Thanks for your suggestions, I will remove the duplicate definitions and > functions. > > Firstly, we will add the support of enabling MT7921U in btusb.c > Secondary, we will discuss the driver architecture with you. > Finally, we update the common part and hif part for MT7921. > >

Re: [PATCH] Bluetooth: btrtl: Add null check in setup

2020-12-22 Thread Marcel Holtmann
Hi Abhishek, > btrtl_dev->ic_info is only available from the controller on cold boot > (the lmp subversion matches the device model and this is used to look up > the ic_info). On warm boots (firmware already loaded), > btrtl_dev->ic_info is null. > > Fixes: 05672a2c14a4 (Bluetooth: btrtl: Enable

Re: [PATCH] Bluetooth: btrtl: Enable central-peripheral role

2020-12-22 Thread Marcel Holtmann
Hi Abhishek, > Enable the central-peripheral role on RTL8822CE. This enables creating > connections while there is an existing connection in the slave role. > > This change can be confirmed in userspace via `bluetoothctl show` which > will now show "Roles: central-peripheral". > > Reviewed-by:

Re: [PATCH] Bluetooth: btusb: Remove duplicate newlines from logging

2020-12-22 Thread Marcel Holtmann
Hi Joe, > The bt_dev_ macros already append a newline. > > Signed-off-by: Joe Perches > --- > > The "No memory" message could be removed as bt_skb_alloc already does > a dump_stack() on allocation failure. > > drivers/bluetooth/btusb.c | 8 > 1 file changed, 4 insertions(+), 4

Re: [PATCH v3 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-22 Thread Marcel Holtmann
Hi Archie, >>> When the controller is powered off, the registered advertising monitor >>> is removed from the controller. This patch handles the re-registration >>> of those monitors when the power is on. >>> >>> Signed-off-by: Archie Pusaka >>> Reviewed-by: Miao-chen Chou >>> Reviewed-by:

Re: [PATCH v3 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-21 Thread Marcel Holtmann
Hi Archie, > When the controller is powered off, the registered advertising monitor > is removed from the controller. This patch handles the re-registration > of those monitors when the power is on. > > Signed-off-by: Archie Pusaka > Reviewed-by: Miao-chen Chou > Reviewed-by: Yun-Hao Chung >

Re: [PATCH v3 2/5] Bluetooth: advmon offload MSFT add monitor

2020-12-21 Thread Marcel Holtmann
Hi Archie, > Enables advertising monitor offloading to the controller, if MSFT > extension is supported. The kernel won't adjust the monitor parameters > to match what the controller supports - that is the user space's > responsibility. > > This patch only manages the addition of monitors.

Re: [PATCH v3 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-21 Thread Marcel Holtmann
Hi Archie, > MSFT needs rssi parameter for monitoring advertisement packet, > therefore we should supply them from mgmt. This adds a new opcode > to add advertisement monitor with rssi parameters. > > Signed-off-by: Archie Pusaka > Reviewed-by: Manish Mandlik > Reviewed-by: Miao-chen Chou >

Re: [PATCH] Bluetooth:btmtksdio Fixed switch and case should be at the same indent

2020-12-18 Thread Marcel Holtmann
Hi Jagdish, > Switch and case where not properly aligned > > Signed-off-by: Jagdish Tirumala > --- > drivers/bluetooth/btmtksdio.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: hci_bcm: Add support for ISO packets

2020-12-18 Thread Marcel Holtmann
Hi Jakub, > This enables bcm driver to properly handle ISO packets. > > Signed-off-by: Jakub Pawlowski > --- > drivers/bluetooth/hci_bcm.c | 1 + > 1 file changed, 1 insertion(+) patch has been applied to bluetooth-next tree. Regards Marcel

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

2020-12-18 Thread Marcel Holtmann
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 > has been initialized. what is the actual benefit of this? It is fundamentally

Re: [PATCH v2 3/4] Bluetooth: btusb: Enable MSFT extension for Intel controllers

2020-12-18 Thread Marcel Holtmann
Hi Miao-chen, > The Intel JeffersonPeak, HarrisonPeak and CyclonePeak Bluetooth > controllers support the Microsoft vendor extension and they are using > 0xFC1E for VsMsftOpCode. > > < HCI Command: Vendor (0x3f|0x001e) plen 1 >00 >> HCI Event: Command Complete (0x0e) plen 15 >

Re: [PATCH v2 2/4] Bluetooth: btqca: Enable MSFT extension for Qualcomm WCN399x

2020-12-18 Thread Marcel Holtmann
Hi Miao-chen, > The following Qualcomm WCN399x Bluetooth controllers support the > Microsoft vendor extension and they are using 0xFD70 for VsMsftOpCode. > -WCN3990 > -WCN3991 > -WCN3998 > > < HCI Command: ogf 0x3f, ocf 0x0170, plen 1 > 00 >> HCI Event: 0x0e plen 18 > 01 70 FD 00 00 1F 00 00

Re: [PATCH v2 4/4] Bluetooth: btrtl: Enable MSFT extension for RTL8822CE controller

2020-12-18 Thread Marcel Holtmann
Hi Miao-chen, > The Realtek RTL8822CE Bluetooth controller support Microsoft vendor > extension and it uses 0xFCF0 for VsMsftOpCode. > > The following test step was performed. > - Boot the test device with RTL8822CE and verify the INFO print in > dmesg. > > Signed-off-by: Miao-chen Chou >

Re: [PATCH] Bluetooth: Pause service discovery for suspend

2020-12-18 Thread Marcel Holtmann
Hi Abhishek, > Just like MGMT_OP_START_DISCOVERY, we should reject > MGMT_OP_START_SERVICE_DISCOVERY with MGMT_STATUS_BUSY when we are paused > for suspend. > > Signed-off-by: Abhishek Pandit-Subedi > --- > On ChromeOS, we started getting reports of scanning failing after > resuming from

Re: [PATCH v1] Bluetooth: btusb: add shutdown function for wcn6855

2020-12-18 Thread Marcel Holtmann
Hi Zijun, > we should send hci reset command before bt turn off, which can reset bt > firmware status. > > Signed-off-by: Tim Jiang > --- > drivers/bluetooth/btusb.c | 15 +++ > 1 file changed, 15 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH 1/1] Bluetooth: Remove hci_req_le_suspend_config

2020-12-18 Thread Marcel Holtmann
Hi Abhishek, > Add a missing SUSPEND_SCAN_ENABLE in passive scan, remove the separate > function for configuring le scan during suspend and update the request > complete function to clear both enable and disable tasks. > > Fixes: dce0a4be8054 ("Bluetooth: Set missing suspend task bits") >

Re: [PATCH] Bluetooth: hci_uart: Fix a race for write_work scheduling

2020-12-18 Thread Marcel Holtmann
Hi Claire, > In hci_uart_write_work, there is a loop/goto checking the value of > HCI_UART_TX_WAKEUP. If HCI_UART_TX_WAKEUP is set again, it keeps trying > hci_uart_dequeue; otherwise, it clears HCI_UART_SENDING and returns. > > In hci_uart_tx_wakeup, if HCI_UART_SENDING is already set, it sets

Re: [PATCH v4] Bluetooth: btqca: Add support to read FW build version for WCN3991 BTSoC

2020-12-18 Thread Marcel Holtmann
Hi Venkata, > Add support to read FW build version from debugfs node. > This info can be read from > /sys/kernel/debug/bluetooth/hci0/firmware_info > > Signed-off-by: Venkata Lakshmi Narayana Gubba > --- > drivers/bluetooth/btqca.c | 54 +++ >

Re: [PATCH] Bluetooth: btusb: Always fallback to alt 1 for WBS

2020-12-18 Thread Marcel Holtmann
Hi Trent, > When alt mode 6 is not available, fallback to the kernel <= 5.7 behavior > of always using alt mode 1. > > Prior to kernel 5.8, btusb would always use alt mode 1 for WBS (Wide > Band Speech aka mSBC aka transparent SCO). In commit baac6276c0a9 > ("Bluetooth: btusb: handle mSBC audio

Re: [PATCH] Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function

2020-12-18 Thread Marcel Holtmann
Hi Christophe, > Some resource should be released in the error handling path of the probe > function, as already done in the remove function. > > The remove function was fixed in commit 5052de8deff5 ("soc: qcom: smd: > Transition client drivers from smd to rpmsg") > > Fixes: 1511cc750c3d

Re: [PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-07 Thread Marcel Holtmann
Hi Archie, > MSFT needs rssi parameter for monitoring advertisement packet, > therefore we should supply them from mgmt. > > Signed-off-by: Archie Pusaka > Reviewed-by: Miao-chen Chou > Reviewed-by: Yun-Hao Chung I don’t need any Reviewed-by if they are not

Re: [PATCH v1] Bluetooth: Set missing suspend task bits

2020-12-04 Thread Marcel Holtmann
Hi Howard, > When suspending, mark SUSPEND_SCAN_ENABLE and SUSPEND_SCAN_DISABLE tasks > correctly when either classic or le scanning is modified. > > Signed-off-by: Abhishek Pandit-Subedi > Signed-off-by: Howard Chung > Reviewed-by: Alain Michaud > --- > > net/bluetooth/hci_request.c | 8

Re: [PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-04 Thread Marcel Holtmann
Hi Archie, >>> MSFT needs rssi parameter for monitoring advertisement packet, >>> therefore we should supply them from mgmt. >>> >>> Signed-off-by: Archie Pusaka >>> Reviewed-by: Miao-chen Chou >>> Reviewed-by: Yun-Hao Chung >> >> I don’t need any Reviewed-by if they are not catching an

Re: [PATCH v7 0/5] Bluetooth: Add new MGMT interface for advertising add

2020-12-03 Thread Marcel Holtmann
Hi Daniel, > This patch series defines the new two-call MGMT interface for adding > new advertising instances. Similarly to the hci advertising commands, a > mgmt call to set parameters is expected to be first, followed by a mgmt > call to set advertising data/scan response. The members of the >

Re: [PATCH v1] Bluetooth: btusb: support download nvm with different board id for wcn6855

2020-12-03 Thread Marcel Holtmann
Hi Zijun, > we define many nvm files for wcn6855 btsoc and host driver > should find the correct nvm file based on board ID and then > download it. > > Signed-off-by: Tim Jiang > --- > drivers/bluetooth/btusb.c | 19 --- > 1 file changed, 16 insertions(+), 3 deletions(-) patch

Re: [PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-03 Thread Marcel Holtmann
Hi Archie, > MSFT needs rssi parameter for monitoring advertisement packet, > therefore we should supply them from mgmt. > > Signed-off-by: Archie Pusaka > Reviewed-by: Miao-chen Chou > Reviewed-by: Yun-Hao Chung I don’t need any Reviewed-by if they are not catching an obvious user API

Re: [PATCH v3] Bluetooth: hci_qca: Add support to read FW build version for WCN3991 BTSoC

2020-12-03 Thread Marcel Holtmann
Hi Venkata, > Add support to read FW build version from debugfs node. > This info can be read from > /sys/kernel/debug/bluetooth/hci0/ibs/fw_build_info > > Signed-off-by: Venkata Lakshmi Narayana Gubba > --- > drivers/bluetooth/btqca.c | 48 + >

Re: [PATCH v11 2/5] Bluetooth: Handle system suspend resume case

2020-12-03 Thread Marcel Holtmann
Hi Howard, > This patch adds code to handle the system suspension during interleave > scan. The interleave scan will be canceled when the system is going to > sleep, and will be restarted after waking up. > > Signed-off-by: Howard Chung > Reviewed-by: Alain Michaud > Reviewed-by: Manish

Re: [PATCH v11 3/5] Bluetooth: Handle active scan case

2020-12-03 Thread Marcel Holtmann
Hi Howard, > This patch adds code to handle the active scan during interleave > scan. The interleave scan will be canceled when users start active scan, > and it will be restarted after active scan stopped. > > Signed-off-by: Howard Chung > Reviewed-by: Alain Michaud > Reviewed-by: Manish

  1   2   3   4   5   6   7   8   9   10   >