1 --- a/src/ap/sta_info.c
2 +++ b/src/ap/sta_info.c
3 @@ -121,7 +121,8 @@ void ap_free_sta(struct hostapd_data *ha
5 accounting_sta_stop(hapd, sta);
7 - hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
8 + if (sta->flags & WLAN_STA_WDS)
9 + hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
10 if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
11 !(sta->flags & WLAN_STA_PREAUTH))
12 hapd->drv.sta_remove(hapd, sta->addr);