All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] Bluetooth: Add socket option definitions for AMP
@ 2010-09-08 17:16 Mat Martineau
  2010-09-09 10:25 ` David Vrabel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mat Martineau @ 2010-09-08 17:16 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: marcel, gustavo, rshaffer, haijun.liu, linux-arm-msm, Mat Martineau

This adds a new BT_AMP socket option to control the use of AMP channels.
It is for use with the SOL_BLUETOOTH option level on L2CAP sockets.

Available option values are defined as:

BT_AMP_REQUIRE_BR_EDR
 * Default
 * AMP controllers cannot be used
 * Channel move requests from the remote device are denied
 * If the L2CAP channel is currently using AMP, move the channel to
   BR/EDR

BT_AMP_PREFER_AMP
 * Allow use of AMP controllers
 * If the L2CAP channel is currently on BR/EDR and AMP controller
   resources are available, initiate a channel move to AMP
 * Channel move requests from the remote device are allowed
 * If the L2CAP socket has not been connected yet, try to create
   and configure the channel directly on an AMP controller rather
   than BR/EDR

BT_AMP_PREFER_BR_EDR
 * Allow use of AMP controllers
 * If the L2CAP channel is currently on AMP, move it to BR/EDR
 * Channel move requests from the remote device are allowed

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
---
 include/net/bluetooth/bluetooth.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 27a902d..d2c62dc 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -64,6 +64,34 @@ struct bt_security {
 
 #define BT_DEFER_SETUP	7
 
+
+#define BT_AMP_POLICY		8
+
+/* Require BR/EDR (default policy)
+ *   AMP controllers cannot be used
+ *   Channel move requests from the remote device are denied
+ *   If the L2CAP channel is currently using AMP, move the channel to BR/EDR
+ */
+#define BT_AMP_POLICY_REQUIRE_BR_EDR	0
+
+/* Prefer AMP
+ *   Allow use of AMP controllers
+ *   If the L2CAP channel is currently on BR/EDR and AMP controller
+ *     resources are available, initiate a channel move to AMP
+ *   Channel move requests from the remote device are allowed
+ *   If the L2CAP socket has not been connected yet, try to create
+ *     and configure the channel directly on an AMP controller rather
+ *     than BR/EDR
+ */
+#define BT_AMP_POLICY_PREFER_AMP	1
+
+/* Prefer BR/EDR
+ *   Allow use of AMP controllers
+ *   If the L2CAP channel is currently on AMP, move it to BR/EDR
+ *   Channel move requests from the remote device are allowed
+ */
+#define BT_AMP_POLICY_PREFER_BR_EDR	2
+
 #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
 #define BT_ERR(fmt, arg...)  printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)
 #define BT_DBG(fmt, arg...)  pr_debug("%s: " fmt "\n" , __func__ , ## arg)
-- 
1.7.1


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

* Re: [PATCH v3] Bluetooth: Add socket option definitions for AMP
  2010-09-08 17:16 [PATCH v3] Bluetooth: Add socket option definitions for AMP Mat Martineau
@ 2010-09-09 10:25 ` David Vrabel
  2010-09-20 21:13 ` Ron Shaffer
  2010-09-27 20:40 ` Gustavo F. Padovan
  2 siblings, 0 replies; 4+ messages in thread
From: David Vrabel @ 2010-09-09 10:25 UTC (permalink / raw)
  To: Mat Martineau
  Cc: linux-bluetooth, marcel, gustavo, rshaffer, haijun.liu, linux-arm-msm

Mat Martineau wrote:
> This adds a new BT_AMP socket option to control the use of AMP channels.
> It is for use with the SOL_BLUETOOTH option level on L2CAP sockets.

Looks good.

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom

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

* Re: [PATCH v3] Bluetooth: Add socket option definitions for AMP
  2010-09-08 17:16 [PATCH v3] Bluetooth: Add socket option definitions for AMP Mat Martineau
  2010-09-09 10:25 ` David Vrabel
@ 2010-09-20 21:13 ` Ron Shaffer
  2010-09-27 20:40 ` Gustavo F. Padovan
  2 siblings, 0 replies; 4+ messages in thread
From: Ron Shaffer @ 2010-09-20 21:13 UTC (permalink / raw)
  To: Mat Martineau; +Cc: linux-bluetooth, marcel, gustavo, haijun.liu, linux-arm-msm

On 9/8/2010 12:16 PM, Mat Martineau wrote:
> This adds a new BT_AMP socket option to control the use of AMP channels.
> It is for use with the SOL_BLUETOOTH option level on L2CAP sockets.
> 
> Available option values are defined as:
> 
> BT_AMP_REQUIRE_BR_EDR
>  * Default
>  * AMP controllers cannot be used
>  * Channel move requests from the remote device are denied
>  * If the L2CAP channel is currently using AMP, move the channel to
>    BR/EDR
> 
> BT_AMP_PREFER_AMP
>  * Allow use of AMP controllers
>  * If the L2CAP channel is currently on BR/EDR and AMP controller
>    resources are available, initiate a channel move to AMP
>  * Channel move requests from the remote device are allowed
>  * If the L2CAP socket has not been connected yet, try to create
>    and configure the channel directly on an AMP controller rather
>    than BR/EDR
> 
> BT_AMP_PREFER_BR_EDR
>  * Allow use of AMP controllers
>  * If the L2CAP channel is currently on AMP, move it to BR/EDR
>  * Channel move requests from the remote device are allowed
> 
> Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
> ---
>  include/net/bluetooth/bluetooth.h |   28 ++++++++++++++++++++++++++++
>  1 files changed, 28 insertions(+), 0 deletions(-)
> 
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 27a902d..d2c62dc 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -64,6 +64,34 @@ struct bt_security {
>  
>  #define BT_DEFER_SETUP	7
>  
> +
> +#define BT_AMP_POLICY		8
> +
> +/* Require BR/EDR (default policy)
> + *   AMP controllers cannot be used
> + *   Channel move requests from the remote device are denied
> + *   If the L2CAP channel is currently using AMP, move the channel to BR/EDR
> + */
> +#define BT_AMP_POLICY_REQUIRE_BR_EDR	0
> +
> +/* Prefer AMP
> + *   Allow use of AMP controllers
> + *   If the L2CAP channel is currently on BR/EDR and AMP controller
> + *     resources are available, initiate a channel move to AMP
> + *   Channel move requests from the remote device are allowed
> + *   If the L2CAP socket has not been connected yet, try to create
> + *     and configure the channel directly on an AMP controller rather
> + *     than BR/EDR
> + */
> +#define BT_AMP_POLICY_PREFER_AMP	1
> +
> +/* Prefer BR/EDR
> + *   Allow use of AMP controllers
> + *   If the L2CAP channel is currently on AMP, move it to BR/EDR
> + *   Channel move requests from the remote device are allowed
> + */
> +#define BT_AMP_POLICY_PREFER_BR_EDR	2
> +
>  #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
>  #define BT_ERR(fmt, arg...)  printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)
>  #define BT_DBG(fmt, arg...)  pr_debug("%s: " fmt "\n" , __func__ , ## arg)

Ping

-- 
Ron Shaffer
Employee of the Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* Re: [PATCH v3] Bluetooth: Add socket option definitions for AMP
  2010-09-08 17:16 [PATCH v3] Bluetooth: Add socket option definitions for AMP Mat Martineau
  2010-09-09 10:25 ` David Vrabel
  2010-09-20 21:13 ` Ron Shaffer
@ 2010-09-27 20:40 ` Gustavo F. Padovan
  2 siblings, 0 replies; 4+ messages in thread
From: Gustavo F. Padovan @ 2010-09-27 20:40 UTC (permalink / raw)
  To: Mat Martineau
  Cc: linux-bluetooth, marcel, gustavo, rshaffer, haijun.liu, linux-arm-msm

Hi Mat,

* Mat Martineau <mathewm@codeaurora.org> [2010-09-08 10:16:33 -0700]:

> This adds a new BT_AMP socket option to control the use of AMP channels.
> It is for use with the SOL_BLUETOOTH option level on L2CAP sockets.
> 
> Available option values are defined as:
> 
> BT_AMP_REQUIRE_BR_EDR
>  * Default
>  * AMP controllers cannot be used
>  * Channel move requests from the remote device are denied
>  * If the L2CAP channel is currently using AMP, move the channel to
>    BR/EDR
> 
> BT_AMP_PREFER_AMP
>  * Allow use of AMP controllers
>  * If the L2CAP channel is currently on BR/EDR and AMP controller
>    resources are available, initiate a channel move to AMP
>  * Channel move requests from the remote device are allowed
>  * If the L2CAP socket has not been connected yet, try to create
>    and configure the channel directly on an AMP controller rather
>    than BR/EDR
> 
> BT_AMP_PREFER_BR_EDR
>  * Allow use of AMP controllers
>  * If the L2CAP channel is currently on AMP, move it to BR/EDR
>  * Channel move requests from the remote device are allowed
> 
> Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
> ---
>  include/net/bluetooth/bluetooth.h |   28 ++++++++++++++++++++++++++++
>  1 files changed, 28 insertions(+), 0 deletions(-)

Patch has been applied to my bluetooth-next-2.6 tree.

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi

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

end of thread, other threads:[~2010-09-27 20:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 17:16 [PATCH v3] Bluetooth: Add socket option definitions for AMP Mat Martineau
2010-09-09 10:25 ` David Vrabel
2010-09-20 21:13 ` Ron Shaffer
2010-09-27 20:40 ` Gustavo F. Padovan

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.