提交 fffadc08 编写于 作者: A Andrei Emeltchenko 提交者: Gustavo Padovan

Bluetooth: Rename ctrl_id to remote_amp_id

Since we have started to use local_amp_id for local AMP
Controller Id it makes sense to rename ctrl_id to remote_amp_id
since it represents remote AMP controller Id.
Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 6e1df6a6
...@@ -481,6 +481,7 @@ struct l2cap_chan { ...@@ -481,6 +481,7 @@ struct l2cap_chan {
unsigned long conn_state; unsigned long conn_state;
unsigned long flags; unsigned long flags;
__u8 remote_amp_id;
__u8 local_amp_id; __u8 local_amp_id;
__u8 move_id; __u8 move_id;
__u8 move_state; __u8 move_state;
...@@ -518,8 +519,6 @@ struct l2cap_chan { ...@@ -518,8 +519,6 @@ struct l2cap_chan {
__u32 remote_acc_lat; __u32 remote_acc_lat;
__u32 remote_flush_to; __u32 remote_flush_to;
__u8 ctrl_id;
struct delayed_work chan_timer; struct delayed_work chan_timer;
struct delayed_work retrans_timer; struct delayed_work retrans_timer;
struct delayed_work monitor_timer; struct delayed_work monitor_timer;
......
...@@ -423,7 +423,7 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr, struct sk_buff *skb, ...@@ -423,7 +423,7 @@ static int a2mp_getampassoc_rsp(struct amp_mgr *mgr, struct sk_buff *skb,
BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id); BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id);
mgr->bredr_chan->ctrl_id = rsp->id; mgr->bredr_chan->remote_amp_id = rsp->id;
amp_create_phylink(hdev, mgr, hcon); amp_create_phylink(hdev, mgr, hcon);
...@@ -939,7 +939,7 @@ void a2mp_send_create_phy_link_req(struct hci_dev *hdev, u8 status) ...@@ -939,7 +939,7 @@ void a2mp_send_create_phy_link_req(struct hci_dev *hdev, u8 status)
goto clean; goto clean;
req->local_id = hdev->id; req->local_id = hdev->id;
req->remote_id = bredr_chan->ctrl_id; req->remote_id = bredr_chan->remote_amp_id;
memcpy(req->amp_assoc, loc_assoc->data, loc_assoc->len); memcpy(req->amp_assoc, loc_assoc->data, loc_assoc->len);
a2mp_send(mgr, A2MP_CREATEPHYSLINK_REQ, __next_ident(mgr), len, req); a2mp_send(mgr, A2MP_CREATEPHYSLINK_REQ, __next_ident(mgr), len, req);
......
...@@ -387,7 +387,7 @@ void amp_physical_cfm(struct hci_conn *bredr_hcon, struct hci_conn *hs_hcon) ...@@ -387,7 +387,7 @@ void amp_physical_cfm(struct hci_conn *bredr_hcon, struct hci_conn *hs_hcon)
bredr_chan = mgr->bredr_chan; bredr_chan = mgr->bredr_chan;
set_bit(FLAG_EFS_ENABLE, &bredr_chan->flags); set_bit(FLAG_EFS_ENABLE, &bredr_chan->flags);
bredr_chan->ctrl_id = hs_hcon->remote_id; bredr_chan->remote_amp_id = hs_hcon->remote_id;
bredr_chan->hs_hcon = hs_hcon; bredr_chan->hs_hcon = hs_hcon;
bredr_chan->conn->mtu = hs_hcon->hdev->block_mtu; bredr_chan->conn->mtu = hs_hcon->hdev->block_mtu;
bredr_chan->fcs = L2CAP_FCS_NONE; bredr_chan->fcs = L2CAP_FCS_NONE;
...@@ -412,8 +412,7 @@ void amp_create_logical_link(struct l2cap_chan *chan) ...@@ -412,8 +412,7 @@ void amp_create_logical_link(struct l2cap_chan *chan)
if (!hdev) if (!hdev)
return; return;
BT_DBG("chan %p ctrl_id %d dst %pMR", chan, chan->ctrl_id, BT_DBG("chan %p dst %pMR", chan, chan->conn->dst);
chan->conn->dst);
hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK, chan->conn->dst); hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK, chan->conn->dst);
if (!hcon) if (!hcon)
......
...@@ -4615,7 +4615,7 @@ static void l2cap_do_move_cancel(struct l2cap_chan *chan, int result) ...@@ -4615,7 +4615,7 @@ static void l2cap_do_move_cancel(struct l2cap_chan *chan, int result)
void l2cap_physical_cfm(struct l2cap_chan *chan, int result) void l2cap_physical_cfm(struct l2cap_chan *chan, int result)
{ {
u8 local_amp_id = chan->local_amp_id; u8 local_amp_id = chan->local_amp_id;
u8 remote_amp_id = chan->ctrl_id; u8 remote_amp_id = chan->remote_amp_id;
BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d", BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d",
chan, result, local_amp_id, remote_amp_id); chan, result, local_amp_id, remote_amp_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册