summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2014-06-24 16:03:50 +0200
committerMarcel Holtmann2014-07-03 17:42:46 +0200
commit4dae27983eaaee15c6867561eb2c8d7b2d28d6cc (patch)
tree5081f92ee6b9cb7f28bfc446b5bf194f82680a3b /net/bluetooth/l2cap_core.c
parentBluetooth: Remove ssp_debug_mode debugfs option (diff)
downloadkernel-qcow2-linux-4dae27983eaaee15c6867561eb2c8d7b2d28d6cc.tar.gz
kernel-qcow2-linux-4dae27983eaaee15c6867561eb2c8d7b2d28d6cc.tar.xz
kernel-qcow2-linux-4dae27983eaaee15c6867561eb2c8d7b2d28d6cc.zip
Bluetooth: Convert hci_conn->link_mode into flags
Since the link_mode member of the hci_conn struct is a bit field and we already have a flags member as well it makes sense to merge these two together. This patch moves all used link_mode bits into corresponding flags. To keep backwards compatibility with user space we still need to provide a get_link_mode() helper function for the ioctl's that expect a link_mode style value. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 565afb78296a..d015aa190fdc 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1486,7 +1486,7 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn)
* been configured for this connection. If not, then trigger
* the connection update procedure.
*/
- if (!(hcon->link_mode & HCI_LM_MASTER) &&
+ if (!test_bit(HCI_CONN_MASTER, &hcon->flags) &&
(hcon->le_conn_interval < hcon->le_conn_min_interval ||
hcon->le_conn_interval > hcon->le_conn_max_interval)) {
struct l2cap_conn_param_update_req req;
@@ -5244,7 +5244,7 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn,
u16 min, max, latency, to_multiplier;
int err;
- if (!(hcon->link_mode & HCI_LM_MASTER))
+ if (!test_bit(HCI_CONN_MASTER, &hcon->flags))
return -EINVAL;
if (cmd_len != sizeof(struct l2cap_conn_param_update_req))