Files
wlan-ap/feeds/wifi-ax/hostapd/patches/770-wds-hack.patch
John Crispin d84982f161 ath11k: fix WDS when encap offload is enabled
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-02 15:45:08 +01:00

37 lines
1.0 KiB
Diff

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 <sqlite3.h>
#endif /* CONFIG_SQLITE */
+#include <syslog.h>
+
#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;