Created
July 23, 2026 20:13
-
-
Save AvinashReddy3108/a69c492bd3eb15369a949908c9ef945a to your computer and use it in GitHub Desktop.
[debian] noscan patch for hostapd (wpa)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Description: allows 40MHz wide channels with IEEE 802.11n (HT) | |
| Author: Viktor Drobot <linux776@gmail.com> | |
| Origin: AUR, https://aur.archlinux.org/cgit/aur.git/tree/noscan.patch?h=hostapd-noscan&id=99cd5aa37f73a4d238319b0976b6890ebc5546b8 | |
| Bug: https://aur.archlinux.org/packages/hostapd-noscan | |
| Last-Update: 2022-01-19 | |
| --- | |
| This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
| Index: wpa-2.10/hostapd/config_file.c | |
| =================================================================== | |
| --- wpa-2.10.orig/hostapd/config_file.c | |
| +++ wpa-2.10/hostapd/config_file.c | |
| @@ -2906,6 +2906,8 @@ static int hostapd_config_fill(struct ho | |
| line, bss->wpa_deny_ptk0_rekey); | |
| return 1; | |
| } | |
| + } else if (os_strcmp(buf, "noscan") == 0) { | |
| + conf->noscan = atoi(pos); | |
| } else if (os_strcmp(buf, "wpa_group_update_count") == 0) { | |
| char *endp; | |
| unsigned long val = strtoul(pos, &endp, 0); | |
| @@ -3474,6 +3476,8 @@ static int hostapd_config_fill(struct ho | |
| if (bss->ocv && !bss->ieee80211w) | |
| bss->ieee80211w = 1; | |
| #endif /* CONFIG_OCV */ | |
| + } else if (os_strcmp(buf, "noscan") == 0) { | |
| + conf->noscan = atoi(pos); | |
| } else if (os_strcmp(buf, "ieee80211n") == 0) { | |
| conf->ieee80211n = atoi(pos); | |
| } else if (os_strcmp(buf, "ht_capab") == 0) { | |
| Index: wpa-2.10/src/ap/ap_config.h | |
| =================================================================== | |
| --- wpa-2.10.orig/src/ap/ap_config.h | |
| +++ wpa-2.10/src/ap/ap_config.h | |
| @@ -1014,6 +1014,7 @@ struct hostapd_config { | |
| int ht_op_mode_fixed; | |
| u16 ht_capab; | |
| + int noscan; | |
| int ieee80211n; | |
| int secondary_channel; | |
| int no_pri_sec_switch; | |
| Index: wpa-2.10/src/ap/hw_features.c | |
| =================================================================== | |
| --- wpa-2.10.orig/src/ap/hw_features.c | |
| +++ wpa-2.10/src/ap/hw_features.c | |
| @@ -517,7 +517,7 @@ static int ieee80211n_check_40mhz(struct | |
| int ret; | |
| /* 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) | |
| return 0; | |
| hostapd_set_state(iface, HAPD_IFACE_HT_SCAN); | |
| @@ -915,7 +915,7 @@ static int hostapd_is_usable_chans(struc | |
| if (!hostapd_is_usable_edmg(iface)) | |
| return 0; | |
| - if (!iface->conf->secondary_channel) | |
| + if (!iface->conf->secondary_channel || iface->conf->noscan) | |
| return 1; | |
| if (hostapd_is_usable_chan(iface, iface->freq + | |
| Index: wpa-2.10/src/ap/ieee802_11_ht.c | |
| =================================================================== | |
| --- wpa-2.10.orig/src/ap/ieee802_11_ht.c | |
| +++ wpa-2.10/src/ap/ieee802_11_ht.c | |
| @@ -230,6 +230,9 @@ void hostapd_2040_coex_action(struct hos | |
| return; | |
| } | |
| + if (iface->conf->noscan) | |
| + return; | |
| + | |
| if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) { | |
| wpa_printf(MSG_DEBUG, | |
| "Ignore too short 20/40 BSS Coexistence Management frame"); | |
| @@ -390,6 +393,9 @@ void ht40_intolerant_add(struct hostapd_ | |
| if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) | |
| return; | |
| + if (iface->conf->noscan) | |
| + return; | |
| + | |
| wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR | |
| " in Association Request", MAC2STR(sta->addr)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment