aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-06-10 16:02:12 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-06-16 17:57:14 -0400
commitc1360a1cf35117d6f3898cb5183ce4349d06714c (patch)
tree0a68031ba6f6252054d7b6b5b5a40913a29c58e4 /net/bluetooth/l2cap_sock.c
parent7fbec224cfb44074ab88720c878aa3bdb3158377 (diff)
Bluetooth: use bit operation on conf_state
Instead of making the bit operations manually, we now use set_bit, test_bit, etc. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 5c819e002fb1..39082d4e77ce 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -512,7 +512,7 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __us
512 chan->mode = opts.mode; 512 chan->mode = opts.mode;
513 switch (chan->mode) { 513 switch (chan->mode) {
514 case L2CAP_MODE_BASIC: 514 case L2CAP_MODE_BASIC:
515 chan->conf_state &= ~L2CAP_CONF_STATE2_DEVICE; 515 clear_bit(CONF_STATE2_DEVICE, &chan->conf_state);
516 break; 516 break;
517 case L2CAP_MODE_ERTM: 517 case L2CAP_MODE_ERTM:
518 case L2CAP_MODE_STREAMING: 518 case L2CAP_MODE_STREAMING:
@@ -891,7 +891,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
891 chan->omtu = 0; 891 chan->omtu = 0;
892 if (!disable_ertm && sk->sk_type == SOCK_STREAM) { 892 if (!disable_ertm && sk->sk_type == SOCK_STREAM) {
893 chan->mode = L2CAP_MODE_ERTM; 893 chan->mode = L2CAP_MODE_ERTM;
894 chan->conf_state |= L2CAP_CONF_STATE2_DEVICE; 894 set_bit(CONF_STATE2_DEVICE, &chan->conf_state);
895 } else { 895 } else {
896 chan->mode = L2CAP_MODE_BASIC; 896 chan->mode = L2CAP_MODE_BASIC;
897 } 897 }