diff mbox

mwifiex: fix wakeup on magic packet

Message ID 1389968780-27268-1-git-send-email-afenkart@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Andreas Fenkart Jan. 17, 2014, 2:26 p.m. UTC
8 bytes preamble
14 bytes src/dst/eth_type
 6 bytes 0xff:0xff..

http://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet
http://en.wikipedia.org/wiki/EtherType

This will fail if we VLAN or the magic packet is encapsulated
as a UDP packet...

Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bing Zhao Jan. 18, 2014, 4:38 a.m. UTC | #1
Hi Andreas,

>  8 bytes preamble
> 14 bytes src/dst/eth_type
>  6 bytes 0xff:0xff..
> 
> http://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet
> http://en.wikipedia.org/wiki/EtherType
> 
> This will fail if we VLAN or the magic packet is encapsulated
> as a UDP packet...
> 
> Signed-off-by: Andreas Fenkart <afenkart@gmail.com>

Thanks for your patch.

Acked-by: Bing Zhao <bzhao@marvell.com>

Regards,
Bing

> ---
>  drivers/net/wireless/mwifiex/cfg80211.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
> index aeaea0e..7e91587 100644
> --- a/drivers/net/wireless/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/mwifiex/cfg80211.c
> @@ -2438,7 +2438,7 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
>  		       ETH_ALEN);
>  		mef_entry->filter[filt_num].byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] =
>  								ETH_ALEN;
> -		mef_entry->filter[filt_num].offset = 14;
> +		mef_entry->filter[filt_num].offset = 28;
>  		mef_entry->filter[filt_num].filt_type = TYPE_EQ;
>  		if (filt_num)
>  			mef_entry->filter[filt_num].filt_action = TYPE_OR;
> --
> 1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index aeaea0e..7e91587 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -2438,7 +2438,7 @@  static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
 		       ETH_ALEN);
 		mef_entry->filter[filt_num].byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] =
 								ETH_ALEN;
-		mef_entry->filter[filt_num].offset = 14;
+		mef_entry->filter[filt_num].offset = 28;
 		mef_entry->filter[filt_num].filt_type = TYPE_EQ;
 		if (filt_num)
 			mef_entry->filter[filt_num].filt_action = TYPE_OR;