mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
hostapd: fix this patch to cause some wireless driver DFS detection (#9997)
This commit is contained in:
parent
abd4c51b2e
commit
80ea9d5bbf
@ -1,10 +1,11 @@
|
|||||||
diff -ru a/src/ap/hw_features.c b/src/ap/hw_features.c
|
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
|
--- 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
|
+++ 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 "beacon.h"
|
||||||
#include "hw_features.h"
|
#include "hw_features.h"
|
||||||
|
|
||||||
|
+#ifdef CONFIG_IWLWIFI
|
||||||
+static void ieee80211n_do_nothing(struct hostapd_iface *iface)
|
+static void ieee80211n_do_nothing(struct hostapd_iface *iface)
|
||||||
+{
|
+{
|
||||||
+ wpa_printf(MSG_DEBUG,
|
+ wpa_printf(MSG_DEBUG,
|
||||||
@ -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,
|
+static void ieee80211n_scan_channels_5g(struct hostapd_iface *iface,
|
||||||
+ struct wpa_driver_scan_params *params);
|
+ struct wpa_driver_scan_params *params);
|
||||||
+
|
+
|
||||||
|
+#endif
|
||||||
|
|
||||||
void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
|
void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
|
||||||
size_t num_hw_features)
|
size_t num_hw_features)
|
||||||
@@ -82,6 +93,33 @@
|
@@ -82,6 +93,35 @@
|
||||||
|
|
||||||
if (hostapd_drv_none(hapd))
|
if (hostapd_drv_none(hapd))
|
||||||
return -1;
|
return -1;
|
||||||
|
+#ifdef CONFIG_IWLWIFI
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+ if (!iface->conf->noscan) {
|
+ if (!iface->conf->noscan) {
|
||||||
@ -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,
|
modes = hostapd_get_hw_feature_data(hapd, &num_modes, &flags,
|
||||||
&dfs_domain);
|
&dfs_domain);
|
||||||
if (modes == NULL) {
|
if (modes == NULL) {
|
||||||
|
@@ -518,8 +556,15 @@
|
||||||
@@ -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;
|
|
||||||
|
|
||||||
/* Check that HT40 is used and PRI / SEC switch is allowed */
|
/* 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 ||
|
||||||
+ if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch || iface->conf->noscan) {
|
+#ifdef CONFIG_IWLWIFI
|
||||||
|
+ iface->conf->noscan) {
|
||||||
+ wpa_printf(MSG_DEBUG, "Not scanning due to noscan?");
|
+ wpa_printf(MSG_DEBUG, "Not scanning due to noscan?");
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
iface->conf->noscan)
|
||||||
return 0;
|
return 0;
|
||||||
+ }
|
+#endif
|
||||||
|
|
||||||
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
|
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
|
||||||
wpa_printf(MSG_DEBUG, "Scan for neighboring BSSes prior to enabling "
|
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))
|
if (!hostapd_is_usable_edmg(iface))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
- if (!iface->conf->secondary_channel)
|
+#ifdef CONFIG_IWLWIFI
|
||||||
+ if (!iface->conf->secondary_channel || iface->conf->noscan)
|
+ if (!iface->conf->secondary_channel || iface->conf->noscan)
|
||||||
|
+#else
|
||||||
|
if (!iface->conf->secondary_channel)
|
||||||
|
+#endif
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (hostapd_is_usable_chan(iface, iface->freq +
|
if (hostapd_is_usable_chan(iface, iface->freq +
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user