diff mbox

driver_nl80211: fix tearing down wds sta interfaces

Message ID 1393598509-9576-1-git-send-email-nbd@openwrt.org
State Accepted
Headers show

Commit Message

Felix Fietkau Feb. 28, 2014, 2:41 p.m. UTC
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 <nbd@openwrt.org>
---
 src/drivers/driver_nl80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jouni Malinen March 4, 2014, 9:41 p.m. UTC | #1
On Fri, Feb 28, 2014 at 03:41:49PM +0100, Felix Fietkau wrote:
> 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

Thanks, applied.
diff mbox

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index bf440b9..c2fe6cd 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -9432,8 +9432,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;
 	}
 }