Re: [PATCH-v5 5/6] Bluetooth: Add MITM mechanism to LE-SMP

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

 



On 12/1/2011 6:11 AM, Gustavo Padovan wrote:
Hi Brian,

diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h
index 15b97d5..43b6c49 100644
--- a/include/net/bluetooth/smp.h
+++ b/include/net/bluetooth/smp.h
@@ -124,6 +124,8 @@ struct smp_chan {
  	u8		pcnf[16]; /* SMP Pairing Confirm */
  	u8		tk[16]; /* SMP Temporary Key */
  	u8		smp_key_size;
+	u8		smp_tk_valid;
+	u8		smp_cfm_pending;

Those two could be converted in a bitfield, you are using them as boolean.


Is there a mandate that bitfields must be manipulated/checked with the clear_bit/set_bit/test_bit prototypes? Or can I just use a single u8 to represent both boolean values (as opposed to an unsigned long), and use standard &=, |= and & to set/clear/check?


--
Brian Gix
bgix@xxxxxxxxxxxxxx
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
--
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