it seems HCI_CONN_POWER_SAVE stands for active mode based on hci_mode_change_evt(), but hci_conn_enter_active_mode() does not take this flag rightly and failed to exit sniff mode potentially, it is fixed by this change. Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx> --- net/bluetooth/hci_conn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 929d0e313db2..302fb5eaca55 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -2582,7 +2582,12 @@ void hci_conn_enter_active_mode(struct hci_conn *conn, __u8 force_active) if (conn->mode != HCI_CM_SNIFF) goto timer; - if (!test_bit(HCI_CONN_POWER_SAVE, &conn->flags) && !force_active) + if (test_bit(HCI_CONN_POWER_SAVE, &conn->flags)) { + BT_DBG("%s: hcon %p is already active mode", __func__, conn); + goto timer; + } + + if (!force_active) goto timer; if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->flags)) { -- The Qualcomm Innovation Center