mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-11-20 09:02:45 +07:00
First Commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From e4b48b7b0f0a9370032945a5a0423f0da2ef6616 Mon Sep 17 00:00:00 2001
|
||||
From: Avraham Stern <avraham.stern@intel.com>
|
||||
Date: Thu, 27 Oct 2016 15:18:29 +0300
|
||||
Subject: [PATCH] Extend ieee80211_freq_to_channel_ext() to cover channels
|
||||
52-64
|
||||
|
||||
Add frequency to channel conversion for the 5 GHz channels 52-64.
|
||||
|
||||
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
|
||||
---
|
||||
src/common/ieee802_11_common.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
|
||||
index 603b961..26e08b7 100644
|
||||
--- a/src/common/ieee802_11_common.c
|
||||
+++ b/src/common/ieee802_11_common.c
|
||||
@@ -823,6 +823,25 @@ enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq,
|
||||
return HOSTAPD_MODE_IEEE80211A;
|
||||
}
|
||||
|
||||
+ /* 5 GHz, channels 52..64 */
|
||||
+ if (freq >= 5260 && freq <= 5320) {
|
||||
+ if ((freq - 5000) % 5)
|
||||
+ return NUM_HOSTAPD_MODES;
|
||||
+
|
||||
+ if (vht_opclass)
|
||||
+ *op_class = vht_opclass;
|
||||
+ else if (sec_channel == 1)
|
||||
+ *op_class = 119;
|
||||
+ else if (sec_channel == -1)
|
||||
+ *op_class = 120;
|
||||
+ else
|
||||
+ *op_class = 118;
|
||||
+
|
||||
+ *channel = (freq - 5000) / 5;
|
||||
+
|
||||
+ return HOSTAPD_MODE_IEEE80211A;
|
||||
+ }
|
||||
+
|
||||
/* 5 GHz, channels 149..169 */
|
||||
if (freq >= 5745 && freq <= 5845) {
|
||||
if ((freq - 5000) % 5)
|
||||
--
|
||||
2.9.3
|
||||
|
||||
58
external/packages/extras-buildpkgs/hostapd/debian/patches/300-noscan.patch
vendored
Normal file
58
external/packages/extras-buildpkgs/hostapd/debian/patches/300-noscan.patch
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3411,6 +3411,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
bss->ieee80211w = 1;
|
||||
#endif /* CONFIG_OCV */
|
||||
#ifdef CONFIG_IEEE80211N
|
||||
+ } else if (os_strcmp(buf, "noscan") == 0) {
|
||||
+ conf->noscan = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "ht_coex") == 0) {
|
||||
+ conf->no_ht_coex = !atoi(pos);
|
||||
} else if (os_strcmp(buf, "ieee80211n") == 0) {
|
||||
conf->ieee80211n = atoi(pos);
|
||||
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -932,6 +932,8 @@ struct hostapd_config {
|
||||
|
||||
int ht_op_mode_fixed;
|
||||
u16 ht_capab;
|
||||
+ int noscan;
|
||||
+ int no_ht_coex;
|
||||
int ieee80211n;
|
||||
int secondary_channel;
|
||||
int no_pri_sec_switch;
|
||||
--- a/src/ap/hw_features.c
|
||||
+++ b/src/ap/hw_features.c
|
||||
@@ -477,7 +477,8 @@ 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);
|
||||
--- a/src/ap/ieee802_11_ht.c
|
||||
+++ b/src/ap/ieee802_11_ht.c
|
||||
@@ -252,6 +252,9 @@ void hostapd_2040_coex_action(struct hos
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (iface->conf->noscan || iface->conf->no_ht_coex)
|
||||
+ return;
|
||||
+
|
||||
if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Ignore too short 20/40 BSS Coexistence Management frame");
|
||||
@@ -412,6 +415,9 @@ void ht40_intolerant_add(struct hostapd_
|
||||
if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
|
||||
return;
|
||||
|
||||
+ if (iface->conf->noscan || iface->conf->no_ht_coex)
|
||||
+ return;
|
||||
+
|
||||
wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR
|
||||
" in Association Request", MAC2STR(sta->addr));
|
||||
|
||||
3
external/packages/extras-buildpkgs/hostapd/debian/patches/series
vendored
Normal file
3
external/packages/extras-buildpkgs/hostapd/debian/patches/series
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
session-ticket.patch
|
||||
300-noscan.patch
|
||||
0006-Extend-ieee80211_freq_to_channel_ext-to-cover-channe.patch
|
||||
12
external/packages/extras-buildpkgs/hostapd/debian/patches/session-ticket.patch
vendored
Normal file
12
external/packages/extras-buildpkgs/hostapd/debian/patches/session-ticket.patch
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
|
||||
index 23ac64b48..cc8d159e0 100644
|
||||
--- a/src/crypto/tls_openssl.c
|
||||
+++ b/src/crypto/tls_openssl.c
|
||||
@@ -1577,6 +1577,7 @@ struct tls_connection * tls_connection_init(void *ssl_ctx)
|
||||
#ifdef SSL_OP_NO_COMPRESSION
|
||||
options |= SSL_OP_NO_COMPRESSION;
|
||||
#endif /* SSL_OP_NO_COMPRESSION */
|
||||
+ options |= SSL_OP_NO_TICKET;
|
||||
SSL_set_options(conn->ssl, options);
|
||||
|
||||
conn->ssl_in = BIO_new(BIO_s_mem());
|
||||
Reference in New Issue
Block a user