diff mbox series

[2/2] mac80211: Set radio to unavailable when it fails to reconfigure.

Message ID 20200922204440.25360-2-greearb@candelatech.com (mailing list archive)
State New
Delegated to: Johannes Berg
Headers show
Series [1/2] wireless: Add sysfs file to show if radio is unavailable | expand

Commit Message

Ben Greear Sept. 22, 2020, 8:44 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

This can happen when firmware crashes during recover operations, for
instance.  Seen sometimes during stress test of ath10k systems, particularlly
an IPQ4019 based platform, but I think it could happen on many systems.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/util.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index f3bc05217f741..ecd56f80b0c82 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2106,6 +2106,7 @@  static void ieee80211_handle_reconfig_failure(struct ieee80211_local *local)
 	mutex_unlock(&local->chanctx_mtx);
 
 	cfg80211_shutdown_all_interfaces(local->hw.wiphy);
+	cfg80211_set_unavailable(local->hw.wiphy, 1);
 }
 
 static void ieee80211_assign_chanctx(struct ieee80211_local *local,