aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210
diff options
context:
space:
mode:
authorAlexei Avshalom Lazar <ailizaro@codeaurora.org>2019-06-16 10:25:57 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-06-27 20:49:34 +0300
commitb913e33076c81165a62ae164259a7915ffa53dc1 (patch)
tree5294c04dc701afc663c2abc36a62c8ac51ebe49c /drivers/net/wireless/ath/wil6210
parentwil6210: no need to check return value of debugfs_create functions (diff)
downloadlinux-dev-b913e33076c81165a62ae164259a7915ffa53dc1.tar.xz
linux-dev-b913e33076c81165a62ae164259a7915ffa53dc1.zip
wil6210: do not reset FW in STA to P2P client interface switch
Currently the FW is reset on every interface type change, because of various FW bugs. FW reset is not required when switching from STA to P2P client, hence can be skipped. Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210')
-rw-r--r--drivers/net/wireless/ath/wil6210/cfg80211.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index ca77d7a48f5d..f94fe428c501 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -643,6 +643,16 @@ out:
return rc;
}
+static bool wil_is_safe_switch(enum nl80211_iftype from,
+ enum nl80211_iftype to)
+{
+ if (from == NL80211_IFTYPE_STATION &&
+ to == NL80211_IFTYPE_P2P_CLIENT)
+ return true;
+
+ return false;
+}
+
static int wil_cfg80211_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
enum nl80211_iftype type,
@@ -668,7 +678,8 @@ static int wil_cfg80211_change_iface(struct wiphy *wiphy,
* because it can cause significant disruption
*/
if (!wil_has_other_active_ifaces(wil, ndev, true, false) &&
- netif_running(ndev) && !wil_is_recovery_blocked(wil)) {
+ netif_running(ndev) && !wil_is_recovery_blocked(wil) &&
+ !wil_is_safe_switch(wdev->iftype, type)) {
wil_dbg_misc(wil, "interface is up. resetting...\n");
mutex_lock(&wil->mutex);
__wil_down(wil);