aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-09-27 10:26:24 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-09-27 16:35:09 -0400
commit0b26ab9dce74f8ac77d7eef0d683ab1d527e45b1 (patch)
tree201cc46c4bf0189d649988deb4ad3366f8d30d34 /net/bluetooth/hci_event.c
parentdffa387110025801862d7ad09f4e850d06ff55a9 (diff)
Bluetooth: AMP: Handle Accept phylink command status evt
When receiving HCI Command Status event for Accept Physical Link execute HCI Write Remote AMP Assoc with data saved from A2MP Create Physical Link Request. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d702ba1c171c..7e716698fe64 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1729,6 +1729,22 @@ static void hci_cs_create_phylink(struct hci_dev *hdev, u8 status)
1729 amp_write_remote_assoc(hdev, cp->phy_handle); 1729 amp_write_remote_assoc(hdev, cp->phy_handle);
1730} 1730}
1731 1731
1732static void hci_cs_accept_phylink(struct hci_dev *hdev, u8 status)
1733{
1734 struct hci_cp_accept_phy_link *cp;
1735
1736 BT_DBG("%s status 0x%2.2x", hdev->name, status);
1737
1738 if (status)
1739 return;
1740
1741 cp = hci_sent_cmd_data(hdev, HCI_OP_ACCEPT_PHY_LINK);
1742 if (!cp)
1743 return;
1744
1745 amp_write_remote_assoc(hdev, cp->phy_handle);
1746}
1747
1732static void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) 1748static void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
1733{ 1749{
1734 __u8 status = *((__u8 *) skb->data); 1750 __u8 status = *((__u8 *) skb->data);
@@ -2551,6 +2567,10 @@ static void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
2551 hci_cs_create_phylink(hdev, ev->status); 2567 hci_cs_create_phylink(hdev, ev->status);
2552 break; 2568 break;
2553 2569
2570 case HCI_OP_ACCEPT_PHY_LINK:
2571 hci_cs_accept_phylink(hdev, ev->status);
2572 break;
2573
2554 default: 2574 default:
2555 BT_DBG("%s opcode 0x%4.4x", hdev->name, opcode); 2575 BT_DBG("%s opcode 0x%4.4x", hdev->name, opcode);
2556 break; 2576 break;