linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mwifiex: fix coding style
@ 2016-04-21 15:07 Amitkumar Karwar
  2016-04-21 15:07 ` [PATCH 2/3] mwifiex: report wowlan wakeup reasons correctly Amitkumar Karwar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amitkumar Karwar @ 2016-04-21 15:07 UTC (permalink / raw)
  To: linux-wireless; +Cc: Wei-Ning Huang, Amitkumar Karwar

Redundant space in case statement is removed.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 6db202f..369ea06 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3388,7 +3388,7 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
 		break;
 	case CONTROL_FRAME_MATCHED:
 		break;
-	case	MANAGEMENT_FRAME_MATCHED:
+	case MANAGEMENT_FRAME_MATCHED:
 		break;
 	case GTK_REKEY_FAILURE:
 		if (wiphy->wowlan_config->gtk_rekey_failure)
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] mwifiex: report wowlan wakeup reasons correctly
  2016-04-21 15:07 [PATCH 1/3] mwifiex: fix coding style Amitkumar Karwar
@ 2016-04-21 15:07 ` Amitkumar Karwar
  2016-04-21 15:07 ` [PATCH 3/3] mwifiex: avoid querying wakeup reason when wowlan is disabled Amitkumar Karwar
  2016-04-27 13:52 ` [1/3] mwifiex: fix coding style Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Amitkumar Karwar @ 2016-04-21 15:07 UTC (permalink / raw)
  To: linux-wireless; +Cc: Wei-Ning Huang, Amitkumar Karwar

It's been observed that wakeup on GTK rekey failure wasn't reported
to cfg80211. This patch corrects the check so that all valid wakeup
reasons are reported.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 369ea06..734cf67 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3344,6 +3344,7 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
 	struct mwifiex_ds_wakeup_reason wakeup_reason;
 	struct cfg80211_wowlan_wakeup wakeup_report;
 	int i;
+	bool report_wakeup_reason = true;
 
 	for (i = 0; i < adapter->priv_num; i++) {
 		priv = adapter->priv[i];
@@ -3386,20 +3387,16 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
 		if (wiphy->wowlan_config->n_patterns)
 			wakeup_report.pattern_idx = 1;
 		break;
-	case CONTROL_FRAME_MATCHED:
-		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:
+		report_wakeup_reason = false;
 		break;
 	}
 
-	if ((wakeup_reason.hs_wakeup_reason > 0) &&
-	    (wakeup_reason.hs_wakeup_reason <= 7))
+	if (report_wakeup_reason)
 		cfg80211_report_wowlan_wakeup(&priv->wdev, &wakeup_report,
 					      GFP_KERNEL);
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] mwifiex: avoid querying wakeup reason when wowlan is disabled
  2016-04-21 15:07 [PATCH 1/3] mwifiex: fix coding style Amitkumar Karwar
  2016-04-21 15:07 ` [PATCH 2/3] mwifiex: report wowlan wakeup reasons correctly Amitkumar Karwar
@ 2016-04-21 15:07 ` Amitkumar Karwar
  2016-04-27 13:52 ` [1/3] mwifiex: fix coding style Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Amitkumar Karwar @ 2016-04-21 15:07 UTC (permalink / raw)
  To: linux-wireless; +Cc: Wei-Ning Huang, Amitkumar Karwar

In cfg80211 resume handler, we query wakeup reason from firmware and
report to cfg80211. if wowlan is disabled, connection is already
terminated during suspend. We don't need to query wakeup reason in this
case.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 734cf67..ff948a9 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3355,6 +3355,9 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
 		}
 	}
 
+	if (!wiphy->wowlan_config)
+		goto done;
+
 	priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA);
 	mwifiex_get_wakeup_reason(priv, HostCmd_ACT_GEN_GET, MWIFIEX_SYNC_CMD,
 				  &wakeup_reason);
@@ -3400,6 +3403,7 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
 		cfg80211_report_wowlan_wakeup(&priv->wdev, &wakeup_report,
 					      GFP_KERNEL);
 
+done:
 	if (adapter->nd_info) {
 		for (i = 0 ; i < adapter->nd_info->n_matches ; i++)
 			kfree(adapter->nd_info->matches[i]);
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [1/3] mwifiex: fix coding style
  2016-04-21 15:07 [PATCH 1/3] mwifiex: fix coding style Amitkumar Karwar
  2016-04-21 15:07 ` [PATCH 2/3] mwifiex: report wowlan wakeup reasons correctly Amitkumar Karwar
  2016-04-21 15:07 ` [PATCH 3/3] mwifiex: avoid querying wakeup reason when wowlan is disabled Amitkumar Karwar
@ 2016-04-27 13:52 ` Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2016-04-27 13:52 UTC (permalink / raw)
  To: Amitkumar Karwar; +Cc: linux-wireless, Wei-Ning Huang, Amitkumar Karwar


> Redundant space in case statement is removed.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

Thanks, 3 patches applied to wireless-drivers-next.git:

3f210e2f1269 mwifiex: fix coding style
df2288623ee0 mwifiex: report wowlan wakeup reasons correctly
d286af9bf40a mwifiex: avoid querying wakeup reason when wowlan is disabled

Kalle Valo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-27 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-21 15:07 [PATCH 1/3] mwifiex: fix coding style Amitkumar Karwar
2016-04-21 15:07 ` [PATCH 2/3] mwifiex: report wowlan wakeup reasons correctly Amitkumar Karwar
2016-04-21 15:07 ` [PATCH 3/3] mwifiex: avoid querying wakeup reason when wowlan is disabled Amitkumar Karwar
2016-04-27 13:52 ` [1/3] mwifiex: fix coding style Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).