aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-05-01 15:15:36 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-05-10 03:28:46 -0400
commite8235c6bdd1c7ffbaa7eb8dcdbb46c51f1e5d72e (patch)
treeccb588d2ef6ba72164b9b43b8e540c7987ce6a1f /net/bluetooth/l2cap.c
parentd1daa091e8612f3aab14d28b5836375fafe155e1 (diff)
Bluetooth: Use a l2cap_pinfo struct instead l2cap_pi() macro
Trivial clean up. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 99cf1772b481..a9c152a09f0b 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1291,7 +1291,7 @@ static int l2cap_streaming_send(struct sock *sk)
1291 control |= pi->next_tx_seq << L2CAP_CTRL_TXSEQ_SHIFT; 1291 control |= pi->next_tx_seq << L2CAP_CTRL_TXSEQ_SHIFT;
1292 put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE); 1292 put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE);
1293 1293
1294 if (l2cap_pi(sk)->fcs == L2CAP_FCS_CRC16) { 1294 if (pi->fcs == L2CAP_FCS_CRC16) {
1295 fcs = crc16(0, (u8 *)tx_skb->data, tx_skb->len - 2); 1295 fcs = crc16(0, (u8 *)tx_skb->data, tx_skb->len - 2);
1296 put_unaligned_le16(fcs, tx_skb->data + tx_skb->len - 2); 1296 put_unaligned_le16(fcs, tx_skb->data + tx_skb->len - 2);
1297 } 1297 }
@@ -1344,7 +1344,7 @@ static int l2cap_retransmit_frame(struct sock *sk, u8 tx_seq)
1344 | (tx_seq << L2CAP_CTRL_TXSEQ_SHIFT); 1344 | (tx_seq << L2CAP_CTRL_TXSEQ_SHIFT);
1345 put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE); 1345 put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE);
1346 1346
1347 if (l2cap_pi(sk)->fcs == L2CAP_FCS_CRC16) { 1347 if (pi->fcs == L2CAP_FCS_CRC16) {
1348 fcs = crc16(0, (u8 *)tx_skb->data, tx_skb->len - 2); 1348 fcs = crc16(0, (u8 *)tx_skb->data, tx_skb->len - 2);
1349 put_unaligned_le16(fcs, tx_skb->data + tx_skb->len - 2); 1349 put_unaligned_le16(fcs, tx_skb->data + tx_skb->len - 2);
1350 } 1350 }
@@ -1388,7 +1388,7 @@ static int l2cap_ertm_send(struct sock *sk)
1388 put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE); 1388 put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE);
1389 1389
1390 1390
1391 if (l2cap_pi(sk)->fcs == L2CAP_FCS_CRC16) { 1391 if (pi->fcs == L2CAP_FCS_CRC16) {
1392 fcs = crc16(0, (u8 *)skb->data, tx_skb->len - 2); 1392 fcs = crc16(0, (u8 *)skb->data, tx_skb->len - 2);
1393 put_unaligned_le16(fcs, skb->data + tx_skb->len - 2); 1393 put_unaligned_le16(fcs, skb->data + tx_skb->len - 2);
1394 } 1394 }
@@ -3518,10 +3518,10 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
3518 pi->expected_ack_seq = tx_seq; 3518 pi->expected_ack_seq = tx_seq;
3519 l2cap_drop_acked_frames(sk); 3519 l2cap_drop_acked_frames(sk);
3520 3520
3521 del_timer(&l2cap_pi(sk)->retrans_timer); 3521 del_timer(&pi->retrans_timer);
3522 if (rx_control & L2CAP_CTRL_POLL) { 3522 if (rx_control & L2CAP_CTRL_POLL) {
3523 u16 control = L2CAP_CTRL_FINAL; 3523 u16 control = L2CAP_CTRL_FINAL;
3524 l2cap_send_rr_or_rnr(l2cap_pi(sk), control); 3524 l2cap_send_rr_or_rnr(pi, control);
3525 } 3525 }
3526 break; 3526 break;
3527 } 3527 }
@@ -3622,7 +3622,7 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
3622 goto done; 3622 goto done;
3623 3623
3624 default: 3624 default:
3625 BT_DBG("sk %p: bad mode 0x%2.2x", sk, l2cap_pi(sk)->mode); 3625 BT_DBG("sk %p: bad mode 0x%2.2x", sk, pi->mode);
3626 break; 3626 break;
3627 } 3627 }
3628 3628