Skip to content

Commit f4b0c2b

Browse files
bulwahnVudentz
authored andcommitted
Bluetooth: hci_event: Remove code to removed CONFIG_BT_HS
Commit cec9f3c5561d ("Bluetooth: Remove BT_HS") removes config BT_HS, but misses two "ifdef BT_HS" blocks in hci_event.c. Remove this dead code from this removed config option. Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 4aa4211 commit f4b0c2b

File tree

1 file changed

+0
-163
lines changed

1 file changed

+0
-163
lines changed

net/bluetooth/hci_event.c

Lines changed: 0 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -5663,150 +5663,6 @@ static void hci_remote_oob_data_request_evt(struct hci_dev *hdev, void *edata,
56635663
hci_dev_unlock(hdev);
56645664
}
56655665

5666-
#if IS_ENABLED(CONFIG_BT_HS)
5667-
static void hci_chan_selected_evt(struct hci_dev *hdev, void *data,
5668-
struct sk_buff *skb)
5669-
{
5670-
struct hci_ev_channel_selected *ev = data;
5671-
struct hci_conn *hcon;
5672-
5673-
bt_dev_dbg(hdev, "handle 0x%2.2x", ev->phy_handle);
5674-
5675-
hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
5676-
if (!hcon)
5677-
return;
5678-
5679-
amp_read_loc_assoc_final_data(hdev, hcon);
5680-
}
5681-
5682-
static void hci_phy_link_complete_evt(struct hci_dev *hdev, void *data,
5683-
struct sk_buff *skb)
5684-
{
5685-
struct hci_ev_phy_link_complete *ev = data;
5686-
struct hci_conn *hcon, *bredr_hcon;
5687-
5688-
bt_dev_dbg(hdev, "handle 0x%2.2x status 0x%2.2x", ev->phy_handle,
5689-
ev->status);
5690-
5691-
hci_dev_lock(hdev);
5692-
5693-
hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
5694-
if (!hcon)
5695-
goto unlock;
5696-
5697-
if (!hcon->amp_mgr)
5698-
goto unlock;
5699-
5700-
if (ev->status) {
5701-
hci_conn_del(hcon);
5702-
goto unlock;
5703-
}
5704-
5705-
bredr_hcon = hcon->amp_mgr->l2cap_conn->hcon;
5706-
5707-
hcon->state = BT_CONNECTED;
5708-
bacpy(&hcon->dst, &bredr_hcon->dst);
5709-
5710-
hci_conn_hold(hcon);
5711-
hcon->disc_timeout = HCI_DISCONN_TIMEOUT;
5712-
hci_conn_drop(hcon);
5713-
5714-
hci_debugfs_create_conn(hcon);
5715-
hci_conn_add_sysfs(hcon);
5716-
5717-
amp_physical_cfm(bredr_hcon, hcon);
5718-
5719-
unlock:
5720-
hci_dev_unlock(hdev);
5721-
}
5722-
5723-
static void hci_loglink_complete_evt(struct hci_dev *hdev, void *data,
5724-
struct sk_buff *skb)
5725-
{
5726-
struct hci_ev_logical_link_complete *ev = data;
5727-
struct hci_conn *hcon;
5728-
struct hci_chan *hchan;
5729-
struct amp_mgr *mgr;
5730-
5731-
bt_dev_dbg(hdev, "log_handle 0x%4.4x phy_handle 0x%2.2x status 0x%2.2x",
5732-
le16_to_cpu(ev->handle), ev->phy_handle, ev->status);
5733-
5734-
hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
5735-
if (!hcon)
5736-
return;
5737-
5738-
/* Create AMP hchan */
5739-
hchan = hci_chan_create(hcon);
5740-
if (!hchan)
5741-
return;
5742-
5743-
hchan->handle = le16_to_cpu(ev->handle);
5744-
hchan->amp = true;
5745-
5746-
BT_DBG("hcon %p mgr %p hchan %p", hcon, hcon->amp_mgr, hchan);
5747-
5748-
mgr = hcon->amp_mgr;
5749-
if (mgr && mgr->bredr_chan) {
5750-
struct l2cap_chan *bredr_chan = mgr->bredr_chan;
5751-
5752-
l2cap_chan_lock(bredr_chan);
5753-
5754-
bredr_chan->conn->mtu = hdev->block_mtu;
5755-
l2cap_logical_cfm(bredr_chan, hchan, 0);
5756-
hci_conn_hold(hcon);
5757-
5758-
l2cap_chan_unlock(bredr_chan);
5759-
}
5760-
}
5761-
5762-
static void hci_disconn_loglink_complete_evt(struct hci_dev *hdev, void *data,
5763-
struct sk_buff *skb)
5764-
{
5765-
struct hci_ev_disconn_logical_link_complete *ev = data;
5766-
struct hci_chan *hchan;
5767-
5768-
bt_dev_dbg(hdev, "handle 0x%4.4x status 0x%2.2x",
5769-
le16_to_cpu(ev->handle), ev->status);
5770-
5771-
if (ev->status)
5772-
return;
5773-
5774-
hci_dev_lock(hdev);
5775-
5776-
hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle));
5777-
if (!hchan || !hchan->amp)
5778-
goto unlock;
5779-
5780-
amp_destroy_logical_link(hchan, ev->reason);
5781-
5782-
unlock:
5783-
hci_dev_unlock(hdev);
5784-
}
5785-
5786-
static void hci_disconn_phylink_complete_evt(struct hci_dev *hdev, void *data,
5787-
struct sk_buff *skb)
5788-
{
5789-
struct hci_ev_disconn_phy_link_complete *ev = data;
5790-
struct hci_conn *hcon;
5791-
5792-
bt_dev_dbg(hdev, "status 0x%2.2x", ev->status);
5793-
5794-
if (ev->status)
5795-
return;
5796-
5797-
hci_dev_lock(hdev);
5798-
5799-
hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
5800-
if (hcon && hcon->type == AMP_LINK) {
5801-
hcon->state = BT_CLOSED;
5802-
hci_disconn_cfm(hcon, ev->reason);
5803-
hci_conn_del(hcon);
5804-
}
5805-
5806-
hci_dev_unlock(hdev);
5807-
}
5808-
#endif
5809-
58105666
static void le_conn_update_addr(struct hci_conn *conn, bdaddr_t *bdaddr,
58115667
u8 bdaddr_type, bdaddr_t *local_rpa)
58125668
{
@@ -7616,25 +7472,6 @@ static const struct hci_ev {
76167472
/* [0x3e = HCI_EV_LE_META] */
76177473
HCI_EV_REQ_VL(HCI_EV_LE_META, hci_le_meta_evt,
76187474
sizeof(struct hci_ev_le_meta), HCI_MAX_EVENT_SIZE),
7619-
#if IS_ENABLED(CONFIG_BT_HS)
7620-
/* [0x40 = HCI_EV_PHY_LINK_COMPLETE] */
7621-
HCI_EV(HCI_EV_PHY_LINK_COMPLETE, hci_phy_link_complete_evt,
7622-
sizeof(struct hci_ev_phy_link_complete)),
7623-
/* [0x41 = HCI_EV_CHANNEL_SELECTED] */
7624-
HCI_EV(HCI_EV_CHANNEL_SELECTED, hci_chan_selected_evt,
7625-
sizeof(struct hci_ev_channel_selected)),
7626-
/* [0x42 = HCI_EV_DISCONN_PHY_LINK_COMPLETE] */
7627-
HCI_EV(HCI_EV_DISCONN_LOGICAL_LINK_COMPLETE,
7628-
hci_disconn_loglink_complete_evt,
7629-
sizeof(struct hci_ev_disconn_logical_link_complete)),
7630-
/* [0x45 = HCI_EV_LOGICAL_LINK_COMPLETE] */
7631-
HCI_EV(HCI_EV_LOGICAL_LINK_COMPLETE, hci_loglink_complete_evt,
7632-
sizeof(struct hci_ev_logical_link_complete)),
7633-
/* [0x46 = HCI_EV_DISCONN_LOGICAL_LINK_COMPLETE] */
7634-
HCI_EV(HCI_EV_DISCONN_PHY_LINK_COMPLETE,
7635-
hci_disconn_phylink_complete_evt,
7636-
sizeof(struct hci_ev_disconn_phy_link_complete)),
7637-
#endif
76387475
/* [0x48 = HCI_EV_NUM_COMP_BLOCKS] */
76397476
HCI_EV(HCI_EV_NUM_COMP_BLOCKS, hci_num_comp_blocks_evt,
76407477
sizeof(struct hci_ev_num_comp_blocks)),

0 commit comments

Comments
 (0)