Re: [PATCH 3/6] Bluetooth: Set the scan response data when needed

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

 



Hi Lizardo,

On Wed, Oct 16, 2013, Anderson Lizardo wrote:
> On Wed, Oct 16, 2013 at 3:16 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> > +static void update_scan_rsp_data(struct hci_request *req)
> > +{
> > +       struct hci_dev *hdev = req->hdev;
> > +       struct hci_cp_le_set_scan_rsp_data cp;
> > +       u8 len;
> > +
> > +       if (!lmp_le_capable(hdev))
> > +               return;
> > +
> > +       memset(&cp, 0, sizeof(cp));
> > +
> > +       len = create_scan_rsp_data(hdev, cp.data);
> > +
> > +       if (hdev->adv_data_len == len &&
> > +           memcmp(cp.data, hdev->adv_data, len) == 0)
> > +               return;
> > +
> > +       memcpy(hdev->adv_data, cp.data, sizeof(cp.data));
> > +       hdev->adv_data_len = len;
> 
> Shouldn't you be using hdev->scan_rsp_data/scan_rsp_data_len here?
> 
> (I still haven't read the later patches, so this may already be fixed.)

Nope, it's still broken upstream. Good that you noticed it. Bad that I
didn't and bad that it seems Marcel didn't actually test this one
properly ;)

Johan
--
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