[PATCH] Bluetooth: Fix the vulnerable issue on enc key size

2020-09-18 Thread Alex Lu
ect() Signed-off-by: Alex Lu --- net/bluetooth/l2cap_core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index ade83e224567..63df961d402d 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4150,6 +4150

[PATCH v2] Bluetooth: btusb: Use cmd_timeout to reset Realtek device

2019-09-04 Thread Alex Lu
From: Alex Lu Realtek Bluetooth controller provides a BT_DIS reset pin for hardware reset of it. The cmd_timeout is helpful on Realtek bluetooth controller where the firmware gets stuck. Signed-off-by: Alex Lu --- Changes in v2 - Provide a dedicated btusb_rtl_cmd_timeout in case of Realtek

[PATCH] Bluetooth: btusb: Use cmd_timeout to reset Realtek device

2019-09-03 Thread Alex Lu
From: Alex Lu Realtek Bluetooth controller provides a BT_DIS reset pin for hardware reset of it. The cmd_timeout is helpful on Realtek bluetooth controller where the firmware gets stuck. Signed-off-by: Alex Lu --- drivers/bluetooth/btusb.c | 29 + 1 file changed

[PATCH 2/2] Bluetooth: btrtl: Remove trailing newline from calls to rtl_dev macros

2019-08-31 Thread Alex Lu
From: Alex Lu These printing macros already add a trailing newline, so drop these unnecessary additional newlines. Signed-off-by: Alex Lu --- drivers/bluetooth/btrtl.c | 56 +++ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers

[PATCH 1/2] Bluetooth: btrtl: Remove redundant prefix from calls to rtl_dev macros

2019-08-31 Thread Alex Lu
From: Alex Lu the rtl: or RTL: prefix in the string is pointless. The rtl_dev_* macros already does that. Signed-off-by: Alex Lu --- drivers/bluetooth/btrtl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c

[PATCH v3 2/2] Bluetooth: btrtl: Add firmware version print

2019-08-31 Thread Alex Lu
From: Alex Lu This patch is used to print fw version for debug convenience Signed-off-by: Alex Lu --- Changes in v3 - Remove the pointless rtl: prefix in the format string Changes in v2 - Re-order the code so that no forward declaration is needed drivers/bluetooth/btrtl.c | 56

[PATCH v2 2/2] Bluetooth: btrtl: Add firmware version print

2019-08-30 Thread Alex Lu
From: Alex Lu This patch is used to print fw version for debug convenience Signed-off-by: Alex Lu --- Changes in v2 - Re-order the code so that no forward declaration is needed drivers/bluetooth/btrtl.c | 56 --- 1 file changed, 35 insertions(+), 21

[PATCH 2/2] Bluetooth: btrtl: Add firmware version print

2019-08-30 Thread Alex Lu
From: Alex Lu This patch is used to print fw version for debug convenience Signed-off-by: Alex Lu --- drivers/bluetooth/btrtl.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index b7487ab99eed..7219eb98d02d 100644

[PATCH 1/2] Bluetooth: btrtl: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY

2019-08-30 Thread Alex Lu
From: Alex Lu 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: Alex Lu --- drivers/bluetooth/btrtl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/bluetooth/btrtl.c b/drivers

[PATCH v3] Bluetooth: btusb: Fix suspend issue for Realtek devices

2019-08-14 Thread Alex Lu
From: Alex Lu >From the perspective of controller, global suspend means there is no SET_FEATURE (DEVICE_REMOTE_WAKEUP) and controller would drop the firmware. It would consume less power. So we should not send this kind of SET_FEATURE when host goes to suspend state. Otherwise, when mak

[PATCH v2] Bluetooth: btrtl: Save firmware and config

2019-08-04 Thread Alex Lu
From: Alex Lu usb reset resume will cause downloading firmware again and requesting firmware may be failed while host is resuming Signed-off-by: Alex Lu --- drivers/bluetooth/btrtl.c | 101 -- 1 file changed, 97 insertions(+), 4 deletions(-) diff --git a

[PATCH] Bluetooth: btrtl: Save firmware and config

2019-08-02 Thread Alex Lu
From: Alex Lu usb reset resume will cause downloading firmware again and requesting firmware may be failed while host is resuming Signed-off-by: Alex Lu --- drivers/bluetooth/btrtl.c | 77 +-- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a

[PATCH v2] Bluetooth: btusb: Fix suspend issue for Realtek devices

2019-08-02 Thread Alex Lu
From: Alex Lu >From the perspective of controller, global suspend means there is no SET_FEATURE (DEVICE_REMOTE_WAKEUP) and controller would drop the firmware. It would consume less power. So we should not send this kind of SET_FEATURE when host goes to suspend state. Otherwise, when mak

[PATCH] Bluetooth: btusb: Fix suspend issue for Realtek

2019-07-26 Thread Alex Lu
From: Alex Lu >From the perspective of controller, global suspend means there is no SET_FEATURE (DEVICE_REMOTE_WAKEUP) and controller would drop the firmware. It would consume less power. So we should not send this kind of SET_FEATURE when host goes to suspend state. Otherwise, when mak