diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-10 20:28:49 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-16 17:57:15 -0400 |
commit | e2ab43536c53ba112a0adfb4c0dba286544c41f6 (patch) | |
tree | 5387e283430437f54c743fa2d9b33538e9850594 /include | |
parent | c1360a1cf35117d6f3898cb5183ce4349d06714c (diff) |
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: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 4ab1b27996bc..9c18e555b6ed 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -325,7 +325,7 @@ struct l2cap_chan { | |||
325 | __u16 mps; | 325 | __u16 mps; |
326 | 326 | ||
327 | unsigned long conf_state; | 327 | unsigned long conf_state; |
328 | __u16 conn_state; | 328 | unsigned long conn_state; |
329 | 329 | ||
330 | __u8 next_tx_seq; | 330 | __u8 next_tx_seq; |
331 | __u8 expected_ack_seq; | 331 | __u8 expected_ack_seq; |
@@ -438,17 +438,19 @@ enum { | |||
438 | #define L2CAP_CONF_MAX_CONF_REQ 2 | 438 | #define L2CAP_CONF_MAX_CONF_REQ 2 |
439 | #define L2CAP_CONF_MAX_CONF_RSP 2 | 439 | #define L2CAP_CONF_MAX_CONF_RSP 2 |
440 | 440 | ||
441 | #define L2CAP_CONN_SAR_SDU 0x0001 | 441 | enum { |
442 | #define L2CAP_CONN_SREJ_SENT 0x0002 | 442 | CONN_SAR_SDU, |
443 | #define L2CAP_CONN_WAIT_F 0x0004 | 443 | CONN_SREJ_SENT, |
444 | #define L2CAP_CONN_SREJ_ACT 0x0008 | 444 | CONN_WAIT_F, |
445 | #define L2CAP_CONN_SEND_PBIT 0x0010 | 445 | CONN_SREJ_ACT, |
446 | #define L2CAP_CONN_REMOTE_BUSY 0x0020 | 446 | CONN_SEND_PBIT, |
447 | #define L2CAP_CONN_LOCAL_BUSY 0x0040 | 447 | CONN_REMOTE_BUSY, |
448 | #define L2CAP_CONN_REJ_ACT 0x0080 | 448 | CONN_LOCAL_BUSY, |
449 | #define L2CAP_CONN_SEND_FBIT 0x0100 | 449 | CONN_REJ_ACT, |
450 | #define L2CAP_CONN_RNR_SENT 0x0200 | 450 | CONN_SEND_FBIT, |
451 | #define L2CAP_CONN_SAR_RETRY 0x0400 | 451 | CONN_RNR_SENT, |
452 | CONN_SAR_RETRY, | ||
453 | }; | ||
452 | 454 | ||
453 | #define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t)) | 455 | #define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t)) |
454 | #define __clear_chan_timer(c) l2cap_clear_timer(c, &c->chan_timer) | 456 | #define __clear_chan_timer(c) l2cap_clear_timer(c, &c->chan_timer) |