aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btwilink.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btwilink.c')
-rw-r--r--drivers/bluetooth/btwilink.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
index 65d27aff553a..04d353f58d71 100644
--- a/drivers/bluetooth/btwilink.c
+++ b/drivers/bluetooth/btwilink.c
@@ -125,6 +125,13 @@ static long st_receive(void *priv_data, struct sk_buff *skb)
125/* protocol structure registered with shared transport */ 125/* protocol structure registered with shared transport */
126static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = { 126static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = {
127 { 127 {
128 .chnl_id = HCI_EVENT_PKT, /* HCI Events */
129 .hdr_len = sizeof(struct hci_event_hdr),
130 .offset_len_in_hdr = offsetof(struct hci_event_hdr, plen),
131 .len_size = 1, /* sizeof(plen) in struct hci_event_hdr */
132 .reserve = 8,
133 },
134 {
128 .chnl_id = HCI_ACLDATA_PKT, /* ACL */ 135 .chnl_id = HCI_ACLDATA_PKT, /* ACL */
129 .hdr_len = sizeof(struct hci_acl_hdr), 136 .hdr_len = sizeof(struct hci_acl_hdr),
130 .offset_len_in_hdr = offsetof(struct hci_acl_hdr, dlen), 137 .offset_len_in_hdr = offsetof(struct hci_acl_hdr, dlen),
@@ -138,13 +145,6 @@ static struct st_proto_s ti_st_proto[MAX_BT_CHNL_IDS] = {
138 .len_size = 1, /* sizeof(dlen) in struct hci_sco_hdr */ 145 .len_size = 1, /* sizeof(dlen) in struct hci_sco_hdr */
139 .reserve = 8, 146 .reserve = 8,
140 }, 147 },
141 {
142 .chnl_id = HCI_EVENT_PKT, /* HCI Events */
143 .hdr_len = sizeof(struct hci_event_hdr),
144 .offset_len_in_hdr = offsetof(struct hci_event_hdr, plen),
145 .len_size = 1, /* sizeof(plen) in struct hci_event_hdr */
146 .reserve = 8,
147 },
148}; 148};
149 149
150/* Called from HCI core to initialize the device */ 150/* Called from HCI core to initialize the device */
@@ -240,7 +240,7 @@ static int ti_st_close(struct hci_dev *hdev)
240 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) 240 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
241 return 0; 241 return 0;
242 242
243 for (i = 0; i < MAX_BT_CHNL_IDS; i++) { 243 for (i = MAX_BT_CHNL_IDS-1; i >= 0; i--) {
244 err = st_unregister(&ti_st_proto[i]); 244 err = st_unregister(&ti_st_proto[i]);
245 if (err) 245 if (err)
246 BT_ERR("st_unregister(%d) failed with error %d", 246 BT_ERR("st_unregister(%d) failed with error %d",