* multiple HCI_UART protocols over hci_ldisc
@ 2010-05-06 22:04 Pavan Savoy
2010-05-06 22:30 ` Max Krasnyansky
0 siblings, 1 reply; 4+ messages in thread
From: Pavan Savoy @ 2010-05-06 22:04 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Marcel Holtmann, maxk
Hi Marcel,=0A=0AI am working on a line discipline which in many respects is=
similar to the hci_ldisc, but only extended to do plenty of other function=
ality.=0A=0AOne road block which i have hit is to support multiple devices/=
or as Alan Cox puts it "avoid single device limits"=0A=0ASo, in somewhat re=
lation to this, I wanted to ask, If in a system I have 2 UARTs both connect=
ed to BT chips but only from different vendors say TI/HCI-Ll and broadcomm =
with BCSP .. =0A=0ACan I have those 2 protocols on top of HCI-ldisc on diff=
erent UARTs at the same time?=0AIs something like that feasible?=0A=0A
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple HCI_UART protocols over hci_ldisc
2010-05-06 22:04 multiple HCI_UART protocols over hci_ldisc Pavan Savoy
@ 2010-05-06 22:30 ` Max Krasnyansky
2010-05-06 22:38 ` Pavan Savoy
0 siblings, 1 reply; 4+ messages in thread
From: Max Krasnyansky @ 2010-05-06 22:30 UTC (permalink / raw)
To: Pavan Savoy; +Cc: linux-bluetooth@vger.kernel.org, Marcel Holtmann
On 05/06/2010 03:04 PM, Pavan Savoy wrote:
> Hi Marcel,
>
> I am working on a line discipline which in many respects is similar to the hci_ldisc, but only extended to do plenty of other functionality.
>
> One road block which i have hit is to support multiple devices/or as Alan Cox puts it "avoid single device limits"
>
> So, in somewhat relation to this, I wanted to ask, If in a system I have 2 UARTs both connected to BT chips but only from different vendors say TI/HCI-Ll and broadcomm with BCSP ..
>
> Can I have those 2 protocols on top of HCI-ldisc on different UARTs at the same time?
> Is something like that feasible?
Sure. You'll get two separate HCI devices in that case.
Max
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple HCI_UART protocols over hci_ldisc
2010-05-06 22:30 ` Max Krasnyansky
@ 2010-05-06 22:38 ` Pavan Savoy
2010-05-07 4:46 ` Suraj Sumangala
0 siblings, 1 reply; 4+ messages in thread
From: Pavan Savoy @ 2010-05-06 22:38 UTC (permalink / raw)
To: Max Krasnyansky; +Cc: linux-bluetooth@vger.kernel.org, Marcel Holtmann
Max,=0A=0A--- On Fri, 7/5/10, Max Krasnyansky <maxk@qualcomm.com> wrote:=0A=
=0A> From: Max Krasnyansky <maxk@qualcomm.com>=0A> Subject: Re: multiple HC=
I_UART protocols over hci_ldisc=0A> To: "Pavan Savoy" <pavan_savoy@yahoo.co=
.in>=0A> Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel=
.org>, "Marcel Holtmann" <marcel@holtmann.org>=0A> Date: Friday, 7 May, 201=
0, 4:00 AM=0A> On 05/06/2010 03:04 PM, Pavan Savoy=0A> wrote:=0A> > Hi Marc=
el,=0A> >=0A> > I am working on a line discipline which in many=0A> respect=
s is similar to the hci_ldisc, but only extended to=0A> do plenty of other =
functionality.=0A> >=0A> > One road block which i have hit is to support mu=
ltiple=0A> devices/or as Alan Cox puts it "avoid single device limits"=0A> =
>=0A> > So, in somewhat relation to this, I wanted to ask, If=0A> in a syst=
em I have 2 UARTs both connected to BT chips but=0A> only from different ve=
ndors say TI/HCI-Ll and broadcomm with=0A> BCSP ..=0A> >=0A> > Can I have t=
hose 2 protocols on top of HCI-ldisc on=0A> different UARTs at the same tim=
e?=0A> > Is something like that feasible?=0A> Sure. You'll get two separate=
HCI devices in that case.=0A=0ABut there seems to be only 1,=0Astatic stru=
ct hci_uart_proto *hup[HCI_UART_MAX_PROTO];=0Aint hci_uart_register_proto(s=
truct hci_uart_proto *p)=0A{=0A if (p->id >=3D HCI_UART_MAX_PROTO)=
=0A return -EINVAL;=0A=0A if (hup[p->id])=0A =
return -EEXIST;=0A=0A hup[p->id] =3D p;=0A=0A return 0=
;=0A}=0A=0ASo, If suppose I have 2 UARTs both on which HCI-Ldisc exists, an=
d I try say HCI-LL on both, Now won't I get a -EEXIST for the 2nd HCI-LL ?=
=0A=0AI am a bit confused, can you explain in brief ?=0AIs there a possibil=
ity of copies of *hup[HCI_UART_MAX_PROTO] for each UART?=0A=0A> Max=0A> =0A=
=0A
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple HCI_UART protocols over hci_ldisc
2010-05-06 22:38 ` Pavan Savoy
@ 2010-05-07 4:46 ` Suraj Sumangala
0 siblings, 0 replies; 4+ messages in thread
From: Suraj Sumangala @ 2010-05-07 4:46 UTC (permalink / raw)
To: Pavan Savoy
Cc: Max Krasnyansky, linux-bluetooth@vger.kernel.org, Marcel Holtmann
Hi pavan,
Pavan Savoy wrote:
> Max,
>
> --- On Fri, 7/5/10, Max Krasnyansky <maxk@qualcomm.com> wrote:
>
>> From: Max Krasnyansky <maxk@qualcomm.com>
>> Subject: Re: multiple HCI_UART protocols over hci_ldisc
>> To: "Pavan Savoy" <pavan_savoy@yahoo.co.in>
>> Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>, "Marcel Holtmann" <marcel@holtmann.org>
>> Date: Friday, 7 May, 2010, 4:00 AM
>> On 05/06/2010 03:04 PM, Pavan Savoy
>> wrote:
>>> Hi Marcel,
>>>
>>> I am working on a line discipline which in many
>> respects is similar to the hci_ldisc, but only extended to
>> do plenty of other functionality.
>>> One road block which i have hit is to support multiple
>> devices/or as Alan Cox puts it "avoid single device limits"
>>> So, in somewhat relation to this, I wanted to ask, If
>> in a system I have 2 UARTs both connected to BT chips but
>> only from different vendors say TI/HCI-Ll and broadcomm with
>> BCSP ..
>>> Can I have those 2 protocols on top of HCI-ldisc on
>> different UARTs at the same time?
>>> Is something like that feasible?
>> Sure. You'll get two separate HCI devices in that case.
>
> But there seems to be only 1,
> static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];
> int hci_uart_register_proto(struct hci_uart_proto *p)
> {
> if (p->id >= HCI_UART_MAX_PROTO)
> return -EINVAL;
>
> if (hup[p->id])
> return -EEXIST;
>
> hup[p->id] = p;
>
> return 0;
> }
>
> So, If suppose I have 2 UARTs both on which HCI-Ldisc exists, and I try say HCI-LL on both, Now won't I get a -EEXIST for the 2nd HCI-LL ?
>
> I am a bit confused, can you explain in brief ?
> Is there a possibility of copies of *hup[HCI_UART_MAX_PROTO] for each UART?
>
>> Max
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
The call "hci_uart_register_proto()" is used to register each protocol,
not each device.
Each protocol calls this API to register themselves during module load,
and will be called only once for each protocol during the module's lifetime.
Checkout the functions under #ifdef inside "hci_uart_init()". each of
them will be calling "hci_uart_register_proto()" to register themselves.
Whenever you attach a UART BT device, "hci_uart_set_proto()" will be
called and this will be responsible for creating an hci device, Not
"hci_uart_register_proto()"
Regards
Suraj
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-07 4:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 22:04 multiple HCI_UART protocols over hci_ldisc Pavan Savoy
2010-05-06 22:30 ` Max Krasnyansky
2010-05-06 22:38 ` Pavan Savoy
2010-05-07 4:46 ` Suraj Sumangala
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.