diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 68192152c23b..694231541a4c 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1042,6 +1042,28 @@ static void hci_cc_le_set_random_addr(struct hci_dev *hdev, struct sk_buff *skb) | |||
1042 | hci_dev_unlock(hdev); | 1042 | hci_dev_unlock(hdev); |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | static void hci_cc_le_set_default_phy(struct hci_dev *hdev, struct sk_buff *skb) | ||
1046 | { | ||
1047 | __u8 status = *((__u8 *) skb->data); | ||
1048 | struct hci_cp_le_set_default_phy *cp; | ||
1049 | |||
1050 | BT_DBG("%s status 0x%2.2x", hdev->name, status); | ||
1051 | |||
1052 | if (status) | ||
1053 | return; | ||
1054 | |||
1055 | cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_DEFAULT_PHY); | ||
1056 | if (!cp) | ||
1057 | return; | ||
1058 | |||
1059 | hci_dev_lock(hdev); | ||
1060 | |||
1061 | hdev->le_tx_def_phys = cp->tx_phys; | ||
1062 | hdev->le_rx_def_phys = cp->rx_phys; | ||
1063 | |||
1064 | hci_dev_unlock(hdev); | ||
1065 | } | ||
1066 | |||
1045 | static void hci_cc_le_set_adv_enable(struct hci_dev *hdev, struct sk_buff *skb) | 1067 | static void hci_cc_le_set_adv_enable(struct hci_dev *hdev, struct sk_buff *skb) |
1046 | { | 1068 | { |
1047 | __u8 *sent, status = *((__u8 *) skb->data); | 1069 | __u8 *sent, status = *((__u8 *) skb->data); |
@@ -3163,6 +3185,10 @@ static void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skb, | |||
3163 | hci_cc_le_set_ext_scan_enable(hdev, skb); | 3185 | hci_cc_le_set_ext_scan_enable(hdev, skb); |
3164 | break; | 3186 | break; |
3165 | 3187 | ||
3188 | case HCI_OP_LE_SET_DEFAULT_PHY: | ||
3189 | hci_cc_le_set_default_phy(hdev, skb); | ||
3190 | break; | ||
3191 | |||
3166 | default: | 3192 | default: |
3167 | BT_DBG("%s opcode 0x%4.4x", hdev->name, *opcode); | 3193 | BT_DBG("%s opcode 0x%4.4x", hdev->name, *opcode); |
3168 | break; | 3194 | break; |