Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352232
b: refs/heads/master
c: cb6801c
h: refs/heads/master
v: v3
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Jan 9, 2013
1 parent 39fcb16 commit ab725e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbf54ad104cb2ec6f5734d95be1dc783bea0343b
refs/heads/master: cb6801c640c759fe02c812728c2661bd8ba5a302
2 changes: 1 addition & 1 deletion trunk/include/net/bluetooth/a2mp.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct amp_mgr {
struct kref kref;
__u8 ident;
__u8 handle;
enum amp_mgr_state state;
unsigned long state;
unsigned long flags;

struct list_head amp_ctrls;
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/bluetooth/a2mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb,
goto done;
}

mgr->state = READ_LOC_AMP_INFO;
set_bit(READ_LOC_AMP_INFO, &mgr->state);
hci_send_cmd(hdev, HCI_OP_READ_LOCAL_AMP_INFO, 0, NULL);

done:
Expand Down Expand Up @@ -506,7 +506,7 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
a2mp_send(mgr, A2MP_CREATEPHYSLINK_RSP, hdr->ident,
sizeof(rsp), &rsp);
} else {
mgr->state = WRITE_REMOTE_AMP_ASSOC;
set_bit(WRITE_REMOTE_AMP_ASSOC, &mgr->state);
mgr->ident = hdr->ident;
}

Expand Down Expand Up @@ -848,7 +848,7 @@ struct amp_mgr *amp_mgr_lookup_by_state(u8 state)

mutex_lock(&amp_mgr_list_lock);
list_for_each_entry(mgr, &amp_mgr_list, list) {
if (mgr->state == state) {
if (test_and_clear_bit(state, &mgr->state)) {
amp_mgr_get(mgr);
mutex_unlock(&amp_mgr_list_lock);
return mgr;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/bluetooth/amp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
Expand Down

0 comments on commit ab725e6

Please sign in to comment.