Skip to content
Snippets Groups Projects
Select Git revision
  • fc7a4a0bffacf2ee6d267bcdc7331e6148bf4a2c
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-07-31
  • experimental-2025-07-31-base
  • experimental-2025-07-29
  • experimental-2025-07-29-base
  • experimental-2025-07-28
  • experimental-2025-07-28-base
  • experimental-2025-07-26
  • experimental-2025-07-26-base
  • experimental-2025-07-24
  • experimental-2025-07-24-base
  • experimental-2025-07-22
  • experimental-2025-07-22-base
  • experimental-2025-07-21
  • experimental-2025-07-21-base
  • experimental-2025-07-20
  • experimental-2025-07-20-base
  • experimental-2025-07-19
  • experimental-2025-07-19-base
  • experimental-2025-07-17
  • experimental-2025-07-17-base
41 results

0007-oonf-olsrd2-change-to-git-version-from-2022-08-25.patch

Blame
  • 0004-hostapd-prevent-channel-switch-for-5GHz.patch 2.70 KiB
    From: Matthias Schiffer <mschiffer@universe-factory.net>
    Date: Mon, 27 Jul 2015 20:42:50 +0200
    Subject: hostapd: prevent channel switch for 5GHz
    
    hostapd would switch the primary and secondary channel on 5GHz networks in
    certain circumstances, completely breaking the adhoc interfaces of the WLAN
    adapter (they would lose their configuration).
    
    As a temporary fix, disable this channel switch function.
    
    diff --git a/package/network/services/hostapd/patches/900-no_channel_switch.patch b/package/network/services/hostapd/patches/900-no_channel_switch.patch
    new file mode 100644
    index 0000000000000000000000000000000000000000..c6145156928ffa5a5195ca145b0655bb88c92091
    --- /dev/null
    +++ b/package/network/services/hostapd/patches/900-no_channel_switch.patch
    @@ -0,0 +1,68 @@
    +--- a/src/common/hw_features_common.c
    ++++ b/src/common/hw_features_common.c
    +@@ -171,7 +171,6 @@ int check_40mhz_5g(struct hostapd_hw_mod
    + 		   struct wpa_scan_results *scan_res, int pri_chan,
    + 		   int sec_chan)
    + {
    +-	int pri_freq, sec_freq, pri_bss, sec_bss;
    + 	int bss_pri_chan, bss_sec_chan;
    + 	size_t i;
    + 	int match;
    +@@ -180,57 +179,6 @@ int check_40mhz_5g(struct hostapd_hw_mod
    + 	    pri_chan == sec_chan)
    + 		return 0;
    + 
    +-	pri_freq = hw_get_freq(mode, pri_chan);
    +-	sec_freq = hw_get_freq(mode, sec_chan);
    +-
    +-	/*
    +-	 * Switch PRI/SEC channels if Beacons were detected on selected SEC
    +-	 * channel, but not on selected PRI channel.
    +-	 */
    +-	pri_bss = sec_bss = 0;
    +-	for (i = 0; i < scan_res->num; i++) {
    +-		struct wpa_scan_res *bss = scan_res->res[i];
    +-		if (bss->freq == pri_freq)
    +-			pri_bss++;
    +-		else if (bss->freq == sec_freq)
    +-			sec_bss++;
    +-	}
    +-	if (sec_bss && !pri_bss) {
    +-		wpa_printf(MSG_INFO,
    +-			   "Switch own primary and secondary channel to get secondary channel with no Beacons from other BSSes");
    +-		return 2;
    +-	}
    +-
    +-	/*
    +-	 * Match PRI/SEC channel with any existing HT40 BSS on the same
    +-	 * channels that we are about to use (if already mixed order in
    +-	 * existing BSSes, use own preference).
    +-	 */
    +-	match = 0;
    +-	for (i = 0; i < scan_res->num; i++) {
    +-		struct wpa_scan_res *bss = scan_res->res[i];
    +-		get_pri_sec_chan(bss, &bss_pri_chan, &bss_sec_chan);
    +-		if (pri_chan == bss_pri_chan &&
    +-		    sec_chan == bss_sec_chan) {
    +-			match = 1;
    +-			break;
    +-		}
    +-	}
    +-	if (!match) {
    +-		for (i = 0; i < scan_res->num; i++) {
    +-			struct wpa_scan_res *bss = scan_res->res[i];
    +-			get_pri_sec_chan(bss, &bss_pri_chan, &bss_sec_chan);
    +-			if (pri_chan == bss_sec_chan &&
    +-			    sec_chan == bss_pri_chan) {
    +-				wpa_printf(MSG_INFO, "Switch own primary and "
    +-					   "secondary channel due to BSS "
    +-					   "overlap with " MACSTR,
    +-					   MAC2STR(bss->bssid));
    +-				return 2;
    +-			}
    +-		}
    +-	}
    +-
    + 	return 1;
    + }
    +