Return-path: Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:57270 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752457AbaFGCsQ (ORCPT ); Fri, 6 Jun 2014 22:48:16 -0400 From: Bing Zhao To: CC: "John W. Linville" , Chin-Ran Lo , Avinash Patil , Amitkumar Karwar , Maithili Hinge , Xinming Hu , Bing Zhao , Zhiyuan Yang , Andreas Fenkart Subject: [PATCH 1/3] mwifiex: support wowlan magic-packet encapsulated as UDP packet Date: Fri, 6 Jun 2014 19:47:42 -0700 Message-ID: <1402109264-7095-1-git-send-email-bzhao@marvell.com> (sfid-20140607_044819_372470_D3C09B79) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Zhiyuan Yang When magic-packet is generated as a UDP packet the offset should be 20+8 more bytes to cover IPv4 header and UDP header. So the total offset become 56. Add a new MEF entry to support both magic-packet patterns generated by different tools. Cc: Andreas Fenkart Signed-off-by: Zhiyuan Yang Signed-off-by: Amitkumar Karwar Signed-off-by: Bing Zhao --- drivers/net/wireless/mwifiex/cfg80211.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index e95dec9..9afac2b 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -2483,6 +2483,16 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy, mef_entry->filter[filt_num].filt_type = TYPE_EQ; if (filt_num) mef_entry->filter[filt_num].filt_action = TYPE_OR; + + filt_num++; + mef_entry->filter[filt_num].repeat = 16; + memcpy(mef_entry->filter[filt_num].byte_seq, priv->curr_addr, + ETH_ALEN); + mef_entry->filter[filt_num].byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] = + ETH_ALEN; + mef_entry->filter[filt_num].offset = 56; + mef_entry->filter[filt_num].filt_type = TYPE_EQ; + mef_entry->filter[filt_num].filt_action = TYPE_OR; } if (!mef_cfg.criteria) -- 1.8.2.3