From: Ganapathi Bhat Date: Tue, 5 Apr 2016 08:04:35 +0000 (-0700) Subject: mwifiex: add support for wakeup on GTK rekey failure X-Git-Tag: v4.7-rc1~154^2~319^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8fa0a0dc634ba1bcf7678db296902d9c4e5025e0;p=karo-tx-linux.git mwifiex: add support for wakeup on GTK rekey failure User can configure wakeup on GTK rekey fail with wowlan. Added corresponding wakeup reason. Signed-off-by: Ganapathi Bhat Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index ca8cdd2ec409..49661e087811 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -3390,6 +3390,10 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy) break; case MANAGEMENT_FRAME_MATCHED: break; + case GTK_REKEY_FAILURE: + if (wiphy->wowlan_config->gtk_rekey_failure) + wakeup_report.gtk_rekey_failure = true; + break; default: break; } @@ -3965,7 +3969,8 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = { #ifdef CONFIG_PM static const struct wiphy_wowlan_support mwifiex_wowlan_support = { .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT | - WIPHY_WOWLAN_NET_DETECT | WIPHY_WOWLAN_SUPPORTS_GTK_REKEY, + WIPHY_WOWLAN_NET_DETECT | WIPHY_WOWLAN_SUPPORTS_GTK_REKEY | + WIPHY_WOWLAN_GTK_REKEY_FAILURE, .n_patterns = MWIFIEX_MEF_MAX_FILTERS, .pattern_min_len = 1, .pattern_max_len = MWIFIEX_MAX_PATTERN_LEN, diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h index 8703d24eaa9e..8e4145abdbfa 100644 --- a/drivers/net/wireless/marvell/mwifiex/fw.h +++ b/drivers/net/wireless/marvell/mwifiex/fw.h @@ -620,6 +620,7 @@ enum HS_WAKEUP_REASON { MAGIC_PATTERN_MATCHED, CONTROL_FRAME_MATCHED, MANAGEMENT_FRAME_MATCHED, + GTK_REKEY_FAILURE, RESERVED };