Skip to content

Commit bdc8ead

Browse files
holtmannjhedberg
authored andcommitted
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>
1 parent 547d103 commit bdc8ead

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎net/bluetooth/a2mp.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
537537
goto send_rsp;
538538
}
539539

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);
541542
if (!hcon) {
542543
BT_ERR("No phys link exist");
543544
rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS;

‎net/bluetooth/amp.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static u8 __next_handle(struct amp_mgr *mgr)
111111
struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
112112
u8 remote_id, bool out)
113113
{
114-
bdaddr_t *dst = mgr->l2cap_conn->dst;
114+
bdaddr_t *dst = &mgr->l2cap_conn->hcon->dst;
115115
struct hci_conn *hcon;
116116

117117
hcon = hci_conn_add(hdev, AMP_LINK, dst);
@@ -410,7 +410,8 @@ void amp_create_logical_link(struct l2cap_chan *chan)
410410
struct hci_cp_create_accept_logical_link cp;
411411
struct hci_dev *hdev;
412412

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);
414415

415416
if (!hs_hcon)
416417
return;

0 commit comments

Comments
 (0)