aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaithili Hinge <maithili@marvell.com>2014-12-31 05:36:46 -0500
committerKalle Valo <kvalo@codeaurora.org>2015-01-06 14:20:32 -0500
commit8a40084e7bb8f0fd32a301a64fd869726516a1df (patch)
tree48cfd1d897a7fc6d963f18b116a8add1a6405e62
parent468133c54f4e5e194cb4bfd4e3bf640ae2304e97 (diff)
mwifiex: Add support for wowlan disconnect
This patch adds support for wowlan disconnect. Signed-off-by: Maithili Hinge <maithili@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 2be2dc5f76bb..93ab36fc9f93 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -2527,6 +2527,7 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
2527 struct cfg80211_wowlan *wowlan) 2527 struct cfg80211_wowlan *wowlan)
2528{ 2528{
2529 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); 2529 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
2530 struct mwifiex_ds_hs_cfg hs_cfg;
2530 int ret = 0; 2531 int ret = 0;
2531 struct mwifiex_private *priv = 2532 struct mwifiex_private *priv =
2532 mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA); 2533 mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
@@ -2550,6 +2551,20 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy,
2550 } 2551 }
2551 } 2552 }
2552 2553
2554 if (wowlan->disconnect) {
2555 memset(&hs_cfg, 0, sizeof(hs_cfg));
2556 hs_cfg.is_invoke_hostcmd = false;
2557 hs_cfg.conditions = HS_CFG_COND_MAC_EVENT;
2558 hs_cfg.gpio = HS_CFG_GPIO_DEF;
2559 hs_cfg.gap = HS_CFG_GAP_DEF;
2560 ret = mwifiex_set_hs_params(priv, HostCmd_ACT_GEN_SET,
2561 MWIFIEX_SYNC_CMD, &hs_cfg);
2562 if (ret) {
2563 dev_err(adapter->dev, "Failed to set HS params\n");
2564 return ret;
2565 }
2566 }
2567
2553 return ret; 2568 return ret;
2554} 2569}
2555 2570
@@ -2890,7 +2905,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
2890 2905
2891#ifdef CONFIG_PM 2906#ifdef CONFIG_PM
2892static const struct wiphy_wowlan_support mwifiex_wowlan_support = { 2907static const struct wiphy_wowlan_support mwifiex_wowlan_support = {
2893 .flags = WIPHY_WOWLAN_MAGIC_PKT, 2908 .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT,
2894 .n_patterns = MWIFIEX_MEF_MAX_FILTERS, 2909 .n_patterns = MWIFIEX_MEF_MAX_FILTERS,
2895 .pattern_min_len = 1, 2910 .pattern_min_len = 1,
2896 .pattern_max_len = MWIFIEX_MAX_PATTERN_LEN, 2911 .pattern_max_len = MWIFIEX_MAX_PATTERN_LEN,