Commit e2ab4353 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan

Bluetooth: Use bit operations on conn_state

Instead of setting bits manually we use set_bit, test_bit, etc.
Also remove L2CAP_ prefix from macros.
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent c1360a1c
...@@ -325,7 +325,7 @@ struct l2cap_chan { ...@@ -325,7 +325,7 @@ struct l2cap_chan {
__u16 mps; __u16 mps;
unsigned long conf_state; unsigned long conf_state;
__u16 conn_state; unsigned long conn_state;
__u8 next_tx_seq; __u8 next_tx_seq;
__u8 expected_ack_seq; __u8 expected_ack_seq;
...@@ -438,17 +438,19 @@ enum { ...@@ -438,17 +438,19 @@ enum {
#define L2CAP_CONF_MAX_CONF_REQ 2 #define L2CAP_CONF_MAX_CONF_REQ 2
#define L2CAP_CONF_MAX_CONF_RSP 2 #define L2CAP_CONF_MAX_CONF_RSP 2
#define L2CAP_CONN_SAR_SDU 0x0001 enum {
#define L2CAP_CONN_SREJ_SENT 0x0002 CONN_SAR_SDU,
#define L2CAP_CONN_WAIT_F 0x0004 CONN_SREJ_SENT,
#define L2CAP_CONN_SREJ_ACT 0x0008 CONN_WAIT_F,
#define L2CAP_CONN_SEND_PBIT 0x0010 CONN_SREJ_ACT,
#define L2CAP_CONN_REMOTE_BUSY 0x0020 CONN_SEND_PBIT,
#define L2CAP_CONN_LOCAL_BUSY 0x0040 CONN_REMOTE_BUSY,
#define L2CAP_CONN_REJ_ACT 0x0080 CONN_LOCAL_BUSY,
#define L2CAP_CONN_SEND_FBIT 0x0100 CONN_REJ_ACT,
#define L2CAP_CONN_RNR_SENT 0x0200 CONN_SEND_FBIT,
#define L2CAP_CONN_SAR_RETRY 0x0400 CONN_RNR_SENT,
CONN_SAR_RETRY,
};
#define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t)) #define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t))
#define __clear_chan_timer(c) l2cap_clear_timer(c, &c->chan_timer) #define __clear_chan_timer(c) l2cap_clear_timer(c, &c->chan_timer)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment