Bluetooth: Incoming ACL packets do not force active mode
Subsystems (2)
PATCH 1/1 Bluetooth: Incoming ACL packets do not force active mode
Incoming sk_buffs always have bt_cb(skb)->force_active set to 0, so it's misleading to use that value from the control block when calling hci_conn_enter_active_mode() for incoming data. The destination socket is not known in the HCI layer, so the force_active setting for each socket isn't known either. Hard-coding the force_active parameter does not change any behavior, but makes it obvious that incoming ACL data never exits sniff mode.
--- net/bluetooth/hci_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/bluetooth/hci_core.c +1 -1
@@ -2439,7 +2439,7 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)if (conn) { registerstruct hci_proto *hp; -hci_conn_enter_active_mode (conn,bt_cb (skb)->force_active); +hci_conn_enter_active_mode (conn,BT_POWER_FORCE_ACTIVE_OFF );/* Send to upper protocol */ hp = hci_proto[HCI_PROTO_L2CAP ];
Signature · 6 lines
1.7.8 -- Mat Martineau Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
Gustavo Padovan
AppliedHi Mat,
Quoted 8 lines · Mat Martineau
Incoming
sk_buffsalways have bt_cb(skb)->force_active set to 0, so it's misleading to use that value from the control block when callinghci_conn_enter_active_mode()for incoming data. The destination socket is not known in the HCI layer, so theforce_activesetting for each socket isn't known either. Hard-coding theforce_activeparameter does not change any behavior, but makes it obvious that incoming ACL data never exits sniff mode.
Quoted 4 lines
Signed-off-by Mat Martineau <[email protected]>--- net/bluetooth/hci_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Gustavo