Re: [PATCH BlueZ 1/8] Add stubs for storing SMP keys

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

 



Hi Mike,

On Mon, Jul 25, 2011 at 8:40 PM, mike tsai <mikeyhtsai@xxxxxxxxx> wrote:
> Hi Vinicius,
>
> <cut>
>> diff --git a/src/event.c b/src/event.c
>> index 86a413e..3f0f454 100644
>> --- a/src/event.c
>> +++ b/src/event.c
>> @@ -395,9 +395,8 @@ proceed:
>>        adapter_set_state(adapter, STATE_IDLE);
>>  }
>>
>> -int btd_event_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
>> -                               uint8_t *key, uint8_t key_type,
>> -                               uint8_t pin_length)
>> +int btd_event_link_key_notify(bdaddr_t *local, bdaddr_t *peer, uint8_t *key,
>> +               uint8_t key_type, uint8_t pin_length, int dlen, uint8_t *data)
>>  {
>>        struct btd_adapter *adapter;
>>        struct btd_device *device;
>> @@ -408,7 +407,10 @@ int btd_event_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
>>
>>        DBG("storing link key of type 0x%02x", key_type);
>>
>> -       ret = write_link_key(local, peer, key, key_type, pin_length);
>> +       if (key_type < 0x10)
>> +               ret = write_link_key(local, peer, key, key_type, pin_length);
>> +       else
>> +               ret = write_longtermkeys(local, peer, NULL);
>>
>>        if (ret == 0 && device_is_temporary(device))
>>                device_set_temporary(device, FALSE);
> [MT] The event.c in the mainline is different from this, It is currently as
>        if (ret == 0) {
>                device_set_bonded(device, TRUE);
>
>                if (device_is_temporary(device))
>                        device_set_temporary(device, FALSE);
>        }
> this causes applying patches failed.
>

Yeah, the code should have moved on after I sent this.

> I am also wandering why these patches are not up-streamed yet. It
> would seem to me that the kernel SMP patches will need these to
> support full capability.
>

After I sent these patches, I received some comments from Johan that
there could be some simplifications if
I used different messages for the SMP keys. I still didn't get to
implement them, but I will make those changes soon.

Don't know if it will be of any help, but in my personal repository[1]
(in the branch for-upstream) there is a version that
applies cleanly on top of the mainline HEAD. Just a warning, that it
was just compile-tested ;-)

> Regards,
>
> Mike
> --
> 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
>


Cheers,
-- 
Vinicius

[1] http://git.infradead.org/users/vcgomes/bluez.git
--
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