From: Felix Fietkau Date: Fri, 28 Feb 2014 14:41:49 +0000 (+0100) Subject: nl80211: Fix tearing down WDS STA interfaces X-Git-Tag: hostap_2_2~677 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0595b25b467a841586a3492f4e10e9f58bc5da0;p=thirdparty%2Fhostap.git nl80211: Fix tearing down WDS STA interfaces wpa_driver_nl80211_if_remove() checks bss->if_added before deleting an interface, which is 0 for the first BSS. The only part of wpa_driver_nl80211_if_remove() that should get called for WDS STA interfaces is the call to nl80211_remove_iface(), which can be pulled in here directly. Signed-off-by: Felix Fietkau --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index c5091705c..d09f7b3b7 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -9431,8 +9431,8 @@ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val, name); i802_set_sta_vlan(priv, addr, bss->ifname, 0); - return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN, - name); + nl80211_remove_iface(drv, if_nametoindex(name)); + return 0; } }