linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Incoming ACL packets do not force active mode
@ 2011-12-13 23:06 Mat Martineau
  2011-12-18 23:57 ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Mat Martineau @ 2011-12-13 23:06 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: padovan, pkrystad, marcel, jaikumar, andrei.emeltchenko,
	Mat Martineau

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.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
---
 net/bluetooth/hci_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ce3727e..8775acb 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2439,7 +2439,7 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
 	if (conn) {
 		register struct 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];
-- 
1.7.8

--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Incoming ACL packets do not force active mode
  2011-12-13 23:06 [PATCH] Bluetooth: Incoming ACL packets do not force active mode Mat Martineau
@ 2011-12-18 23:57 ` Gustavo Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2011-12-18 23:57 UTC (permalink / raw)
  To: Mat Martineau
  Cc: linux-bluetooth, pkrystad, marcel, jaikumar, andrei.emeltchenko

Hi Mat,

* Mat Martineau <mathewm@codeaurora.org> [2011-12-13 15:06:02 -0800]:

> 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.
> 
> Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
> ---
>  net/bluetooth/hci_core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

	Gustavo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-18 23:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13 23:06 [PATCH] Bluetooth: Incoming ACL packets do not force active mode Mat Martineau
2011-12-18 23:57 ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).