mwifiex: fix bug for wildcard-prefix wowlan pattern
authorXinming Hu <huxm@marvell.com>
Mon, 14 Dec 2015 12:15:05 +0000 (04:15 -0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 30 Dec 2015 14:57:56 +0000 (16:57 +0200)
Wildcard prefix bytes are ignored while downloading packet
pattern to firmware. As packet offset is not adjusted
accordingly firmware end up matching the pattern at wrong
offset. The packet offset is corrected in this patch.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/cfg80211.c

index 3349c2ae3b761a5b89bd9734e3eb88dcfb260bff..0aab9354ab5b5a6573501c0a0c733c70c9a5f36b 100644 (file)
@@ -2921,6 +2921,12 @@ mwifiex_is_pattern_supported(struct cfg80211_pkt_pattern *pat, s8 *byte_seq,
                                        dont_care_byte = true;
                        }
 
+                       /* wildcard bytes record as the offset
+                        * before the valid byte
+                        */
+                       if (!valid_byte_cnt && !dont_care_byte)
+                               pat->pkt_offset++;
+
                        if (valid_byte_cnt > max_byte_seq)
                                return false;
                }
This page took 0.027014 seconds and 5 git commands to generate.