Sometimes, userspace is able to detect that a peer silently lost its state (like, if the peer reboots). wpa_supplicant does this for IBSS-RSN and currently only resets the key of the peer so that it can attempt another handshake. However, the kernel also hold state about the station, such as BA sessions, probe response parameters and the like. They also need to be resetted correctly. This patch allow userspace to use NL80211_CMD_DEL_STATION in IBSS mode, which should send a deauth and reset the state of the station, just like in mesh point mode. This has successfully been tested with mac80211/ath9k. Drivers that do not support it should just return an error, so that userspace can fall back to the old methods. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@xxxxxxxxxxxxxxxxxxxxxxx> --- net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index da5262b2298b..82046c990a2a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -6073,7 +6073,8 @@ static int nl80211_del_station(struct sk_buff *skb, struct genl_info *info) if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN && dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT && - dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) + dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO && + dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) return -EINVAL; if (!rdev->ops->del_station) -- 2.24.0