Re: [PATCH 4/8] Bluetooth: Change SMP procedures to use the new key structures

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

 



Hi Vinicius,

On Tue, Dec 06, 2011 at 09:48:08PM -0300, Vinicius Costa Gomes wrote:
> Using separated messages and list for Long Term Keys allow simplification
> of the code.
> 
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxxxxxx>
> ---
>  include/net/bluetooth/hci_core.h |   31 +++++------
>  net/bluetooth/hci_core.c         |  105 ++++++++++++++++++++++---------------
>  net/bluetooth/hci_event.c        |    5 ++-
>  net/bluetooth/mgmt.c             |    6 ++
>  net/bluetooth/smp.c              |   29 +++++-----
>  5 files changed, 102 insertions(+), 74 deletions(-)

...
> -struct link_key *hci_find_link_key_type(struct hci_dev *hdev,
> -					bdaddr_t *bdaddr, u8 type)
> +struct smp_ltk *hci_find_ltk_addr(struct hci_dev *hdev, bdaddr_t *bdaddr)
>  {
> -	struct link_key *k;
> +	struct smp_ltk *k;
>  
> -	list_for_each_entry(k, &hdev->link_keys, list)
> -		if (k->type == type && bacmp(bdaddr, &k->bdaddr) == 0)
> +	list_for_each_entry(k, &hdev->ltks, list)
> +		if (bacmp(bdaddr, &k->bdaddr) == 0)

shall we use kernel-style here? (!bacmp())

...

Best regards 
Andrei Emeltchenko 

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