]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Bluetooth: Move high speed specific event under BT_HS option
authorArron Wang <arron.wang@intel.com>
Fri, 24 Jul 2015 09:13:15 +0000 (17:13 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 30 Jul 2015 11:31:59 +0000 (13:31 +0200)
Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index 32363c2b7f83d7b458eb303e2fbe7a8b050539b5..4f0a97b948377456d3db042e4405bd5a72c54fdc 100644 (file)
@@ -4399,6 +4399,23 @@ unlock:
        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,
                                      struct sk_buff *skb)
 {
@@ -4522,6 +4539,7 @@ static void hci_disconn_phylink_complete_evt(struct hci_dev *hdev,
 
        hci_dev_unlock(hdev);
 }
+#endif
 
 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,
                                 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);
                break;
 
-       case HCI_EV_CHANNEL_SELECTED:
-               hci_chan_selected_evt(hdev, skb);
-               break;
-
        case HCI_EV_REMOTE_OOB_DATA_REQUEST:
                hci_remote_oob_data_request_evt(hdev, skb);
                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:
                hci_phy_link_complete_evt(hdev, skb);
                break;
@@ -5465,6 +5468,7 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb)
        case HCI_EV_DISCONN_PHY_LINK_COMPLETE:
                hci_disconn_phylink_complete_evt(hdev, skb);
                break;
+#endif
 
        case HCI_EV_NUM_COMP_BLOCKS:
                hci_num_comp_blocks_evt(hdev, skb);