brcmfmac: shutdown interfaces on PSM's watchdog fire
RFC PATCH 1/1 brcmfmac: shutdown interfaces on PSM's watchdog fire
From: Rafał Miłecki <[email protected]>
When PSM's watchdog fires hardware / firmware is not operational. It seems there isn't a way to restart firmware & reapply all settings so instead shut all interfaces down. This is at least some signal for the user things went wrong and allows reacting to it.
---
This patch is RFC as I'm wondering if there is any other way to handle such errors. I couldn't find anything except for that cfg80211_shutdown_all_interfaces.
Unfortunately hostapd doesn't seem to react to this except for sth like:
Fri Feb 24 13:41:07 2017 daemon.notice hostapd: wlan0: INTERFACE-DISABLED
Shall we introduce some nl80211 even for such cases maybe?
Or maybe I'm totally wrong and there is some simple way for a driver to request reconfiguration of all interfaces?
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 +++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 4 ++++ 3 files changed, 10 insertions(+)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +5 -0
@@ -6981,3 +6981,8 @@ void brcmf_cfg80211_detach(struct brcmf_cfg80211_info *cfg)wl_deinit_priv (cfg);brcmf_free_wiphy (cfg->wiphy); } + +void brcmf_cfg80211_shutdown (struct brcmf_cfg80211_info *cfg) +{ +cfg80211_shutdown_all_interfaces (cfg->wiphy); +}
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h +1 -0
@@ -385,6 +385,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,struct device *busdev, bool p2pdev_forced);void brcmf_cfg80211_detach (struct brcmf_cfg80211_info *cfg); +void brcmf_cfg80211_shutdown (struct brcmf_cfg80211_info *cfg);s32 brcmf_cfg80211_up (struct net_device *ndev);s32 brcmf_cfg80211_down (struct net_device *ndev);enum nl80211_iftype brcmf_cfg80211_get_iftype (struct brcmf_if *ifp);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +4 -0
@@ -753,6 +753,10 @@ static int brcmf_psm_watchdog_notify(struct brcmf_if *ifp,if (err)brcmf_err ("Failed to get memory dump, %d\n" , err); +brcmf_cfg80211_shutdown (ifp->drvr->config); + +/* TODO: Stop the firmware */ +return err; }
Signature · 1 line
2.11.0
Quoted 13 lines · Rafa=C5=82 Mi=C5=82ecki <[email protected]> writes:
From: Rafa=C5=82 Mi=C5=82ecki <[email protected]>
When PSM's watchdog fires hardware / firmware is not operational. It seems there isn't a way to restart firmware & reapply all settings so instead shut all interfaces down. This is at least some signal for the user things went wrong and allows reacting to it.
Signed-off-by Rafa=C5=82 Mi=C5=82ecki <[email protected]>---
This patch is RFC as I'm wondering if there is any other way to handle such errors. I couldn't find anything except for thatcfg80211_shutdown_all_interfaces.
Quoted 7 lines
Unfortunately hostapd doesn't seem to react to this except for sth like:
Fri Feb 24 13:41:07 2017 daemon.notice hostapd: wlan0: INTERFACE-DISABLEDShall we introduce some nl80211 even for such cases maybe?
Or maybe I'm totally wrong and there is some simple way for a driver to request reconfiguration of all interfaces?
Did you notice this on your email:
To: unlisted-recipients:; (no To-header on input)
--=20
Kalle Valo
Quoted 9 lines · Kalle Valo
Quoted 7 lines · Rafa=C5=82 Mi=C5=82ecki <[email protected]> writes:
From: Rafa=C5=82 Mi=C5=82ecki <[email protected]>
When PSM's watchdog fires hardware / firmware is not operational. It seems there isn't a way to restart firmware & reapply all settings so instead shut all interfaces down. This is at least some signal for the user things went wrong and allows reacting to it.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Rafa=C5=82 Mi=C5=82ecki <[email protected]>---
This patch is RFC as I'm wondering if there is any other way to handle such errors. I couldn't find anything except for thatcfg80211_shutdown_all_interfaces.Unfortunately hostapd doesn't seem to react to this except for sth like:
Fri Feb 24 13:41:07 2017 daemon.notice hostapd: wlan0: INTERFACE-DISABLE=
D
Quoted 9 lines
Quoted 5 lines
Shall we introduce some nl80211 even for such cases maybe?
Or maybe I'm totally wrong and there is some simple way for a driver to request reconfiguration of all interfaces?
Did you notice this on your email:
To: unlisted-recipients:; (no To-header on input)
I guess I should have put linux-wireless in To. Normally I put you, but since it's RFC, I left it empty and it went like this.
Anyway I believe it still reached linux-wireless. So any comments on this? = :)
--=20
Rafa=C5=82