diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-16 11:42:28 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-16 11:04:23 +0200 |
commit | e804d25d4a07c0ff9e5e1c58ea5ee67232aa9af8 (patch) | |
tree | b52e7927dace2aa691585d9dd12534d36ade1b87 /net/bluetooth/smp.c | |
parent | 40bef302f6323d1ee6fb3dc0e62edb0f446d0339 (diff) | |
download | linux-e804d25d4a07c0ff9e5e1c58ea5ee67232aa9af8.tar.bz2 |
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.c | 4 |
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) struct hci_conn *hcon = conn->hcon; key = hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type, - hcon->out); + hcon->role); if (!key) return false; @@ -881,7 +881,7 @@ bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level) */ if (test_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags) && hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type, - hcon->out)) + hcon->role)) return false; if (hcon->sec_level >= sec_level) |