summaryrefslogtreecommitdiffstats
path: root/package/hostapd/patches/140-wds_sta_remove.patch
blob: 80e036eef9dee64fa057e86ecf1b637cc3c76871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -121,7 +121,8 @@ void ap_free_sta(struct hostapd_data *ha
 
 	accounting_sta_stop(hapd, sta);
 
-	hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
+	if (sta->flags & WLAN_STA_WDS)
+		hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
 	if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
 	    !(sta->flags & WLAN_STA_PREAUTH))
 		hapd->drv.sta_remove(hapd, sta->addr);