All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bluetooth-next] Added force_acl_master param for bluetooth module
@ 2011-09-12  3:32 ilia.kolominsky
  2011-09-12  9:28 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: ilia.kolominsky @ 2011-09-12  3:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ilia Kolomisnky

From: Ilia Kolomisnky <iliak@ti.com>

This param allows role switch request while accepting a new acl
connection. This is an enhancement to l2cap L2CAP_LM role switching
capability which allows requesting role switch without modification
to the application code. It was observed that operating as a master
of piconet (as oposed to scatternet config) is beneficial when
qos (flow_spec) guarantees are requested.

Signed-off-by: Ilia Kolomisnky <iliak@ti.com>
---
 net/bluetooth/hci_event.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 8483cab..5b39b2e 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -46,6 +46,7 @@
 #include <net/bluetooth/hci_core.h>
 
 static int enable_le;
+static int force_acl_master = 0;
 
 /* Handle HCI Event packets */
 
@@ -1505,7 +1506,8 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
 
 			bacpy(&cp.bdaddr, &ev->bdaddr);
 
-			if (lmp_rswitch_capable(hdev) && (mask & HCI_LM_MASTER))
+			if (lmp_rswitch_capable(hdev) &&
+				((mask & HCI_LM_MASTER) || force_acl_master))
 				cp.role = 0x00; /* Become master */
 			else
 				cp.role = 0x01; /* Remain slave */
@@ -3105,3 +3107,5 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data)
 
 module_param(enable_le, bool, 0444);
 MODULE_PARM_DESC(enable_le, "Enable LE support");
+module_param(force_acl_master, bool, 0644);
+MODULE_PARM_DESC(force_acl_master, "Always try to switch to master role on ACL link");
-- 
1.7.1


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12  3:32 [PATCH bluetooth-next] Added force_acl_master param for bluetooth module ilia.kolominsky
2011-09-12  9:28 ` Marcel Holtmann
2011-09-12  9:57   ` Ilia, Kolominsky
2011-09-12 14:11     ` Marcel Holtmann
2011-09-12 15:12       ` Ilia, Kolominsky
2011-09-12 15:57         ` tim.howes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.