Index: hostapd-2021-02-20-59e9794c/src/ap/hostapd.c =================================================================== --- hostapd-2021-02-20-59e9794c.orig/src/ap/hostapd.c +++ hostapd-2021-02-20-59e9794c/src/ap/hostapd.c @@ -11,6 +11,8 @@ #include #endif /* CONFIG_SQLITE */ +#include + #include "utils/common.h" #include "utils/eloop.h" #include "common/ieee802_11_defs.h" @@ -1316,6 +1318,22 @@ static int hostapd_setup_bss(struct host os_memcpy(hapd->own_addr, if_addr, ETH_ALEN); } + if (conf->wds_sta) { + char path[128]; + FILE *fp; + + sprintf(path, "/sys/kernel/debug/ieee80211/%s/netdev:%s/disable_offload", hostapd_drv_get_radio_name(hapd), conf->iface); + + fp = fopen(path, "w"); + if (fp) { + syslog(0, "WDS: disable encap - %s\n", path); + fprintf(fp, "1"); + fclose(fp); + } else { + syslog(0, "WDS: failed to disable encap - %s\n", path); + } + } + if (conf->wmm_enabled < 0) conf->wmm_enabled = hapd->iconf->ieee80211n | hapd->iconf->ieee80211ax;