aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2011-12-19 09:31:29 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-20 13:59:40 -0500
commit32ac5b9b57ef521470f930fd00849be4705bc134 (patch)
treecd27ccf4395dfa0b517e43b81f4d41cff22e4d71
parent2455a3ea0c0235fe3c32b67649ff7db3fb892d90 (diff)
Bluetooth: Check for flow control mode
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
-rw-r--r--net/bluetooth/hci_event.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index da4e17f4a7c6..5a204aefc035 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2263,6 +2263,11 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s
2263 2263
2264 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); 2264 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl);
2265 2265
2266 if (hdev->flow_ctl_mode != HCI_FLOW_CTL_MODE_PACKET_BASED) {
2267 BT_ERR("Wrong event for mode %d", hdev->flow_ctl_mode);
2268 return;
2269 }
2270
2266 if (skb->len < ev->num_hndl * 4) { 2271 if (skb->len < ev->num_hndl * 4) {
2267 BT_DBG("%s bad parameters", hdev->name); 2272 BT_DBG("%s bad parameters", hdev->name);
2268 return; 2273 return;