diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2011-10-12 03:53:57 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-10-13 16:34:16 -0400 |
commit | 928abaa777501ddab94b1b49aae485a2c730d303 (patch) | |
tree | c77b743bb88b86bc18e9f88dae37ce5a7ee3a0b9 /net/bluetooth/hci_event.c | |
parent | f89cef09cee60a9715150a6e335dce4e64df7400 (diff) |
Bluetooth: AMP: read local amp info HCI command
Implementation of Read Local AMP Info Command
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0e57634ab8da..41967fec12b7 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -748,6 +748,30 @@ static void hci_cc_write_ca_timeout(struct hci_dev *hdev, struct sk_buff *skb) | |||
748 | hci_req_complete(hdev, HCI_OP_WRITE_CA_TIMEOUT, status); | 748 | hci_req_complete(hdev, HCI_OP_WRITE_CA_TIMEOUT, status); |
749 | } | 749 | } |
750 | 750 | ||
751 | static void hci_cc_read_local_amp_info(struct hci_dev *hdev, | ||
752 | struct sk_buff *skb) | ||
753 | { | ||
754 | struct hci_rp_read_local_amp_info *rp = (void *) skb->data; | ||
755 | |||
756 | BT_DBG("%s status 0x%x", hdev->name, rp->status); | ||
757 | |||
758 | if (rp->status) | ||
759 | return; | ||
760 | |||
761 | hdev->amp_status = rp->amp_status; | ||
762 | hdev->amp_total_bw = __le32_to_cpu(rp->total_bw); | ||
763 | hdev->amp_max_bw = __le32_to_cpu(rp->max_bw); | ||
764 | hdev->amp_min_latency = __le32_to_cpu(rp->min_latency); | ||
765 | hdev->amp_max_pdu = __le32_to_cpu(rp->max_pdu); | ||
766 | hdev->amp_type = rp->amp_type; | ||
767 | hdev->amp_pal_cap = __le16_to_cpu(rp->pal_cap); | ||
768 | hdev->amp_assoc_size = __le16_to_cpu(rp->max_assoc_size); | ||
769 | hdev->amp_be_flush_to = __le32_to_cpu(rp->be_flush_to); | ||
770 | hdev->amp_max_flush_to = __le32_to_cpu(rp->max_flush_to); | ||
771 | |||
772 | hci_req_complete(hdev, HCI_OP_READ_LOCAL_AMP_INFO, rp->status); | ||
773 | } | ||
774 | |||
751 | static void hci_cc_delete_stored_link_key(struct hci_dev *hdev, | 775 | static void hci_cc_delete_stored_link_key(struct hci_dev *hdev, |
752 | struct sk_buff *skb) | 776 | struct sk_buff *skb) |
753 | { | 777 | { |
@@ -1898,6 +1922,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk | |||
1898 | hci_cc_write_ca_timeout(hdev, skb); | 1922 | hci_cc_write_ca_timeout(hdev, skb); |
1899 | break; | 1923 | break; |
1900 | 1924 | ||
1925 | case HCI_OP_READ_LOCAL_AMP_INFO: | ||
1926 | hci_cc_read_local_amp_info(hdev, skb); | ||
1927 | break; | ||
1928 | |||
1901 | case HCI_OP_DELETE_STORED_LINK_KEY: | 1929 | case HCI_OP_DELETE_STORED_LINK_KEY: |
1902 | hci_cc_delete_stored_link_key(hdev, skb); | 1930 | hci_cc_delete_stored_link_key(hdev, skb); |
1903 | break; | 1931 | break; |