Skip to content

Commit

Permalink
hostapd: fix this patch to cause some wireless driver DFS detection (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
1054009064 committed Aug 25, 2022
1 parent abd4c51 commit 80ea9d5
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions package/network/services/hostapd/patches/800-hostapd-2.10-lar.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
diff -ru a/src/ap/hw_features.c b/src/ap/hw_features.c
--- a/src/ap/hw_features.c 2022-01-16 15:51:29.000000000 -0500
+++ b/src/ap/hw_features.c 2022-07-06 22:57:53.007315518 -0500
@@ -26,6 +26,17 @@
@@ -24,6 +24,19 @@
#include "beacon.h"
#include "hw_features.h"

+#ifdef CONFIG_IWLWIFI
+static void ieee80211n_do_nothing(struct hostapd_iface *iface)
+{
+ wpa_printf(MSG_DEBUG,
Expand All @@ -16,13 +17,15 @@ diff -ru a/src/ap/hw_features.c b/src/ap/hw_features.c
+static void ieee80211n_scan_channels_5g(struct hostapd_iface *iface,
+ struct wpa_driver_scan_params *params);
+
+#endif

void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
size_t num_hw_features)
@@ -82,6 +93,33 @@
@@ -82,6 +93,35 @@

if (hostapd_drv_none(hapd))
return -1;
+#ifdef CONFIG_IWLWIFI
+
+
+ if (!iface->conf->noscan) {
Expand Down Expand Up @@ -50,37 +53,35 @@ diff -ru a/src/ap/hw_features.c b/src/ap/hw_features.c
+ }
+ }
+ }
+#endif
modes = hostapd_get_hw_feature_data(hapd, &num_modes, &flags,
&dfs_domain);
if (modes == NULL) {

@@ -308,7 +346,6 @@
sec_chan);
}

-
static void ieee80211n_check_scan(struct hostapd_iface *iface)
{
struct wpa_scan_results *scan_res;
@@ -517,8 +554,10 @@
int ret;
@@ -518,8 +556,15 @@

/* Check that HT40 is used and PRI / SEC switch is allowed */
- if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
+ if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch || iface->conf->noscan) {
if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch ||
+#ifdef CONFIG_IWLWIFI
+ iface->conf->noscan) {
+ wpa_printf(MSG_DEBUG, "Not scanning due to noscan?");
+ return 0;
+ }
+#else
iface->conf->noscan)
return 0;
+ }
+#endif

hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
wpa_printf(MSG_DEBUG, "Scan for neighboring BSSes prior to enabling "
@@ -916,7 +954,7 @@
@@ -916,7 +954,11 @@
if (!hostapd_is_usable_edmg(iface))
return 0;

- if (!iface->conf->secondary_channel)
+#ifdef CONFIG_IWLWIFI
+ if (!iface->conf->secondary_channel || iface->conf->noscan)
+#else
if (!iface->conf->secondary_channel)
+#endif
return 1;

if (hostapd_is_usable_chan(iface, iface->freq +

0 comments on commit 80ea9d5

Please sign in to comment.