mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Bluetooth: Move high speed specific event under BT_HS option
Signed-off-by: Arron Wang <arron.wang@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
244bc37759
commit
a77a6a14e5
1 changed files with 24 additions and 20 deletions
|
@ -4399,6 +4399,23 @@ static void hci_remote_oob_data_request_evt(struct hci_dev *hdev,
|
||||||
hci_dev_unlock(hdev);
|
hci_dev_unlock(hdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_BT_HS)
|
||||||
|
static void hci_chan_selected_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
struct hci_ev_channel_selected *ev = (void *)skb->data;
|
||||||
|
struct hci_conn *hcon;
|
||||||
|
|
||||||
|
BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle);
|
||||||
|
|
||||||
|
skb_pull(skb, sizeof(*ev));
|
||||||
|
|
||||||
|
hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
|
||||||
|
if (!hcon)
|
||||||
|
return;
|
||||||
|
|
||||||
|
amp_read_loc_assoc_final_data(hdev, hcon);
|
||||||
|
}
|
||||||
|
|
||||||
static void hci_phy_link_complete_evt(struct hci_dev *hdev,
|
static void hci_phy_link_complete_evt(struct hci_dev *hdev,
|
||||||
struct sk_buff *skb)
|
struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
@ -4522,6 +4539,7 @@ static void hci_disconn_phylink_complete_evt(struct hci_dev *hdev,
|
||||||
|
|
||||||
hci_dev_unlock(hdev);
|
hci_dev_unlock(hdev);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
@ -5206,22 +5224,6 @@ static void hci_le_meta_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hci_chan_selected_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
struct hci_ev_channel_selected *ev = (void *) skb->data;
|
|
||||||
struct hci_conn *hcon;
|
|
||||||
|
|
||||||
BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle);
|
|
||||||
|
|
||||||
skb_pull(skb, sizeof(*ev));
|
|
||||||
|
|
||||||
hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle);
|
|
||||||
if (!hcon)
|
|
||||||
return;
|
|
||||||
|
|
||||||
amp_read_loc_assoc_final_data(hdev, hcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode,
|
static bool hci_get_cmd_complete(struct hci_dev *hdev, u16 opcode,
|
||||||
u8 event, struct sk_buff *skb)
|
u8 event, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
@ -5442,14 +5444,15 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
hci_le_meta_evt(hdev, skb);
|
hci_le_meta_evt(hdev, skb);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HCI_EV_CHANNEL_SELECTED:
|
|
||||||
hci_chan_selected_evt(hdev, skb);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HCI_EV_REMOTE_OOB_DATA_REQUEST:
|
case HCI_EV_REMOTE_OOB_DATA_REQUEST:
|
||||||
hci_remote_oob_data_request_evt(hdev, skb);
|
hci_remote_oob_data_request_evt(hdev, skb);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_BT_HS)
|
||||||
|
case HCI_EV_CHANNEL_SELECTED:
|
||||||
|
hci_chan_selected_evt(hdev, skb);
|
||||||
|
break;
|
||||||
|
|
||||||
case HCI_EV_PHY_LINK_COMPLETE:
|
case HCI_EV_PHY_LINK_COMPLETE:
|
||||||
hci_phy_link_complete_evt(hdev, skb);
|
hci_phy_link_complete_evt(hdev, skb);
|
||||||
break;
|
break;
|
||||||
|
@ -5465,6 +5468,7 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
|
||||||
case HCI_EV_DISCONN_PHY_LINK_COMPLETE:
|
case HCI_EV_DISCONN_PHY_LINK_COMPLETE:
|
||||||
hci_disconn_phylink_complete_evt(hdev, skb);
|
hci_disconn_phylink_complete_evt(hdev, skb);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case HCI_EV_NUM_COMP_BLOCKS:
|
case HCI_EV_NUM_COMP_BLOCKS:
|
||||||
hci_num_comp_blocks_evt(hdev, skb);
|
hci_num_comp_blocks_evt(hdev, skb);
|
||||||
|
|
Loading…
Reference in a new issue