diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-13 05:23:38 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-13 10:43:32 -0400 |
commit | bdc8ead27c71b4d3f3e883b0bf3f279a18a6f590 (patch) | |
tree | d91b98be379447c8fdcc15e762ab7c924277c87f | |
parent | 547d103280690b8febd2354320e164ae508d912e (diff) |
Bluetooth: Remove l2cap_conn->dst usage from AMP manager
The l2cap_conn->dst address is just a pointer into the hci_conn->dst
structure. Use hci_conn->dst directly instead.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | net/bluetooth/a2mp.c | 3 | ||||
-rw-r--r-- | net/bluetooth/amp.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index 7e25be3e8a79..60ca52819247 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c | |||
@@ -537,7 +537,8 @@ static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, | |||
537 | goto send_rsp; | 537 | goto send_rsp; |
538 | } | 538 | } |
539 | 539 | ||
540 | hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK, mgr->l2cap_conn->dst); | 540 | hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK, |
541 | &mgr->l2cap_conn->hcon->dst); | ||
541 | if (!hcon) { | 542 | if (!hcon) { |
542 | BT_ERR("No phys link exist"); | 543 | BT_ERR("No phys link exist"); |
543 | rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS; | 544 | rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS; |
diff --git a/net/bluetooth/amp.c b/net/bluetooth/amp.c index 5497ed3f2e3d..bb39509b3f06 100644 --- a/net/bluetooth/amp.c +++ b/net/bluetooth/amp.c | |||
@@ -111,7 +111,7 @@ static u8 __next_handle(struct amp_mgr *mgr) | |||
111 | struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr, | 111 | struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr, |
112 | u8 remote_id, bool out) | 112 | u8 remote_id, bool out) |
113 | { | 113 | { |
114 | bdaddr_t *dst = mgr->l2cap_conn->dst; | 114 | bdaddr_t *dst = &mgr->l2cap_conn->hcon->dst; |
115 | struct hci_conn *hcon; | 115 | struct hci_conn *hcon; |
116 | 116 | ||
117 | hcon = hci_conn_add(hdev, AMP_LINK, dst); | 117 | hcon = hci_conn_add(hdev, AMP_LINK, dst); |
@@ -410,7 +410,8 @@ void amp_create_logical_link(struct l2cap_chan *chan) | |||
410 | struct hci_cp_create_accept_logical_link cp; | 410 | struct hci_cp_create_accept_logical_link cp; |
411 | struct hci_dev *hdev; | 411 | struct hci_dev *hdev; |
412 | 412 | ||
413 | BT_DBG("chan %p hs_hcon %p dst %pMR", chan, hs_hcon, chan->conn->dst); | 413 | BT_DBG("chan %p hs_hcon %p dst %pMR", chan, hs_hcon, |
414 | &chan->conn->hcon->dst); | ||
414 | 415 | ||
415 | if (!hs_hcon) | 416 | if (!hs_hcon) |
416 | return; | 417 | return; |