Re: [PATCH] android: Add support for setting adapters name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrei,

On 31 October 2013 15:21, Andrei Emeltchenko
<andrei.emeltchenko.news@xxxxxxxxx> wrote:
>
> Hi Grzegorz,
>
> On Thu, Oct 31, 2013 at 03:00:38PM +0100, Grzegorz Kolodziejczyk wrote:
> > ---
> >  android/adapter.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  android/hal-msg.h |  2 ++
> >  2 files changed, 55 insertions(+)
> >
> > diff --git a/android/adapter.c b/android/adapter.c
> > index 15b65e5..5dadc2e 100644
> > --- a/android/adapter.c
> > +++ b/android/adapter.c
> > @@ -129,6 +129,27 @@ static void scan_mode_changed(void)
> >       g_free(ev);
> >  }
> >
> > +static void adapter_name_changed(const uint8_t *name)
> > +{
> > +     struct hal_ev_adapter_props_changed *ev;
> > +     uint8_t buf[sizeof(*ev) + sizeof(struct hal_property) +
> > +                                                     HAL_MAX_NAME_LENGTH];
> > +
> > +     memset(buf, 0, sizeof(buf));
> > +     ev = (void *) buf;
> > +
> > +     ev->num_props = 1;
> > +     ev->status = HAL_STATUS_SUCCESS;
> > +     ev->props[0].type = HAL_PROP_ADAPTER_NAME;
> > +     ev->props[0].len = HAL_MAX_NAME_LENGTH;
>
> Do we need to pass always HAL_MAX_NAME_LENGTH ?
>

Yes, HAL expect 249 byte size array. IPC should map to HAL calls,
where name is expected to have 249 bytes.

Best regards,
Grzegorz Kołodziejczyk
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux