Commit 8f21b0ad authored by Johannes Berg's avatar Johannes Berg

mac80211: call restart complete at wowlan resume time

When the driver's resume function can't completely
restore the configuration in the device, it returns
1 from the callback which will be treated like a HW
restart request, but done directly.

In this case, also call the driver's restart_complete()
function so it can finish the reconfiguration there.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d888130a
...@@ -2488,7 +2488,10 @@ enum ieee80211_rate_control_changed { ...@@ -2488,7 +2488,10 @@ enum ieee80211_rate_control_changed {
* *
* @restart_complete: Called after a call to ieee80211_restart_hw(), when the * @restart_complete: Called after a call to ieee80211_restart_hw(), when the
* reconfiguration has completed. This can help the driver implement the * reconfiguration has completed. This can help the driver implement the
* reconfiguration step. This callback may sleep. * reconfiguration step. Also called when reconfiguring because the
* driver's resume function returned 1, as this is just like an "inline"
* hardware restart. This callback may sleep.
*
*/ */
struct ieee80211_ops { struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw, void (*tx)(struct ieee80211_hw *hw,
......
...@@ -1358,9 +1358,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -1358,9 +1358,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
struct ieee80211_chanctx *ctx; struct ieee80211_chanctx *ctx;
struct sta_info *sta; struct sta_info *sta;
int res, i; int res, i;
#ifdef CONFIG_PM
bool reconfig_due_to_wowlan = false; bool reconfig_due_to_wowlan = false;
#ifdef CONFIG_PM
if (local->suspended) if (local->suspended)
local->resuming = true; local->resuming = true;
...@@ -1656,10 +1656,11 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -1656,10 +1656,11 @@ int ieee80211_reconfig(struct ieee80211_local *local)
* If this is for hw restart things are still running. * If this is for hw restart things are still running.
* We may want to change that later, however. * We may want to change that later, however.
*/ */
if (!local->suspended) { if (!local->suspended || reconfig_due_to_wowlan)
drv_restart_complete(local); drv_restart_complete(local);
if (!local->suspended)
return 0; return 0;
}
#ifdef CONFIG_PM #ifdef CONFIG_PM
/* first set suspended false, then resuming */ /* first set suspended false, then resuming */
......
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