Bluetooth: Refactor l2cap_send_sframe
authorMat Martineau <mathewm@codeaurora.org>
Fri, 18 May 2012 03:53:35 +0000 (20:53 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 5 Jun 2012 03:34:02 +0000 (06:34 +0300)
commita67d7f6fca776317bb478c96f25196972c05d173
treeb4e6f2f2304673775915c23e14646bee7fa1a987
parent18a48e76640c590a14b0286c9da5fde6ac146cc2
Bluetooth: Refactor l2cap_send_sframe

The new implementation uses struct l2cap_ctrl to set up the sframe
fields, and also reduces duplicate acks by canceling the ack timer
whenever an RR or RNR frame is sent.  sframe PDU generation is also
split in to a separate function to separate it from the logic related
to the connection state and sframe type.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c