diff options
author | Dean Jenkins <Dean_Jenkins@mentor.com> | 2015-06-23 16:59:33 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-07-23 15:10:51 (GMT) |
commit | f65468f6e26c3bd05e642e10e80a485b99b7de05 (patch) | |
tree | acf84d5f1bf435c379c78ac51fc6a43b9b990c45 /mm/memory.c | |
parent | 2baea85dec1aebe0b100d4836dee8bcf29a51e94 (diff) | |
download | linux-f65468f6e26c3bd05e642e10e80a485b99b7de05.tar.xz |
Bluetooth: Make __l2cap_wait_ack more efficient
Use chan->state instead of chan->conn because waiting
for ACK's is only possible in the BT_CONNECTED state.
Also avoids reference to the conn structure so makes
locking easier.
Only call __l2cap_wait_ack() when the needed condition
of chan->unacked_frames > 0 && chan->state == BT_CONNECTED
is true and convert the while loop to a do while loop.
__l2cap_wait_ack() change the function prototype to
pass in the chan variable as chan is already available
in the calling function l2cap_sock_shutdown(). Avoids
locking issues.
Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'mm/memory.c')
0 files changed, 0 insertions, 0 deletions