Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 642ba9ef authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ath10k: deinit wow config in driver unload"

parents 5596910c f5706210
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8277,6 +8277,7 @@ err_free:

void ath10k_mac_unregister(struct ath10k *ar)
{
	ath10k_wow_deinit(ar);
	ieee80211_unregister_hw(ar->hw);

	if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
+9 −2
Original line number Diff line number Diff line
@@ -577,8 +577,15 @@ int ath10k_wow_init(struct ath10k *ar)
	ar->wow.wowlan_support = ath10k_wowlan_support;
	ar->wow.wowlan_support.n_patterns = ar->wow.max_num_patterns;
	ar->hw->wiphy->wowlan = &ar->wow.wowlan_support;

	device_set_wakeup_capable(ar->dev, true);
	device_init_wakeup(ar->dev, true);

	return 0;
}

void ath10k_wow_deinit(struct ath10k *ar)
{
	if (test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT,
		     ar->running_fw->fw_file.fw_features) &&
		test_bit(WMI_SERVICE_WOW, ar->wmi.svc_map))
		device_init_wakeup(ar->dev, false);
}
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ struct ath10k_wow {
#ifdef CONFIG_PM

int ath10k_wow_init(struct ath10k *ar);
void ath10k_wow_deinit(struct ath10k *ar);
int ath10k_wow_op_suspend(struct ieee80211_hw *hw,
			  struct cfg80211_wowlan *wowlan);
int ath10k_wow_op_resume(struct ieee80211_hw *hw);
@@ -41,5 +42,8 @@ static inline int ath10k_wow_init(struct ath10k *ar)
	return 0;
}

void ath10k_wow_deinit(struct ath10k *ar)
{
}
#endif /* CONFIG_PM */
#endif /* _WOW_H_ */