diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-04-30 14:19:04 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-05-09 12:21:34 +0200 |
commit | f6837ba8c98afcf28ec25f6863a8597274aeefd6 (patch) | |
tree | 25e045970c4161b73457e42ded044dd908e81c6c /include/net/cfg80211.h | |
parent | f29f58a9e53252a50eaea0ece59f1af5fad56b5f (diff) | |
download | op-kernel-dev-f6837ba8c98afcf28ec25f6863a8597274aeefd6.zip op-kernel-dev-f6837ba8c98afcf28ec25f6863a8597274aeefd6.tar.gz |
mac80211: handle failed restart/resume better
When the driver fails during HW restart or resume, the whole
stack goes into a very confused state with interfaces being
up while the hardware is down etc.
Address this by shutting down everything; we'll run into a
lot of warnings in the process but that's better than having
the whole stack get messed up.
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 28f6f1a..5c7169b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4771,6 +4771,20 @@ int cfg80211_iter_combinations(struct wiphy *wiphy, void cfg80211_stop_iface(struct wiphy *wiphy, struct wireless_dev *wdev, gfp_t gfp); +/** + * cfg80211_shutdown_all_interfaces - shut down all interfaces for a wiphy + * @wiphy: the wiphy to shut down + * + * This function shuts down all interfaces belonging to this wiphy by + * calling dev_close() (and treating non-netdev interfaces as needed). + * It shouldn't really be used unless there are some fatal device errors + * that really can't be recovered in any other way. + * + * Callers must hold the RTNL and be able to deal with callbacks into + * the driver while the function is running. + */ +void cfg80211_shutdown_all_interfaces(struct wiphy *wiphy); + /* Logging, debugging and troubleshooting/diagnostic helpers. */ /* wiphy_printk helpers, similar to dev_printk */ |