Patchwork bt: Fix the bitmask in event masked check.

login
register
mail settings
Submitter andrzej zaborowski
Date June 7, 2012, 1:43 p.m.
Message ID <1339076590-18909-2-git-send-email-balrogg@gmail.com>
Download mbox | patch
Permalink /patch/163633/
State New
Headers show

Comments

andrzej zaborowski - June 7, 2012, 1:43 p.m.
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
---
 hw/bt-hci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index 8c717f9..48cbbb5 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -442,7 +442,7 @@  static inline uint8_t *bt_hci_event_start(struct bt_hci_s *hci,
     }
 
     mask_byte = (evt - 1) >> 3;
-    mask = 1 << ((evt - 1) & 3);
+    mask = 1 << ((evt - 1) & 7);
     if (mask & bt_event_reserved_mask[mask_byte] & ~hci->event_mask[mask_byte])
         return NULL;