aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-16 04:42:28 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-16 05:04:23 -0400
commite804d25d4a07c0ff9e5e1c58ea5ee67232aa9af8 (patch)
treeb52e7927dace2aa691585d9dd12534d36ade1b87 /net/bluetooth/smp.c
parent40bef302f6323d1ee6fb3dc0e62edb0f446d0339 (diff)
Bluetooth: Use explicit role instead of a bool in function parameters
To make the code more understandable it makes sense to use the new HCI defines for connection role instead of a "bool master" parameter. This makes it immediately clear when looking at the function calls what the last parameter is describing. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r--net/bluetooth/smp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 78eeb8b5970a..70b726518d7b 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -849,7 +849,7 @@ static bool smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level)
849 struct hci_conn *hcon = conn->hcon; 849 struct hci_conn *hcon = conn->hcon;
850 850
851 key = hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type, 851 key = hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type,
852 hcon->out); 852 hcon->role);
853 if (!key) 853 if (!key)
854 return false; 854 return false;
855 855
@@ -881,7 +881,7 @@ bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level)
881 */ 881 */
882 if (test_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags) && 882 if (test_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags) &&
883 hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type, 883 hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type,
884 hcon->out)) 884 hcon->role))
885 return false; 885 return false;
886 886
887 if (hcon->sec_level >= sec_level) 887 if (hcon->sec_level >= sec_level)