]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Remove l2cap_conn->dst usage from AMP manager
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 13 Oct 2013 09:23:38 +0000 (02:23 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 13 Oct 2013 14:43:32 +0000 (17:43 +0300)
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>
net/bluetooth/a2mp.c
net/bluetooth/amp.c

index 7e25be3e8a79561d79448a970ae6665c50ce37ab..60ca52819247506a33a36f444698295e6f4fc762 100644 (file)
@@ -537,7 +537,8 @@ static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
                goto send_rsp;
        }
 
-       hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK, mgr->l2cap_conn->dst);
+       hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK,
+                                      &mgr->l2cap_conn->hcon->dst);
        if (!hcon) {
                BT_ERR("No phys link exist");
                rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS;
index 5497ed3f2e3d2e9fed369916d6ba9e4f48db46f2..bb39509b3f065e2a0d18e1a53cfcfabc8bfe779e 100644 (file)
@@ -111,7 +111,7 @@ static u8 __next_handle(struct amp_mgr *mgr)
 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
                             u8 remote_id, bool out)
 {
-       bdaddr_t *dst = mgr->l2cap_conn->dst;
+       bdaddr_t *dst = &mgr->l2cap_conn->hcon->dst;
        struct hci_conn *hcon;
 
        hcon = hci_conn_add(hdev, AMP_LINK, dst);
@@ -410,7 +410,8 @@ void amp_create_logical_link(struct l2cap_chan *chan)
        struct hci_cp_create_accept_logical_link cp;
        struct hci_dev *hdev;
 
-       BT_DBG("chan %p hs_hcon %p dst %pMR", chan, hs_hcon, chan->conn->dst);
+       BT_DBG("chan %p hs_hcon %p dst %pMR", chan, hs_hcon,
+              &chan->conn->hcon->dst);
 
        if (!hs_hcon)
                return;