mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
BT: fix kernel 5.15 issue for RDK linux system [1/1]
PD#SWPL-128975 SWPL-118242 Problem: 1.rdk kernel 5.15 bt not support deep sleep wake-up 2.rdk kernel 5.15 need user confirm Solution: support it Verify: T5W T3X Change-Id: Id900189d0a1b66b4c42cf0ca2eb6a9e479b9440c Signed-off-by: lei.chen <lei.chen@amlogic.com>
This commit is contained in:
@@ -1303,7 +1303,9 @@ static void hci_req_add_set_adv_filter_enable(struct hci_request *req,
|
||||
void hci_req_prepare_suspend(struct hci_dev *hdev, enum suspended_state next)
|
||||
{
|
||||
int old_state;
|
||||
#ifndef CONFIG_AMLOGIC_LINUX_BT_SUPPORT_WAKEUP
|
||||
struct hci_conn *conn;
|
||||
#endif
|
||||
struct hci_request req;
|
||||
u8 page_scan;
|
||||
int disconnect_counter;
|
||||
@@ -1372,10 +1374,12 @@ void hci_req_prepare_suspend(struct hci_dev *hdev, enum suspended_state next)
|
||||
|
||||
disconnect_counter = 0;
|
||||
/* Soft disconnect everything (power off) */
|
||||
#ifndef CONFIG_AMLOGIC_LINUX_BT_SUPPORT_WAKEUP
|
||||
list_for_each_entry(conn, &hdev->conn_hash.list, list) {
|
||||
hci_disconnect(conn, HCI_ERROR_REMOTE_POWER_OFF);
|
||||
disconnect_counter++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (disconnect_counter > 0) {
|
||||
bt_dev_dbg(hdev,
|
||||
|
||||
@@ -883,6 +883,13 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
|
||||
hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT)
|
||||
smp->method = JUST_WORKS;
|
||||
|
||||
#if IS_ENABLED(CONFIG_AMLOGIC_LINUX_BT_SMP)
|
||||
/* If Just Works, Continue with Zero TK */
|
||||
if (smp->method == JUST_WORKS) {
|
||||
set_bit(SMP_FLAG_TK_VALID, &smp->flags);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
/* If Just Works, Continue with Zero TK and ask user-space for
|
||||
* confirmation */
|
||||
if (smp->method == JUST_WORKS) {
|
||||
@@ -895,6 +902,7 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
|
||||
set_bit(SMP_FLAG_WAIT_USER, &smp->flags);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If this function is used for SC -> legacy fallback we
|
||||
* can only recover the just-works case.
|
||||
|
||||
Reference in New Issue
Block a user