diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-12-07 14:59:08 +0200 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-01-09 17:05:05 -0200 |
commit | cb6801c640c759fe02c812728c2661bd8ba5a302 (patch) | |
tree | 41a0c3980eb805049de1cbc654a90284131a1b98 /net/bluetooth/amp.c | |
parent | cbf54ad104cb2ec6f5734d95be1dc783bea0343b (diff) | |
download | blackbird-op-linux-cb6801c640c759fe02c812728c2661bd8ba5a302.tar.gz blackbird-op-linux-cb6801c640c759fe02c812728c2661bd8ba5a302.zip |
Bluetooth: AMP: Use set_bit / test_bit for amp_mgr state
Using bit operations solves problems with multiple requests
and clearing state.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/amp.c')
-rw-r--r-- | net/bluetooth/amp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/amp.c b/net/bluetooth/amp.c index 6b829b28eb80..d459ed43c779 100644 --- a/net/bluetooth/amp.c +++ b/net/bluetooth/amp.c @@ -236,7 +236,7 @@ void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr) cp.max_len = cpu_to_le16(hdev->amp_assoc_size); - mgr->state = READ_LOC_AMP_ASSOC; + set_bit(READ_LOC_AMP_ASSOC, &mgr->state); hci_send_cmd(hdev, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); } @@ -250,7 +250,7 @@ void amp_read_loc_assoc_final_data(struct hci_dev *hdev, cp.len_so_far = cpu_to_le16(0); cp.max_len = cpu_to_le16(hdev->amp_assoc_size); - mgr->state = READ_LOC_AMP_ASSOC_FINAL; + set_bit(READ_LOC_AMP_ASSOC_FINAL, &mgr->state); /* Read Local AMP Assoc final link information data */ hci_send_cmd(hdev, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); |