Commit df228862 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo

mwifiex: report wowlan wakeup reasons correctly

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3f210e2f
...@@ -3344,6 +3344,7 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy) ...@@ -3344,6 +3344,7 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
struct mwifiex_ds_wakeup_reason wakeup_reason; struct mwifiex_ds_wakeup_reason wakeup_reason;
struct cfg80211_wowlan_wakeup wakeup_report; struct cfg80211_wowlan_wakeup wakeup_report;
int i; int i;
bool report_wakeup_reason = true;
for (i = 0; i < adapter->priv_num; i++) { for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i]; priv = adapter->priv[i];
...@@ -3386,20 +3387,16 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy) ...@@ -3386,20 +3387,16 @@ static int mwifiex_cfg80211_resume(struct wiphy *wiphy)
if (wiphy->wowlan_config->n_patterns) if (wiphy->wowlan_config->n_patterns)
wakeup_report.pattern_idx = 1; wakeup_report.pattern_idx = 1;
break; break;
case CONTROL_FRAME_MATCHED:
break;
case MANAGEMENT_FRAME_MATCHED:
break;
case GTK_REKEY_FAILURE: case GTK_REKEY_FAILURE:
if (wiphy->wowlan_config->gtk_rekey_failure) if (wiphy->wowlan_config->gtk_rekey_failure)
wakeup_report.gtk_rekey_failure = true; wakeup_report.gtk_rekey_failure = true;
break; break;
default: default:
report_wakeup_reason = false;
break; break;
} }
if ((wakeup_reason.hs_wakeup_reason > 0) && if (report_wakeup_reason)
(wakeup_reason.hs_wakeup_reason <= 7))
cfg80211_report_wowlan_wakeup(&priv->wdev, &wakeup_report, cfg80211_report_wowlan_wakeup(&priv->wdev, &wakeup_report,
GFP_KERNEL); GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment