Compare commits
3 Commits
adb94d90b6
...
5f33141a99
| Author | SHA1 | Date |
|---|---|---|
|
|
5f33141a99 | |
|
|
ec3175941d | |
|
|
1c97fae330 |
|
|
@ -1,4 +1,4 @@
|
|||
From ae4dbb9e7a3f94a143b9a18e124773a7cb52589b Mon Sep 17 00:00:00 2001
|
||||
From 21ce83b4ae2b9563175fdb4fc4312096cc399cf8 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Wed, 5 May 2021 00:44:34 +0200
|
||||
Subject: [PATCH] wolfssl: add RNG to EC key
|
||||
|
|
@ -10,16 +10,13 @@ the EC key when built hardened which is the default.
|
|||
Set the RNG for the EC key to fix connections for OWE clients.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
---
|
||||
src/crypto/crypto_wolfssl.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c
|
||||
index f47beebeb..a28349b66 100644
|
||||
--- a/src/crypto/crypto_wolfssl.c
|
||||
+++ b/src/crypto/crypto_wolfssl.c
|
||||
@@ -1340,6 +1340,7 @@ int ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R,
|
||||
@@ -1340,6 +1340,7 @@ int ecc_projective_add_point(ecc_point *
|
||||
|
||||
struct crypto_ec {
|
||||
ecc_key key;
|
||||
|
|
@ -27,7 +24,7 @@ index f47beebeb..a28349b66 100644
|
|||
mp_int a;
|
||||
mp_int prime;
|
||||
mp_int order;
|
||||
@@ -1394,6 +1395,8 @@ struct crypto_ec * crypto_ec_init(int group)
|
||||
@@ -1394,6 +1395,8 @@ struct crypto_ec * crypto_ec_init(int gr
|
||||
return NULL;
|
||||
|
||||
if (wc_ecc_init(&e->key) != 0 ||
|
||||
|
|
@ -36,7 +33,7 @@ index f47beebeb..a28349b66 100644
|
|||
wc_ecc_set_curve(&e->key, 0, curve_id) != 0 ||
|
||||
mp_init(&e->a) != MP_OKAY ||
|
||||
mp_init(&e->prime) != MP_OKAY ||
|
||||
@@ -1425,6 +1428,7 @@ void crypto_ec_deinit(struct crypto_ec* e)
|
||||
@@ -1425,6 +1428,7 @@ void crypto_ec_deinit(struct crypto_ec*
|
||||
mp_clear(&e->order);
|
||||
mp_clear(&e->prime);
|
||||
mp_clear(&e->a);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
From 4b6c9580dae47d20f429f0e2738183969acf29b8 Mon Sep 17 00:00:00 2001
|
||||
From 8de8cd8380af0c43d4fde67a668d79ef73b26b26 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Tue, 30 Jun 2020 14:18:58 +0200
|
||||
Subject: [PATCH] mesh: Allow DFS channels to be selected if dfs is enabled
|
||||
Subject: [PATCH 10/19] mesh: Allow DFS channels to be selected if dfs is
|
||||
enabled
|
||||
|
||||
Note: DFS is assumed to be usable if a country code has been set
|
||||
|
||||
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
|
||||
---
|
||||
wpa_supplicant/wpa_supplicant.c | 31 ++++++++++++++++++++++---------
|
||||
1 file changed, 22 insertions(+), 9 deletions(-)
|
||||
wpa_supplicant/wpa_supplicant.c | 25 +++++++++++++++++++------
|
||||
1 file changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index cf68417ca..fb47942c9 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2425,7 +2425,7 @@ static int drv_supports_vht(struct wpa_supplicant *wpa_s,
|
||||
@@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -25,7 +23,7 @@ index cf68417ca..fb47942c9 100644
|
|||
{
|
||||
int i;
|
||||
|
||||
@@ -2434,7 +2434,10 @@ static bool ibss_mesh_is_80mhz_avail(int channel, struct hostapd_hw_modes *mode)
|
||||
@@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
|
||||
|
||||
chan = hw_get_channel_chan(mode, i, NULL);
|
||||
if (!chan ||
|
||||
|
|
@ -37,16 +35,16 @@ index cf68417ca..fb47942c9 100644
|
|||
return false;
|
||||
}
|
||||
|
||||
@@ -2463,6 +2466,8 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
int chwidth, seg0, seg1;
|
||||
u32 vht_caps = 0;
|
||||
bool is_24ghz, is_6ghz;
|
||||
+ bool dfs_enabled = wpa_s->conf->country[0] &&
|
||||
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
|
||||
freq->freq = ssid->frequency;
|
||||
|
||||
@@ -2559,8 +2564,11 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
@@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
|
||||
const struct wpa_ssid *ssid,
|
||||
struct hostapd_hw_modes *mode,
|
||||
struct hostapd_freq_params *freq,
|
||||
- int obss_scan) {
|
||||
+ int obss_scan, bool dfs_enabled) {
|
||||
int chan_idx;
|
||||
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
|
||||
int i, res;
|
||||
@@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
|
||||
return;
|
||||
|
||||
/* Check primary channel flags */
|
||||
|
|
@ -57,9 +55,9 @@ index cf68417ca..fb47942c9 100644
|
|||
+ if (!dfs_enabled)
|
||||
+ return;
|
||||
|
||||
freq->channel = pri_chan->chan;
|
||||
|
||||
@@ -2593,8 +2601,11 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
#ifdef CONFIG_HT_OVERRIDES
|
||||
if (ssid->disable_ht40)
|
||||
@@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
|
||||
return;
|
||||
|
||||
/* Check secondary channel flags */
|
||||
|
|
@ -72,25 +70,34 @@ index cf68417ca..fb47942c9 100644
|
|||
|
||||
if (ht40 == -1) {
|
||||
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
|
||||
@@ -2683,7 +2694,7 @@ skip_to_6ghz:
|
||||
return;
|
||||
@@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||
const struct wpa_ssid *ssid,
|
||||
struct hostapd_hw_modes *mode,
|
||||
struct hostapd_freq_params *freq,
|
||||
- int ieee80211_mode, bool is_6ghz) {
|
||||
+ int ieee80211_mode, bool is_6ghz, bool dfs_enabled) {
|
||||
static const int bw80[] = {
|
||||
5180, 5260, 5500, 5580, 5660, 5745, 5825,
|
||||
5955, 6035, 6115, 6195, 6275, 6355, 6435,
|
||||
@@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||
goto skip_80mhz;
|
||||
|
||||
/* Back to HT configuration if channel not usable */
|
||||
/* Use 40 MHz if channel not usable */
|
||||
- if (!ibss_mesh_is_80mhz_avail(channel, mode))
|
||||
+ if (!ibss_mesh_is_80mhz_avail(channel, mode, dfs_enabled))
|
||||
return;
|
||||
|
||||
chwidth = CHANWIDTH_80MHZ;
|
||||
@@ -2697,7 +2708,7 @@ skip_to_6ghz:
|
||||
* above; check the remaining four 20 MHz channels for the total
|
||||
* of 160 MHz bandwidth.
|
||||
*/
|
||||
- if (!ibss_mesh_is_80mhz_avail(channel + 16, mode))
|
||||
+ if (!ibss_mesh_is_80mhz_avail(channel + 16, mode, dfs_enabled))
|
||||
return;
|
||||
goto skip_80mhz;
|
||||
|
||||
chwidth = CONF_OPER_CHWIDTH_80MHZ;
|
||||
@@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||
if ((mode->he_capab[ieee80211_mode].phy_cap[
|
||||
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
|
||||
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
|
||||
- ibss_mesh_is_80mhz_avail(channel + 16, mode)) {
|
||||
+ ibss_mesh_is_80mhz_avail(channel + 16, mode, dfs_enabled)) {
|
||||
for (j = 0; j < ARRAY_SIZE(bw160); j++) {
|
||||
@@ -2727,10 +2738,12 @@ skip_to_6ghz:
|
||||
if (freq->freq == bw160[j]) {
|
||||
chwidth = CONF_OPER_CHWIDTH_160MHZ;
|
||||
@@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
|
||||
if (!chan)
|
||||
continue;
|
||||
|
||||
|
|
@ -105,4 +112,24 @@ index cf68417ca..fb47942c9 100644
|
|||
+ continue;
|
||||
|
||||
/* Found a suitable second segment for 80+80 */
|
||||
chwidth = CHANWIDTH_80P80MHZ;
|
||||
chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
|
||||
@@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
int i, obss_scan = 1;
|
||||
u8 channel;
|
||||
bool is_6ghz;
|
||||
+ bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
|
||||
freq->freq = ssid->frequency;
|
||||
|
||||
@@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
freq->channel = channel;
|
||||
/* Setup higher BW only for 5 GHz */
|
||||
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
|
||||
- ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan);
|
||||
+ ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan, dfs_enabled);
|
||||
if (!ibss_mesh_select_80_160mhz(wpa_s, ssid, mode, freq,
|
||||
- ieee80211_mode, is_6ghz))
|
||||
+ ieee80211_mode, is_6ghz, dfs_enabled))
|
||||
freq->he_enabled = freq->vht_enabled = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
From 1165051d5d5d32340384a6e10f73fa763530aac9 Mon Sep 17 00:00:00 2001
|
||||
From fc8ea40f6130ac18d9c66797de2cf1d5af55d496 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
Date: Tue, 30 Jun 2020 14:19:07 +0200
|
||||
Subject: [PATCH] mesh: use deterministic channel on channel switch
|
||||
Subject: [PATCH 19/19] mesh: use deterministic channel on channel switch
|
||||
|
||||
This patch uses a deterministic channel on DFS channel switch
|
||||
in mesh networks. Otherwise, when switching to a usable but not
|
||||
|
|
@ -14,14 +14,11 @@ of the mesh ID, in order to use at least a different number in each
|
|||
mesh network.
|
||||
|
||||
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
|
||||
---
|
||||
src/ap/dfs.c | 20 +++++++++++++++++++-
|
||||
src/drivers/driver_nl80211.c | 4 ++++
|
||||
2 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
|
||||
index e46dd7ede..5a0d3497d 100644
|
||||
--- a/src/ap/dfs.c
|
||||
+++ b/src/ap/dfs.c
|
||||
@@ -17,6 +17,7 @@
|
||||
|
|
@ -32,7 +29,7 @@ index e46dd7ede..5a0d3497d 100644
|
|||
|
||||
|
||||
enum dfs_channel_type {
|
||||
@@ -515,9 +516,14 @@ dfs_get_valid_channel(struct hostapd_iface *iface,
|
||||
@@ -521,9 +522,14 @@ dfs_get_valid_channel(struct hostapd_ifa
|
||||
int num_available_chandefs;
|
||||
int chan_idx, chan_idx2;
|
||||
int sec_chan_idx_80p80 = -1;
|
||||
|
|
@ -47,7 +44,7 @@ index e46dd7ede..5a0d3497d 100644
|
|||
wpa_printf(MSG_DEBUG, "DFS: Selecting random channel");
|
||||
*secondary_channel = 0;
|
||||
*oper_centr_freq_seg0_idx = 0;
|
||||
@@ -537,8 +543,20 @@ dfs_get_valid_channel(struct hostapd_iface *iface,
|
||||
@@ -543,8 +549,20 @@ dfs_get_valid_channel(struct hostapd_ifa
|
||||
if (num_available_chandefs == 0)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -69,11 +66,9 @@ index e46dd7ede..5a0d3497d 100644
|
|||
chan_idx = _rand % num_available_chandefs;
|
||||
dfs_find_channel(iface, &chan, chan_idx, type);
|
||||
if (!chan) {
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index 60e44a1a9..d62d685f4 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -9932,6 +9932,10 @@ static int nl80211_switch_channel(void *priv, struct csa_settings *settings)
|
||||
@@ -10977,6 +10977,10 @@ static int nl80211_switch_channel(void *
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -4944,6 +4944,13 @@ static int add_associated_sta(struct hos
|
||||
@@ -4601,6 +4601,13 @@ static int add_associated_sta(struct hos
|
||||
* drivers to accept the STA parameter configuration. Since this is
|
||||
* after a new FT-over-DS exchange, a new TK has been derived, so key
|
||||
* reinstallation is not a concern for this case.
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
|
||||
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
|
||||
@@ -4957,7 +4964,8 @@ static int add_associated_sta(struct hos
|
||||
@@ -4614,7 +4621,8 @@ static int add_associated_sta(struct hos
|
||||
(!(sta->flags & WLAN_STA_AUTHORIZED) ||
|
||||
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
|
||||
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
From a035c0a0419a9936e043e90a8c6f66f2ab5f08b5 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 8 Jul 2021 16:33:03 +0200
|
||||
Subject: [PATCH] hostapd: fix use of uninitialized stack variables
|
||||
|
|
@ -11,16 +10,11 @@ seg0/1 remains uninitialized and filled with stack garbage, causing errors
|
|||
such as "hostapd: 80 MHz: center segment 1 configured"
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
---
|
||||
src/ap/hostapd.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
|
||||
index f6fe8a8a0..2b07a9283 100644
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -3453,7 +3453,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
|
||||
@@ -3764,7 +3764,7 @@ static int hostapd_change_config_freq(st
|
||||
struct hostapd_freq_params *old_params)
|
||||
{
|
||||
int channel;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
From 97eb8d6e7a1b8fe424b9a0cae1985b6057324fe6 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 28 Jul 2021 05:43:29 +0200
|
||||
Subject: [PATCH] ndisc_snoop: call dl_list_del before freeing ipv6 addresses
|
||||
|
|
@ -6,16 +5,11 @@ Subject: [PATCH] ndisc_snoop: call dl_list_del before freeing ipv6 addresses
|
|||
Fixes a segmentation fault on sta disconnect
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
---
|
||||
src/ap/ndisc_snoop.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/ap/ndisc_snoop.c b/src/ap/ndisc_snoop.c
|
||||
index 788c12fdc..bc1eb6251 100644
|
||||
--- a/src/ap/ndisc_snoop.c
|
||||
+++ b/src/ap/ndisc_snoop.c
|
||||
@@ -61,6 +61,7 @@ void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta)
|
||||
@@ -61,6 +61,7 @@ void sta_ip6addr_del(struct hostapd_data
|
||||
dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr,
|
||||
list) {
|
||||
hostapd_drv_br_delete_ip_neigh(hapd, 6, (u8 *) &ip6addr->addr);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
From e5583c6d58d48ab01ee6fcd2086cb60448828cb8 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 28 Jul 2021 05:49:46 +0200
|
||||
Subject: [PATCH] driver_nl80211: rewrite neigh code to not depend on
|
||||
|
|
@ -7,13 +6,8 @@ Subject: [PATCH] driver_nl80211: rewrite neigh code to not depend on
|
|||
Removes an unnecessary dependency and also makes the code smaller
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 148 ++++++++++++++---------------------
|
||||
1 file changed, 58 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index d62d685f4..de6a6c2f6 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -16,9 +16,6 @@
|
||||
|
|
@ -26,7 +20,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
#include <linux/rtnetlink.h>
|
||||
#include <netpacket/packet.h>
|
||||
#include <linux/errqueue.h>
|
||||
@@ -5333,26 +5330,29 @@ fail:
|
||||
@@ -5783,26 +5780,29 @@ fail:
|
||||
|
||||
static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
|
||||
{
|
||||
|
|
@ -70,7 +64,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
if (err < 0) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
|
||||
MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
|
||||
@@ -5362,9 +5362,8 @@ static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
|
||||
@@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
|
||||
MACSTR, MAC2STR(addr));
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +76,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
}
|
||||
|
||||
|
||||
@@ -7747,7 +7746,6 @@ static void *i802_init(struct hostapd_data *hapd,
|
||||
@@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
|
||||
(params->num_bridge == 0 || !params->bridge[0]))
|
||||
add_ifidx(drv, br_ifindex, drv->ifindex);
|
||||
|
||||
|
|
@ -90,7 +84,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
if (bss->added_if_into_bridge || bss->already_in_bridge) {
|
||||
int err;
|
||||
|
||||
@@ -7764,7 +7762,6 @@ static void *i802_init(struct hostapd_data *hapd,
|
||||
@@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
|
|
@ -98,7 +92,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
|
||||
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
@@ -10797,13 +10794,14 @@ static int wpa_driver_br_add_ip_neigh(void *priv, u8 version,
|
||||
@@ -11843,13 +11840,14 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||
const u8 *ipaddr, int prefixlen,
|
||||
const u8 *addr)
|
||||
{
|
||||
|
|
@ -118,7 +112,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
int res;
|
||||
|
||||
if (!ipaddr || prefixlen == 0 || !addr)
|
||||
@@ -10822,85 +10820,66 @@ static int wpa_driver_br_add_ip_neigh(void *priv, u8 version,
|
||||
@@ -11868,85 +11866,66 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||
}
|
||||
|
||||
if (version == 4) {
|
||||
|
|
@ -226,7 +220,7 @@ index d62d685f4..de6a6c2f6 100644
|
|||
addrsize = 16;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
@@ -10918,41 +10897,30 @@ static int wpa_driver_br_delete_ip_neigh(void *priv, u8 version,
|
||||
@@ -11964,41 +11943,30 @@ static int wpa_driver_br_delete_ip_neigh
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
From 9450fcbac73a7f0eb1bcac4d7dd25d5d9309bb87 Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 18 Feb 2019 12:57:11 +0100
|
||||
Subject: [PATCH] mesh: allow processing authentication frames in blocked state
|
||||
|
|
@ -13,16 +12,11 @@ To fix this, allow restarting authentication even if the link is in blocked
|
|||
state, but don't initiate the attempt until the blocked period is over.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
---
|
||||
src/ap/ieee802_11.c | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
|
||||
index e0d75498c..8f7e3de21 100644
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -3775,15 +3775,6 @@ static void handle_auth(struct hostapd_data *hapd,
|
||||
@@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d
|
||||
seq_ctrl);
|
||||
return;
|
||||
}
|
||||
|
|
@ -31,7 +25,7 @@ index e0d75498c..8f7e3de21 100644
|
|||
- sta->plink_state == PLINK_BLOCKED) {
|
||||
- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
|
||||
- " is blocked - drop Authentication frame",
|
||||
- MAC2STR(mgmt->sa));
|
||||
- MAC2STR(sa));
|
||||
- return;
|
||||
- }
|
||||
-#endif /* CONFIG_MESH */
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
From 15ddf28504bf656e6c8de16db69fd0cb9cbf7ae0 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:24 +0000
|
||||
|
||||
---
|
||||
hostapd/Makefile | 1 +
|
||||
wpa_supplicant/Makefile | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/hostapd/Makefile b/hostapd/Makefile
|
||||
index 73cf28c1a..4e79daa73 100644
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -324,6 +324,7 @@ ifdef CONFIG_FILS
|
||||
|
|
@ -19,11 +8,9 @@ index 73cf28c1a..4e79daa73 100644
|
|||
NEED_AES_SIV=y
|
||||
ifdef CONFIG_FILS_SK_PFS
|
||||
CFLAGS += -DCONFIG_FILS_SK_PFS
|
||||
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
|
||||
index a6bcb4c42..707d6dc88 100644
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -320,6 +320,7 @@ endif
|
||||
@@ -331,6 +331,7 @@ endif
|
||||
ifdef CONFIG_FILS
|
||||
CFLAGS += -DCONFIG_FILS
|
||||
NEED_SHA384=y
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
From ec89cf6113ab9324e0095b8ea64eb93a3ff98b11 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/utils/os_unix.c | 68 +++++++++++++++++++--------------------------
|
||||
1 file changed, 28 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c
|
||||
index 258deef9d..5b026f8f6 100644
|
||||
--- a/src/utils/os_unix.c
|
||||
+++ b/src/utils/os_unix.c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
|
@ -18,7 +8,7 @@ index 258deef9d..5b026f8f6 100644
|
|||
|
||||
#ifdef ANDROID
|
||||
#include <sys/capability.h>
|
||||
@@ -188,59 +189,46 @@ int os_gmtime(os_time_t t, struct os_tm *tm)
|
||||
@@ -188,59 +189,46 @@ int os_gmtime(os_time_t t, struct os_tm
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -76,8 +66,8 @@ index 258deef9d..5b026f8f6 100644
|
|||
-#else /* __APPLE__ */
|
||||
-#define os_daemon daemon
|
||||
-#endif /* __APPLE__ */
|
||||
-
|
||||
|
||||
-
|
||||
-int os_daemonize(const char *pid_file)
|
||||
-{
|
||||
-#if defined(__uClinux__) || defined(__sun__)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,114 @@
|
|||
From c8dba4bd750269bcc80fed3d546e2077cb4cdf0e Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Tue, 19 Jul 2022 20:02:21 -0400
|
||||
Subject: [PATCH 2/7] mbedtls: fips186_2_prf()
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
hostapd/Makefile | 4 ---
|
||||
src/crypto/crypto_mbedtls.c | 60 +++++++++++++++++++++++++++++++++++++
|
||||
wpa_supplicant/Makefile | 4 ---
|
||||
3 files changed, 60 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -759,10 +759,6 @@ endif
|
||||
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
SOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
-ifdef NEED_FIPS186_2_PRF
|
||||
-OBJS += ../src/crypto/fips_prf_internal.o
|
||||
-SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||
-endif
|
||||
ifeq ($(CONFIG_CRYPTO), mbedtls)
|
||||
ifdef CONFIG_DPP
|
||||
LIBS += -lmbedx509
|
||||
--- a/src/crypto/crypto_mbedtls.c
|
||||
+++ b/src/crypto/crypto_mbedtls.c
|
||||
@@ -132,6 +132,12 @@
|
||||
#define CRYPTO_MBEDTLS_HMAC_KDF_SHA512
|
||||
#endif
|
||||
|
||||
+#if defined(EAP_SIM) || defined(EAP_SIM_DYNAMIC) || defined(EAP_SERVER_SIM) \
|
||||
+ || defined(EAP_AKA) || defined(EAP_AKA_DYNAMIC) || defined(EAP_SERVER_AKA)
|
||||
+/* EAP_SIM=y EAP_AKA=y */
|
||||
+#define CRYPTO_MBEDTLS_FIPS186_2_PRF
|
||||
+#endif
|
||||
+
|
||||
#if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST) \
|
||||
|| defined(EAP_TEAP) || defined(EAP_TEAP_DYNAMIC) || defined(EAP_SERVER_FAST)
|
||||
#define CRYPTO_MBEDTLS_SHA1_T_PRF
|
||||
@@ -813,6 +819,60 @@ int sha1_t_prf(const u8 *key, size_t key
|
||||
|
||||
#endif /* CRYPTO_MBEDTLS_SHA1_T_PRF */
|
||||
|
||||
+#ifdef CRYPTO_MBEDTLS_FIPS186_2_PRF
|
||||
+
|
||||
+/* fips_prf_internal.c sha1-internal.c */
|
||||
+
|
||||
+/* used only by src/eap_common/eap_sim_common.c:eap_sim_prf()
|
||||
+ * for eap_sim_derive_keys() and eap_sim_derive_keys_reauth()
|
||||
+ * where xlen is 160 */
|
||||
+
|
||||
+int fips186_2_prf(const u8 *seed, size_t seed_len, u8 *x, size_t xlen)
|
||||
+{
|
||||
+ /* FIPS 186-2 + change notice 1 */
|
||||
+
|
||||
+ mbedtls_sha1_context ctx;
|
||||
+ u8 * const xkey = ctx.MBEDTLS_PRIVATE(buffer);
|
||||
+ u32 * const xstate = ctx.MBEDTLS_PRIVATE(state);
|
||||
+ const u32 xstate_init[] =
|
||||
+ { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 };
|
||||
+
|
||||
+ mbedtls_sha1_init(&ctx);
|
||||
+ os_memcpy(xkey, seed, seed_len < 64 ? seed_len : 64);
|
||||
+
|
||||
+ /* note: does not fill extra bytes if (xlen % 20) (SHA1_MAC_LEN) */
|
||||
+ for (; xlen >= 20; xlen -= 20) {
|
||||
+ /* XSEED_j = 0 */
|
||||
+ /* XVAL = (XKEY + XSEED_j) mod 2^b */
|
||||
+
|
||||
+ /* w_i = G(t, XVAL) */
|
||||
+ os_memcpy(xstate, xstate_init, sizeof(xstate_init));
|
||||
+ mbedtls_internal_sha1_process(&ctx, xkey);
|
||||
+
|
||||
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+ xstate[0] = host_to_be32(xstate[0]);
|
||||
+ xstate[1] = host_to_be32(xstate[1]);
|
||||
+ xstate[2] = host_to_be32(xstate[2]);
|
||||
+ xstate[3] = host_to_be32(xstate[3]);
|
||||
+ xstate[4] = host_to_be32(xstate[4]);
|
||||
+ #endif
|
||||
+ os_memcpy(x, xstate, 20);
|
||||
+ if (xlen == 20) /*(done; skip prep for next loop)*/
|
||||
+ break;
|
||||
+
|
||||
+ /* XKEY = (1 + XKEY + w_i) mod 2^b */
|
||||
+ for (u32 carry = 1, k = 20; k-- > 0; carry >>= 8)
|
||||
+ xkey[k] = (carry += xkey[k] + x[k]) & 0xff;
|
||||
+ x += 20;
|
||||
+ /* x_j = w_0|w_1 (each pair of iterations through loop)*/
|
||||
+ }
|
||||
+
|
||||
+ mbedtls_sha1_free(&ctx);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#endif /* CRYPTO_MBEDTLS_FIPS186_2_PRF */
|
||||
+
|
||||
#endif /* MBEDTLS_SHA1_C */
|
||||
|
||||
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -1174,10 +1174,6 @@ endif
|
||||
OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
|
||||
-ifdef NEED_FIPS186_2_PRF
|
||||
-OBJS += ../src/crypto/fips_prf_internal.o
|
||||
-SHA1OBJS += ../src/crypto/sha1-internal.o
|
||||
-endif
|
||||
ifeq ($(CONFIG_CRYPTO), mbedtls)
|
||||
LIBS += -lmbedcrypto
|
||||
LIBS_p += -lmbedcrypto
|
||||
|
|
@ -0,0 +1,421 @@
|
|||
From 31bd19e0e0254b910cccfd3ddc6a6a9222bbcfc0 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Sun, 9 Oct 2022 05:12:17 -0400
|
||||
Subject: [PATCH 3/7] mbedtls: annotate with TEST_FAIL() for hwsim tests
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
src/crypto/crypto_mbedtls.c | 124 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 124 insertions(+)
|
||||
|
||||
--- a/src/crypto/crypto_mbedtls.c
|
||||
+++ b/src/crypto/crypto_mbedtls.c
|
||||
@@ -280,6 +280,9 @@ __attribute_noinline__
|
||||
static int md_vector(size_t num_elem, const u8 *addr[], const size_t *len,
|
||||
u8 *mac, mbedtls_md_type_t md_type)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_md_context_t ctx;
|
||||
mbedtls_md_init(&ctx);
|
||||
if (mbedtls_md_setup(&ctx, mbedtls_md_info_from_type(md_type), 0) != 0){
|
||||
@@ -343,6 +346,9 @@ __attribute_noinline__
|
||||
static int sha384_512_vector(size_t num_elem, const u8 *addr[],
|
||||
const size_t *len, u8 *mac, int is384)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
struct mbedtls_sha512_context ctx;
|
||||
mbedtls_sha512_init(&ctx);
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
@@ -375,6 +381,9 @@ int sha384_vector(size_t num_elem, const
|
||||
#include <mbedtls/sha256.h>
|
||||
int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
struct mbedtls_sha256_context ctx;
|
||||
mbedtls_sha256_init(&ctx);
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
@@ -397,6 +406,9 @@ int sha256_vector(size_t num_elem, const
|
||||
#include <mbedtls/sha1.h>
|
||||
int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
struct mbedtls_sha1_context ctx;
|
||||
mbedtls_sha1_init(&ctx);
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
@@ -419,6 +431,9 @@ int sha1_vector(size_t num_elem, const u
|
||||
#include <mbedtls/md5.h>
|
||||
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
struct mbedtls_md5_context ctx;
|
||||
mbedtls_md5_init(&ctx);
|
||||
#if MBEDTLS_VERSION_MAJOR >= 3
|
||||
@@ -441,6 +456,9 @@ int md5_vector(size_t num_elem, const u8
|
||||
#include <mbedtls/md4.h>
|
||||
int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
struct mbedtls_md4_context ctx;
|
||||
mbedtls_md4_init(&ctx);
|
||||
mbedtls_md4_starts_ret(&ctx);
|
||||
@@ -460,6 +478,9 @@ static int hmac_vector(const u8 *key, si
|
||||
const u8 *addr[], const size_t *len, u8 *mac,
|
||||
mbedtls_md_type_t md_type)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_md_context_t ctx;
|
||||
mbedtls_md_init(&ctx);
|
||||
if (mbedtls_md_setup(&ctx, mbedtls_md_info_from_type(md_type), 1) != 0){
|
||||
@@ -571,6 +592,9 @@ static int hmac_kdf_expand(const u8 *prk
|
||||
const char *label, const u8 *info, size_t info_len,
|
||||
u8 *okm, size_t okm_len, mbedtls_md_type_t md_type)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type(md_type);
|
||||
#ifdef MBEDTLS_HKDF_C
|
||||
if (label == NULL) /* RFC 5869 HKDF-Expand when (label == NULL) */
|
||||
@@ -663,6 +687,9 @@ static int hmac_prf_bits(const u8 *key,
|
||||
const u8 *data, size_t data_len, u8 *buf,
|
||||
size_t buf_len_bits, mbedtls_md_type_t md_type)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_md_context_t ctx;
|
||||
mbedtls_md_init(&ctx);
|
||||
const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type(md_type);
|
||||
@@ -938,6 +965,9 @@ int pbkdf2_sha1(const char *passphrase,
|
||||
|
||||
static void *aes_crypt_init_mode(const u8 *key, size_t len, int mode)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
mbedtls_aes_context *aes = os_malloc(sizeof(*aes));
|
||||
if (!aes)
|
||||
return NULL;
|
||||
@@ -996,6 +1026,9 @@ void aes_decrypt_deinit(void *ctx)
|
||||
/* aes-wrap.c */
|
||||
int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_nist_kw_context ctx;
|
||||
mbedtls_nist_kw_init(&ctx);
|
||||
size_t olen;
|
||||
@@ -1010,6 +1043,9 @@ int aes_wrap(const u8 *kek, size_t kek_l
|
||||
/* aes-unwrap.c */
|
||||
int aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_nist_kw_context ctx;
|
||||
mbedtls_nist_kw_init(&ctx);
|
||||
size_t olen;
|
||||
@@ -1041,6 +1077,9 @@ int omac1_aes_vector(
|
||||
const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[],
|
||||
const size_t *len, u8 *mac)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_cipher_type_t cipher_type;
|
||||
switch (key_len) {
|
||||
case 16: cipher_type = MBEDTLS_CIPHER_AES_128_ECB; break;
|
||||
@@ -1103,6 +1142,9 @@ int omac1_aes_256(const u8 *key, const u
|
||||
/* aes-encblock.c */
|
||||
int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_aes_context aes;
|
||||
mbedtls_aes_init(&aes);
|
||||
int ret = mbedtls_aes_setkey_enc(&aes, key, 128)
|
||||
@@ -1118,6 +1160,9 @@ int aes_128_encrypt_block(const u8 *key,
|
||||
int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
|
||||
u8 *data, size_t data_len)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
unsigned char counter[MBEDTLS_AES_BLOCK_SIZE];
|
||||
unsigned char stream_block[MBEDTLS_AES_BLOCK_SIZE];
|
||||
os_memcpy(counter, nonce, MBEDTLS_AES_BLOCK_SIZE);/*(must be writable)*/
|
||||
@@ -1160,11 +1205,17 @@ static int aes_128_cbc_oper(const u8 *ke
|
||||
|
||||
int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return aes_128_cbc_oper(key, iv, data, data_len, MBEDTLS_AES_ENCRYPT);
|
||||
}
|
||||
|
||||
int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return aes_128_cbc_oper(key, iv, data, data_len, MBEDTLS_AES_DECRYPT);
|
||||
}
|
||||
|
||||
@@ -1407,6 +1458,10 @@ int crypto_hash_finish(struct crypto_has
|
||||
}
|
||||
mbedtls_md_free(mctx);
|
||||
os_free(mctx);
|
||||
+
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1421,6 +1476,9 @@ int crypto_hash_finish(struct crypto_has
|
||||
|
||||
struct crypto_bignum *crypto_bignum_init(void)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
mbedtls_mpi *bn = os_malloc(sizeof(*bn));
|
||||
if (bn)
|
||||
mbedtls_mpi_init(bn);
|
||||
@@ -1429,6 +1487,9 @@ struct crypto_bignum *crypto_bignum_init
|
||||
|
||||
struct crypto_bignum *crypto_bignum_init_set(const u8 *buf, size_t len)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
mbedtls_mpi *bn = os_malloc(sizeof(*bn));
|
||||
if (bn) {
|
||||
mbedtls_mpi_init(bn);
|
||||
@@ -1442,6 +1503,9 @@ struct crypto_bignum *crypto_bignum_init
|
||||
|
||||
struct crypto_bignum *crypto_bignum_init_uint(unsigned int val)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
#if 0 /*(hostap use of this interface passes int, not uint)*/
|
||||
val = host_to_be32(val);
|
||||
return crypto_bignum_init_set((const u8 *)&val, sizeof(val));
|
||||
@@ -1467,6 +1531,9 @@ void crypto_bignum_deinit(struct crypto_
|
||||
int crypto_bignum_to_bin(const struct crypto_bignum *a,
|
||||
u8 *buf, size_t buflen, size_t padlen)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
size_t n = mbedtls_mpi_size((mbedtls_mpi *)a);
|
||||
if (n < padlen)
|
||||
n = padlen;
|
||||
@@ -1477,6 +1544,9 @@ int crypto_bignum_to_bin(const struct cr
|
||||
|
||||
int crypto_bignum_rand(struct crypto_bignum *r, const struct crypto_bignum *m)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
/*assert(r != m);*//* r must not be same as m for mbedtls_mpi_random()*/
|
||||
#if MBEDTLS_VERSION_NUMBER >= 0x021B0000 /* mbedtls 2.27.0 */
|
||||
return mbedtls_mpi_random((mbedtls_mpi *)r, 0, (mbedtls_mpi *)m,
|
||||
@@ -1513,6 +1583,9 @@ int crypto_bignum_exptmod(const struct c
|
||||
const struct crypto_bignum *c,
|
||||
struct crypto_bignum *d)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
/* (check if input params match d; d is the result) */
|
||||
/* (a == d) is ok in current mbedtls implementation */
|
||||
if (b == d || c == d) { /*(not ok; store result in intermediate)*/
|
||||
@@ -1540,6 +1613,9 @@ int crypto_bignum_inverse(const struct c
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return mbedtls_mpi_inv_mod((mbedtls_mpi *)c,
|
||||
(const mbedtls_mpi *)a,
|
||||
(const mbedtls_mpi *)b) ? -1 : 0;
|
||||
@@ -1549,6 +1625,9 @@ int crypto_bignum_sub(const struct crypt
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return mbedtls_mpi_sub_mpi((mbedtls_mpi *)c,
|
||||
(const mbedtls_mpi *)a,
|
||||
(const mbedtls_mpi *)b) ? -1 : 0;
|
||||
@@ -1558,6 +1637,9 @@ int crypto_bignum_div(const struct crypt
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
/*(most current use of this crypto.h interface has a == c (result),
|
||||
* so store result in an intermediate to avoid overwritten input)*/
|
||||
mbedtls_mpi R;
|
||||
@@ -1575,6 +1657,9 @@ int crypto_bignum_addmod(const struct cr
|
||||
const struct crypto_bignum *c,
|
||||
struct crypto_bignum *d)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return mbedtls_mpi_add_mpi((mbedtls_mpi *)d,
|
||||
(const mbedtls_mpi *)a,
|
||||
(const mbedtls_mpi *)b)
|
||||
@@ -1588,6 +1673,9 @@ int crypto_bignum_mulmod(const struct cr
|
||||
const struct crypto_bignum *c,
|
||||
struct crypto_bignum *d)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return mbedtls_mpi_mul_mpi((mbedtls_mpi *)d,
|
||||
(const mbedtls_mpi *)a,
|
||||
(const mbedtls_mpi *)b)
|
||||
@@ -1600,6 +1688,9 @@ int crypto_bignum_sqrmod(const struct cr
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
#if 1
|
||||
return crypto_bignum_mulmod(a, a, b, c);
|
||||
#else
|
||||
@@ -1650,6 +1741,9 @@ int crypto_bignum_is_odd(const struct cr
|
||||
int crypto_bignum_legendre(const struct crypto_bignum *a,
|
||||
const struct crypto_bignum *p)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -2;
|
||||
+
|
||||
/* Security Note:
|
||||
* mbedtls_mpi_exp_mod() is not documented to run in constant time,
|
||||
* though mbedtls/library/bignum.c uses constant_time_internal.h funcs.
|
||||
@@ -1702,6 +1796,9 @@ int crypto_mod_exp(const u8 *base, size_
|
||||
const u8 *modulus, size_t modulus_len,
|
||||
u8 *result, size_t *result_len)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
mbedtls_mpi bn_base, bn_exp, bn_modulus, bn_result;
|
||||
mbedtls_mpi_init(&bn_base);
|
||||
mbedtls_mpi_init(&bn_exp);
|
||||
@@ -1769,6 +1866,9 @@ static int crypto_mbedtls_dh_init_public
|
||||
int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey,
|
||||
u8 *pubkey)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
#if 0 /*(crypto_dh_init() duplicated (and identical) in crypto_*.c modules)*/
|
||||
size_t pubkey_len, pad;
|
||||
|
||||
@@ -1810,6 +1910,9 @@ int crypto_dh_derive_secret(u8 generator
|
||||
const u8 *pubkey, size_t pubkey_len,
|
||||
u8 *secret, size_t *len)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
#if 0
|
||||
if (pubkey_len > prime_len ||
|
||||
(pubkey_len == prime_len &&
|
||||
@@ -2512,6 +2615,9 @@ const struct crypto_ec_point * crypto_ec
|
||||
|
||||
struct crypto_ec_point *crypto_ec_point_init(struct crypto_ec *e)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
mbedtls_ecp_point *p = os_malloc(sizeof(*p));
|
||||
if (p != NULL)
|
||||
mbedtls_ecp_point_init(p);
|
||||
@@ -2536,6 +2642,9 @@ int crypto_ec_point_x(struct crypto_ec *
|
||||
int crypto_ec_point_to_bin(struct crypto_ec *e,
|
||||
const struct crypto_ec_point *point, u8 *x, u8 *y)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
/* crypto.h documents crypto_ec_point_to_bin() output is big-endian */
|
||||
size_t len = CRYPTO_EC_plen(e);
|
||||
if (x) {
|
||||
@@ -2563,6 +2672,9 @@ int crypto_ec_point_to_bin(struct crypto
|
||||
struct crypto_ec_point * crypto_ec_point_from_bin(struct crypto_ec *e,
|
||||
const u8 *val)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
size_t len = CRYPTO_EC_plen(e);
|
||||
mbedtls_ecp_point *p = os_malloc(sizeof(*p));
|
||||
u8 buf[1+MBEDTLS_MPI_MAX_SIZE*2];
|
||||
@@ -2615,6 +2727,9 @@ int crypto_ec_point_add(struct crypto_ec
|
||||
const struct crypto_ec_point *b,
|
||||
struct crypto_ec_point *c)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
/* mbedtls does not provide an mbedtls_ecp_point add function */
|
||||
mbedtls_mpi one;
|
||||
mbedtls_mpi_init(&one);
|
||||
@@ -2631,6 +2746,9 @@ int crypto_ec_point_mul(struct crypto_ec
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_ec_point *res)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
return mbedtls_ecp_mul(
|
||||
(mbedtls_ecp_group *)e, (mbedtls_ecp_point *)res,
|
||||
(const mbedtls_mpi *)b, (const mbedtls_ecp_point *)p,
|
||||
@@ -2639,6 +2757,9 @@ int crypto_ec_point_mul(struct crypto_ec
|
||||
|
||||
int crypto_ec_point_invert(struct crypto_ec *e, struct crypto_ec_point *p)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return -1;
|
||||
+
|
||||
if (mbedtls_ecp_get_type((mbedtls_ecp_group *)e)
|
||||
== MBEDTLS_ECP_TYPE_MONTGOMERY) {
|
||||
/* e.g. MBEDTLS_ECP_DP_CURVE25519 and MBEDTLS_ECP_DP_CURVE448 */
|
||||
@@ -2751,6 +2872,9 @@ struct crypto_bignum *
|
||||
crypto_ec_point_compute_y_sqr(struct crypto_ec *e,
|
||||
const struct crypto_bignum *x)
|
||||
{
|
||||
+ if (TEST_FAIL())
|
||||
+ return NULL;
|
||||
+
|
||||
mbedtls_mpi *y2 = os_malloc(sizeof(*y2));
|
||||
if (y2 == NULL)
|
||||
return NULL;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,45 @@
|
|||
From 33afce36c54b0cad38643629ded10ff5d727f077 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Fri, 12 Aug 2022 05:34:47 -0400
|
||||
Subject: [PATCH 5/7] add NULL checks (encountered during tests/hwsim)
|
||||
|
||||
sae_derive_commit_element_ecc NULL pwe_ecc check
|
||||
dpp_gen_keypair() NULL curve check
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
src/common/dpp_crypto.c | 6 ++++++
|
||||
src/common/sae.c | 7 +++++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
--- a/src/common/dpp_crypto.c
|
||||
+++ b/src/common/dpp_crypto.c
|
||||
@@ -269,6 +269,12 @@ int dpp_get_pubkey_hash(struct crypto_ec
|
||||
|
||||
struct crypto_ec_key * dpp_gen_keypair(const struct dpp_curve_params *curve)
|
||||
{
|
||||
+ if (curve == NULL) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: %s curve must be initialized", __func__);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
struct crypto_ec_key *key;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "DPP: Generating a keypair");
|
||||
--- a/src/common/sae.c
|
||||
+++ b/src/common/sae.c
|
||||
@@ -1278,6 +1278,13 @@ void sae_deinit_pt(struct sae_pt *pt)
|
||||
static int sae_derive_commit_element_ecc(struct sae_data *sae,
|
||||
struct crypto_bignum *mask)
|
||||
{
|
||||
+ if (sae->tmp->pwe_ecc == NULL) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "SAE: %s sae->tmp->pwe_ecc must be initialized",
|
||||
+ __func__);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* COMMIT-ELEMENT = inverse(scalar-op(mask, PWE)) */
|
||||
if (!sae->tmp->own_commit_element_ecc) {
|
||||
sae->tmp->own_commit_element_ecc =
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 54211caa2e0e5163aefef390daf88a971367a702 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
Date: Tue, 4 Oct 2022 17:09:24 -0400
|
||||
Subject: [PATCH 6/7] dpp_pkex: EC point mul w/ value < prime
|
||||
|
||||
crypto_ec_point_mul() with mbedtls requires point
|
||||
be multiplied by a multiplicand with value < prime
|
||||
|
||||
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
|
||||
---
|
||||
src/common/dpp_crypto.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/common/dpp_crypto.c
|
||||
+++ b/src/common/dpp_crypto.c
|
||||
@@ -1588,7 +1588,9 @@ dpp_pkex_derive_Qr(const struct dpp_curv
|
||||
Pr = crypto_ec_key_get_public_key(Pr_key);
|
||||
Qr = crypto_ec_point_init(ec);
|
||||
hash_bn = crypto_bignum_init_set(hash, curve->hash_len);
|
||||
- if (!Pr || !Qr || !hash_bn || crypto_ec_point_mul(ec, Pr, hash_bn, Qr))
|
||||
+ if (!Pr || !Qr || !hash_bn ||
|
||||
+ crypto_bignum_mod(hash_bn, crypto_ec_get_prime(ec), hash_bn) ||
|
||||
+ crypto_ec_point_mul(ec, Pr, hash_bn, Qr))
|
||||
goto fail;
|
||||
|
||||
if (crypto_ec_point_is_at_infinity(ec, Qr)) {
|
||||
|
|
@ -1,22 +1,3 @@
|
|||
From c3efbfb27f3797b84e861a01f3e4f0dadc21966d Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/Makefile | 26 ++++++++++++++++++++++----
|
||||
hostapd/main.c | 7 +++++++
|
||||
src/ap/drv_callbacks.c | 6 +++---
|
||||
src/drivers/driver.h | 6 +++---
|
||||
src/drivers/drivers.c | 4 ++++
|
||||
wpa_supplicant/Makefile | 29 +++++++++++++++++++++++++++++
|
||||
wpa_supplicant/eapol_test.c | 11 +++++++++++
|
||||
wpa_supplicant/events.c | 6 +++---
|
||||
wpa_supplicant/wpa_priv.c | 8 +++++---
|
||||
wpa_supplicant/wpa_supplicant.c | 8 +++++++-
|
||||
10 files changed, 94 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/hostapd/Makefile b/hostapd/Makefile
|
||||
index 4e79daa73..6c34c5f88 100644
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
|
|
@ -55,7 +36,7 @@ index 4e79daa73..6c34c5f88 100644
|
|||
LIBS += $(DRV_AP_LIBS)
|
||||
|
||||
ifdef CONFIG_L2_PACKET
|
||||
@@ -1291,6 +1297,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
|
||||
@@ -1380,6 +1386,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
|
||||
_OBJS_VAR := OBJS
|
||||
include ../src/objs.mk
|
||||
|
||||
|
|
@ -68,7 +49,7 @@ index 4e79daa73..6c34c5f88 100644
|
|||
hostapd: $(OBJS)
|
||||
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
||||
@$(E) " LD " $@
|
||||
@@ -1365,6 +1377,12 @@ include ../src/objs.mk
|
||||
@@ -1460,6 +1472,12 @@ include ../src/objs.mk
|
||||
_OBJS_VAR := SOBJS
|
||||
include ../src/objs.mk
|
||||
|
||||
|
|
@ -81,11 +62,229 @@ index 4e79daa73..6c34c5f88 100644
|
|||
nt_password_hash: $(NOBJS)
|
||||
$(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
|
||||
@$(E) " LD " $@
|
||||
diff --git a/hostapd/main.c b/hostapd/main.c
|
||||
index 21932d1be..6a7b91bf2 100644
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -10,6 +10,7 @@ ALL += dbus/fi.w1.wpa_supplicant1.servic
|
||||
EXTRA_TARGETS=dynamic_eap_methods
|
||||
|
||||
CONFIG_FILE=.config
|
||||
+-include $(if $(MULTICALL),../hostapd/.config)
|
||||
include ../src/build.rules
|
||||
|
||||
ifdef CONFIG_BUILD_PASN_SO
|
||||
@@ -382,7 +383,9 @@ endif
|
||||
ifdef CONFIG_IBSS_RSN
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_IBSS_RSN
|
||||
+ifndef MULTICALL
|
||||
CFLAGS += -DCONFIG_NO_VLAN
|
||||
+endif
|
||||
OBJS += ibss_rsn.o
|
||||
endif
|
||||
|
||||
@@ -924,6 +927,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
|
||||
LIBS += -ldl -rdynamic
|
||||
endif
|
||||
+else
|
||||
+ ifdef MULTICALL
|
||||
+ OBJS += ../src/eap_common/eap_common.o
|
||||
+ endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_AP
|
||||
@@ -931,9 +938,11 @@ NEED_EAP_COMMON=y
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_AP
|
||||
OBJS += ap.o
|
||||
+ifndef MULTICALL
|
||||
CFLAGS += -DCONFIG_NO_RADIUS
|
||||
CFLAGS += -DCONFIG_NO_ACCOUNTING
|
||||
CFLAGS += -DCONFIG_NO_VLAN
|
||||
+endif
|
||||
OBJS += ../src/ap/hostapd.o
|
||||
OBJS += ../src/ap/wpa_auth_glue.o
|
||||
OBJS += ../src/ap/utils.o
|
||||
@@ -1022,6 +1031,12 @@ endif
|
||||
ifdef CONFIG_HS20
|
||||
OBJS += ../src/ap/hs20.o
|
||||
endif
|
||||
+else
|
||||
+ ifdef MULTICALL
|
||||
+ OBJS += ../src/eap_server/eap_server.o
|
||||
+ OBJS += ../src/eap_server/eap_server_identity.o
|
||||
+ OBJS += ../src/eap_server/eap_server_methods.o
|
||||
+ endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MBO
|
||||
@@ -1030,7 +1045,9 @@ CFLAGS += -DCONFIG_MBO
|
||||
endif
|
||||
|
||||
ifdef NEED_RSN_AUTHENTICATOR
|
||||
+ifndef MULTICALL
|
||||
CFLAGS += -DCONFIG_NO_RADIUS
|
||||
+endif
|
||||
NEED_AES_WRAP=y
|
||||
OBJS += ../src/ap/wpa_auth.o
|
||||
OBJS += ../src/ap/wpa_auth_ie.o
|
||||
@@ -2010,6 +2027,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
|
||||
_OBJS_VAR := OBJS
|
||||
include ../src/objs.mk
|
||||
+wpa_supplicant_multi.a: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
+ $(Q)$(CC) -c -o wpa_supplicant_multi.o -Dmain=wpa_supplicant_main $(CFLAGS) main.c
|
||||
+ @$(E) " CC " $<
|
||||
+ @rm -f $@
|
||||
+ @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
||||
+
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||
@$(E) " LD " $@
|
||||
@@ -2142,6 +2165,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
|
||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
||||
@$(E) " sed" $<
|
||||
|
||||
+dump_cflags:
|
||||
+ @printf "%s " "$(CFLAGS)"
|
||||
+
|
||||
+dump_ldflags:
|
||||
+ @printf "%s " "$(LDFLAGS) $(LIBS) $(EXTRALIBS)"
|
||||
+
|
||||
wpa_supplicant.exe: wpa_supplicant
|
||||
mv -f $< $@
|
||||
wpa_cli.exe: wpa_cli
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -6651,8 +6651,8 @@ union wpa_event_data {
|
||||
* Driver wrapper code should call this function whenever an event is received
|
||||
* from the driver.
|
||||
*/
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data);
|
||||
+extern void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data);
|
||||
|
||||
/**
|
||||
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
|
||||
@@ -6664,7 +6664,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
* Same as wpa_supplicant_event(), but we search for the interface in
|
||||
* wpa_global.
|
||||
*/
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+extern void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data);
|
||||
|
||||
/*
|
||||
--- a/src/ap/drv_callbacks.c
|
||||
+++ b/src/ap/drv_callbacks.c
|
||||
@@ -1994,8 +1994,8 @@ err:
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data)
|
||||
+void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data)
|
||||
{
|
||||
struct hostapd_data *hapd = ctx;
|
||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||
@@ -2271,7 +2271,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+void hostapd_wpa_event_global(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct hapd_interfaces *interfaces = ctx;
|
||||
--- a/wpa_supplicant/wpa_priv.c
|
||||
+++ b/wpa_supplicant/wpa_priv.c
|
||||
@@ -1039,8 +1039,8 @@ static void wpa_priv_send_ft_response(st
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data)
|
||||
+static void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_priv_interface *iface = ctx;
|
||||
|
||||
@@ -1103,7 +1103,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+void supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_priv_global *global = ctx;
|
||||
@@ -1217,6 +1217,8 @@ int main(int argc, char *argv[])
|
||||
if (os_program_init())
|
||||
return -1;
|
||||
|
||||
+ wpa_supplicant_event = supplicant_event;
|
||||
+ wpa_supplicant_event_global = supplicant_event_global;
|
||||
wpa_priv_fd_workaround();
|
||||
|
||||
os_memset(&global, 0, sizeof(global));
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -5345,8 +5345,8 @@ static void wpas_link_reconfig(struct wp
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data)
|
||||
+void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
int resched;
|
||||
@@ -6264,7 +6264,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+void supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s;
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -7435,7 +7435,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-
|
||||
/**
|
||||
* wpa_supplicant_match_existing - Match existing interfaces
|
||||
* @global: Pointer to global data from wpa_supplicant_init()
|
||||
@@ -7470,6 +7469,11 @@ static int wpa_supplicant_match_existing
|
||||
|
||||
#endif /* CONFIG_MATCH_IFACE */
|
||||
|
||||
+extern void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data);
|
||||
+
|
||||
+extern void supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data);
|
||||
|
||||
/**
|
||||
* wpa_supplicant_add_iface - Add a new network interface
|
||||
@@ -7726,6 +7730,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
#ifndef CONFIG_NO_WPA_MSG
|
||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||
#endif /* CONFIG_NO_WPA_MSG */
|
||||
+ wpa_supplicant_event = supplicant_event;
|
||||
+ wpa_supplicant_event_global = supplicant_event_global;
|
||||
|
||||
if (params->wpa_debug_file_path)
|
||||
wpa_debug_open_file(params->wpa_debug_file_path);
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -591,6 +591,11 @@ fail:
|
||||
@@ -685,6 +685,11 @@ fail:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +296,7 @@ index 21932d1be..6a7b91bf2 100644
|
|||
|
||||
#ifdef CONFIG_WPS
|
||||
static int gen_uuid(const char *txt_addr)
|
||||
@@ -684,6 +689,8 @@ int main(int argc, char *argv[])
|
||||
@@ -778,6 +783,8 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
#endif /* CONFIG_DPP */
|
||||
|
||||
|
|
@ -106,56 +305,6 @@ index 21932d1be..6a7b91bf2 100644
|
|||
for (;;) {
|
||||
c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:q");
|
||||
if (c < 0)
|
||||
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
|
||||
index fff8bb3e5..4d70939ef 100644
|
||||
--- a/src/ap/drv_callbacks.c
|
||||
+++ b/src/ap/drv_callbacks.c
|
||||
@@ -1855,8 +1855,8 @@ err:
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data)
|
||||
+void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data)
|
||||
{
|
||||
struct hostapd_data *hapd = ctx;
|
||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||
@@ -2128,7 +2128,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+void hostapd_wpa_event_global(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct hapd_interfaces *interfaces = ctx;
|
||||
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
|
||||
index f069b74e1..f8f91c023 100644
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -6168,8 +6168,8 @@ union wpa_event_data {
|
||||
* Driver wrapper code should call this function whenever an event is received
|
||||
* from the driver.
|
||||
*/
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data);
|
||||
+extern void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data);
|
||||
|
||||
/**
|
||||
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
|
||||
@@ -6181,7 +6181,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
* Same as wpa_supplicant_event(), but we search for the interface in
|
||||
* wpa_global.
|
||||
*/
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+extern void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data);
|
||||
|
||||
/*
|
||||
diff --git a/src/drivers/drivers.c b/src/drivers/drivers.c
|
||||
index e95df6ddb..9071da3cf 100644
|
||||
--- a/src/drivers/drivers.c
|
||||
+++ b/src/drivers/drivers.c
|
||||
@@ -10,6 +10,10 @@
|
||||
|
|
@ -169,102 +318,6 @@ index e95df6ddb..9071da3cf 100644
|
|||
|
||||
const struct wpa_driver_ops *const wpa_drivers[] =
|
||||
{
|
||||
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
|
||||
index 707d6dc88..f7740e6f0 100644
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -10,6 +10,7 @@ ALL += dbus/fi.w1.wpa_supplicant1.service
|
||||
EXTRA_TARGETS=dynamic_eap_methods
|
||||
|
||||
CONFIG_FILE=.config
|
||||
+-include $(if $(MULTICALL),../hostapd/.config)
|
||||
include ../src/build.rules
|
||||
|
||||
ifdef CONFIG_BUILD_WPA_CLIENT_SO
|
||||
@@ -371,7 +372,9 @@ endif
|
||||
ifdef CONFIG_IBSS_RSN
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_IBSS_RSN
|
||||
+ifndef MULTICALL
|
||||
CFLAGS += -DCONFIG_NO_VLAN
|
||||
+endif
|
||||
OBJS += ibss_rsn.o
|
||||
endif
|
||||
|
||||
@@ -912,6 +915,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
|
||||
LIBS += -ldl -rdynamic
|
||||
endif
|
||||
+else
|
||||
+ ifdef MULTICALL
|
||||
+ OBJS += ../src/eap_common/eap_common.o
|
||||
+ endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_AP
|
||||
@@ -919,9 +926,11 @@ NEED_EAP_COMMON=y
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_AP
|
||||
OBJS += ap.o
|
||||
+ifndef MULTICALL
|
||||
CFLAGS += -DCONFIG_NO_RADIUS
|
||||
CFLAGS += -DCONFIG_NO_ACCOUNTING
|
||||
CFLAGS += -DCONFIG_NO_VLAN
|
||||
+endif
|
||||
OBJS += ../src/ap/hostapd.o
|
||||
OBJS += ../src/ap/wpa_auth_glue.o
|
||||
OBJS += ../src/ap/utils.o
|
||||
@@ -1008,6 +1017,12 @@ endif
|
||||
ifdef CONFIG_HS20
|
||||
OBJS += ../src/ap/hs20.o
|
||||
endif
|
||||
+else
|
||||
+ ifdef MULTICALL
|
||||
+ OBJS += ../src/eap_server/eap_server.o
|
||||
+ OBJS += ../src/eap_server/eap_server_identity.o
|
||||
+ OBJS += ../src/eap_server/eap_server_methods.o
|
||||
+ endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MBO
|
||||
@@ -1016,7 +1031,9 @@ CFLAGS += -DCONFIG_MBO
|
||||
endif
|
||||
|
||||
ifdef NEED_RSN_AUTHENTICATOR
|
||||
+ifndef MULTICALL
|
||||
CFLAGS += -DCONFIG_NO_RADIUS
|
||||
+endif
|
||||
NEED_AES_WRAP=y
|
||||
OBJS += ../src/ap/wpa_auth.o
|
||||
OBJS += ../src/ap/wpa_auth_ie.o
|
||||
@@ -1920,6 +1937,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
|
||||
_OBJS_VAR := OBJS
|
||||
include ../src/objs.mk
|
||||
+wpa_supplicant_multi.a: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
+ $(Q)$(CC) -c -o wpa_supplicant_multi.o -Dmain=wpa_supplicant_main $(CFLAGS) main.c
|
||||
+ @$(E) " CC " $<
|
||||
+ @rm -f $@
|
||||
+ @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
||||
+
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||
@$(E) " LD " $@
|
||||
@@ -2052,6 +2075,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
|
||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
||||
@$(E) " sed" $<
|
||||
|
||||
+dump_cflags:
|
||||
+ @printf "%s " "$(CFLAGS)"
|
||||
+
|
||||
+dump_ldflags:
|
||||
+ @printf "%s " "$(LDFLAGS) $(LIBS) $(EXTRALIBS)"
|
||||
+
|
||||
wpa_supplicant.exe: wpa_supplicant
|
||||
mv -f $< $@
|
||||
wpa_cli.exe: wpa_cli
|
||||
diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
|
||||
index efec31c65..ca6faacf2 100644
|
||||
--- a/wpa_supplicant/eapol_test.c
|
||||
+++ b/wpa_supplicant/eapol_test.c
|
||||
@@ -31,7 +31,12 @@
|
||||
|
|
@ -300,93 +353,3 @@ index efec31c65..ca6faacf2 100644
|
|||
hostapd_logger_register_cb(hostapd_logger_cb);
|
||||
|
||||
os_memset(&eapol_test, 0, sizeof(eapol_test));
|
||||
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
|
||||
index ec56cfdc0..48aa792b3 100644
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -4953,8 +4953,8 @@ static void wpas_event_unprot_beacon(struct wpa_supplicant *wpa_s,
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data)
|
||||
+void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
int resched;
|
||||
@@ -5813,7 +5813,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+void supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s;
|
||||
diff --git a/wpa_supplicant/wpa_priv.c b/wpa_supplicant/wpa_priv.c
|
||||
index ff1fb6702..731325929 100644
|
||||
--- a/wpa_supplicant/wpa_priv.c
|
||||
+++ b/wpa_supplicant/wpa_priv.c
|
||||
@@ -1038,8 +1038,8 @@ static void wpa_priv_send_ft_response(struct wpa_priv_interface *iface,
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
- union wpa_event_data *data)
|
||||
+static void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_priv_interface *iface = ctx;
|
||||
|
||||
@@ -1102,7 +1102,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
}
|
||||
|
||||
|
||||
-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+void supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_priv_global *global = ctx;
|
||||
@@ -1216,6 +1216,8 @@ int main(int argc, char *argv[])
|
||||
if (os_program_init())
|
||||
return -1;
|
||||
|
||||
+ wpa_supplicant_event = supplicant_event;
|
||||
+ wpa_supplicant_event_global = supplicant_event_global;
|
||||
wpa_priv_fd_workaround();
|
||||
|
||||
os_memset(&global, 0, sizeof(global));
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index fb47942c9..b00a24792 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -7073,7 +7073,6 @@ struct wpa_interface * wpa_supplicant_match_iface(struct wpa_global *global,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-
|
||||
/**
|
||||
* wpa_supplicant_match_existing - Match existing interfaces
|
||||
* @global: Pointer to global data from wpa_supplicant_init()
|
||||
@@ -7108,6 +7107,11 @@ static int wpa_supplicant_match_existing(struct wpa_global *global)
|
||||
|
||||
#endif /* CONFIG_MATCH_IFACE */
|
||||
|
||||
+extern void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data);
|
||||
+
|
||||
+extern void supplicant_event_global(void *ctx, enum wpa_event_type event,
|
||||
+ union wpa_event_data *data);
|
||||
|
||||
/**
|
||||
* wpa_supplicant_add_iface - Add a new network interface
|
||||
@@ -7364,6 +7368,8 @@ struct wpa_global * wpa_supplicant_init(struct wpa_params *params)
|
||||
#ifndef CONFIG_NO_WPA_MSG
|
||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||
#endif /* CONFIG_NO_WPA_MSG */
|
||||
+ wpa_supplicant_event = supplicant_event;
|
||||
+ wpa_supplicant_event_global = supplicant_event_global;
|
||||
|
||||
if (params->wpa_debug_file_path)
|
||||
wpa_debug_open_file(params->wpa_debug_file_path);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,6 @@
|
|||
From 1a55572f699610d356997da020bcfb65da6d2dc5 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 4 ++++
|
||||
src/ap/ap_config.h | 2 ++
|
||||
src/ap/hw_features.c | 3 ++-
|
||||
src/ap/ieee802_11_ht.c | 6 ++++++
|
||||
4 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 8a86ce08b..03b902076 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3435,6 +3435,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -3446,6 +3446,10 @@ static int hostapd_config_fill(struct ho
|
||||
if (bss->ocv && !bss->ieee80211w)
|
||||
bss->ieee80211w = 1;
|
||||
#endif /* CONFIG_OCV */
|
||||
|
|
@ -24,11 +11,9 @@ index 8a86ce08b..03b902076 100644
|
|||
} else if (os_strcmp(buf, "ieee80211n") == 0) {
|
||||
conf->ieee80211n = atoi(pos);
|
||||
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index 805ea93df..58dd2cfed 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -1040,6 +1040,8 @@ struct hostapd_config {
|
||||
@@ -1072,6 +1072,8 @@ struct hostapd_config {
|
||||
|
||||
int ht_op_mode_fixed;
|
||||
u16 ht_capab;
|
||||
|
|
@ -37,11 +22,9 @@ index 805ea93df..58dd2cfed 100644
|
|||
int ieee80211n;
|
||||
int secondary_channel;
|
||||
int no_pri_sec_switch;
|
||||
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
|
||||
index 4b66b02f4..2b66ab563 100644
|
||||
--- a/src/ap/hw_features.c
|
||||
+++ b/src/ap/hw_features.c
|
||||
@@ -517,7 +517,8 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)
|
||||
@@ -517,7 +517,8 @@ static int ieee80211n_check_40mhz(struct
|
||||
int ret;
|
||||
|
||||
/* Check that HT40 is used and PRI / SEC switch is allowed */
|
||||
|
|
@ -51,11 +34,9 @@ index 4b66b02f4..2b66ab563 100644
|
|||
return 0;
|
||||
|
||||
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
|
||||
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
|
||||
index 59ecbdce7..ebe2e5acd 100644
|
||||
--- a/src/ap/ieee802_11_ht.c
|
||||
+++ b/src/ap/ieee802_11_ht.c
|
||||
@@ -230,6 +230,9 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd,
|
||||
@@ -230,6 +230,9 @@ void hostapd_2040_coex_action(struct hos
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +46,7 @@ index 59ecbdce7..ebe2e5acd 100644
|
|||
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_iface *iface, struct sta_info *sta)
|
||||
@@ -390,6 +393,9 @@ void ht40_intolerant_add(struct hostapd_
|
||||
if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,6 @@
|
|||
From 0c333b13dfbf5a04e94cda26948e5dc48803e723 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
wpa_supplicant/config.c | 1 +
|
||||
wpa_supplicant/config_file.c | 1 +
|
||||
wpa_supplicant/config_ssid.h | 2 ++
|
||||
wpa_supplicant/mesh.c | 2 ++
|
||||
wpa_supplicant/wpa_supplicant.c | 6 +++---
|
||||
5 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
|
||||
index bfbc46000..ec8301ab9 100644
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -2531,6 +2531,7 @@ static const struct parse_data ssid_fields[] = {
|
||||
@@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
|
||||
#else /* CONFIG_MESH */
|
||||
{ INT_RANGE(mode, 0, 4) },
|
||||
#endif /* CONFIG_MESH */
|
||||
|
|
@ -22,11 +8,9 @@ index bfbc46000..ec8301ab9 100644
|
|||
{ INT_RANGE(proactive_key_caching, 0, 1) },
|
||||
{ INT_RANGE(disabled, 0, 2) },
|
||||
{ STR(id_str) },
|
||||
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
|
||||
index c0763253f..93fc014e4 100644
|
||||
--- a/wpa_supplicant/config_file.c
|
||||
+++ b/wpa_supplicant/config_file.c
|
||||
@@ -766,6 +766,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
|
||||
@@ -775,6 +775,7 @@ static void wpa_config_write_network(FIL
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
INT(mode);
|
||||
INT(no_auto_peer);
|
||||
|
|
@ -34,24 +18,9 @@ index c0763253f..93fc014e4 100644
|
|||
INT(mesh_fwding);
|
||||
INT(frequency);
|
||||
INT(enable_edmg);
|
||||
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
|
||||
index 9b17c3b14..d5c90122a 100644
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -981,6 +981,8 @@ struct wpa_ssid {
|
||||
*/
|
||||
int no_auto_peer;
|
||||
|
||||
+ int noscan;
|
||||
+
|
||||
/**
|
||||
* mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
|
||||
*
|
||||
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
|
||||
index b67396d5a..ad067da67 100644
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
|
||||
@@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
frequency);
|
||||
goto out_free;
|
||||
}
|
||||
|
|
@ -60,34 +29,43 @@ index b67396d5a..ad067da67 100644
|
|||
|
||||
if (ssid->mesh_basic_rates == NULL) {
|
||||
/*
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index b00a24792..bc2d4012d 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2452,7 +2452,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
@@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
|
||||
const struct wpa_ssid *ssid,
|
||||
struct hostapd_hw_modes *mode)
|
||||
{
|
||||
- if (mode->mode != HOSTAPD_MODE_IEEE80211A)
|
||||
+ if (mode->mode != HOSTAPD_MODE_IEEE80211A && !(ssid->noscan))
|
||||
return false;
|
||||
|
||||
if (!drv_supports_vht(wpa_s, ssid))
|
||||
@@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
|
||||
int i, res;
|
||||
unsigned int j;
|
||||
static const int ht40plus[] = {
|
||||
- 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
|
||||
+ 1, 2, 3, 4, 5, 6, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
|
||||
184, 192
|
||||
};
|
||||
int ht40 = -1;
|
||||
@@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
|
||||
enum hostapd_hw_mode hw_mode;
|
||||
struct hostapd_hw_modes *mode = NULL;
|
||||
- int ht40plus[] = { 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
|
||||
+ int ht40plus[] = { 1, 2, 3, 4, 5, 6, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157,
|
||||
184, 192 };
|
||||
int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955,
|
||||
6035, 6115, 6195, 6275, 6355, 6435, 6515,
|
||||
@@ -2460,7 +2460,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
int bw160[] = { 5955, 6115, 6275, 6435, 6595, 6755, 6915 };
|
||||
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
|
||||
- int i, obss_scan = 1;
|
||||
+ int i, obss_scan = !(ssid->noscan);
|
||||
u8 channel;
|
||||
- int i, chan_idx, ht40 = -1, res, obss_scan = 1;
|
||||
+ int i, chan_idx, ht40 = -1, res, obss_scan = !(ssid->noscan);
|
||||
unsigned int j, k;
|
||||
struct hostapd_freq_params vht_freq;
|
||||
int chwidth, seg0, seg1;
|
||||
@@ -2551,7 +2551,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
#endif /* CONFIG_HE_OVERRIDES */
|
||||
bool is_6ghz;
|
||||
bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -1035,6 +1035,8 @@ struct wpa_ssid {
|
||||
*/
|
||||
int no_auto_peer;
|
||||
|
||||
/* Setup higher BW only for 5 GHz */
|
||||
- if (mode->mode != HOSTAPD_MODE_IEEE80211A)
|
||||
+ if (mode->mode != HOSTAPD_MODE_IEEE80211A && !(ssid->noscan))
|
||||
return;
|
||||
|
||||
for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) {
|
||||
+ int noscan;
|
||||
+
|
||||
/**
|
||||
* mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From f9584fa25cb679943e978926af83dcb17597a76c Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
wpa_supplicant/wpa_supplicant.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index bc2d4012d..c31421c3e 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -5405,7 +5405,7 @@ wpa_supplicant_alloc(struct wpa_supplicant *parent)
|
||||
@@ -5740,7 +5740,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
if (wpa_s == NULL)
|
||||
return NULL;
|
||||
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
From 20b84122399e878194d5757bbe637c4fed6d0f2e Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/drivers/drivers.mak | 4 +---
|
||||
src/drivers/rfkill.h | 16 ++++++++++++++++
|
||||
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
|
||||
index a03d4a034..8da44d9f5 100644
|
||||
--- a/src/drivers/drivers.mak
|
||||
+++ b/src/drivers/drivers.mak
|
||||
@@ -54,7 +54,6 @@ NEED_SME=y
|
||||
|
|
@ -43,8 +32,6 @@ index a03d4a034..8da44d9f5 100644
|
|||
endif
|
||||
|
||||
ifdef NEED_RADIOTAP
|
||||
diff --git a/src/drivers/rfkill.h b/src/drivers/rfkill.h
|
||||
index 0412ac330..e27565375 100644
|
||||
--- a/src/drivers/rfkill.h
|
||||
+++ b/src/drivers/rfkill.h
|
||||
@@ -18,8 +18,24 @@ struct rfkill_config {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From 7fafab3b02af33cb9cbb4c1ea7de83cfc6161a4a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index de6a6c2f6..d2b30a0b8 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -5011,7 +5011,7 @@ static int nl80211_set_channel(struct i802_bss *bss,
|
||||
@@ -5407,7 +5407,7 @@ static int nl80211_set_channel(struct i8
|
||||
freq->he_enabled, freq->eht_enabled, freq->bandwidth,
|
||||
freq->center_freq1, freq->center_freq2);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From a8e0a04a432c75c828a5ed0a56de0de2a3ea558f Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/ap/hostapd.c | 50 +++++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 35 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
|
||||
index 2b07a9283..f6c9c0e78 100644
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -119,6 +119,29 @@ static void hostapd_reload_bss(struct hostapd_data *hapd)
|
||||
@@ -143,6 +143,29 @@ static void hostapd_reload_bss(struct ho
|
||||
#endif /* CONFIG_NO_RADIUS */
|
||||
|
||||
ssid = &hapd->conf->ssid;
|
||||
|
|
@ -40,7 +30,7 @@ index 2b07a9283..f6c9c0e78 100644
|
|||
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
|
||||
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
|
||||
/*
|
||||
@@ -220,6 +243,7 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
@@ -251,6 +274,7 @@ int hostapd_reload_config(struct hostapd
|
||||
struct hostapd_data *hapd = iface->bss[0];
|
||||
struct hostapd_config *newconf, *oldconf;
|
||||
size_t j;
|
||||
|
|
@ -48,7 +38,7 @@ index 2b07a9283..f6c9c0e78 100644
|
|||
|
||||
if (iface->config_fname == NULL) {
|
||||
/* Only in-memory config in use - assume it has been updated */
|
||||
@@ -270,24 +294,20 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
@@ -301,6 +325,17 @@ int hostapd_reload_config(struct hostapd
|
||||
}
|
||||
iface->conf = newconf;
|
||||
|
||||
|
|
@ -65,6 +55,10 @@ index 2b07a9283..f6c9c0e78 100644
|
|||
+
|
||||
for (j = 0; j < iface->num_bss; j++) {
|
||||
hapd = iface->bss[j];
|
||||
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
|
||||
@@ -308,21 +343,6 @@ int hostapd_reload_config(struct hostapd
|
||||
newconf->bss[j]->config_id) != 0)
|
||||
hostapd_clear_old_bss(hapd);
|
||||
hapd->iconf = newconf;
|
||||
- hapd->iconf->channel = oldconf->channel;
|
||||
- hapd->iconf->acs = oldconf->acs;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From 2aeb1ad361356c6eca3101b00cd323490ad7d55a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
wpa_supplicant/ap.c | 22 +++++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
|
||||
index 52b537e62..f21b8713f 100644
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1803,15 +1803,35 @@ int ap_switch_channel(struct wpa_supplicant *wpa_s,
|
||||
@@ -1825,15 +1825,35 @@ int ap_switch_channel(struct wpa_supplic
|
||||
|
||||
|
||||
#ifdef CONFIG_CTRL_IFACE
|
||||
|
|
|
|||
|
|
@ -1,44 +1,35 @@
|
|||
From e89b089b1b199a7332e704de84f261c437d9f510 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 8 +++-----
|
||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index d2b30a0b8..a9ae0fbe2 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -2932,11 +2932,11 @@ static int wpa_driver_nl80211_del_beacon(struct i802_bss *bss)
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
@@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
|
||||
return 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
|
||||
- drv->ifindex);
|
||||
+ bss->ifindex);
|
||||
bss->beacon_set = 0;
|
||||
bss->freq = 0;
|
||||
link->beacon_set = 0;
|
||||
link->freq = 0;
|
||||
|
||||
nl80211_put_wiphy_data_ap(bss);
|
||||
- msg = nl80211_drv_msg(drv, 0, NL80211_CMD_DEL_BEACON);
|
||||
+ msg = nl80211_bss_msg(drv, 0, NL80211_CMD_DEL_BEACON);
|
||||
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
+ msg = nl80211_bss_msg(bss, 0, NL80211_CMD_DEL_BEACON);
|
||||
if (!msg)
|
||||
return -ENOBUFS;
|
||||
|
||||
@@ -5650,7 +5650,7 @@ static void nl80211_teardown_ap(struct i802_bss *bss)
|
||||
@@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
|
||||
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
||||
|
||||
nl80211_put_wiphy_data_ap(bss);
|
||||
- bss->beacon_set = 0;
|
||||
+ wpa_driver_nl80211_del_beacon(bss);
|
||||
- bss->flink->beacon_set = 0;
|
||||
+ wpa_driver_nl80211_del_beacon_all(bss);
|
||||
}
|
||||
|
||||
|
||||
@@ -8104,8 +8104,6 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
|
||||
@@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
} else {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
||||
nl80211_teardown_ap(bss);
|
||||
- if (!bss->added_if && !drv->first_bss->next)
|
||||
- wpa_driver_nl80211_del_beacon(bss);
|
||||
- wpa_driver_nl80211_del_beacon_all(bss);
|
||||
nl80211_destroy_bss(bss);
|
||||
if (!bss->added_if)
|
||||
i802_set_iface_flags(bss, 0);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,6 @@
|
|||
From e949a35332f665fb789e2c4a07cfdacd635e67b8 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/ctrl_iface.c | 59 ++++++++++++++++++++++++++++++++++++++++++
|
||||
src/ap/ctrl_iface_ap.c | 8 +++++-
|
||||
2 files changed, 66 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
|
||||
index 664c59df7..8baa4a4d4 100644
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -67,6 +67,7 @@
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "fst/fst_ctrl_iface.h"
|
||||
#include "config_file.h"
|
||||
#include "ctrl_iface.h"
|
||||
|
|
@ -19,7 +8,7 @@ index 664c59df7..8baa4a4d4 100644
|
|||
|
||||
|
||||
#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256
|
||||
@@ -82,6 +83,7 @@ static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level,
|
||||
@@ -83,6 +84,7 @@ static void hostapd_ctrl_iface_send(stru
|
||||
enum wpa_msg_type type,
|
||||
const char *buf, size_t len);
|
||||
|
||||
|
|
@ -27,7 +16,7 @@ index 664c59df7..8baa4a4d4 100644
|
|||
|
||||
static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd,
|
||||
struct sockaddr_storage *from,
|
||||
@@ -133,6 +135,61 @@ static int hostapd_ctrl_iface_new_sta(struct hostapd_data *hapd,
|
||||
@@ -134,6 +136,61 @@ static int hostapd_ctrl_iface_new_sta(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +78,7 @@ index 664c59df7..8baa4a4d4 100644
|
|||
|
||||
#ifdef NEED_AP_MLME
|
||||
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
|
||||
@@ -3434,6 +3491,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
|
||||
@@ -3564,6 +3621,8 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
|
||||
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
|
||||
reply_size);
|
||||
|
|
@ -98,11 +87,9 @@ index 664c59df7..8baa4a4d4 100644
|
|||
} else if (os_strcmp(buf, "ERP_FLUSH") == 0) {
|
||||
ieee802_1x_erp_flush(hapd);
|
||||
#ifdef RADIUS_SERVER
|
||||
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
|
||||
index 29b41f5bc..5150d9bbf 100644
|
||||
--- a/src/ap/ctrl_iface_ap.c
|
||||
+++ b/src/ap/ctrl_iface_ap.c
|
||||
@@ -945,7 +945,13 @@ int hostapd_parse_csa_settings(const char *pos,
|
||||
@@ -1023,7 +1023,13 @@ int hostapd_parse_csa_settings(const cha
|
||||
|
||||
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,117 +1,6 @@
|
|||
From d1928a9eedc0ce358521d6681c7f61d2e0da1316 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/ctrl_iface.c | 6 +++
|
||||
src/ap/beacon.c | 5 ---
|
||||
src/drivers/driver.h | 2 +
|
||||
src/drivers/driver_nl80211_event.c | 6 ++-
|
||||
wpa_supplicant/Makefile | 2 +
|
||||
wpa_supplicant/bss.c | 14 ++++++
|
||||
wpa_supplicant/bss.h | 4 ++
|
||||
wpa_supplicant/events.c | 58 ++++++++++++++++++++++++-
|
||||
wpa_supplicant/main.c | 8 +++-
|
||||
wpa_supplicant/wpa_supplicant.c | 69 ++++++++++++++++++++++++++++++
|
||||
wpa_supplicant/wpa_supplicant_i.h | 7 +++
|
||||
11 files changed, 172 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
|
||||
index 8baa4a4d4..193df6e11 100644
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -2626,6 +2626,12 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (os_strstr(pos, " auto-ht")) {
|
||||
+ settings.freq_params.ht_enabled = iface->conf->ieee80211n;
|
||||
+ settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
|
||||
+ settings.freq_params.he_enabled = iface->conf->ieee80211ax;
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < iface->num_bss; i++) {
|
||||
|
||||
/* Save CHAN_SWITCH VHT, HE, and EHT config */
|
||||
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
|
||||
index 58872bfda..c8a0e51d3 100644
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -1901,11 +1901,6 @@ static int __ieee802_11_set_beacon(struct hostapd_data *hapd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (hapd->csa_in_progress) {
|
||||
- wpa_printf(MSG_ERROR, "Cannot set beacons during CSA period");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
hapd->beacon_set_done = 1;
|
||||
|
||||
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
|
||||
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
|
||||
index f8f91c023..f7dfcc165 100644
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -5965,6 +5965,7 @@ union wpa_event_data {
|
||||
|
||||
/**
|
||||
* struct ch_switch
|
||||
+ * @count: Count until channel switch activates
|
||||
* @freq: Frequency of new channel in MHz
|
||||
* @ht_enabled: Whether this is an HT channel
|
||||
* @ch_offset: Secondary channel offset
|
||||
@@ -5973,6 +5974,7 @@ union wpa_event_data {
|
||||
* @cf2: Center frequency 2
|
||||
*/
|
||||
struct ch_switch {
|
||||
+ int count;
|
||||
int freq;
|
||||
int ht_enabled;
|
||||
int ch_offset;
|
||||
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
|
||||
index 00f8b0cbb..a67b4818a 100644
|
||||
--- a/src/drivers/driver_nl80211_event.c
|
||||
+++ b/src/drivers/driver_nl80211_event.c
|
||||
@@ -691,7 +691,7 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
|
||||
struct nlattr *ifindex, struct nlattr *freq,
|
||||
struct nlattr *type, struct nlattr *bw,
|
||||
struct nlattr *cf1, struct nlattr *cf2,
|
||||
- int finished)
|
||||
+ struct nlattr *count, int finished)
|
||||
{
|
||||
struct i802_bss *bss;
|
||||
union wpa_event_data data;
|
||||
@@ -752,6 +752,8 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
|
||||
data.ch_switch.cf1 = nla_get_u32(cf1);
|
||||
if (cf2)
|
||||
data.ch_switch.cf2 = nla_get_u32(cf2);
|
||||
+ if (count)
|
||||
+ data.ch_switch.count = nla_get_u32(count);
|
||||
|
||||
if (finished)
|
||||
bss->freq = data.ch_switch.freq;
|
||||
@@ -3115,6 +3117,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
|
||||
tb[NL80211_ATTR_CHANNEL_WIDTH],
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
+ tb[NL80211_ATTR_CH_SWITCH_COUNT],
|
||||
0);
|
||||
break;
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
@@ -3125,6 +3128,7 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
|
||||
tb[NL80211_ATTR_CHANNEL_WIDTH],
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
+ NULL,
|
||||
1);
|
||||
break;
|
||||
case NL80211_CMD_DISCONNECT:
|
||||
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
|
||||
index f7740e6f0..969dc713f 100644
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -115,6 +115,8 @@ OBJS_c += ../src/utils/common.o
|
||||
@@ -126,6 +126,8 @@ OBJS_c += ../src/utils/common.o
|
||||
OBJS_c += ../src/common/cli.o
|
||||
OBJS += wmm_ac.o
|
||||
|
||||
|
|
@ -120,8 +9,6 @@ index f7740e6f0..969dc713f 100644
|
|||
ifndef CONFIG_OS
|
||||
ifdef CONFIG_NATIVE_WINDOWS
|
||||
CONFIG_OS=win32
|
||||
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
|
||||
index eb97a618d..01ddb13ec 100644
|
||||
--- a/wpa_supplicant/bss.c
|
||||
+++ b/wpa_supplicant/bss.c
|
||||
@@ -11,6 +11,7 @@
|
||||
|
|
@ -132,7 +19,7 @@ index eb97a618d..01ddb13ec 100644
|
|||
#include "drivers/driver.h"
|
||||
#include "eap_peer/eap.h"
|
||||
#include "wpa_supplicant_i.h"
|
||||
@@ -282,6 +283,10 @@ void calculate_update_time(const struct os_reltime *fetch_time,
|
||||
@@ -283,6 +284,10 @@ void calculate_update_time(const struct
|
||||
static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src,
|
||||
struct os_reltime *fetch_time)
|
||||
{
|
||||
|
|
@ -143,7 +30,7 @@ index eb97a618d..01ddb13ec 100644
|
|||
dst->flags = src->flags;
|
||||
os_memcpy(dst->bssid, src->bssid, ETH_ALEN);
|
||||
dst->freq = src->freq;
|
||||
@@ -295,6 +300,15 @@ static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src,
|
||||
@@ -296,6 +301,15 @@ static void wpa_bss_copy_res(struct wpa_
|
||||
dst->est_throughput = src->est_throughput;
|
||||
dst->snr = src->snr;
|
||||
|
||||
|
|
@ -159,8 +46,6 @@ index eb97a618d..01ddb13ec 100644
|
|||
calculate_update_time(fetch_time, src->age, &dst->last_update);
|
||||
}
|
||||
|
||||
diff --git a/wpa_supplicant/bss.h b/wpa_supplicant/bss.h
|
||||
index 146aaee7f..2f37e8d1c 100644
|
||||
--- a/wpa_supplicant/bss.h
|
||||
+++ b/wpa_supplicant/bss.h
|
||||
@@ -94,6 +94,10 @@ struct wpa_bss {
|
||||
|
|
@ -174,11 +59,212 @@ index 146aaee7f..2f37e8d1c 100644
|
|||
/** Frequency of the channel in MHz (e.g., 2412 = channel 1) */
|
||||
int freq;
|
||||
/** Beacon interval in TUs (host byte order) */
|
||||
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
|
||||
index 48aa792b3..86a0dc7fa 100644
|
||||
--- a/wpa_supplicant/main.c
|
||||
+++ b/wpa_supplicant/main.c
|
||||
@@ -35,7 +35,7 @@ static void usage(void)
|
||||
"vW] [-P<pid file>] "
|
||||
"[-g<global ctrl>] \\\n"
|
||||
" [-G<group>] \\\n"
|
||||
- " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
|
||||
+ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>] "
|
||||
"[-p<driver_param>] \\\n"
|
||||
" [-b<br_ifname>] [-e<entropy file>]"
|
||||
#ifdef CONFIG_DEBUG_FILE
|
||||
@@ -75,6 +75,7 @@ static void usage(void)
|
||||
" -g = global ctrl_interface\n"
|
||||
" -G = global ctrl_interface group\n"
|
||||
" -h = show this help text\n"
|
||||
+ " -H = connect to a hostapd instance to manage state changes\n"
|
||||
" -i = interface name\n"
|
||||
" -I = additional configuration file\n"
|
||||
" -K = include keys (passwords, etc.) in debug output\n"
|
||||
@@ -202,7 +203,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (;;) {
|
||||
c = getopt(argc, argv,
|
||||
- "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
+ "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -249,6 +250,9 @@ int main(int argc, char *argv[])
|
||||
usage();
|
||||
exitcode = 0;
|
||||
goto out;
|
||||
+ case 'H':
|
||||
+ iface->hostapd_ctrl = optarg;
|
||||
+ break;
|
||||
case 'i':
|
||||
iface->ifname = optarg;
|
||||
break;
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -131,6 +131,54 @@ static void wpas_update_fils_connect_par
|
||||
static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s);
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
+static int hostapd_stop(struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ const char *cmd = "STOP_AP";
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+
|
||||
+ if (wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL) < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to stop hostapd AP interfaces\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int hostapd_reload(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
|
||||
+{
|
||||
+ char *cmd = NULL;
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+ enum hostapd_hw_mode hw_mode;
|
||||
+ u8 channel;
|
||||
+ int sec_chan = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!bss)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (bss->ht_param & HT_INFO_HT_PARAM_STA_CHNL_WIDTH) {
|
||||
+ int sec = bss->ht_param & HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK;
|
||||
+ if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE)
|
||||
+ sec_chan = 1;
|
||||
+ else if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW)
|
||||
+ sec_chan = -1;
|
||||
+ }
|
||||
+
|
||||
+ hw_mode = ieee80211_freq_to_chan(bss->freq, &channel);
|
||||
+ if (asprintf(&cmd, "UPDATE channel=%d sec_chan=%d hw_mode=%d",
|
||||
+ channel, sec_chan, hw_mode) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ret = wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL);
|
||||
+ free(cmd);
|
||||
+
|
||||
+ if (ret < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to reload hostapd AP interfaces\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
#ifdef CONFIG_WEP
|
||||
/* Configure default/group WEP keys for static WEP */
|
||||
@@ -1026,6 +1074,8 @@ void wpa_supplicant_set_state(struct wpa
|
||||
|
||||
sme_sched_obss_scan(wpa_s, 1);
|
||||
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#if defined(CONFIG_FILS) && defined(IEEE8021X_EAPOL)
|
||||
if (!fils_hlp_sent && ssid && ssid->eap.erp)
|
||||
update_fils_connect_params = true;
|
||||
@@ -1036,6 +1086,8 @@ void wpa_supplicant_set_state(struct wpa
|
||||
#endif /* CONFIG_OWE */
|
||||
} else if (state == WPA_DISCONNECTED || state == WPA_ASSOCIATING ||
|
||||
state == WPA_ASSOCIATED) {
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_stop(wpa_s);
|
||||
wpa_s->new_connection = 1;
|
||||
wpa_drv_set_operstate(wpa_s, 0);
|
||||
#ifndef IEEE8021X_EAPOL
|
||||
@@ -2537,6 +2589,8 @@ void wpa_supplicant_associate(struct wpa
|
||||
return;
|
||||
}
|
||||
wpa_s->current_bss = bss;
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#else /* CONFIG_MESH */
|
||||
wpa_msg(wpa_s, MSG_ERROR,
|
||||
"mesh mode support not included in the build");
|
||||
@@ -7037,6 +7091,16 @@ static int wpa_supplicant_init_iface(str
|
||||
sizeof(wpa_s->bridge_ifname));
|
||||
}
|
||||
|
||||
+ if (iface->hostapd_ctrl) {
|
||||
+ wpa_s->hostapd = wpa_ctrl_open(iface->hostapd_ctrl);
|
||||
+ if (!wpa_s->hostapd) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to connect to hostapd\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (hostapd_stop(wpa_s) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* RSNA Supplicant Key Management - INITIALIZE */
|
||||
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
||||
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
||||
@@ -7379,6 +7443,11 @@ static void wpa_supplicant_deinit_iface(
|
||||
if (terminate)
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
||||
|
||||
+ if (wpa_s->hostapd) {
|
||||
+ wpa_ctrl_close(wpa_s->hostapd);
|
||||
+ wpa_s->hostapd = NULL;
|
||||
+ }
|
||||
+
|
||||
wpa_supplicant_ctrl_iface_deinit(wpa_s, wpa_s->ctrl_iface);
|
||||
wpa_s->ctrl_iface = NULL;
|
||||
|
||||
--- a/wpa_supplicant/wpa_supplicant_i.h
|
||||
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
||||
@@ -106,6 +106,11 @@ struct wpa_interface {
|
||||
const char *ifname;
|
||||
|
||||
/**
|
||||
+ * hostapd_ctrl - path to hostapd control socket for notification
|
||||
+ */
|
||||
+ const char *hostapd_ctrl;
|
||||
+
|
||||
+ /**
|
||||
* bridge_ifname - Optional bridge interface name
|
||||
*
|
||||
* If the driver interface (ifname) is included in a Linux bridge
|
||||
@@ -665,6 +670,8 @@ struct wpa_supplicant {
|
||||
#endif /* CONFIG_CTRL_IFACE_BINDER */
|
||||
char bridge_ifname[16];
|
||||
|
||||
+ struct wpa_ctrl *hostapd;
|
||||
+
|
||||
char *confname;
|
||||
char *confanother;
|
||||
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -2751,6 +2751,12 @@ static int hostapd_ctrl_iface_chan_switc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (os_strstr(pos, " auto-ht")) {
|
||||
+ settings.freq_params.ht_enabled = iface->conf->ieee80211n;
|
||||
+ settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
|
||||
+ settings.freq_params.he_enabled = iface->conf->ieee80211ax;
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < iface->num_bss; i++) {
|
||||
|
||||
/* Save CHAN_SWITCH VHT, HE, and EHT config */
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -2108,11 +2108,6 @@ static int __ieee802_11_set_beacon(struc
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (hapd->csa_in_progress) {
|
||||
- wpa_printf(MSG_ERROR, "Cannot set beacons during CSA period");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
hapd->beacon_set_done = 1;
|
||||
|
||||
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -4953,6 +4953,60 @@ static void wpas_event_unprot_beacon(struct wpa_supplicant *wpa_s,
|
||||
@@ -5345,6 +5345,60 @@ static void wpas_link_reconfig(struct wp
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -239,7 +325,7 @@ index 48aa792b3..86a0dc7fa 100644
|
|||
void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
@@ -5268,8 +5322,10 @@ void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
@@ -5697,8 +5751,10 @@ void supplicant_event(void *ctx, enum wp
|
||||
channel_width_to_string(data->ch_switch.ch_width),
|
||||
data->ch_switch.cf1,
|
||||
data->ch_switch.cf2);
|
||||
|
|
@ -251,183 +337,56 @@ index 48aa792b3..86a0dc7fa 100644
|
|||
|
||||
wpa_s->assoc_freq = data->ch_switch.freq;
|
||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||
diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
|
||||
index 9229eb51f..535923ecd 100644
|
||||
--- a/wpa_supplicant/main.c
|
||||
+++ b/wpa_supplicant/main.c
|
||||
@@ -35,7 +35,7 @@ static void usage(void)
|
||||
"vW] [-P<pid file>] "
|
||||
"[-g<global ctrl>] \\\n"
|
||||
" [-G<group>] \\\n"
|
||||
- " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
|
||||
+ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>] "
|
||||
"[-p<driver_param>] \\\n"
|
||||
" [-b<br_ifname>] [-e<entropy file>]"
|
||||
#ifdef CONFIG_DEBUG_FILE
|
||||
@@ -75,6 +75,7 @@ static void usage(void)
|
||||
" -g = global ctrl_interface\n"
|
||||
" -G = global ctrl_interface group\n"
|
||||
" -h = show this help text\n"
|
||||
+ " -H = connect to a hostapd instance to manage state changes\n"
|
||||
" -i = interface name\n"
|
||||
" -I = additional configuration file\n"
|
||||
" -K = include keys (passwords, etc.) in debug output\n"
|
||||
@@ -202,7 +203,7 @@ int main(int argc, char *argv[])
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -6421,6 +6421,7 @@ union wpa_event_data {
|
||||
|
||||
for (;;) {
|
||||
c = getopt(argc, argv,
|
||||
- "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
+ "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -249,6 +250,9 @@ int main(int argc, char *argv[])
|
||||
usage();
|
||||
exitcode = 0;
|
||||
goto out;
|
||||
+ case 'H':
|
||||
+ iface->hostapd_ctrl = optarg;
|
||||
+ break;
|
||||
case 'i':
|
||||
iface->ifname = optarg;
|
||||
break;
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index c31421c3e..c18723384 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -131,6 +131,54 @@ static void wpas_update_fils_connect_params(struct wpa_supplicant *wpa_s);
|
||||
static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s);
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
+static int hostapd_stop(struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ const char *cmd = "STOP_AP";
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+
|
||||
+ if (wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL) < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to stop hostapd AP interfaces\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int hostapd_reload(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
|
||||
+{
|
||||
+ char *cmd = NULL;
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+ enum hostapd_hw_mode hw_mode;
|
||||
+ u8 channel;
|
||||
+ int sec_chan = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!bss)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (bss->ht_param & HT_INFO_HT_PARAM_STA_CHNL_WIDTH) {
|
||||
+ int sec = bss->ht_param & HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK;
|
||||
+ if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE)
|
||||
+ sec_chan = 1;
|
||||
+ else if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW)
|
||||
+ sec_chan = -1;
|
||||
+ }
|
||||
+
|
||||
+ hw_mode = ieee80211_freq_to_chan(bss->freq, &channel);
|
||||
+ if (asprintf(&cmd, "UPDATE channel=%d sec_chan=%d hw_mode=%d",
|
||||
+ channel, sec_chan, hw_mode) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ret = wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL);
|
||||
+ free(cmd);
|
||||
+
|
||||
+ if (ret < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to reload hostapd AP interfaces\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
#ifdef CONFIG_WEP
|
||||
/* Configure default/group WEP keys for static WEP */
|
||||
@@ -1016,6 +1064,8 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
|
||||
|
||||
sme_sched_obss_scan(wpa_s, 1);
|
||||
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#if defined(CONFIG_FILS) && defined(IEEE8021X_EAPOL)
|
||||
if (!fils_hlp_sent && ssid && ssid->eap.erp)
|
||||
update_fils_connect_params = true;
|
||||
@@ -1026,6 +1076,8 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
|
||||
#endif /* CONFIG_OWE */
|
||||
} else if (state == WPA_DISCONNECTED || state == WPA_ASSOCIATING ||
|
||||
state == WPA_ASSOCIATED) {
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_stop(wpa_s);
|
||||
wpa_s->new_connection = 1;
|
||||
wpa_drv_set_operstate(wpa_s, 0);
|
||||
#ifndef IEEE8021X_EAPOL
|
||||
@@ -2324,6 +2376,8 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||
return;
|
||||
}
|
||||
wpa_s->current_bss = bss;
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#else /* CONFIG_MESH */
|
||||
wpa_msg(wpa_s, MSG_ERROR,
|
||||
"mesh mode support not included in the build");
|
||||
@@ -6679,6 +6733,16 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
|
||||
sizeof(wpa_s->bridge_ifname));
|
||||
}
|
||||
|
||||
+ if (iface->hostapd_ctrl) {
|
||||
+ wpa_s->hostapd = wpa_ctrl_open(iface->hostapd_ctrl);
|
||||
+ if (!wpa_s->hostapd) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to connect to hostapd\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (hostapd_stop(wpa_s) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* RSNA Supplicant Key Management - INITIALIZE */
|
||||
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
||||
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
||||
@@ -7017,6 +7081,11 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
|
||||
if (terminate)
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
||||
|
||||
+ if (wpa_s->hostapd) {
|
||||
+ wpa_ctrl_close(wpa_s->hostapd);
|
||||
+ wpa_s->hostapd = NULL;
|
||||
+ }
|
||||
+
|
||||
wpa_supplicant_ctrl_iface_deinit(wpa_s, wpa_s->ctrl_iface);
|
||||
wpa_s->ctrl_iface = NULL;
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
|
||||
index 301d5d56a..2f121462a 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant_i.h
|
||||
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
||||
@@ -104,6 +104,11 @@ struct wpa_interface {
|
||||
*/
|
||||
const char *ifname;
|
||||
|
||||
+ /**
|
||||
+ * hostapd_ctrl - path to hostapd control socket for notification
|
||||
+ */
|
||||
+ const char *hostapd_ctrl;
|
||||
+
|
||||
/**
|
||||
* bridge_ifname - Optional bridge interface name
|
||||
*
|
||||
@@ -719,6 +724,8 @@ struct wpa_supplicant {
|
||||
#endif /* CONFIG_CTRL_IFACE_BINDER */
|
||||
char bridge_ifname[16];
|
||||
|
||||
+ struct wpa_ctrl *hostapd;
|
||||
+
|
||||
char *confname;
|
||||
char *confanother;
|
||||
* struct ch_switch
|
||||
+ * @count: Count until channel switch activates
|
||||
* @freq: Frequency of new channel in MHz
|
||||
* @ht_enabled: Whether this is an HT channel
|
||||
* @ch_offset: Secondary channel offset
|
||||
@@ -6431,6 +6432,7 @@ union wpa_event_data {
|
||||
* @punct_bitmap: Puncturing bitmap
|
||||
*/
|
||||
struct ch_switch {
|
||||
+ int count;
|
||||
int freq;
|
||||
int ht_enabled;
|
||||
int ch_offset;
|
||||
--- a/src/drivers/driver_nl80211_event.c
|
||||
+++ b/src/drivers/driver_nl80211_event.c
|
||||
@@ -1202,6 +1202,7 @@ static void mlme_event_ch_switch(struct
|
||||
struct nlattr *bw, struct nlattr *cf1,
|
||||
struct nlattr *cf2,
|
||||
struct nlattr *punct_bitmap,
|
||||
+ struct nlattr *count,
|
||||
int finished)
|
||||
{
|
||||
struct i802_bss *bss;
|
||||
@@ -1265,6 +1266,8 @@ static void mlme_event_ch_switch(struct
|
||||
data.ch_switch.cf1 = nla_get_u32(cf1);
|
||||
if (cf2)
|
||||
data.ch_switch.cf2 = nla_get_u32(cf2);
|
||||
+ if (count)
|
||||
+ data.ch_switch.count = nla_get_u32(count);
|
||||
|
||||
if (finished)
|
||||
bss->flink->freq = data.ch_switch.freq;
|
||||
@@ -3848,6 +3851,7 @@ static void do_process_drv_event(struct
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
tb[NL80211_ATTR_PUNCT_BITMAP],
|
||||
+ tb[NL80211_ATTR_CH_SWITCH_COUNT],
|
||||
0);
|
||||
break;
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
@@ -3860,6 +3864,7 @@ static void do_process_drv_event(struct
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
tb[NL80211_ATTR_PUNCT_BITMAP],
|
||||
+ NULL,
|
||||
1);
|
||||
break;
|
||||
case NL80211_CMD_DISCONNECT:
|
||||
|
|
|
|||
|
|
@ -1,21 +1,3 @@
|
|||
From e54c0492fd8d13ce2e4dd9f7f6301bbeb2afd155 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/Makefile | 3 +++
|
||||
hostapd/ctrl_iface.c | 2 ++
|
||||
src/ap/ctrl_iface_ap.c | 6 ++++--
|
||||
src/ap/ieee802_1x.c | 2 ++
|
||||
src/ap/wpa_auth.c | 3 ++-
|
||||
src/rsn_supp/wpa.c | 3 +++
|
||||
wpa_supplicant/Makefile | 3 +++
|
||||
wpa_supplicant/ap.c | 2 +-
|
||||
wpa_supplicant/ctrl_iface.c | 8 +++++++-
|
||||
9 files changed, 27 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hostapd/Makefile b/hostapd/Makefile
|
||||
index 6c34c5f88..6a125ed80 100644
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -221,6 +221,9 @@ endif
|
||||
|
|
@ -28,11 +10,9 @@ index 6c34c5f88..6a125ed80 100644
|
|||
ifeq ($(CONFIG_CTRL_IFACE), udp)
|
||||
CFLAGS += -DCONFIG_CTRL_IFACE_UDP
|
||||
else
|
||||
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
|
||||
index 193df6e11..9215ab739 100644
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -3250,6 +3250,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
|
||||
@@ -3377,6 +3377,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
reply_size);
|
||||
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
|
||||
reply_len = hostapd_drv_status(hapd, reply, reply_size);
|
||||
|
|
@ -40,7 +20,7 @@ index 193df6e11..9215ab739 100644
|
|||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
@@ -3291,6 +3292,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
|
||||
@@ -3418,6 +3419,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
||||
reply_size);
|
||||
|
|
@ -48,108 +28,9 @@ index 193df6e11..9215ab739 100644
|
|||
} else if (os_strcmp(buf, "ATTACH") == 0) {
|
||||
if (hostapd_ctrl_iface_attach(hapd, from, fromlen, NULL))
|
||||
reply_len = -1;
|
||||
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
|
||||
index 5150d9bbf..c496e4f4a 100644
|
||||
--- a/src/ap/ctrl_iface_ap.c
|
||||
+++ b/src/ap/ctrl_iface_ap.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "taxonomy.h"
|
||||
#include "wnm_ap.h"
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
|
||||
static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen,
|
||||
size_t curr_len, const u8 *mcs_set)
|
||||
@@ -460,6 +461,7 @@ int hostapd_ctrl_iface_sta_next(struct hostapd_data *hapd, const char *txtaddr,
|
||||
return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_P2P_MANAGER
|
||||
static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
|
||||
@@ -832,12 +834,12 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
|
||||
return len;
|
||||
len += ret;
|
||||
}
|
||||
-
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
if (iface->conf->ieee80211n && !hapd->conf->disable_11n && mode) {
|
||||
len = hostapd_write_ht_mcs_bitmask(buf, buflen, len,
|
||||
mode->mcs_set);
|
||||
}
|
||||
-
|
||||
+#endif /* CONFIG_CTRL_IFACE_MIB */
|
||||
if (iface->current_rates && iface->num_rates) {
|
||||
ret = os_snprintf(buf + len, buflen - len, "supported_rates=");
|
||||
if (os_snprintf_error(buflen - len, ret))
|
||||
diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c
|
||||
index d90792c78..7854de1a2 100644
|
||||
--- a/src/ap/ieee802_1x.c
|
||||
+++ b/src/ap/ieee802_1x.c
|
||||
@@ -2740,6 +2740,7 @@ static const char * bool_txt(bool val)
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
|
||||
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
||||
{
|
||||
@@ -2926,6 +2927,7 @@ int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
return len;
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_HS20
|
||||
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
|
||||
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
|
||||
index 705517b16..6fb23947b 100644
|
||||
--- a/src/ap/wpa_auth.c
|
||||
+++ b/src/ap/wpa_auth.c
|
||||
@@ -4559,6 +4559,7 @@ static const char * wpa_bool_txt(int val)
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
@@ -4709,7 +4710,7 @@ int wpa_get_mib_sta(struct wpa_state_machine *sm, char *buf, size_t buflen)
|
||||
|
||||
return len;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
|
||||
void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth)
|
||||
{
|
||||
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
|
||||
index 577717611..27bb644be 100644
|
||||
--- a/src/rsn_supp/wpa.c
|
||||
+++ b/src/rsn_supp/wpa.c
|
||||
@@ -2801,6 +2801,8 @@ static u32 wpa_key_mgmt_suite(struct wpa_sm *sm)
|
||||
}
|
||||
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
+
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
|
||||
@@ -2882,6 +2884,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen)
|
||||
|
||||
return (int) len;
|
||||
}
|
||||
+#endif
|
||||
#endif /* CONFIG_CTRL_IFACE */
|
||||
|
||||
|
||||
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
|
||||
index 969dc713f..57a89edcb 100644
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -973,6 +973,9 @@ ifdef CONFIG_FILS
|
||||
@@ -985,6 +985,9 @@ ifdef CONFIG_FILS
|
||||
OBJS += ../src/ap/fils_hlp.o
|
||||
endif
|
||||
ifdef CONFIG_CTRL_IFACE
|
||||
|
|
@ -159,24 +40,9 @@ index 969dc713f..57a89edcb 100644
|
|||
OBJS += ../src/ap/ctrl_iface_ap.o
|
||||
endif
|
||||
|
||||
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
|
||||
index f21b8713f..992c0a056 100644
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1477,7 +1477,7 @@ int wpas_ap_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
|
||||
#endif /* CONFIG_WPS */
|
||||
|
||||
|
||||
-#ifdef CONFIG_CTRL_IFACE
|
||||
+#if defined(CONFIG_CTRL_IFACE) && defined(CONFIG_CTRL_IFACE_MIB)
|
||||
|
||||
int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
|
||||
char *buf, size_t buflen)
|
||||
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
|
||||
index 499e6d3dd..0b931a7d5 100644
|
||||
--- a/wpa_supplicant/ctrl_iface.c
|
||||
+++ b/wpa_supplicant/ctrl_iface.c
|
||||
@@ -2325,7 +2325,7 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
|
||||
@@ -2326,7 +2326,7 @@ static int wpa_supplicant_ctrl_iface_sta
|
||||
pos += ret;
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +51,7 @@ index 499e6d3dd..0b931a7d5 100644
|
|||
if (wpa_s->ap_iface) {
|
||||
pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
|
||||
end - pos,
|
||||
@@ -11521,6 +11521,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
@@ -11964,6 +11964,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_len = -1;
|
||||
} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
|
||||
wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
|
||||
|
|
@ -193,7 +59,7 @@ index 499e6d3dd..0b931a7d5 100644
|
|||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
@@ -11533,6 +11534,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
@@ -11976,6 +11977,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_size - reply_len);
|
||||
#endif /* CONFIG_MACSEC */
|
||||
}
|
||||
|
|
@ -201,7 +67,7 @@ index 499e6d3dd..0b931a7d5 100644
|
|||
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
|
||||
reply_len = wpa_supplicant_ctrl_iface_status(
|
||||
wpa_s, buf + 6, reply, reply_size);
|
||||
@@ -12021,6 +12023,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
@@ -12464,6 +12466,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_len = wpa_supplicant_ctrl_iface_bss(
|
||||
wpa_s, buf + 4, reply, reply_size);
|
||||
#ifdef CONFIG_AP
|
||||
|
|
@ -209,7 +75,7 @@ index 499e6d3dd..0b931a7d5 100644
|
|||
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
||||
reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
|
||||
} else if (os_strncmp(buf, "STA ", 4) == 0) {
|
||||
@@ -12029,12 +12032,15 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
@@ -12472,12 +12475,15 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||
reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
|
||||
reply_size);
|
||||
|
|
@ -225,3 +91,167 @@ index 499e6d3dd..0b931a7d5 100644
|
|||
} else if (os_strncmp(buf, "CHAN_SWITCH ", 12) == 0) {
|
||||
if (ap_ctrl_iface_chanswitch(wpa_s, buf + 12))
|
||||
reply_len = -1;
|
||||
--- a/src/ap/ctrl_iface_ap.c
|
||||
+++ b/src/ap/ctrl_iface_ap.c
|
||||
@@ -26,6 +26,26 @@
|
||||
#include "taxonomy.h"
|
||||
#include "wnm_ap.h"
|
||||
|
||||
+static const char * hw_mode_str(enum hostapd_hw_mode mode)
|
||||
+{
|
||||
+ switch (mode) {
|
||||
+ case HOSTAPD_MODE_IEEE80211B:
|
||||
+ return "b";
|
||||
+ case HOSTAPD_MODE_IEEE80211G:
|
||||
+ return "g";
|
||||
+ case HOSTAPD_MODE_IEEE80211A:
|
||||
+ return "a";
|
||||
+ case HOSTAPD_MODE_IEEE80211AD:
|
||||
+ return "ad";
|
||||
+ case HOSTAPD_MODE_IEEE80211ANY:
|
||||
+ return "any";
|
||||
+ case NUM_HOSTAPD_MODES:
|
||||
+ return "invalid";
|
||||
+ }
|
||||
+ return "unknown";
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
|
||||
static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen,
|
||||
size_t curr_len, const u8 *mcs_set)
|
||||
@@ -212,26 +232,6 @@ static const char * timeout_next_str(int
|
||||
}
|
||||
|
||||
|
||||
-static const char * hw_mode_str(enum hostapd_hw_mode mode)
|
||||
-{
|
||||
- switch (mode) {
|
||||
- case HOSTAPD_MODE_IEEE80211B:
|
||||
- return "b";
|
||||
- case HOSTAPD_MODE_IEEE80211G:
|
||||
- return "g";
|
||||
- case HOSTAPD_MODE_IEEE80211A:
|
||||
- return "a";
|
||||
- case HOSTAPD_MODE_IEEE80211AD:
|
||||
- return "ad";
|
||||
- case HOSTAPD_MODE_IEEE80211ANY:
|
||||
- return "any";
|
||||
- case NUM_HOSTAPD_MODES:
|
||||
- return "invalid";
|
||||
- }
|
||||
- return "unknown";
|
||||
-}
|
||||
-
|
||||
-
|
||||
static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
|
||||
struct sta_info *sta,
|
||||
char *buf, size_t buflen)
|
||||
@@ -493,6 +493,7 @@ int hostapd_ctrl_iface_sta_next(struct h
|
||||
return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_P2P_MANAGER
|
||||
static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
|
||||
@@ -884,12 +885,12 @@ int hostapd_ctrl_iface_status(struct hos
|
||||
return len;
|
||||
len += ret;
|
||||
}
|
||||
-
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
if (iface->conf->ieee80211n && !hapd->conf->disable_11n && mode) {
|
||||
len = hostapd_write_ht_mcs_bitmask(buf, buflen, len,
|
||||
mode->mcs_set);
|
||||
}
|
||||
-
|
||||
+#endif /* CONFIG_CTRL_IFACE_MIB */
|
||||
if (iface->current_rates && iface->num_rates) {
|
||||
ret = os_snprintf(buf + len, buflen - len, "supported_rates=");
|
||||
if (os_snprintf_error(buflen - len, ret))
|
||||
--- a/src/ap/ieee802_1x.c
|
||||
+++ b/src/ap/ieee802_1x.c
|
||||
@@ -2834,6 +2834,7 @@ static const char * bool_txt(bool val)
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
|
||||
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
||||
{
|
||||
@@ -3020,6 +3021,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
||||
return len;
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_HS20
|
||||
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
|
||||
--- a/src/ap/wpa_auth.c
|
||||
+++ b/src/ap/wpa_auth.c
|
||||
@@ -5328,6 +5328,7 @@ static const char * wpa_bool_txt(int val
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
@@ -5480,7 +5481,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||
|
||||
return len;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
|
||||
void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth)
|
||||
{
|
||||
--- a/src/rsn_supp/wpa.c
|
||||
+++ b/src/rsn_supp/wpa.c
|
||||
@@ -3834,6 +3834,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
|
||||
}
|
||||
|
||||
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
+
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
|
||||
@@ -3915,6 +3917,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
||||
|
||||
return (int) len;
|
||||
}
|
||||
+#endif
|
||||
#endif /* CONFIG_CTRL_IFACE */
|
||||
|
||||
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1499,7 +1499,7 @@ int wpas_ap_wps_nfc_report_handover(stru
|
||||
#endif /* CONFIG_WPS */
|
||||
|
||||
|
||||
-#ifdef CONFIG_CTRL_IFACE
|
||||
+#if defined(CONFIG_CTRL_IFACE) && defined(CONFIG_CTRL_IFACE_MIB)
|
||||
|
||||
int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
|
||||
char *buf, size_t buflen)
|
||||
--- a/wpa_supplicant/ctrl_iface.c
|
||||
+++ b/wpa_supplicant/ctrl_iface.c
|
||||
@@ -12493,6 +12493,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
} else if (os_strcmp(buf, "UPDATE_BEACON") == 0) {
|
||||
if (wpas_ap_update_beacon(wpa_s))
|
||||
reply_len = -1;
|
||||
+#ifdef CONFIG_CTRL_IFACE_MIB
|
||||
} else if (os_strncmp(buf, "ACCEPT_ACL ", 11) == 0) {
|
||||
if (os_strncmp(buf + 11, "ADD_MAC ", 8) == 0) {
|
||||
if (ap_ctrl_iface_acl_add_mac(wpa_s,
|
||||
@@ -12545,6 +12546,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
} else {
|
||||
reply_len = -1;
|
||||
}
|
||||
+#endif
|
||||
#endif /* CONFIG_AP */
|
||||
} else if (os_strcmp(buf, "SUSPEND") == 0) {
|
||||
wpas_notify_suspend(wpa_s->global);
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From 0111fae9ca0184e10b60494c4ecdc27f2636bc17 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/hostapd_cli.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
|
||||
index 60396f3da..ad39aeb3b 100644
|
||||
--- a/hostapd/hostapd_cli.c
|
||||
+++ b/hostapd/hostapd_cli.c
|
||||
@@ -744,7 +744,7 @@ static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, const char *cmd,
|
||||
@@ -757,7 +757,7 @@ static int wpa_ctrl_command_sta(struct w
|
||||
}
|
||||
|
||||
buf[len] = '\0';
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From 09a00a07a0db13618bad412c058c9d4786f2264b Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/common/wpa_common.c | 40 ++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 38 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
|
||||
index 587cd88b2..2b2b09fb9 100644
|
||||
--- a/src/common/wpa_common.c
|
||||
+++ b/src/common/wpa_common.c
|
||||
@@ -2451,6 +2451,31 @@ u32 wpa_akm_to_suite(int akm)
|
||||
@@ -2719,6 +2719,31 @@ u32 wpa_akm_to_suite(int akm)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -42,7 +32,7 @@ index 587cd88b2..2b2b09fb9 100644
|
|||
int wpa_compare_rsn_ie(int ft_initial_assoc,
|
||||
const u8 *ie1, size_t ie1len,
|
||||
const u8 *ie2, size_t ie2len)
|
||||
@@ -2458,8 +2483,19 @@ int wpa_compare_rsn_ie(int ft_initial_assoc,
|
||||
@@ -2726,8 +2751,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
|
||||
if (ie1 == NULL || ie2 == NULL)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From 1c7809b15fab60dd8781248bd53ee4760d3c3ace Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/ap/wps_hostapd.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c
|
||||
index aacfa3372..0c351af5f 100644
|
||||
--- a/src/ap/wps_hostapd.c
|
||||
+++ b/src/ap/wps_hostapd.c
|
||||
@@ -394,9 +394,8 @@ static int hapd_wps_reconfig_in_memory(struct hostapd_data *hapd,
|
||||
@@ -394,9 +394,8 @@ static int hapd_wps_reconfig_in_memory(s
|
||||
bss->wpa_pairwise |= WPA_CIPHER_GCMP;
|
||||
else
|
||||
bss->wpa_pairwise |= WPA_CIPHER_CCMP;
|
||||
|
|
@ -21,7 +11,7 @@ index aacfa3372..0c351af5f 100644
|
|||
bss->wpa_pairwise |= WPA_CIPHER_TKIP;
|
||||
#endif /* CONFIG_NO_TKIP */
|
||||
bss->rsn_pairwise = bss->wpa_pairwise;
|
||||
@@ -1181,8 +1180,7 @@ int hostapd_init_wps(struct hostapd_data *hapd,
|
||||
@@ -1181,8 +1180,7 @@ int hostapd_init_wps(struct hostapd_data
|
||||
WPA_CIPHER_GCMP_256)) {
|
||||
wps->encr_types |= WPS_ENCR_AES;
|
||||
wps->encr_types_rsn |= WPS_ENCR_AES;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
From 833a09ecb52559b9dcef824ff29620d12a88f085 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/utils/wpa_debug.c | 36 ++++------------------
|
||||
src/utils/wpa_debug.h | 69 +++++++++++++++++++++++++++++++++++++------
|
||||
2 files changed, 65 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c
|
||||
index a338a2039..a887d60b3 100644
|
||||
--- a/src/utils/wpa_debug.c
|
||||
+++ b/src/utils/wpa_debug.c
|
||||
@@ -206,7 +206,7 @@ void wpa_debug_close_linux_tracing(void)
|
||||
|
|
@ -20,7 +9,7 @@ index a338a2039..a887d60b3 100644
|
|||
{
|
||||
va_list ap;
|
||||
|
||||
@@ -255,7 +255,7 @@ void wpa_printf(int level, const char *fmt, ...)
|
||||
@@ -255,7 +255,7 @@ void wpa_printf(int level, const char *f
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -29,7 +18,7 @@ index a338a2039..a887d60b3 100644
|
|||
size_t len, int show, int only_syslog)
|
||||
{
|
||||
size_t i;
|
||||
@@ -382,19 +382,7 @@ static void _wpa_hexdump(int level, const char *title, const u8 *buf,
|
||||
@@ -382,19 +382,7 @@ static void _wpa_hexdump(int level, cons
|
||||
#endif /* CONFIG_ANDROID_LOG */
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +60,7 @@ index a338a2039..a887d60b3 100644
|
|||
#ifdef CONFIG_DEBUG_FILE
|
||||
static char *last_path = NULL;
|
||||
#endif /* CONFIG_DEBUG_FILE */
|
||||
@@ -636,7 +610,7 @@ void wpa_msg_register_ifname_cb(wpa_msg_get_ifname_func func)
|
||||
@@ -644,7 +618,7 @@ void wpa_msg_register_ifname_cb(wpa_msg_
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -80,7 +69,7 @@ index a338a2039..a887d60b3 100644
|
|||
{
|
||||
va_list ap;
|
||||
char *buf;
|
||||
@@ -674,7 +648,7 @@ void wpa_msg(void *ctx, int level, const char *fmt, ...)
|
||||
@@ -682,7 +656,7 @@ void wpa_msg(void *ctx, int level, const
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -89,13 +78,11 @@ index a338a2039..a887d60b3 100644
|
|||
{
|
||||
va_list ap;
|
||||
char *buf;
|
||||
diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h
|
||||
index c6d5cc647..824538b41 100644
|
||||
--- a/src/utils/wpa_debug.h
|
||||
+++ b/src/utils/wpa_debug.h
|
||||
@@ -50,6 +50,17 @@ int wpa_debug_reopen_file(void);
|
||||
void wpa_debug_close_file(void);
|
||||
@@ -51,6 +51,17 @@ void wpa_debug_close_file(void);
|
||||
void wpa_debug_setup_stdout(void);
|
||||
void wpa_debug_stop_log(void);
|
||||
|
||||
+/* internal */
|
||||
+void _wpa_hexdump(int level, const char *title, const u8 *buf,
|
||||
|
|
@ -111,7 +98,7 @@ index c6d5cc647..824538b41 100644
|
|||
/**
|
||||
* wpa_debug_printf_timestamp - Print timestamp for debug output
|
||||
*
|
||||
@@ -70,9 +81,15 @@ void wpa_debug_print_timestamp(void);
|
||||
@@ -71,9 +82,15 @@ void wpa_debug_print_timestamp(void);
|
||||
*
|
||||
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
||||
*/
|
||||
|
|
@ -128,7 +115,7 @@ index c6d5cc647..824538b41 100644
|
|||
/**
|
||||
* wpa_hexdump - conditional hex dump
|
||||
* @level: priority level (MSG_*) of the message
|
||||
@@ -84,7 +101,13 @@ PRINTF_FORMAT(2, 3);
|
||||
@@ -85,7 +102,13 @@ PRINTF_FORMAT(2, 3);
|
||||
* output may be directed to stdout, stderr, and/or syslog based on
|
||||
* configuration. The contents of buf is printed out has hex dump.
|
||||
*/
|
||||
|
|
@ -143,7 +130,7 @@ index c6d5cc647..824538b41 100644
|
|||
|
||||
static inline void wpa_hexdump_buf(int level, const char *title,
|
||||
const struct wpabuf *buf)
|
||||
@@ -106,7 +129,13 @@ static inline void wpa_hexdump_buf(int level, const char *title,
|
||||
@@ -107,7 +130,13 @@ static inline void wpa_hexdump_buf(int l
|
||||
* like wpa_hexdump(), but by default, does not include secret keys (passwords,
|
||||
* etc.) in debug output.
|
||||
*/
|
||||
|
|
@ -158,7 +145,7 @@ index c6d5cc647..824538b41 100644
|
|||
|
||||
static inline void wpa_hexdump_buf_key(int level, const char *title,
|
||||
const struct wpabuf *buf)
|
||||
@@ -128,8 +157,14 @@ static inline void wpa_hexdump_buf_key(int level, const char *title,
|
||||
@@ -129,8 +158,14 @@ static inline void wpa_hexdump_buf_key(i
|
||||
* the hex numbers and ASCII characters (for printable range) are shown. 16
|
||||
* bytes per line will be shown.
|
||||
*/
|
||||
|
|
@ -175,7 +162,7 @@ index c6d5cc647..824538b41 100644
|
|||
|
||||
/**
|
||||
* wpa_hexdump_ascii_key - conditional hex dump, hide keys
|
||||
@@ -145,8 +180,14 @@ void wpa_hexdump_ascii(int level, const char *title, const void *buf,
|
||||
@@ -146,8 +181,14 @@ void wpa_hexdump_ascii(int level, const
|
||||
* bytes per line will be shown. This works like wpa_hexdump_ascii(), but by
|
||||
* default, does not include secret keys (passwords, etc.) in debug output.
|
||||
*/
|
||||
|
|
@ -192,7 +179,7 @@ index c6d5cc647..824538b41 100644
|
|||
|
||||
/*
|
||||
* wpa_dbg() behaves like wpa_msg(), but it can be removed from build to reduce
|
||||
@@ -183,7 +224,12 @@ void wpa_hexdump_ascii_key(int level, const char *title, const void *buf,
|
||||
@@ -184,7 +225,12 @@ void wpa_hexdump_ascii_key(int level, co
|
||||
*
|
||||
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
||||
*/
|
||||
|
|
@ -206,7 +193,7 @@ index c6d5cc647..824538b41 100644
|
|||
|
||||
/**
|
||||
* wpa_msg_ctrl - Conditional printf for ctrl_iface monitors
|
||||
@@ -197,8 +243,13 @@ void wpa_msg(void *ctx, int level, const char *fmt, ...) PRINTF_FORMAT(3, 4);
|
||||
@@ -198,8 +244,13 @@ void wpa_msg(void *ctx, int level, const
|
||||
* attached ctrl_iface monitors. In other words, it can be used for frequent
|
||||
* events that do not need to be sent to syslog.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
From 86099ab5f18972ae8fb503c2f3eead226486cb2d Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/main.c | 6 ++++--
|
||||
wpa_supplicant/main.c | 11 ++++++++---
|
||||
2 files changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hostapd/main.c b/hostapd/main.c
|
||||
index 6a7b91bf2..0c972bba9 100644
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -31,7 +31,7 @@
|
||||
|
|
@ -20,7 +9,7 @@ index 6a7b91bf2..0c972bba9 100644
|
|||
|
||||
struct hapd_global {
|
||||
void **drv_priv;
|
||||
@@ -692,7 +692,7 @@ int main(int argc, char *argv[])
|
||||
@@ -786,7 +786,7 @@ int main(int argc, char *argv[])
|
||||
wpa_supplicant_event = hostapd_wpa_event;
|
||||
wpa_supplicant_event_global = hostapd_wpa_event_global;
|
||||
for (;;) {
|
||||
|
|
@ -29,7 +18,7 @@ index 6a7b91bf2..0c972bba9 100644
|
|||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -729,6 +729,8 @@ int main(int argc, char *argv[])
|
||||
@@ -823,6 +823,8 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
#endif /* CONFIG_DEBUG_LINUX_TRACING */
|
||||
case 'v':
|
||||
|
|
@ -38,8 +27,6 @@ index 6a7b91bf2..0c972bba9 100644
|
|||
show_version();
|
||||
exit(1);
|
||||
case 'g':
|
||||
diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
|
||||
index 535923ecd..5ebda5a67 100644
|
||||
--- a/wpa_supplicant/main.c
|
||||
+++ b/wpa_supplicant/main.c
|
||||
@@ -12,6 +12,7 @@
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From cbf654d789340c578f1cd6648670f7c242c8dcfa Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/hostapd_cli.c | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
|
||||
index ad39aeb3b..6b5387869 100644
|
||||
--- a/hostapd/hostapd_cli.c
|
||||
+++ b/hostapd/hostapd_cli.c
|
||||
@@ -388,7 +388,6 @@ static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -401,7 +401,6 @@ static int hostapd_cli_cmd_disassociate(
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -18,7 +8,7 @@ index ad39aeb3b..6b5387869 100644
|
|||
static int hostapd_cli_cmd_signature(struct wpa_ctrl *ctrl, int argc,
|
||||
char *argv[])
|
||||
{
|
||||
@@ -401,7 +400,6 @@ static int hostapd_cli_cmd_signature(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -414,7 +413,6 @@ static int hostapd_cli_cmd_signature(str
|
||||
os_snprintf(buf, sizeof(buf), "SIGNATURE %s", argv[0]);
|
||||
return wpa_ctrl_command(ctrl, buf);
|
||||
}
|
||||
|
|
@ -26,7 +16,7 @@ index ad39aeb3b..6b5387869 100644
|
|||
|
||||
|
||||
static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -418,7 +416,6 @@ static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -431,7 +429,6 @@ static int hostapd_cli_cmd_sa_query(stru
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -34,7 +24,7 @@ index ad39aeb3b..6b5387869 100644
|
|||
static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc,
|
||||
char *argv[])
|
||||
{
|
||||
@@ -644,7 +641,6 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -657,7 +654,6 @@ static int hostapd_cli_cmd_wps_config(st
|
||||
ssid_hex, argv[1]);
|
||||
return wpa_ctrl_command(ctrl, buf);
|
||||
}
|
||||
|
|
@ -42,7 +32,7 @@ index ad39aeb3b..6b5387869 100644
|
|||
|
||||
|
||||
static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -1579,13 +1575,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
|
||||
@@ -1610,13 +1606,10 @@ static const struct hostapd_cli_cmd host
|
||||
{ "disassociate", hostapd_cli_cmd_disassociate,
|
||||
hostapd_complete_stations,
|
||||
"<addr> = disassociate a station" },
|
||||
|
|
@ -56,7 +46,7 @@ index ad39aeb3b..6b5387869 100644
|
|||
{ "wps_pin", hostapd_cli_cmd_wps_pin, NULL,
|
||||
"<uuid> <pin> [timeout] [addr] = add WPS Enrollee PIN" },
|
||||
{ "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL,
|
||||
@@ -1610,7 +1603,6 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
|
||||
@@ -1641,7 +1634,6 @@ static const struct hostapd_cli_cmd host
|
||||
"<SSID> <auth> <encr> <key> = configure AP" },
|
||||
{ "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL,
|
||||
"= show current WPS status" },
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
From ee90e69b78884550b098dff70cd9df02834d6a21 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
wpa_supplicant/wpa_cli.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
|
||||
index 0e2315d25..91e07427f 100644
|
||||
--- a/wpa_supplicant/wpa_cli.c
|
||||
+++ b/wpa_supplicant/wpa_cli.c
|
||||
@@ -26,6 +26,15 @@
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
From 5c6d5f192b60fc0dd14085af9e4e530dbc7f359d Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/drivers/linux_wext.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/drivers/linux_wext.h b/src/drivers/linux_wext.h
|
||||
index e7c7001e1..1cb890974 100644
|
||||
--- a/src/drivers/linux_wext.h
|
||||
+++ b/src/drivers/linux_wext.h
|
||||
@@ -26,6 +26,7 @@ typedef int32_t __s32;
|
||||
typedef uint16_t __u16;
|
||||
typedef int16_t __s16;
|
||||
typedef uint8_t __u8;
|
||||
+typedef int8_t __s8;
|
||||
#ifndef __user
|
||||
#define __user
|
||||
#endif /* __user */
|
||||
|
|
@ -1,13 +1,3 @@
|
|||
From 45669a452a963ac83bb788d66879f58e6feb894e Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/main.c | 29 +++++++++++++----------------
|
||||
1 file changed, 13 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/hostapd/main.c b/hostapd/main.c
|
||||
index 0c972bba9..859ff3046 100644
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -39,6 +39,8 @@ struct hapd_global {
|
||||
|
|
@ -19,7 +9,7 @@ index 0c972bba9..859ff3046 100644
|
|||
|
||||
|
||||
#ifndef CONFIG_NO_HOSTAPD_LOGGER
|
||||
@@ -146,6 +148,14 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
|
||||
@@ -146,6 +148,14 @@ static void hostapd_logger_cb(void *ctx,
|
||||
}
|
||||
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
|
||||
|
||||
|
|
@ -34,16 +24,16 @@ index 0c972bba9..859ff3046 100644
|
|||
|
||||
/**
|
||||
* hostapd_driver_init - Preparate driver interface
|
||||
@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
|
||||
return -1;
|
||||
@@ -217,6 +227,8 @@ static int hostapd_driver_init(struct ho
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
|
||||
+ hapd->setup_complete_cb = hostapd_setup_complete_cb;
|
||||
+
|
||||
/* Initialize the driver interface */
|
||||
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
|
||||
b = NULL;
|
||||
@@ -404,8 +416,6 @@ static void hostapd_global_deinit(const char *pid_file, int eloop_initialized)
|
||||
@@ -497,8 +509,6 @@ static void hostapd_global_deinit(const
|
||||
#endif /* CONFIG_NATIVE_WINDOWS */
|
||||
|
||||
eap_server_unregister_methods();
|
||||
|
|
@ -52,7 +42,7 @@ index 0c972bba9..859ff3046 100644
|
|||
}
|
||||
|
||||
|
||||
@@ -431,18 +441,6 @@ static int hostapd_global_run(struct hapd_interfaces *ifaces, int daemonize,
|
||||
@@ -524,18 +534,6 @@ static int hostapd_global_run(struct hap
|
||||
}
|
||||
#endif /* EAP_SERVER_TNC */
|
||||
|
||||
|
|
@ -71,7 +61,7 @@ index 0c972bba9..859ff3046 100644
|
|||
eloop_run();
|
||||
|
||||
return 0;
|
||||
@@ -645,8 +643,7 @@ int main(int argc, char *argv[])
|
||||
@@ -739,8 +737,7 @@ int main(int argc, char *argv[])
|
||||
struct hapd_interfaces interfaces;
|
||||
int ret = 1;
|
||||
size_t i, j;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
From a25ddcc5458fce3ca367d3d24d2a6ba8e7291689 Mon Sep 17 00:00:00 2001
|
||||
From 4bb69d15477e0f2b00e166845341dc933de47c58 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Quartulli <ordex@autistici.org>
|
||||
Date: Sun, 3 Jun 2012 18:22:56 +0200
|
||||
Subject: [PATCH] wpa_supplicant: add new config params to be used with the
|
||||
ibss join command
|
||||
Subject: [PATCHv2 601/602] wpa_supplicant: add new config params to be used
|
||||
with the ibss join command
|
||||
|
||||
Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
|
||||
---
|
||||
src/drivers/driver.h | 4 ++
|
||||
wpa_supplicant/config.c | 94 +++++++++++++++++++++++++++++++++
|
||||
wpa_supplicant/config_ssid.h | 5 ++
|
||||
wpa_supplicant/wpa_supplicant.c | 6 +++
|
||||
4 files changed, 109 insertions(+)
|
||||
src/drivers/driver.h | 6 +++
|
||||
wpa_supplicant/config.c | 96 +++++++++++++++++++++++++++++++++++++++
|
||||
wpa_supplicant/config_ssid.h | 6 +++
|
||||
wpa_supplicant/wpa_supplicant.c | 23 +++++++---
|
||||
4 files changed, 124 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
|
||||
index f7dfcc165..3c2a25ce8 100644
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -19,6 +19,7 @@
|
||||
|
|
@ -25,7 +22,7 @@ index f7dfcc165..3c2a25ce8 100644
|
|||
#include "common/defs.h"
|
||||
#include "common/ieee802_11_defs.h"
|
||||
#include "common/wpa_common.h"
|
||||
@@ -893,6 +894,9 @@ struct wpa_driver_associate_params {
|
||||
@@ -953,6 +954,9 @@ struct wpa_driver_associate_params {
|
||||
* responsible for selecting with which BSS to associate. */
|
||||
const u8 *bssid;
|
||||
|
||||
|
|
@ -35,8 +32,6 @@ index f7dfcc165..3c2a25ce8 100644
|
|||
/**
|
||||
* bssid_hint - BSSID of a proposed AP
|
||||
*
|
||||
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
|
||||
index ec8301ab9..57a8dd4fb 100644
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
|
@ -47,7 +42,7 @@ index ec8301ab9..57a8dd4fb 100644
|
|||
#include "config.h"
|
||||
|
||||
|
||||
@@ -2321,6 +2322,97 @@ static char * wpa_config_write_peerkey(const struct parse_data *data,
|
||||
@@ -2389,6 +2390,97 @@ static char * wpa_config_write_mac_value
|
||||
#endif /* NO_CONFIG_WRITE */
|
||||
|
||||
|
||||
|
|
@ -145,7 +140,7 @@ index ec8301ab9..57a8dd4fb 100644
|
|||
/* Helper macros for network block parser */
|
||||
|
||||
#ifdef OFFSET
|
||||
@@ -2605,6 +2697,8 @@ static const struct parse_data ssid_fields[] = {
|
||||
@@ -2674,6 +2766,8 @@ static const struct parse_data ssid_fiel
|
||||
{ INT(ap_max_inactivity) },
|
||||
{ INT(dtim_period) },
|
||||
{ INT(beacon_int) },
|
||||
|
|
@ -154,8 +149,6 @@ index ec8301ab9..57a8dd4fb 100644
|
|||
#ifdef CONFIG_MACSEC
|
||||
{ INT_RANGE(macsec_policy, 0, 1) },
|
||||
{ INT_RANGE(macsec_integ_only, 0, 1) },
|
||||
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
|
||||
index d5c90122a..de664371c 100644
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -10,8 +10,10 @@
|
||||
|
|
@ -169,7 +162,7 @@ index d5c90122a..de664371c 100644
|
|||
|
||||
|
||||
#define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
|
||||
@@ -846,6 +848,9 @@ struct wpa_ssid {
|
||||
@@ -879,6 +881,9 @@ struct wpa_ssid {
|
||||
*/
|
||||
void *parent_cred;
|
||||
|
||||
|
|
@ -179,11 +172,9 @@ index d5c90122a..de664371c 100644
|
|||
#ifdef CONFIG_MACSEC
|
||||
/**
|
||||
* macsec_policy - Determines the policy for MACsec secure session
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index c18723384..605b81179 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -3883,6 +3883,12 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
|
||||
@@ -4203,6 +4203,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
params.beacon_int = ssid->beacon_int;
|
||||
else
|
||||
params.beacon_int = wpa_s->conf->beacon_int;
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
From 62c9667d1f53d9e7612352b497b67224063049bb Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Quartulli <ordex@autistici.org>
|
||||
Date: Sun, 3 Jun 2012 18:42:25 +0200
|
||||
Subject: [PATCH] driver_nl80211: use new parameters during ibss join
|
||||
|
||||
Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 33 ++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index a9ae0fbe2..17875670d 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -5994,7 +5994,7 @@ static int wpa_driver_nl80211_ibss(struct wpa_driver_nl80211_data *drv,
|
||||
struct wpa_driver_associate_params *params)
|
||||
{
|
||||
struct nl_msg *msg;
|
||||
- int ret = -1;
|
||||
+ int ret = -1, i;
|
||||
int count = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
|
||||
@@ -6021,6 +6021,37 @@ retry:
|
||||
nl80211_put_beacon_int(msg, params->beacon_int))
|
||||
goto fail;
|
||||
|
||||
+ if (params->fixed_freq) {
|
||||
+ wpa_printf(MSG_DEBUG, " * fixed_freq");
|
||||
+ nla_put_flag(msg, NL80211_ATTR_FREQ_FIXED);
|
||||
+ }
|
||||
+
|
||||
+ if (params->beacon_int > 0) {
|
||||
+ wpa_printf(MSG_DEBUG, " * beacon_int=%d",
|
||||
+ params->beacon_int);
|
||||
+ nla_put_u32(msg, NL80211_ATTR_BEACON_INTERVAL,
|
||||
+ params->beacon_int);
|
||||
+ }
|
||||
+
|
||||
+ if (params->rates[0] > 0) {
|
||||
+ wpa_printf(MSG_DEBUG, " * basic_rates:");
|
||||
+ i = 0;
|
||||
+ while (i < NL80211_MAX_SUPP_RATES &&
|
||||
+ params->rates[i] > 0) {
|
||||
+ wpa_printf(MSG_DEBUG, " %.1f",
|
||||
+ (double)params->rates[i] / 2);
|
||||
+ i++;
|
||||
+ }
|
||||
+ nla_put(msg, NL80211_ATTR_BSS_BASIC_RATES, i,
|
||||
+ params->rates);
|
||||
+ }
|
||||
+
|
||||
+ if (params->mcast_rate > 0) {
|
||||
+ wpa_printf(MSG_DEBUG, " * mcast_rate=%.1f",
|
||||
+ (double)params->mcast_rate / 10);
|
||||
+ nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate);
|
||||
+ }
|
||||
+
|
||||
ret = nl80211_set_conn_keys(params, msg);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
From e46daac3ce5e3d0d9c43f21fd895ecbab247d00e Mon Sep 17 00:00:00 2001
|
||||
From: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||
Date: Thu, 11 May 2017 08:21:45 +0200
|
||||
Subject: [PATCH] set mcast_rate in mesh mode
|
||||
|
|
@ -18,17 +17,9 @@ because newer drivers seem to support 802.11s but not IBSS anymore.
|
|||
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
|
||||
Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
|
||||
---
|
||||
src/drivers/driver.h | 1 +
|
||||
src/drivers/driver_nl80211.c | 13 +++++++++++++
|
||||
wpa_supplicant/mesh.c | 1 +
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
|
||||
index 3c2a25ce8..836c16b91 100644
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -1660,6 +1660,7 @@ struct wpa_driver_mesh_join_params {
|
||||
@@ -1827,6 +1827,7 @@ struct wpa_driver_mesh_join_params {
|
||||
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
|
||||
unsigned int flags;
|
||||
bool handle_dfs;
|
||||
|
|
@ -36,11 +27,9 @@ index 3c2a25ce8..836c16b91 100644
|
|||
};
|
||||
|
||||
struct wpa_driver_set_key_params {
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index 17875670d..69afdabbc 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10611,6 +10611,18 @@ static int nl80211_put_mesh_id(struct nl_msg *msg, const u8 *mesh_id,
|
||||
@@ -11626,6 +11626,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -59,7 +48,7 @@ index 17875670d..69afdabbc 100644
|
|||
static int nl80211_put_mesh_config(struct nl_msg *msg,
|
||||
struct wpa_driver_mesh_bss_params *params)
|
||||
{
|
||||
@@ -10672,6 +10684,7 @@ static int nl80211_join_mesh(struct i802_bss *bss,
|
||||
@@ -11687,6 +11699,7 @@ static int nl80211_join_mesh(struct i802
|
||||
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
||||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||
|
|
@ -67,11 +56,9 @@ index 17875670d..69afdabbc 100644
|
|||
nl80211_put_dtim_period(msg, params->dtim_period))
|
||||
goto fail;
|
||||
|
||||
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
|
||||
index ad067da67..2cbe8e366 100644
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -632,6 +632,7 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
|
||||
@@ -632,6 +632,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
|
||||
params->meshid = ssid->ssid;
|
||||
params->meshid_len = ssid->ssid_len;
|
||||
|
|
|
|||
|
|
@ -1,29 +1,13 @@
|
|||
From a6e07dbd4c1958c76cb12211a8787c709a2b0f74 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
wpa_supplicant/wpa_supplicant.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
||||
index 605b81179..4519cad0e 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2528,11 +2528,13 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||
for (j = 0; j < wpa_s->last_scan_res_used; j++) {
|
||||
struct wpa_bss *bss = wpa_s->last_scan_res[j];
|
||||
@@ -3094,6 +3094,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
|
||||
- if (ssid->mode != WPAS_MODE_IBSS)
|
||||
+ /* Don't adjust control freq in case of fixed_freq */
|
||||
+ if (ssid->fixed_freq) {
|
||||
+ obss_scan = 0;
|
||||
break;
|
||||
+ }
|
||||
freq->freq = ssid->frequency;
|
||||
|
||||
- /* Don't adjust control freq in case of fixed_freq */
|
||||
- if (ssid->fixed_freq)
|
||||
+ if (ssid->mode != WPAS_MODE_IBSS)
|
||||
break;
|
||||
+ if (ssid->fixed_freq) {
|
||||
+ obss_scan = 0;
|
||||
+ }
|
||||
+
|
||||
if (ssid->mode == WPAS_MODE_IBSS && !ssid->fixed_freq) {
|
||||
struct wpa_bss *bss = ibss_find_existing_bss(wpa_s, ssid);
|
||||
|
||||
if (!bss_is_ibss(bss))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 73289165d2871182af4ca7f95a099b53bef8e459 Mon Sep 17 00:00:00 2001
|
||||
From c9304d3303d563ad6d2619f4e07864ed12f96889 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sat, 14 May 2022 21:41:03 +0200
|
||||
Subject: [PATCH] hostapd: config: support random BSS color
|
||||
|
|
@ -7,16 +7,13 @@ Configure the HE BSS color to a random value in case the config defines
|
|||
a BSS color which exceeds the max BSS color (63).
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 03b902076..bc988d0dd 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3485,6 +3485,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -3498,6 +3498,8 @@ static int hostapd_config_fill(struct ho
|
||||
} else if (os_strcmp(buf, "he_bss_color") == 0) {
|
||||
conf->he_op.he_bss_color = atoi(pos) & 0x3f;
|
||||
conf->he_op.he_bss_color_disabled = 0;
|
||||
|
|
|
|||
|
|
@ -1,34 +1,29 @@
|
|||
From 78ec7a84dd829e4dbc0bfd2d9c82d7c1a06467ef Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
src/ap/acs.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/ap/acs.c b/src/ap/acs.c
|
||||
index faaedbfdb..a24e5410c 100644
|
||||
--- a/src/ap/acs.c
|
||||
+++ b/src/ap/acs.c
|
||||
@@ -420,20 +420,19 @@ static int acs_usable_bw160_chan(const struct hostapd_channel_data *chan)
|
||||
@@ -455,17 +455,17 @@ static int acs_get_bw_center_chan(int fr
|
||||
static int acs_survey_is_sufficient(struct freq_survey *survey)
|
||||
{
|
||||
if (!(survey->filled & SURVEY_HAS_NF)) {
|
||||
+ survey->nf = -95;
|
||||
wpa_printf(MSG_INFO, "ACS: Survey is missing noise floor");
|
||||
wpa_printf(MSG_INFO,
|
||||
"ACS: Survey for freq %d is missing noise floor",
|
||||
survey->freq);
|
||||
- return 0;
|
||||
}
|
||||
|
||||
if (!(survey->filled & SURVEY_HAS_CHAN_TIME)) {
|
||||
+ survey->channel_time = 0;
|
||||
wpa_printf(MSG_INFO, "ACS: Survey is missing channel time");
|
||||
wpa_printf(MSG_INFO,
|
||||
"ACS: Survey for freq %d is missing channel time",
|
||||
survey->freq);
|
||||
- return 0;
|
||||
}
|
||||
|
||||
if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
|
||||
!(survey->filled & SURVEY_HAS_CHAN_TIME_RX)) {
|
||||
@@ -473,7 +473,6 @@ static int acs_survey_is_sufficient(stru
|
||||
wpa_printf(MSG_INFO,
|
||||
"ACS: Survey is missing RX and busy time (at least one is required)");
|
||||
"ACS: Survey for freq %d is missing RX and busy time (at least one is required)",
|
||||
survey->freq);
|
||||
- return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,6 @@
|
|||
From 7220bb0ffbb1b6ed518f7b258e454bbd5b6fb75a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
hostapd/Makefile | 4 ++--
|
||||
wpa_supplicant/Makefile | 10 +++++-----
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hostapd/Makefile b/hostapd/Makefile
|
||||
index 6a125ed80..19a88e0fd 100644
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -1307,7 +1307,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
|
||||
@@ -1396,7 +1396,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
|
||||
@$(AR) cr $@ hostapd_multi.o $(OBJS)
|
||||
|
||||
hostapd: $(OBJS)
|
||||
|
|
@ -20,7 +9,7 @@ index 6a125ed80..19a88e0fd 100644
|
|||
@$(E) " LD " $@
|
||||
|
||||
ifdef CONFIG_WPA_TRACE
|
||||
@@ -1318,7 +1318,7 @@ _OBJS_VAR := OBJS_c
|
||||
@@ -1407,7 +1407,7 @@ _OBJS_VAR := OBJS_c
|
||||
include ../src/objs.mk
|
||||
|
||||
hostapd_cli: $(OBJS_c)
|
||||
|
|
@ -29,11 +18,9 @@ index 6a125ed80..19a88e0fd 100644
|
|||
@$(E) " LD " $@
|
||||
|
||||
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
|
||||
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
|
||||
index 57a89edcb..10f6da71c 100644
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -1949,31 +1949,31 @@ wpa_supplicant_multi.a: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
@@ -2039,31 +2039,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
||||
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
||||
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
|
|
|
|||
|
|
@ -1,22 +1,9 @@
|
|||
From 4725c6a64dee96e3d3b7d906dfc9679d3f4a3190 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:28 +0000
|
||||
|
||||
---
|
||||
src/ap/hostapd.h | 18 ++++++++++++++++++
|
||||
src/ap/rrm.c | 2 ++
|
||||
src/ap/wnm_ap.c | 6 ++++++
|
||||
3 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
|
||||
index cbe03a060..5d867f086 100644
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -150,6 +150,21 @@ struct hostapd_sae_commit_queue {
|
||||
u8 msg[];
|
||||
@@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
|
||||
};
|
||||
|
||||
+/**
|
||||
/**
|
||||
+ * struct hostapd_openwrt_stats - OpenWrt custom STA/AP statistics
|
||||
+ */
|
||||
+struct hostapd_openwrt_stats {
|
||||
|
|
@ -31,12 +18,13 @@ index cbe03a060..5d867f086 100644
|
|||
+ } wnm;
|
||||
+};
|
||||
+
|
||||
/**
|
||||
+/**
|
||||
* struct hostapd_data - hostapd per-BSS data structure
|
||||
*/
|
||||
@@ -164,6 +179,9 @@ struct hostapd_data {
|
||||
struct hostapd_data {
|
||||
@@ -182,6 +197,9 @@ struct hostapd_data {
|
||||
|
||||
u8 own_addr[ETH_ALEN];
|
||||
struct hostapd_data *mld_first_bss;
|
||||
|
||||
+ /* OpenWrt specific statistics */
|
||||
+ struct hostapd_openwrt_stats openwrt_stats;
|
||||
|
|
@ -44,24 +32,9 @@ index cbe03a060..5d867f086 100644
|
|||
int num_sta; /* number of entries in sta_list */
|
||||
struct sta_info *sta_list; /* STA info list head */
|
||||
#define STA_HASH_SIZE 256
|
||||
diff --git a/src/ap/rrm.c b/src/ap/rrm.c
|
||||
index f2d5cd16e..1aa9aa89f 100644
|
||||
--- a/src/ap/rrm.c
|
||||
+++ b/src/ap/rrm.c
|
||||
@@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp(struct hostapd_data *hapd,
|
||||
}
|
||||
}
|
||||
|
||||
+ hapd->openwrt_stats.rrm.neighbor_report_tx++;
|
||||
+
|
||||
hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
|
||||
wpabuf_head(buf), wpabuf_len(buf));
|
||||
wpabuf_free(buf);
|
||||
diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
|
||||
index 23a352c9b..fde743acc 100644
|
||||
--- a/src/ap/wnm_ap.c
|
||||
+++ b/src/ap/wnm_ap.c
|
||||
@@ -386,6 +386,7 @@ static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
|
||||
@@ -386,6 +386,7 @@ static int ieee802_11_send_bss_trans_mgm
|
||||
mgmt->u.action.u.bss_tm_req.validity_interval = 1;
|
||||
pos = mgmt->u.action.u.bss_tm_req.variable;
|
||||
|
||||
|
|
@ -69,9 +42,9 @@ index 23a352c9b..fde743acc 100644
|
|||
wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to "
|
||||
MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u "
|
||||
"validity_interval=%u",
|
||||
@@ -659,10 +660,12 @@ int ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd,
|
||||
|
||||
switch (action) {
|
||||
@@ -790,10 +791,12 @@ int ieee802_11_rx_wnm_action_ap(struct h
|
||||
plen);
|
||||
return 0;
|
||||
case WNM_BSS_TRANS_MGMT_QUERY:
|
||||
+ hapd->openwrt_stats.wnm.bss_transition_query_rx++;
|
||||
ieee802_11_rx_bss_trans_mgmt_query(hapd, mgmt->sa, payload,
|
||||
|
|
@ -82,7 +55,7 @@ index 23a352c9b..fde743acc 100644
|
|||
ieee802_11_rx_bss_trans_mgmt_resp(hapd, mgmt->sa, payload,
|
||||
plen);
|
||||
return 0;
|
||||
@@ -709,6 +712,7 @@ int wnm_send_disassoc_imminent(struct hostapd_data *hapd,
|
||||
@@ -840,6 +843,7 @@ int wnm_send_disassoc_imminent(struct ho
|
||||
|
||||
pos = mgmt->u.action.u.bss_tm_req.variable;
|
||||
|
||||
|
|
@ -90,7 +63,7 @@ index 23a352c9b..fde743acc 100644
|
|||
wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request frame to indicate imminent disassociation (disassoc_timer=%d) to "
|
||||
MACSTR, disassoc_timer, MAC2STR(sta->addr));
|
||||
if (hostapd_drv_send_mlme(hapd, buf, pos - buf, 0, NULL, 0, 0) < 0) {
|
||||
@@ -790,6 +794,7 @@ int wnm_send_ess_disassoc_imminent(struct hostapd_data *hapd,
|
||||
@@ -921,6 +925,7 @@ int wnm_send_ess_disassoc_imminent(struc
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +71,7 @@ index 23a352c9b..fde743acc 100644
|
|||
if (disassoc_timer) {
|
||||
/* send disassociation frame after time-out */
|
||||
set_disassoc_timer(hapd, sta, disassoc_timer);
|
||||
@@ -870,6 +875,7 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
@@ -1001,6 +1006,7 @@ int wnm_send_bss_tm_req(struct hostapd_d
|
||||
}
|
||||
os_free(buf);
|
||||
|
||||
|
|
@ -106,3 +79,14 @@ index 23a352c9b..fde743acc 100644
|
|||
if (disassoc_timer) {
|
||||
/* send disassociation frame after time-out */
|
||||
set_disassoc_timer(hapd, sta, disassoc_timer);
|
||||
--- a/src/ap/rrm.c
|
||||
+++ b/src/ap/rrm.c
|
||||
@@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp
|
||||
}
|
||||
}
|
||||
|
||||
+ hapd->openwrt_stats.rrm.neighbor_report_tx++;
|
||||
+
|
||||
hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
|
||||
wpabuf_head(buf), wpabuf_len(buf));
|
||||
wpabuf_free(buf);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
From 8b94367a604589d061f40f7e22b38bf59e702c9c Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 14:41:09 +0200
|
||||
|
||||
---
|
||||
wpa_supplicant/wps_supplicant.h | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/wpa_supplicant/wps_supplicant.h b/wpa_supplicant/wps_supplicant.h
|
||||
index c55936cee..52fb13bc1 100644
|
||||
--- a/wpa_supplicant/wps_supplicant.h
|
||||
+++ b/wpa_supplicant/wps_supplicant.h
|
||||
@@ -9,6 +9,7 @@
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
From a1d6be648f6aa12d34bc4cfe8fb1c40ce4d1d427 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:28 +0000
|
||||
|
||||
---
|
||||
src/common/wpa_ctrl.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
|
||||
index 7e197f094..791fdbf93 100644
|
||||
--- a/src/common/wpa_ctrl.c
|
||||
+++ b/src/common/wpa_ctrl.c
|
||||
@@ -135,7 +135,7 @@ try_again:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index bc988d0dd..67b385ded 100644
|
||||
index e0589d540..ec7955179 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2412,6 +2412,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -2418,6 +2418,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
bss->isolate = atoi(pos);
|
||||
} else if (os_strcmp(buf, "ap_max_inactivity") == 0) {
|
||||
bss->ap_max_inactivity = atoi(pos);
|
||||
|
|
@ -10,21 +10,12 @@ index bc988d0dd..67b385ded 100644
|
|||
+ bss->config_id = os_strdup(pos);
|
||||
} else if (os_strcmp(buf, "skip_inactivity_poll") == 0) {
|
||||
bss->skip_inactivity_poll = atoi(pos);
|
||||
} else if (os_strcmp(buf, "country_code") == 0) {
|
||||
@@ -3117,6 +3119,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
}
|
||||
} else if (os_strcmp(buf, "acs_exclude_dfs") == 0) {
|
||||
conf->acs_exclude_dfs = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "radio_config_id") == 0) {
|
||||
+ conf->config_id = os_strdup(pos);
|
||||
} else if (os_strcmp(buf, "op_class") == 0) {
|
||||
conf->op_class = atoi(pos);
|
||||
} else if (os_strcmp(buf, "channel") == 0) {
|
||||
} else if (os_strcmp(buf, "config_id") == 0) {
|
||||
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
|
||||
index 9215ab739..47183687f 100644
|
||||
index 0b4de6999..92b5f90db 100644
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -186,7 +186,7 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
|
||||
@@ -187,7 +187,7 @@ static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
|
||||
iface->interfaces->config_read_cb = hostapd_ctrl_iface_config_read;
|
||||
reload_opts = txt;
|
||||
|
||||
|
|
@ -34,31 +25,23 @@ index 9215ab739..47183687f 100644
|
|||
iface->interfaces->config_read_cb = config_read_cb;
|
||||
}
|
||||
diff --git a/hostapd/main.c b/hostapd/main.c
|
||||
index 859ff3046..0d0e92e9e 100644
|
||||
index 1b1575e04..b4ef3485f 100644
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -317,7 +317,7 @@ static void handle_term(int sig, void *signal_ctx)
|
||||
@@ -410,7 +410,7 @@ static void handle_term(int sig, void *signal_ctx)
|
||||
|
||||
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
|
||||
{
|
||||
- if (hostapd_reload_config(iface) < 0) {
|
||||
+ if (hostapd_reload_config(iface, 0) < 0) {
|
||||
+ if (hostapd_reload_config(iface,0 ) < 0) {
|
||||
wpa_printf(MSG_WARNING, "Failed to read new configuration "
|
||||
"file - continuing with old.");
|
||||
}
|
||||
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
|
||||
index 1c229c6c7..23b67e139 100644
|
||||
index 298216a47..41c70708d 100644
|
||||
--- a/src/ap/ap_config.c
|
||||
+++ b/src/ap/ap_config.c
|
||||
@@ -795,6 +795,7 @@ void hostapd_config_free_bss(struct hostapd_bss_config *conf)
|
||||
os_free(conf->radius_req_attr_sqlite);
|
||||
os_free(conf->rsn_preauth_interfaces);
|
||||
os_free(conf->ctrl_interface);
|
||||
+ os_free(conf->config_id);
|
||||
os_free(conf->ca_cert);
|
||||
os_free(conf->server_cert);
|
||||
os_free(conf->server_cert2);
|
||||
@@ -992,6 +993,7 @@ void hostapd_config_free(struct hostapd_config *conf)
|
||||
@@ -998,6 +998,7 @@ void hostapd_config_free(struct hostapd_config *conf)
|
||||
|
||||
for (i = 0; i < conf->num_bss; i++)
|
||||
hostapd_config_free_bss(conf->bss[i]);
|
||||
|
|
@ -67,19 +50,10 @@ index 1c229c6c7..23b67e139 100644
|
|||
os_free(conf->supported_rates);
|
||||
os_free(conf->basic_rates);
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index 58dd2cfed..e4340952e 100644
|
||||
index 76f20c3c1..5628da1d0 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -285,6 +285,8 @@ struct hostapd_bss_config {
|
||||
char vlan_bridge[IFNAMSIZ + 1];
|
||||
char wds_bridge[IFNAMSIZ + 1];
|
||||
|
||||
+ char *config_id;
|
||||
+
|
||||
enum hostapd_logger_level logger_syslog_level, logger_stdout_level;
|
||||
|
||||
unsigned int logger_syslog; /* module bitfield */
|
||||
@@ -966,6 +968,7 @@ struct eht_phy_capabilities_info {
|
||||
@@ -998,6 +998,7 @@ struct eht_phy_capabilities_info {
|
||||
struct hostapd_config {
|
||||
struct hostapd_bss_config **bss, *last_bss;
|
||||
size_t num_bss;
|
||||
|
|
@ -88,21 +62,21 @@ index 58dd2cfed..e4340952e 100644
|
|||
u16 beacon_int;
|
||||
int rts_threshold;
|
||||
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
|
||||
index f6c9c0e78..5d3a6de42 100644
|
||||
index 7a1d24459..986c64a1e 100644
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -224,6 +224,10 @@ static int hostapd_iface_conf_changed(struct hostapd_config *newconf,
|
||||
@@ -255,6 +255,10 @@ static int hostapd_iface_conf_changed(struct hostapd_config *newconf,
|
||||
{
|
||||
size_t i;
|
||||
|
||||
+ if (newconf->config_id != oldconf->config_id)
|
||||
+ if (newconf->config_id != oldconf->config_id)
|
||||
+ if (strcmp(newconf->config_id, oldconf->config_id))
|
||||
+ return 1;
|
||||
+
|
||||
if (newconf->num_bss != oldconf->num_bss)
|
||||
return 1;
|
||||
|
||||
@@ -237,7 +241,7 @@ static int hostapd_iface_conf_changed(struct hostapd_config *newconf,
|
||||
@@ -268,7 +272,7 @@ static int hostapd_iface_conf_changed(struct hostapd_config *newconf,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -111,25 +85,17 @@ index f6c9c0e78..5d3a6de42 100644
|
|||
{
|
||||
struct hapd_interfaces *interfaces = iface->interfaces;
|
||||
struct hostapd_data *hapd = iface->bss[0];
|
||||
@@ -260,13 +264,15 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
if (newconf == NULL)
|
||||
return -1;
|
||||
|
||||
- hostapd_clear_old(iface);
|
||||
-
|
||||
oldconf = hapd->iconf;
|
||||
if (hostapd_iface_conf_changed(newconf, oldconf)) {
|
||||
@@ -296,6 +300,9 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
char *fname;
|
||||
int res;
|
||||
|
||||
+ if (reconf)
|
||||
+ return -1;
|
||||
+ hostapd_clear_old(iface);
|
||||
+
|
||||
hostapd_clear_old(iface);
|
||||
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Configuration changes include interface/BSS modification - force full disable+enable sequence");
|
||||
fname = os_strdup(iface->config_fname);
|
||||
@@ -291,6 +297,24 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
@@ -322,7 +329,26 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Failed to enable interface on config reload");
|
||||
return res;
|
||||
|
|
@ -138,23 +104,25 @@ index f6c9c0e78..5d3a6de42 100644
|
|||
+ hapd = iface->bss[j];
|
||||
+ if (!hapd->config_id || strcmp(hapd->config_id, newconf->bss[j]->config_id)) {
|
||||
+ hostapd_flush_old_stations(iface->bss[j],
|
||||
+ WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
+ + WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
+#ifdef CONFIG_WEP
|
||||
+ hostapd_broadcast_wep_clear(iface->bss[j]);
|
||||
+#endif
|
||||
+
|
||||
+#ifndef CONFIG_NO_RADIUS
|
||||
+ /* TODO: update dynamic data based on changed configuration
|
||||
+ * items (e.g., open/close sockets, etc.) */
|
||||
+ * items (e.g., open/close sockets, etc.) */
|
||||
+ radius_client_flush(iface->bss[j]->radius, 0);
|
||||
+#endif /* CONFIG_NO_RADIUS */
|
||||
+ wpa_printf(MSG_INFO, "bss %zu changed", j);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+
|
||||
iface->conf = newconf;
|
||||
|
||||
@@ -307,6 +331,12 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
for (i = 0; i < iface->num_hw_features; i++) {
|
||||
@@ -338,6 +364,12 @@ int hostapd_reload_config(struct hostapd_iface *iface)
|
||||
|
||||
for (j = 0; j < iface->num_bss; j++) {
|
||||
hapd = iface->bss[j];
|
||||
|
|
@ -164,10 +132,10 @@ index f6c9c0e78..5d3a6de42 100644
|
|||
+ }
|
||||
+ if (newconf->bss[j]->config_id)
|
||||
+ hapd->config_id = strdup(newconf->bss[j]->config_id);
|
||||
hapd->iconf = newconf;
|
||||
hapd->conf = newconf->bss[j];
|
||||
hostapd_reload_bss(hapd);
|
||||
@@ -2415,6 +2445,10 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
|
||||
if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
|
||||
os_strcmp(hapd->conf->config_id,
|
||||
newconf->bss[j]->config_id) != 0)
|
||||
@@ -2718,6 +2750,10 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
|
||||
hapd->iconf = conf;
|
||||
hapd->conf = bss;
|
||||
hapd->iface = hapd_iface;
|
||||
|
|
@ -179,7 +147,7 @@ index f6c9c0e78..5d3a6de42 100644
|
|||
hapd->driver = conf->driver;
|
||||
hapd->ctrl_sock = -1;
|
||||
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
|
||||
index 5d867f086..ae8d305aa 100644
|
||||
index e9075e9f0..e122805ea 100644
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -46,7 +46,7 @@ struct mesh_conf;
|
||||
|
|
@ -191,7 +159,7 @@ index 5d867f086..ae8d305aa 100644
|
|||
struct hostapd_config * (*config_read_cb)(const char *config_fname);
|
||||
int (*ctrl_iface_init)(struct hostapd_data *hapd);
|
||||
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
|
||||
@@ -172,6 +172,7 @@ struct hostapd_data {
|
||||
@@ -184,6 +184,7 @@ struct hostapd_data {
|
||||
struct hostapd_iface *iface;
|
||||
struct hostapd_config *iconf;
|
||||
struct hostapd_bss_config *conf;
|
||||
|
|
@ -199,7 +167,7 @@ index 5d867f086..ae8d305aa 100644
|
|||
int interface_added; /* virtual interface added for this BSS */
|
||||
unsigned int started:1;
|
||||
unsigned int disabled:1;
|
||||
@@ -652,7 +653,7 @@ struct hostapd_iface {
|
||||
@@ -687,7 +688,7 @@ struct hostapd_iface {
|
||||
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
||||
int (*cb)(struct hostapd_iface *iface,
|
||||
void *ctx), void *ctx);
|
||||
|
|
@ -222,16 +190,16 @@ index 0c351af5f..e4f303bdc 100644
|
|||
"configuration");
|
||||
}
|
||||
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
||||
index 69afdabbc..a0019c3e3 100644
|
||||
index 99870a60d..70d98e7d4 100644
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4844,6 +4844,9 @@ static int wpa_driver_nl80211_set_ap(void *priv,
|
||||
@@ -5322,6 +5322,9 @@ static int wpa_driver_nl80211_set_ap(void *priv,
|
||||
if (ret) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
|
||||
ret, strerror(-ret));
|
||||
+ if (!bss->beacon_set)
|
||||
+ if (!bss->flink->beacon_set)
|
||||
+ ret = 0;
|
||||
+ bss->beacon_set = 0;
|
||||
+ bss->flink->beacon_set = 0;
|
||||
} else {
|
||||
bss->beacon_set = 1;
|
||||
link->beacon_set = 1;
|
||||
nl80211_set_bss(bss, params->cts_protect, params->preamble,
|
||||
|
|
|
|||
|
|
@ -1,28 +1,3 @@
|
|||
From d8aa8cfd9e47a553bd8f20b8fa20eed153d76704 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:28 +0000
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 2 ++
|
||||
src/ap/ap_config.h | 1 +
|
||||
src/ap/vlan_full.c | 4 ++++
|
||||
3 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 67b385ded..7fcbb0be3 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3342,6 +3342,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
#ifndef CONFIG_NO_VLAN
|
||||
} else if (os_strcmp(buf, "dynamic_vlan") == 0) {
|
||||
bss->ssid.dynamic_vlan = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "vlan_no_bridge") == 0) {
|
||||
+ bss->ssid.vlan_no_bridge = atoi(pos);
|
||||
} else if (os_strcmp(buf, "per_sta_vif") == 0) {
|
||||
bss->ssid.per_sta_vif = atoi(pos);
|
||||
} else if (os_strcmp(buf, "vlan_file") == 0) {
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index e4340952e..6884d30be 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -121,6 +121,7 @@ struct hostapd_ssid {
|
||||
|
|
@ -33,11 +8,9 @@ index e4340952e..6884d30be 100644
|
|||
#define DYNAMIC_VLAN_NAMING_WITHOUT_DEVICE 0
|
||||
#define DYNAMIC_VLAN_NAMING_WITH_DEVICE 1
|
||||
#define DYNAMIC_VLAN_NAMING_END 2
|
||||
diff --git a/src/ap/vlan_full.c b/src/ap/vlan_full.c
|
||||
index 19aa3c649..053d6338e 100644
|
||||
--- a/src/ap/vlan_full.c
|
||||
+++ b/src/ap/vlan_full.c
|
||||
@@ -475,6 +475,9 @@ void vlan_newlink(const char *ifname, struct hostapd_data *hapd)
|
||||
@@ -475,6 +475,9 @@ void vlan_newlink(const char *ifname, st
|
||||
if (!vlan)
|
||||
return;
|
||||
|
||||
|
|
@ -47,7 +20,7 @@ index 19aa3c649..053d6338e 100644
|
|||
vlan->configured = 1;
|
||||
|
||||
notempty = vlan->vlan_desc.notempty;
|
||||
@@ -506,6 +509,7 @@ void vlan_newlink(const char *ifname, struct hostapd_data *hapd)
|
||||
@@ -506,6 +509,7 @@ void vlan_newlink(const char *ifname, st
|
||||
ifname, br_name, tagged[i], hapd);
|
||||
}
|
||||
|
||||
|
|
@ -55,3 +28,14 @@ index 19aa3c649..053d6338e 100644
|
|||
ifconfig_up(ifname);
|
||||
}
|
||||
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3353,6 +3353,8 @@ static int hostapd_config_fill(struct ho
|
||||
#ifndef CONFIG_NO_VLAN
|
||||
} else if (os_strcmp(buf, "dynamic_vlan") == 0) {
|
||||
bss->ssid.dynamic_vlan = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "vlan_no_bridge") == 0) {
|
||||
+ bss->ssid.vlan_no_bridge = atoi(pos);
|
||||
} else if (os_strcmp(buf, "per_sta_vif") == 0) {
|
||||
bss->ssid.per_sta_vif = atoi(pos);
|
||||
} else if (os_strcmp(buf, "vlan_file") == 0) {
|
||||
|
|
|
|||
|
|
@ -1,30 +1,17 @@
|
|||
From 5a171ddcfab8d1a51e17e73e322d194c99d12092 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:29 +0000
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 2 ++
|
||||
src/ap/ap_drv_ops.c | 2 --
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 7fcbb0be3..24f044ae2 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2312,6 +2312,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -2316,6 +2316,8 @@ static int hostapd_config_fill(struct ho
|
||||
sizeof(conf->bss[0]->iface));
|
||||
} else if (os_strcmp(buf, "bridge") == 0) {
|
||||
os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
|
||||
+ if (!bss->wds_bridge[0])
|
||||
+ os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
|
||||
} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
|
||||
bss->bridge_hairpin = atoi(pos);
|
||||
} else if (os_strcmp(buf, "vlan_bridge") == 0) {
|
||||
os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
|
||||
} else if (os_strcmp(buf, "wds_bridge") == 0) {
|
||||
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
|
||||
index 8af7a0e25..192b30ce1 100644
|
||||
--- a/src/ap/ap_drv_ops.c
|
||||
+++ b/src/ap/ap_drv_ops.c
|
||||
@@ -340,8 +340,6 @@ int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds,
|
||||
@@ -348,8 +348,6 @@ int hostapd_set_wds_sta(struct hostapd_d
|
||||
return -1;
|
||||
if (hapd->conf->wds_bridge[0])
|
||||
bridge = hapd->conf->wds_bridge;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,6 @@
|
|||
From 0682b469685046b6f963c97edf0c72df4e3728b6 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:29 +0000
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 8 ++++++++
|
||||
src/ap/ap_config.h | 2 ++
|
||||
src/ap/beacon.c | 2 +-
|
||||
src/ap/hostapd.c | 24 ++++++++++++++++++++++++
|
||||
src/ap/hostapd.h | 1 +
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 24f044ae2..a7b7b91ae 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2837,6 +2837,14 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -2848,6 +2848,14 @@ static int hostapd_config_fill(struct ho
|
||||
line, bss->max_num_sta, MAX_STA_COUNT);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -29,37 +15,19 @@ index 24f044ae2..a7b7b91ae 100644
|
|||
} else if (os_strcmp(buf, "wpa") == 0) {
|
||||
bss->wpa = atoi(pos);
|
||||
} else if (os_strcmp(buf, "extended_key_id") == 0) {
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index 6884d30be..5c466d529 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -1007,6 +1007,8 @@ struct hostapd_config {
|
||||
unsigned int track_sta_max_num;
|
||||
unsigned int track_sta_max_age;
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -734,6 +734,7 @@ void hostapd_cleanup_cs_params(struct ho
|
||||
void hostapd_periodic_iface(struct hostapd_iface *iface);
|
||||
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
|
||||
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
|
||||
+int hostapd_check_max_sta(struct hostapd_data *hapd);
|
||||
|
||||
+ int max_num_sta;
|
||||
+
|
||||
char country[3]; /* first two octets: country code as described in
|
||||
* ISO/IEC 3166-1. Third octet:
|
||||
* ' ' (ascii 32): all environments
|
||||
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
|
||||
index 7c9b589e0..4e02739e5 100644
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -1135,7 +1135,7 @@ void handle_probe_req(struct hostapd_data *hapd,
|
||||
if (hapd->conf->no_probe_resp_if_max_sta &&
|
||||
is_multicast_ether_addr(mgmt->da) &&
|
||||
is_multicast_ether_addr(mgmt->bssid) &&
|
||||
- hapd->num_sta >= hapd->conf->max_num_sta &&
|
||||
+ hostapd_check_max_sta(hapd) &&
|
||||
!ap_get_sta(hapd, mgmt->sa)) {
|
||||
wpa_printf(MSG_MSGDUMP, "%s: Ignore Probe Request from " MACSTR
|
||||
" since no room for additional STA",
|
||||
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
|
||||
index 72ab76e93..377436263 100644
|
||||
void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap);
|
||||
void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -241,6 +241,30 @@ static int hostapd_iface_conf_changed(struct hostapd_config *newconf,
|
||||
@@ -272,6 +272,30 @@ static int hostapd_iface_conf_changed(st
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -90,15 +58,25 @@ index 72ab76e93..377436263 100644
|
|||
int hostapd_reload_config(struct hostapd_iface *iface, int reconf)
|
||||
{
|
||||
struct hapd_interfaces *interfaces = iface->interfaces;
|
||||
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
|
||||
index 0c1bca809..0e588ce91 100644
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -698,6 +698,7 @@ void hostapd_cleanup_cs_params(struct hostapd_data *hapd);
|
||||
void hostapd_periodic_iface(struct hostapd_iface *iface);
|
||||
int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
|
||||
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
|
||||
+int hostapd_check_max_sta(struct hostapd_data *hapd);
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -1252,7 +1252,7 @@ void handle_probe_req(struct hostapd_dat
|
||||
if (hapd->conf->no_probe_resp_if_max_sta &&
|
||||
is_multicast_ether_addr(mgmt->da) &&
|
||||
is_multicast_ether_addr(mgmt->bssid) &&
|
||||
- hapd->num_sta >= hapd->conf->max_num_sta &&
|
||||
+ hostapd_check_max_sta(hapd) &&
|
||||
!ap_get_sta(hapd, mgmt->sa)) {
|
||||
wpa_printf(MSG_MSGDUMP, "%s: Ignore Probe Request from " MACSTR
|
||||
" since no room for additional STA",
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -1037,6 +1037,8 @@ struct hostapd_config {
|
||||
unsigned int track_sta_max_num;
|
||||
unsigned int track_sta_max_age;
|
||||
|
||||
void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap);
|
||||
void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
|
||||
+ int max_num_sta;
|
||||
+
|
||||
char country[3]; /* first two octets: country code as described in
|
||||
* ISO/IEC 3166-1. Third octet:
|
||||
* ' ' (ascii 32): all environments
|
||||
|
|
|
|||
|
|
@ -1,18 +1,6 @@
|
|||
From 5326cc72099d17c8b4746e2d5c04f70805d42ccd Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:29 +0000
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 2 ++
|
||||
src/ap/ap_config.h | 1 +
|
||||
src/ap/wpa_auth_glue.c | 8 ++++++--
|
||||
3 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index a7b7b91ae..62eaab122 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2996,6 +2996,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -3007,6 +3007,8 @@ static int hostapd_config_fill(struct ho
|
||||
wpa_printf(MSG_INFO,
|
||||
"Line %d: Obsolete peerkey parameter ignored", line);
|
||||
#ifdef CONFIG_IEEE80211R_AP
|
||||
|
|
@ -21,8 +9,6 @@ index a7b7b91ae..62eaab122 100644
|
|||
} else if (os_strcmp(buf, "mobility_domain") == 0) {
|
||||
if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN ||
|
||||
hexstr2bin(pos, bss->mobility_domain,
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index 5c466d529..f0ec2fe6a 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -283,6 +283,7 @@ struct airtime_sta_weight {
|
||||
|
|
@ -32,12 +18,10 @@ index 5c466d529..f0ec2fe6a 100644
|
|||
+ char ft_iface[IFNAMSIZ + 1];
|
||||
char vlan_bridge[IFNAMSIZ + 1];
|
||||
char wds_bridge[IFNAMSIZ + 1];
|
||||
|
||||
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
|
||||
index 5c7075891..e5a9a7b35 100644
|
||||
int bridge_hairpin; /* hairpin_mode on bridge members */
|
||||
--- a/src/ap/wpa_auth_glue.c
|
||||
+++ b/src/ap/wpa_auth_glue.c
|
||||
@@ -1593,8 +1593,12 @@ int hostapd_setup_wpa(struct hostapd_data *hapd)
|
||||
@@ -1727,8 +1727,12 @@ int hostapd_setup_wpa(struct hostapd_dat
|
||||
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
|
||||
const char *ft_iface;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,3 @@
|
|||
From 86704eeb96106bf9a2d5fdd09b044dca92f719f7 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:29 +0000
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 2 ++
|
||||
src/ap/ap_config.h | 1 +
|
||||
src/ap/x_snoop.c | 15 +++++++++++----
|
||||
3 files changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 62eaab122..7af9f7a72 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2314,6 +2314,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
|
||||
if (!bss->wds_bridge[0])
|
||||
os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
|
||||
+ } else if (os_strcmp(buf, "snoop_iface") == 0) {
|
||||
+ os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
|
||||
} else if (os_strcmp(buf, "vlan_bridge") == 0) {
|
||||
os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
|
||||
} else if (os_strcmp(buf, "wds_bridge") == 0) {
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index f0ec2fe6a..f795ee919 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -284,6 +284,7 @@ struct hostapd_bss_config {
|
||||
|
|
@ -32,12 +7,10 @@ index f0ec2fe6a..f795ee919 100644
|
|||
+ char snoop_iface[IFNAMSIZ + 1];
|
||||
char vlan_bridge[IFNAMSIZ + 1];
|
||||
char wds_bridge[IFNAMSIZ + 1];
|
||||
|
||||
diff --git a/src/ap/x_snoop.c b/src/ap/x_snoop.c
|
||||
index 029f4de23..30c990fd2 100644
|
||||
int bridge_hairpin; /* hairpin_mode on bridge members */
|
||||
--- a/src/ap/x_snoop.c
|
||||
+++ b/src/ap/x_snoop.c
|
||||
@@ -33,14 +33,16 @@ int x_snoop_init(struct hostapd_data *hapd)
|
||||
@@ -33,14 +33,16 @@ int x_snoop_init(struct hostapd_data *ha
|
||||
|
||||
hapd->x_snoop_initialized = true;
|
||||
|
||||
|
|
@ -56,7 +29,7 @@ index 029f4de23..30c990fd2 100644
|
|||
wpa_printf(MSG_DEBUG,
|
||||
"x_snoop: Failed to enable proxyarp on the bridge port");
|
||||
return -1;
|
||||
@@ -54,7 +56,8 @@ int x_snoop_init(struct hostapd_data *hapd)
|
||||
@@ -54,7 +56,8 @@ int x_snoop_init(struct hostapd_data *ha
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IPV6
|
||||
|
|
@ -66,7 +39,7 @@ index 029f4de23..30c990fd2 100644
|
|||
wpa_printf(MSG_DEBUG,
|
||||
"x_snoop: Failed to enable multicast snooping on the bridge");
|
||||
return -1;
|
||||
@@ -73,8 +76,12 @@ x_snoop_get_l2_packet(struct hostapd_data *hapd,
|
||||
@@ -73,8 +76,12 @@ x_snoop_get_l2_packet(struct hostapd_dat
|
||||
{
|
||||
struct hostapd_bss_config *conf = hapd->conf;
|
||||
struct l2_packet_data *l2;
|
||||
|
|
@ -80,3 +53,14 @@ index 029f4de23..30c990fd2 100644
|
|||
if (l2 == NULL) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"x_snoop: Failed to initialize L2 packet processing %s",
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2320,6 +2320,8 @@ static int hostapd_config_fill(struct ho
|
||||
os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
|
||||
} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
|
||||
bss->bridge_hairpin = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "snoop_iface") == 0) {
|
||||
+ os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
|
||||
} else if (os_strcmp(buf, "vlan_bridge") == 0) {
|
||||
os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
|
||||
} else if (os_strcmp(buf, "wds_bridge") == 0) {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,6 @@
|
|||
From 9279da2d91d4c8c4a33449e0a6fe0f03e91a40e5 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:29 +0000
|
||||
|
||||
---
|
||||
hostapd/config_file.c | 6 +++---
|
||||
src/ap/hostapd.c | 2 +-
|
||||
src/ap/ieee802_11_shared.c | 2 --
|
||||
wpa_supplicant/events.c | 6 ------
|
||||
4 files changed, 4 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index 7af9f7a72..e57c78b70 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -1598,6 +1598,8 @@ static int parse_anqp_elem(struct hostapd_bss_config *bss, char *buf, int line)
|
||||
@@ -1602,6 +1602,8 @@ static int parse_anqp_elem(struct hostap
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -22,7 +9,7 @@ index 7af9f7a72..e57c78b70 100644
|
|||
|
||||
static int parse_qos_map_set(struct hostapd_bss_config *bss,
|
||||
char *buf, int line)
|
||||
@@ -1639,8 +1641,6 @@ static int parse_qos_map_set(struct hostapd_bss_config *bss,
|
||||
@@ -1643,8 +1645,6 @@ static int parse_qos_map_set(struct host
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +18,7 @@ index 7af9f7a72..e57c78b70 100644
|
|||
|
||||
#ifdef CONFIG_HS20
|
||||
static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
|
||||
@@ -4042,10 +4042,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -4064,10 +4064,10 @@ static int hostapd_config_fill(struct ho
|
||||
bss->gas_frag_limit = val;
|
||||
} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
|
||||
bss->gas_comeback_delay = atoi(pos);
|
||||
|
|
@ -43,11 +30,9 @@ index 7af9f7a72..e57c78b70 100644
|
|||
#ifdef CONFIG_RADIUS_TEST
|
||||
} else if (os_strcmp(buf, "dump_msk_file") == 0) {
|
||||
os_free(bss->dump_msk_file);
|
||||
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
|
||||
index 377436263..e61ac39b8 100644
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -1424,6 +1424,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
|
||||
@@ -1534,6 +1534,7 @@ static int hostapd_setup_bss(struct host
|
||||
wpa_printf(MSG_ERROR, "GAS server initialization failed");
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -55,7 +40,7 @@ index 377436263..e61ac39b8 100644
|
|||
|
||||
if (conf->qos_map_set_len &&
|
||||
hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
|
||||
@@ -1431,7 +1432,6 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
|
||||
@@ -1541,7 +1542,6 @@ static int hostapd_setup_bss(struct host
|
||||
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -63,11 +48,40 @@ index 377436263..e61ac39b8 100644
|
|||
|
||||
if (conf->bss_load_update_period && bss_load_update_init(hapd)) {
|
||||
wpa_printf(MSG_ERROR, "BSS Load initialization failed");
|
||||
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
|
||||
index 615489511..691b1394a 100644
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -2683,8 +2683,6 @@ void wnm_bss_keep_alive_deinit(struct wp
|
||||
}
|
||||
|
||||
|
||||
-#ifdef CONFIG_INTERWORKING
|
||||
-
|
||||
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
|
||||
size_t len)
|
||||
{
|
||||
@@ -2717,8 +2715,6 @@ static void interworking_process_assoc_r
|
||||
}
|
||||
}
|
||||
|
||||
-#endif /* CONFIG_INTERWORKING */
|
||||
-
|
||||
|
||||
static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
@@ -3098,10 +3094,8 @@ static int wpa_supplicant_event_associnf
|
||||
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len);
|
||||
#endif /* CONFIG_WNM */
|
||||
-#ifdef CONFIG_INTERWORKING
|
||||
interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len);
|
||||
-#endif /* CONFIG_INTERWORKING */
|
||||
if (wpa_s->hw_capab == CAPAB_VHT &&
|
||||
get_ie(data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))
|
||||
--- a/src/ap/ieee802_11_shared.c
|
||||
+++ b/src/ap/ieee802_11_shared.c
|
||||
@@ -1098,13 +1098,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_data *hapd, u8 *eid, size_t len)
|
||||
@@ -1116,13 +1116,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_da
|
||||
u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
const u8 *ext_capab_ie, size_t ext_capab_ie_len)
|
||||
{
|
||||
|
|
@ -81,36 +95,3 @@ index 615489511..691b1394a 100644
|
|||
|
||||
if (ext_capab_ie_len > 0) {
|
||||
sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2));
|
||||
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
|
||||
index 86a0dc7fa..0bac5f2c2 100644
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -2586,8 +2586,6 @@ void wnm_bss_keep_alive_deinit(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
|
||||
|
||||
-#ifdef CONFIG_INTERWORKING
|
||||
-
|
||||
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
|
||||
size_t len)
|
||||
{
|
||||
@@ -2620,8 +2618,6 @@ static void interworking_process_assoc_resp(struct wpa_supplicant *wpa_s,
|
||||
}
|
||||
}
|
||||
|
||||
-#endif /* CONFIG_INTERWORKING */
|
||||
-
|
||||
|
||||
static void multi_ap_process_assoc_resp(struct wpa_supplicant *wpa_s,
|
||||
const u8 *ies, size_t ies_len)
|
||||
@@ -2954,10 +2950,8 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
||||
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len);
|
||||
#endif /* CONFIG_WNM */
|
||||
-#ifdef CONFIG_INTERWORKING
|
||||
interworking_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len);
|
||||
-#endif /* CONFIG_INTERWORKING */
|
||||
if (wpa_s->hw_capab == CAPAB_VHT &&
|
||||
get_ie(data->assoc_info.resp_ies,
|
||||
data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
From 898a6cd8ef1eefa3c214d0b558959a4f52084706 Mon Sep 17 00:00:00 2001
|
||||
From: OpenEmbedded <oe.patch@oe>
|
||||
Date: Thu, 15 Sep 2022 12:35:29 +0000
|
||||
|
||||
---
|
||||
src/ap/ap_drv_ops.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
|
||||
index 192b30ce1..f7ad3edc7 100644
|
||||
--- a/src/ap/ap_drv_ops.c
|
||||
+++ b/src/ap/ap_drv_ops.c
|
||||
@@ -864,7 +864,8 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
|
||||
@@ -927,7 +927,8 @@ int hostapd_start_dfs_cac(struct hostapd
|
||||
int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
|
||||
const u8 *qos_map_set, u8 qos_map_set_len)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,109 @@
|
|||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -310,6 +310,7 @@ struct hostapd_bss_config {
|
||||
unsigned int eap_sim_db_timeout;
|
||||
int eap_server_erp; /* Whether ERP is enabled on internal EAP server */
|
||||
struct hostapd_ip_addr own_ip_addr;
|
||||
+ int dynamic_own_ip_addr;
|
||||
char *nas_identifier;
|
||||
struct hostapd_radius_servers *radius;
|
||||
int acct_interim_interval;
|
||||
--- a/src/radius/radius_client.c
|
||||
+++ b/src/radius/radius_client.c
|
||||
@@ -163,6 +163,8 @@ struct radius_client_data {
|
||||
*/
|
||||
void *ctx;
|
||||
|
||||
+ struct hostapd_ip_addr local_ip;
|
||||
+
|
||||
/**
|
||||
* conf - RADIUS client configuration (list of RADIUS servers to use)
|
||||
*/
|
||||
@@ -720,6 +722,30 @@ static void radius_client_list_add(struc
|
||||
|
||||
|
||||
/**
|
||||
+ * radius_client_send - Get local address for the RADIUS auth socket
|
||||
+ * @radius: RADIUS client context from radius_client_init()
|
||||
+ * @addr: pointer to store the address
|
||||
+ *
|
||||
+ * This function returns the local address for the connection to the RADIUS
|
||||
+ * auth server. It also opens the socket if it's not available yet.
|
||||
+ */
|
||||
+int radius_client_get_local_addr(struct radius_client_data *radius,
|
||||
+ struct hostapd_ip_addr *addr)
|
||||
+{
|
||||
+ struct hostapd_radius_servers *conf = radius->conf;
|
||||
+
|
||||
+ if (conf->auth_server && radius->auth_sock < 0)
|
||||
+ radius_client_init_auth(radius);
|
||||
+
|
||||
+ if (radius->auth_sock < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ memcpy(addr, &radius->local_ip, sizeof(*addr));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* radius_client_send - Send a RADIUS request
|
||||
* @radius: RADIUS client context from radius_client_init()
|
||||
* @msg: RADIUS message to be sent
|
||||
@@ -1238,6 +1264,10 @@ radius_change_server(struct radius_clien
|
||||
wpa_printf(MSG_DEBUG, "RADIUS local address: %s:%u",
|
||||
inet_ntoa(claddr.sin_addr),
|
||||
ntohs(claddr.sin_port));
|
||||
+ if (auth) {
|
||||
+ radius->local_ip.af = AF_INET;
|
||||
+ radius->local_ip.u.v4 = claddr.sin_addr;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
#ifdef CONFIG_IPV6
|
||||
@@ -1249,6 +1279,10 @@ radius_change_server(struct radius_clien
|
||||
inet_ntop(AF_INET6, &claddr6.sin6_addr,
|
||||
abuf, sizeof(abuf)),
|
||||
ntohs(claddr6.sin6_port));
|
||||
+ if (auth) {
|
||||
+ radius->local_ip.af = AF_INET6;
|
||||
+ radius->local_ip.u.v6 = claddr6.sin6_addr;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
}
|
||||
--- a/src/radius/radius_client.h
|
||||
+++ b/src/radius/radius_client.h
|
||||
@@ -249,6 +249,8 @@ int radius_client_register(struct radius
|
||||
void radius_client_set_interim_error_cb(struct radius_client_data *radius,
|
||||
void (*cb)(const u8 *addr, void *ctx),
|
||||
void *ctx);
|
||||
+int radius_client_get_local_addr(struct radius_client_data *radius,
|
||||
+ struct hostapd_ip_addr * addr);
|
||||
int radius_client_send(struct radius_client_data *radius,
|
||||
struct radius_msg *msg,
|
||||
RadiusType msg_type, const u8 *addr);
|
||||
--- a/src/ap/ieee802_1x.c
|
||||
+++ b/src/ap/ieee802_1x.c
|
||||
@@ -598,6 +598,10 @@ int add_common_radius_attr(struct hostap
|
||||
struct hostapd_radius_attr *attr;
|
||||
int len;
|
||||
|
||||
+ if (hapd->conf->dynamic_own_ip_addr)
|
||||
+ radius_client_get_local_addr(hapd->radius,
|
||||
+ &hapd->conf->own_ip_addr);
|
||||
+
|
||||
if (!hostapd_config_get_radius_attr(req_attr,
|
||||
RADIUS_ATTR_NAS_IP_ADDRESS) &&
|
||||
hapd->conf->own_ip_addr.af == AF_INET &&
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2688,6 +2688,8 @@ static int hostapd_config_fill(struct ho
|
||||
} else if (os_strcmp(buf, "iapp_interface") == 0) {
|
||||
wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used");
|
||||
#endif /* CONFIG_IAPP */
|
||||
+ } else if (os_strcmp(buf, "dynamic_own_ip_addr") == 0) {
|
||||
+ bss->dynamic_own_ip_addr = atoi(pos);
|
||||
} else if (os_strcmp(buf, "own_ip_addr") == 0) {
|
||||
if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
|
|
@ -0,0 +1,298 @@
|
|||
--- a/src/radius/radius_das.h
|
||||
+++ b/src/radius/radius_das.h
|
||||
@@ -44,6 +44,7 @@ struct radius_das_attrs {
|
||||
struct radius_das_conf {
|
||||
int port;
|
||||
const u8 *shared_secret;
|
||||
+ const u8 *nas_identifier;
|
||||
size_t shared_secret_len;
|
||||
const struct hostapd_ip_addr *client_addr;
|
||||
unsigned int time_window;
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -1471,6 +1471,7 @@ static int hostapd_setup_bss(struct host
|
||||
|
||||
os_memset(&das_conf, 0, sizeof(das_conf));
|
||||
das_conf.port = conf->radius_das_port;
|
||||
+ das_conf.nas_identifier = conf->nas_identifier;
|
||||
das_conf.shared_secret = conf->radius_das_shared_secret;
|
||||
das_conf.shared_secret_len =
|
||||
conf->radius_das_shared_secret_len;
|
||||
--- a/src/radius/radius_das.c
|
||||
+++ b/src/radius/radius_das.c
|
||||
@@ -12,13 +12,26 @@
|
||||
#include "utils/common.h"
|
||||
#include "utils/eloop.h"
|
||||
#include "utils/ip_addr.h"
|
||||
+#include "utils/list.h"
|
||||
#include "radius.h"
|
||||
#include "radius_das.h"
|
||||
|
||||
|
||||
-struct radius_das_data {
|
||||
+static struct dl_list das_ports = DL_LIST_HEAD_INIT(das_ports);
|
||||
+
|
||||
+struct radius_das_port {
|
||||
+ struct dl_list list;
|
||||
+ struct dl_list das_data;
|
||||
+
|
||||
+ int port;
|
||||
int sock;
|
||||
+};
|
||||
+
|
||||
+struct radius_das_data {
|
||||
+ struct dl_list list;
|
||||
+ struct radius_das_port *port;
|
||||
u8 *shared_secret;
|
||||
+ u8 *nas_identifier;
|
||||
size_t shared_secret_len;
|
||||
struct hostapd_ip_addr client_addr;
|
||||
unsigned int time_window;
|
||||
@@ -378,56 +391,17 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
-static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx)
|
||||
+static void
|
||||
+radius_das_receive_msg(struct radius_das_data *das, struct radius_msg *msg,
|
||||
+ struct sockaddr *from, socklen_t fromlen,
|
||||
+ char *abuf, int from_port)
|
||||
{
|
||||
- struct radius_das_data *das = eloop_ctx;
|
||||
- u8 buf[1500];
|
||||
- union {
|
||||
- struct sockaddr_storage ss;
|
||||
- struct sockaddr_in sin;
|
||||
-#ifdef CONFIG_IPV6
|
||||
- struct sockaddr_in6 sin6;
|
||||
-#endif /* CONFIG_IPV6 */
|
||||
- } from;
|
||||
- char abuf[50];
|
||||
- int from_port = 0;
|
||||
- socklen_t fromlen;
|
||||
- int len;
|
||||
- struct radius_msg *msg, *reply = NULL;
|
||||
+ struct radius_msg *reply = NULL;
|
||||
struct radius_hdr *hdr;
|
||||
struct wpabuf *rbuf;
|
||||
+ struct os_time now;
|
||||
u32 val;
|
||||
int res;
|
||||
- struct os_time now;
|
||||
-
|
||||
- fromlen = sizeof(from);
|
||||
- len = recvfrom(sock, buf, sizeof(buf), 0,
|
||||
- (struct sockaddr *) &from.ss, &fromlen);
|
||||
- if (len < 0) {
|
||||
- wpa_printf(MSG_ERROR, "DAS: recvfrom: %s", strerror(errno));
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- os_strlcpy(abuf, inet_ntoa(from.sin.sin_addr), sizeof(abuf));
|
||||
- from_port = ntohs(from.sin.sin_port);
|
||||
-
|
||||
- wpa_printf(MSG_DEBUG, "DAS: Received %d bytes from %s:%d",
|
||||
- len, abuf, from_port);
|
||||
- if (das->client_addr.u.v4.s_addr &&
|
||||
- das->client_addr.u.v4.s_addr != from.sin.sin_addr.s_addr) {
|
||||
- wpa_printf(MSG_DEBUG, "DAS: Drop message from unknown client");
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- msg = radius_msg_parse(buf, len);
|
||||
- if (msg == NULL) {
|
||||
- wpa_printf(MSG_DEBUG, "DAS: Parsing incoming RADIUS packet "
|
||||
- "from %s:%d failed", abuf, from_port);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (wpa_debug_level <= MSG_MSGDUMP)
|
||||
- radius_msg_dump(msg);
|
||||
|
||||
if (radius_msg_verify_das_req(msg, das->shared_secret,
|
||||
das->shared_secret_len,
|
||||
@@ -494,9 +468,8 @@ static void radius_das_receive(int sock,
|
||||
radius_msg_dump(reply);
|
||||
|
||||
rbuf = radius_msg_get_buf(reply);
|
||||
- res = sendto(das->sock, wpabuf_head(rbuf),
|
||||
- wpabuf_len(rbuf), 0,
|
||||
- (struct sockaddr *) &from.ss, fromlen);
|
||||
+ res = sendto(das->port->sock, wpabuf_head(rbuf),
|
||||
+ wpabuf_len(rbuf), 0, from, fromlen);
|
||||
if (res < 0) {
|
||||
wpa_printf(MSG_ERROR, "DAS: sendto(to %s:%d): %s",
|
||||
abuf, from_port, strerror(errno));
|
||||
@@ -508,6 +481,72 @@ fail:
|
||||
radius_msg_free(reply);
|
||||
}
|
||||
|
||||
+static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx)
|
||||
+{
|
||||
+ struct radius_das_port *p = eloop_ctx;
|
||||
+ struct radius_das_data *das;
|
||||
+ u8 buf[1500];
|
||||
+ union {
|
||||
+ struct sockaddr_storage ss;
|
||||
+ struct sockaddr_in sin;
|
||||
+#ifdef CONFIG_IPV6
|
||||
+ struct sockaddr_in6 sin6;
|
||||
+#endif /* CONFIG_IPV6 */
|
||||
+ } from;
|
||||
+ struct radius_msg *msg;
|
||||
+ size_t nasid_len = 0;
|
||||
+ u8 *nasid_buf = NULL;
|
||||
+ char abuf[50];
|
||||
+ int from_port = 0;
|
||||
+ socklen_t fromlen;
|
||||
+ int found = 0;
|
||||
+ int len;
|
||||
+
|
||||
+ fromlen = sizeof(from);
|
||||
+ len = recvfrom(sock, buf, sizeof(buf), 0,
|
||||
+ (struct sockaddr *) &from.ss, &fromlen);
|
||||
+ if (len < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "DAS: recvfrom: %s", strerror(errno));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ os_strlcpy(abuf, inet_ntoa(from.sin.sin_addr), sizeof(abuf));
|
||||
+ from_port = ntohs(from.sin.sin_port);
|
||||
+
|
||||
+ msg = radius_msg_parse(buf, len);
|
||||
+ if (msg == NULL) {
|
||||
+ wpa_printf(MSG_DEBUG, "DAS: Parsing incoming RADIUS packet "
|
||||
+ "from %s:%d failed", abuf, from_port);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DAS: Received %d bytes from %s:%d",
|
||||
+ len, abuf, from_port);
|
||||
+
|
||||
+ if (wpa_debug_level <= MSG_MSGDUMP)
|
||||
+ radius_msg_dump(msg);
|
||||
+
|
||||
+ radius_msg_get_attr_ptr(msg, RADIUS_ATTR_NAS_IDENTIFIER,
|
||||
+ &nasid_buf, &nasid_len, NULL);
|
||||
+ dl_list_for_each(das, &p->das_data, struct radius_das_data, list) {
|
||||
+ if (das->client_addr.u.v4.s_addr &&
|
||||
+ das->client_addr.u.v4.s_addr != from.sin.sin_addr.s_addr)
|
||||
+ continue;
|
||||
+
|
||||
+ if (das->nas_identifier && nasid_buf &&
|
||||
+ (nasid_len != os_strlen(das->nas_identifier) ||
|
||||
+ os_memcmp(das->nas_identifier, nasid_buf, nasid_len) != 0))
|
||||
+ continue;
|
||||
+
|
||||
+ found = 1;
|
||||
+ radius_das_receive_msg(das, msg, (struct sockaddr *)&from.ss,
|
||||
+ fromlen, abuf, from_port);
|
||||
+ }
|
||||
+
|
||||
+ if (!found)
|
||||
+ wpa_printf(MSG_DEBUG, "DAS: Drop message from unknown client");
|
||||
+}
|
||||
+
|
||||
|
||||
static int radius_das_open_socket(int port)
|
||||
{
|
||||
@@ -533,6 +572,49 @@ static int radius_das_open_socket(int po
|
||||
}
|
||||
|
||||
|
||||
+static struct radius_das_port *
|
||||
+radius_das_open_port(int port)
|
||||
+{
|
||||
+ struct radius_das_port *p;
|
||||
+
|
||||
+ dl_list_for_each(p, &das_ports, struct radius_das_port, list) {
|
||||
+ if (p->port == port)
|
||||
+ return p;
|
||||
+ }
|
||||
+
|
||||
+ p = os_zalloc(sizeof(*p));
|
||||
+ if (p == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ dl_list_init(&p->das_data);
|
||||
+ p->port = port;
|
||||
+ p->sock = radius_das_open_socket(port);
|
||||
+ if (p->sock < 0)
|
||||
+ goto free_port;
|
||||
+
|
||||
+ if (eloop_register_read_sock(p->sock, radius_das_receive, p, NULL))
|
||||
+ goto close_port;
|
||||
+
|
||||
+ dl_list_add(&das_ports, &p->list);
|
||||
+
|
||||
+ return p;
|
||||
+
|
||||
+close_port:
|
||||
+ close(p->sock);
|
||||
+free_port:
|
||||
+ os_free(p);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void radius_das_close_port(struct radius_das_port *p)
|
||||
+{
|
||||
+ dl_list_del(&p->list);
|
||||
+ eloop_unregister_read_sock(p->sock);
|
||||
+ close(p->sock);
|
||||
+ free(p);
|
||||
+}
|
||||
+
|
||||
struct radius_das_data *
|
||||
radius_das_init(struct radius_das_conf *conf)
|
||||
{
|
||||
@@ -553,6 +635,8 @@ radius_das_init(struct radius_das_conf *
|
||||
das->ctx = conf->ctx;
|
||||
das->disconnect = conf->disconnect;
|
||||
das->coa = conf->coa;
|
||||
+ if (conf->nas_identifier)
|
||||
+ das->nas_identifier = os_strdup(conf->nas_identifier);
|
||||
|
||||
os_memcpy(&das->client_addr, conf->client_addr,
|
||||
sizeof(das->client_addr));
|
||||
@@ -565,19 +649,15 @@ radius_das_init(struct radius_das_conf *
|
||||
}
|
||||
das->shared_secret_len = conf->shared_secret_len;
|
||||
|
||||
- das->sock = radius_das_open_socket(conf->port);
|
||||
- if (das->sock < 0) {
|
||||
+ das->port = radius_das_open_port(conf->port);
|
||||
+ if (!das->port) {
|
||||
wpa_printf(MSG_ERROR, "Failed to open UDP socket for RADIUS "
|
||||
"DAS");
|
||||
radius_das_deinit(das);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (eloop_register_read_sock(das->sock, radius_das_receive, das, NULL))
|
||||
- {
|
||||
- radius_das_deinit(das);
|
||||
- return NULL;
|
||||
- }
|
||||
+ dl_list_add(&das->port->das_data, &das->list);
|
||||
|
||||
return das;
|
||||
}
|
||||
@@ -588,11 +668,14 @@ void radius_das_deinit(struct radius_das
|
||||
if (das == NULL)
|
||||
return;
|
||||
|
||||
- if (das->sock >= 0) {
|
||||
- eloop_unregister_read_sock(das->sock);
|
||||
- close(das->sock);
|
||||
+ if (das->port) {
|
||||
+ dl_list_del(&das->list);
|
||||
+
|
||||
+ if (dl_list_empty(&das->port->das_data))
|
||||
+ radius_das_close_port(das->port);
|
||||
}
|
||||
|
||||
+ os_free(das->nas_identifier);
|
||||
os_free(das->shared_secret);
|
||||
os_free(das);
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
|
||||
index 992c0a056..d0cc641e5 100644
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1613,7 +1613,7 @@ int ap_ctrl_iface_bss_tm_req(struct wpa_supplicant *wpa_s, const char *buf)
|
||||
|
||||
#endif /* CONFIG_WNM_AP */
|
||||
|
||||
-
|
||||
+#ifdef CONFIG_CTRL_IFACE_ACL
|
||||
int ap_ctrl_iface_acl_add_mac(struct wpa_supplicant *wpa_s,
|
||||
enum macaddr_acl acl_type,
|
||||
const char *buf)
|
||||
@@ -1748,7 +1748,7 @@ int ap_ctrl_iface_set_acl(struct wpa_supplicant *wpa_s)
|
||||
|
||||
return hostapd_set_acl(hapd);
|
||||
}
|
||||
-
|
||||
+#endif /* CONFIG_CTRL_IFACE_ACL */
|
||||
#endif /* CONFIG_CTRL_IFACE */
|
||||
|
||||
|
||||
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
|
||||
index bb6b1f9ac..6016e843e 100644
|
||||
--- a/wpa_supplicant/ctrl_iface.c
|
||||
+++ b/wpa_supplicant/ctrl_iface.c
|
||||
@@ -12050,6 +12050,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
} else if (os_strcmp(buf, "UPDATE_BEACON") == 0) {
|
||||
if (wpas_ap_update_beacon(wpa_s))
|
||||
reply_len = -1;
|
||||
+#ifdef CONFIG_CTRL_IFACE_ACL
|
||||
} else if (os_strncmp(buf, "ACCEPT_ACL ", 11) == 0) {
|
||||
if (os_strncmp(buf + 11, "ADD_MAC ", 8) == 0) {
|
||||
if (ap_ctrl_iface_acl_add_mac(wpa_s,
|
||||
@@ -12102,6 +12103,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
} else {
|
||||
reply_len = -1;
|
||||
}
|
||||
+#endif
|
||||
#endif /* CONFIG_AP */
|
||||
} else if (os_strcmp(buf, "SUSPEND") == 0) {
|
||||
wpas_notify_suspend(wpa_s->global);
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
|
||||
index 2f8e8862e..21708132c 100644
|
||||
index 3a243d13b..790d229c7 100644
|
||||
--- a/hostapd/Android.mk
|
||||
+++ b/hostapd/Android.mk
|
||||
@@ -210,6 +210,11 @@ endif
|
||||
|
|
@ -15,7 +15,7 @@ index 2f8e8862e..21708132c 100644
|
|||
L_CFLAGS += -DCONFIG_RSN_PREAUTH
|
||||
CONFIG_L2_PACKET=y
|
||||
diff --git a/hostapd/Makefile b/hostapd/Makefile
|
||||
index 19a88e0fd..64c29ef33 100644
|
||||
index deb813d56..c20110a6b 100644
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -254,6 +254,11 @@ ifndef CONFIG_NO_CTRL_IFACE
|
||||
|
|
@ -45,10 +45,10 @@ index c8b3afabe..095f930da 100644
|
|||
#CONFIG_RSN_PREAUTH=y
|
||||
|
||||
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
||||
index e57c78b70..a388703fb 100644
|
||||
index 42896f348..dfd3af262 100644
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2675,7 +2675,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
@@ -2686,7 +2686,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||
bss->eapol_key_index_workaround = atoi(pos);
|
||||
#ifdef CONFIG_IAPP
|
||||
} else if (os_strcmp(buf, "iapp_interface") == 0) {
|
||||
|
|
@ -56,13 +56,13 @@ index e57c78b70..a388703fb 100644
|
|||
+ bss->ieee802_11f = 1;
|
||||
+ os_strlcpy(bss->iapp_iface, pos, sizeof(bss->iapp_iface));
|
||||
#endif /* CONFIG_IAPP */
|
||||
} else if (os_strcmp(buf, "own_ip_addr") == 0) {
|
||||
if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) {
|
||||
} else if (os_strcmp(buf, "dynamic_own_ip_addr") == 0) {
|
||||
bss->dynamic_own_ip_addr = atoi(pos);
|
||||
diff --git a/hostapd/defconfig b/hostapd/defconfig
|
||||
index a9eab4d9c..7da1da555 100644
|
||||
index bf185c5b4..6f7bc6ca4 100644
|
||||
--- a/hostapd/defconfig
|
||||
+++ b/hostapd/defconfig
|
||||
@@ -44,6 +44,9 @@ CONFIG_LIBNL32=y
|
||||
@@ -56,6 +56,9 @@ CONFIG_LIBNL32=y
|
||||
# Driver interface for no driver (e.g., RADIUS server only)
|
||||
#CONFIG_DRIVER_NONE=y
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ index a9eab4d9c..7da1da555 100644
|
|||
CONFIG_RSN_PREAUTH=y
|
||||
|
||||
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
|
||||
index f37d5634b..594eb0d17 100644
|
||||
index 30fb06d1c..ce970a8a5 100644
|
||||
--- a/hostapd/hostapd.conf
|
||||
+++ b/hostapd/hostapd.conf
|
||||
@@ -41,6 +41,7 @@ interface=wlan0
|
||||
|
|
@ -84,7 +84,7 @@ index f37d5634b..594eb0d17 100644
|
|||
# bit 6 (64) = MLME
|
||||
#
|
||||
# Levels (minimum value for logged events):
|
||||
@@ -1438,6 +1439,11 @@ eap_server=0
|
||||
@@ -1476,6 +1477,11 @@ eap_server=0
|
||||
# Whether to enable ERP on the EAP server.
|
||||
#eap_server_erp=1
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ index f37d5634b..594eb0d17 100644
|
|||
##### RADIUS client configuration #############################################
|
||||
# for IEEE 802.1X with external Authentication Server, IEEE 802.11
|
||||
diff --git a/hostapd/main.c b/hostapd/main.c
|
||||
index 0d0e92e9e..8de88e513 100644
|
||||
index b4ef3485f..21b57bd9d 100644
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -84,6 +84,9 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
|
||||
|
|
@ -131,7 +131,7 @@ index a1e9b7c44..27a63dac0 100644
|
|||
ieee802_11.o \
|
||||
ieee802_11_ht.o \
|
||||
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
|
||||
index f795ee919..529ad0b12 100644
|
||||
index 02fd4940c..639e99256 100644
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -346,6 +346,10 @@ struct hostapd_bss_config {
|
||||
|
|
@ -146,7 +146,7 @@ index f795ee919..529ad0b12 100644
|
|||
struct mac_acl_entry *accept_mac;
|
||||
int num_accept_mac;
|
||||
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
|
||||
index 1bd525fe9..a4bf68e6f 100644
|
||||
index c8f100b09..c7d8f20f2 100644
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -29,6 +29,7 @@
|
||||
|
|
@ -157,7 +157,7 @@ index 1bd525fe9..a4bf68e6f 100644
|
|||
#include "ieee802_1x.h"
|
||||
#include "ieee802_11_auth.h"
|
||||
#include "vlan_init.h"
|
||||
@@ -455,6 +456,8 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||
@@ -511,6 +512,8 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
||||
hapd->beacon_set_done = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
||||
|
|
@ -166,7 +166,7 @@ index 1bd525fe9..a4bf68e6f 100644
|
|||
accounting_deinit(hapd);
|
||||
hostapd_deinit_wpa(hapd);
|
||||
vlan_deinit(hapd);
|
||||
@@ -1417,6 +1420,13 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
|
||||
@@ -1528,6 +1531,13 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ index 1bd525fe9..a4bf68e6f 100644
|
|||
#ifdef CONFIG_INTERWORKING
|
||||
if (gas_serv_init(hapd)) {
|
||||
wpa_printf(MSG_ERROR, "GAS server initialization failed");
|
||||
@@ -3313,6 +3323,10 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
@@ -3625,6 +3635,10 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
ap_sta_clear_disconnect_timeouts(hapd, sta);
|
||||
sta->post_csa_sa_query = 0;
|
||||
|
||||
|
|
@ -192,10 +192,10 @@ index 1bd525fe9..a4bf68e6f 100644
|
|||
if (sta->p2p_ie == NULL && !sta->no_p2p_set) {
|
||||
sta->no_p2p_set = 1;
|
||||
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
|
||||
index aba04a925..ae4f0b26f 100644
|
||||
index 19dc5accc..747da82c4 100644
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -210,6 +210,8 @@ struct hostapd_data {
|
||||
@@ -228,6 +228,8 @@ struct hostapd_data {
|
||||
u64 acct_session_id;
|
||||
struct radius_das_data *radius_das;
|
||||
|
||||
|
|
@ -798,10 +798,10 @@ index 000000000..c22118342
|
|||
+
|
||||
+#endif /* IAPP_H */
|
||||
diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h
|
||||
index 824538b41..498b35291 100644
|
||||
index a57f1d507..5b6e5c25d 100644
|
||||
--- a/src/utils/wpa_debug.h
|
||||
+++ b/src/utils/wpa_debug.h
|
||||
@@ -354,6 +354,7 @@ void hostapd_logger_register_cb(hostapd_logger_cb_func func);
|
||||
@@ -355,6 +355,7 @@ void hostapd_logger_register_cb(hostapd_logger_cb_func func);
|
||||
#define HOSTAPD_MODULE_RADIUS 0x00000004
|
||||
#define HOSTAPD_MODULE_WPA 0x00000008
|
||||
#define HOSTAPD_MODULE_DRIVER 0x00000010
|
||||
|
|
@ -822,10 +822,10 @@ index 421977eed..0fc1c2511 100644
|
|||
#CONFIG_FILS=y
|
||||
#CONFIG_FILS_SK_PFS=y
|
||||
diff --git a/tests/hwsim/example-hostapd.config b/tests/hwsim/example-hostapd.config
|
||||
index 5b7130fdc..451414e01 100644
|
||||
index c227625aa..65b218500 100644
|
||||
--- a/tests/hwsim/example-hostapd.config
|
||||
+++ b/tests/hwsim/example-hostapd.config
|
||||
@@ -108,6 +108,7 @@ CONFIG_SUITEB=y
|
||||
@@ -105,6 +105,7 @@ CONFIG_SUITEB192=$(if $(filter openssl mbedtls,$(CONFIG_TLS)),y,)
|
||||
#LIBS_c += -fsanitize=undefined
|
||||
CONFIG_MBO=y
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,9 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||
wpa_supplicant/ctrl_iface.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
|
||||
index ac337e0f5..6e23114e6 100644
|
||||
--- a/wpa_supplicant/ctrl_iface.c
|
||||
+++ b/wpa_supplicant/ctrl_iface.c
|
||||
@@ -12185,7 +12185,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
@@ -12640,7 +12640,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
|
||||
reply_len = -1;
|
||||
#endif /* CONFIG_WNM */
|
||||
|
|
@ -24,7 +22,7 @@ index ac337e0f5..6e23114e6 100644
|
|||
} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
|
||||
if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
|
||||
reply_len = -1;
|
||||
@@ -12195,7 +12195,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||
@@ -12650,7 +12650,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
|
||||
if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
|
||||
reply_len = -1;
|
||||
|
|
@ -33,6 +31,3 @@ index ac337e0f5..6e23114e6 100644
|
|||
} else if (os_strcmp(buf, "FLUSH") == 0) {
|
||||
wpa_supplicant_ctrl_iface_flush(wpa_s);
|
||||
} else if (os_strncmp(buf, "RADIO_WORK ", 11) == 0) {
|
||||
--
|
||||
2.35.1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -8104,6 +8104,7 @@ int wpas_network_disabled(struct wpa_sup
|
||||
!ssid->mem_only_psk)
|
||||
return 1;
|
||||
|
||||
+#ifdef CONFIG_IEEE8021X_EAPOL
|
||||
#ifdef CRYPTO_RSA_OAEP_SHA256
|
||||
if (ssid->eap.imsi_privacy_cert) {
|
||||
struct crypto_rsa_key *key;
|
||||
@@ -8121,7 +8122,7 @@ int wpas_network_disabled(struct wpa_sup
|
||||
}
|
||||
}
|
||||
#endif /* CRYPTO_RSA_OAEP_SHA256 */
|
||||
-
|
||||
+#endif /* CONFIG_IEEE8021X_EAPOL */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From f374d52079111a4340acb6df835f45ac6b5f3f60 Mon Sep 17 00:00:00 2001
|
||||
From: Andre Heider <a.heider@gmail.com>
|
||||
Date: Wed, 22 Jun 2022 14:13:55 +0200
|
||||
Subject: OpenSSL: Include rsa.h for all OpenSSL versions
|
||||
|
||||
This fixes the build with OpenSSL 1.1.1:
|
||||
../src/crypto/crypto_openssl.c: In function 'crypto_rsa_oaep_sha256_decrypt':
|
||||
../src/crypto/crypto_openssl.c:4404:49: error: 'RSA_PKCS1_OAEP_PADDING' undeclared (first use in this function)
|
||||
|
||||
Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
---
|
||||
src/crypto/crypto_openssl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/crypto/crypto_openssl.c
|
||||
+++ b/src/crypto/crypto_openssl.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/rand.h>
|
||||
+#include <openssl/rsa.h>
|
||||
#include <openssl/pem.h>
|
||||
#ifdef CONFIG_ECC
|
||||
#include <openssl/ec.h>
|
||||
@@ -25,7 +26,6 @@
|
||||
#include <openssl/provider.h>
|
||||
#include <openssl/core_names.h>
|
||||
#include <openssl/param_build.h>
|
||||
-#include <openssl/rsa.h>
|
||||
#include <openssl/encoder.h>
|
||||
#include <openssl/decoder.h>
|
||||
#else /* OpenSSL version >= 3.0 */
|
||||
|
|
@ -30,6 +30,12 @@ SRC_URI = "git://w1.fi/hostap.git;protocol=http;branch=main \
|
|||
file://040-mesh-allow-processing-authentication-frames-in-block.patch \
|
||||
file://050-build_fix.patch \
|
||||
file://100-daemonize_fix.patch \
|
||||
file://110-mbedtls-TLS-crypto-option-initial-port.patch \
|
||||
file://120-mbedtls-fips186_2_prf.patch \
|
||||
file://130-mbedtls-annotate-with-TEST_FAIL-for-hwsim-tests.patch \
|
||||
file://140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch \
|
||||
file://150-add-NULL-checks-encountered-during-tests-hwsim.patch \
|
||||
file://160-dpp_pkex-EC-point-mul-w-value-prime.patch \
|
||||
file://200-multicall.patch \
|
||||
file://300-noscan.patch \
|
||||
file://301-mesh-noscan.patch \
|
||||
|
|
@ -49,15 +55,12 @@ SRC_URI = "git://w1.fi/hostap.git;protocol=http;branch=main \
|
|||
file://420-indicate-features.patch \
|
||||
file://430-hostapd_cli_ifdef.patch \
|
||||
file://431-wpa_cli_ifdef.patch \
|
||||
file://432-missing-typedef.patch \
|
||||
file://450-scan_wait.patch \
|
||||
file://460-wpa_supplicant-add-new-config-params-to-be-used-with.patch \
|
||||
file://461-driver_nl80211-use-new-parameters-during-ibss-join.patch \
|
||||
file://463-add-mcast_rate-to-11s.patch \
|
||||
file://464-fix-mesh-obss-check.patch \
|
||||
file://465-hostapd-config-support-random-BSS-color.patch \
|
||||
file://470-survey_data_fallback.patch \
|
||||
file://500-lto-jobserver-support.patch \
|
||||
file://590-rrm-wnm-statistics.patch \
|
||||
file://599-wpa_supplicant-fix-warnings.patch \
|
||||
file://610-hostapd_cli_ujail_permission.patch \
|
||||
|
|
@ -69,19 +72,20 @@ SRC_URI = "git://w1.fi/hostap.git;protocol=http;branch=main \
|
|||
file://740-snoop_iface.patch \
|
||||
file://750-qos_map_set_without_interworking.patch \
|
||||
file://751-qos_map_ignore_when_unsupported.patch \
|
||||
file://910-wpa_supplicant_remove_acl.patch \
|
||||
file://912-iapp-integration.patch \
|
||||
file://913-iapp-improvements.patch \
|
||||
file://760-dynamic_own_ip.patch \
|
||||
file://761-shared_das_port.patch \
|
||||
file://914-wlan-acs-srd-channels.patch \
|
||||
file://990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch \
|
||||
file://991-fix-compile.patch \
|
||||
file://992-openssl-include-rsa.patch \
|
||||
file://0001-fix-create-a-versioned-shared-library-libwlan_client.patch \
|
||||
file://0001-use-nas-port-type-ethernet-for-wired-802.1X.patch \
|
||||
"
|
||||
file://912-iapp-integration.patch \
|
||||
file://913-iapp-improvements.patch \
|
||||
"
|
||||
|
||||
SRCREV = "4383528e01955d995d3b3db201e4c0f9840e8236"
|
||||
SRC_URI[sha256sum] = "a1330574a241200188ff1478df25b58630012d7db91dfe092b8e0a3c50805ef0"
|
||||
# file://500-lto-jobserver-support.patch
|
||||
|
||||
SRCREV = "599d00be9de2846c6ea18c1487d8329522ade22b"
|
||||
SRC_URI[sha256sum] = "828810c558ea181e45ed0c8b940f5c41e55775e2979a15aed8cf0ab17dd7723c"
|
||||
|
||||
CVE_PRODUCT = "${TARGET_NAME}"
|
||||
CONFFILES_${TARGET_NAME} += "${sysconfdir}/${TARGET_NAME}-full.config"
|
||||
|
|
|
|||
|
|
@ -1,554 +1,259 @@
|
|||
--- a/nl80211.h
|
||||
+++ b/nl80211.h
|
||||
@@ -11,7 +11,7 @@
|
||||
* Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
|
||||
* Copyright 2008 Colin McCabe <colin@cozybit.com>
|
||||
* Copyright 2015-2017 Intel Deutschland GmbH
|
||||
- * Copyright (C) 2018-2022 Intel Corporation
|
||||
+ * Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -301,29 +301,6 @@
|
||||
@@ -324,6 +324,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
- * DOC: FILS shared key crypto offload
|
||||
- *
|
||||
- * This feature is applicable to drivers running in AP mode.
|
||||
- *
|
||||
- * FILS shared key crypto offload can be advertised by drivers by setting
|
||||
- * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD flag. The drivers that support
|
||||
- * FILS shared key crypto offload should be able to encrypt and decrypt
|
||||
- * association frames for FILS shared key authentication as per IEEE 802.11ai.
|
||||
- * With this capability, for FILS key derivation, drivers depend on userspace.
|
||||
- *
|
||||
- * After FILS key derivation, userspace shares the FILS AAD details with the
|
||||
- * driver and the driver stores the same to use in decryption of association
|
||||
- * request and in encryption of association response. The below parameters
|
||||
- * should be given to the driver in %NL80211_CMD_SET_FILS_AAD.
|
||||
- * %NL80211_ATTR_MAC - STA MAC address, used for storing FILS AAD per STA
|
||||
- * %NL80211_ATTR_FILS_KEK - Used for encryption or decryption
|
||||
- * %NL80211_ATTR_FILS_NONCES - Used for encryption or decryption
|
||||
- * (STA Nonce 16 bytes followed by AP Nonce 16 bytes)
|
||||
- *
|
||||
- * Once the association is done, the driver cleans the FILS AAD data.
|
||||
- */
|
||||
-
|
||||
-/**
|
||||
+ * DOC: Multi-Link Operation
|
||||
+ *
|
||||
+ * In Multi-Link Operation, a connection between to MLDs utilizes multiple
|
||||
+ * links. To use this in nl80211, various commands and responses now need
|
||||
+ * to or will include the new %NL80211_ATTR_MLO_LINKS attribute.
|
||||
+ * Additionally, various commands that need to operate on a specific link
|
||||
+ * now need to be given the %NL80211_ATTR_MLO_LINK_ID attribute, e.g. to
|
||||
+ * use %NL80211_CMD_START_AP or similar functions.
|
||||
+ */
|
||||
+
|
||||
+/**
|
||||
* enum nl80211_commands - supported nl80211 commands
|
||||
*
|
||||
* @NL80211_CMD_UNSPEC: unspecified command to catch errors
|
||||
@@ -1226,17 +1203,6 @@
|
||||
* @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change
|
||||
* has completed
|
||||
@@ -366,14 +377,22 @@
|
||||
* the non-transmitting interfaces are deleted as well.
|
||||
*
|
||||
- * @NL80211_CMD_SET_FILS_AAD: Set FILS AAD data to the driver using -
|
||||
- * &NL80211_ATTR_MAC - for STA MAC address
|
||||
- * &NL80211_ATTR_FILS_KEK - for KEK
|
||||
- * &NL80211_ATTR_FILS_NONCES - for FILS Nonces
|
||||
- * (STA Nonce 16 bytes followed by AP Nonce 16 bytes)
|
||||
- *
|
||||
- * @NL80211_CMD_ASSOC_COMEBACK: notification about an association
|
||||
- * temporal rejection with comeback. The event includes %NL80211_ATTR_MAC
|
||||
- * to describe the BSSID address of the AP and %NL80211_ATTR_TIMEOUT to
|
||||
- * specify the timeout value.
|
||||
- *
|
||||
* @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
|
||||
- * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
|
||||
+ * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. %NL80211_ATTR_MAC
|
||||
+ * represents peer's MLD address for MLO pairwise key. For MLO group key,
|
||||
+ * the link is identified by %NL80211_ATTR_MLO_LINK_ID.
|
||||
* @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
|
||||
* %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
|
||||
+ * For MLO connection, the link to set default key is identified by
|
||||
+ * %NL80211_ATTR_MLO_LINK_ID.
|
||||
* @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
|
||||
* %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC, %NL80211_ATTR_KEY_CIPHER,
|
||||
- * and %NL80211_ATTR_KEY_SEQ attributes.
|
||||
+ * and %NL80211_ATTR_KEY_SEQ attributes. %NL80211_ATTR_MAC represents
|
||||
+ * peer's MLD address for MLO pairwise key. The link to add MLO
|
||||
+ * group key is identified by %NL80211_ATTR_MLO_LINK_ID.
|
||||
* @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX
|
||||
- * or %NL80211_ATTR_MAC.
|
||||
+ * or %NL80211_ATTR_MAC. %NL80211_ATTR_MAC represents peer's MLD address
|
||||
+ * for MLO pairwise key. The link to delete group key is identified by
|
||||
+ * %NL80211_ATTR_MLO_LINK_ID.
|
||||
*
|
||||
* @NL80211_CMD_GET_BEACON: (not used)
|
||||
* @NL80211_CMD_SET_BEACON: change the beacon on an access point interface
|
||||
@@ -753,6 +772,13 @@
|
||||
* %NL80211_ATTR_CSA_C_OFFSETS_TX is an array of offsets to CSA
|
||||
* counters which will be updated to the current value. This attribute
|
||||
* is used during CSA period.
|
||||
+ * For TX on an MLD, the frequency can be omitted and the link ID be
|
||||
+ * specified, or if transmitting to a known peer MLD (with MLD addresses
|
||||
+ * in the frame) both can be omitted and the link will be selected by
|
||||
+ * lower layers.
|
||||
+ * For RX notification, %NL80211_ATTR_RX_HW_TIMESTAMP may be included to
|
||||
+ * indicate the frame RX timestamp and %NL80211_ATTR_TX_HW_TIMESTAMP may
|
||||
+ * be included to indicate the ack TX timestamp.
|
||||
* @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
|
||||
* command may be used with the corresponding cookie to cancel the wait
|
||||
* time if it is known that it is no longer necessary. This command is
|
||||
@@ -763,7 +789,9 @@
|
||||
* transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies
|
||||
* the TX command and %NL80211_ATTR_FRAME includes the contents of the
|
||||
* frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
|
||||
- * the frame.
|
||||
+ * the frame. %NL80211_ATTR_TX_HW_TIMESTAMP may be included to indicate the
|
||||
+ * tx timestamp and %NL80211_ATTR_RX_HW_TIMESTAMP may be included to
|
||||
+ * indicate the ack RX timestamp.
|
||||
* @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for
|
||||
* backward compatibility.
|
||||
*
|
||||
@@ -1108,6 +1136,12 @@
|
||||
* has been received. %NL80211_ATTR_FRAME is used to specify the
|
||||
* frame contents. The frame is the raw EAPoL data, without ethernet or
|
||||
* 802.11 headers.
|
||||
+ * For an MLD transmitter, the %NL80211_ATTR_MLO_LINK_ID may be given and
|
||||
+ * its effect will depend on the destination: If the destination is known
|
||||
+ * to be an MLD, this will be used as a hint to select the link to transmit
|
||||
+ * the frame on. If the destination is not an MLD, this will select both
|
||||
+ * the link to transmit on and the source address will be set to the link
|
||||
+ * address of that link.
|
||||
* When used as an event indication %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
|
||||
* %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT and %NL80211_ATTR_MAC are added
|
||||
* indicating the protocol type of the received frame; whether the frame
|
||||
@@ -1237,6 +1271,16 @@
|
||||
* to describe the BSSID address of the AP and %NL80211_ATTR_TIMEOUT to
|
||||
* specify the timeout value.
|
||||
*
|
||||
+ * @NL80211_CMD_ADD_LINK: Add a new link to an interface. The
|
||||
+ * %NL80211_ATTR_MLO_LINK_ID attribute is used for the new link.
|
||||
+ * @NL80211_CMD_REMOVE_LINK: Remove a link from an interface. This may come
|
||||
+ * without %NL80211_ATTR_MLO_LINK_ID as an easy way to remove all links
|
||||
+ * in preparation for e.g. roaming to a regular (non-MLO) AP.
|
||||
+ *
|
||||
+ * @NL80211_CMD_ADD_LINK_STA: Add a link to an MLD station
|
||||
+ * @NL80211_CMD_MODIFY_LINK_STA: Modify a link of an MLD station
|
||||
+ * @NL80211_CMD_REMOVE_LINK_STA: Remove a link of an MLD station
|
||||
+ *
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1477,10 +1443,6 @@ enum nl80211_commands {
|
||||
NL80211_CMD_COLOR_CHANGE_ABORTED,
|
||||
NL80211_CMD_COLOR_CHANGE_COMPLETED,
|
||||
@@ -1481,6 +1525,13 @@ enum nl80211_commands {
|
||||
|
||||
- NL80211_CMD_SET_FILS_AAD,
|
||||
-
|
||||
- NL80211_CMD_ASSOC_COMEBACK,
|
||||
-
|
||||
NL80211_CMD_ASSOC_COMEBACK,
|
||||
|
||||
+ NL80211_CMD_ADD_LINK,
|
||||
+ NL80211_CMD_REMOVE_LINK,
|
||||
+
|
||||
+ NL80211_CMD_ADD_LINK_STA,
|
||||
+ NL80211_CMD_MODIFY_LINK_STA,
|
||||
+ NL80211_CMD_REMOVE_LINK_STA,
|
||||
+
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -2477,9 +2439,7 @@ enum nl80211_commands {
|
||||
* space supports external authentication. This attribute shall be used
|
||||
* with %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP request. The driver
|
||||
* may offload authentication processing to user space if this capability
|
||||
- * is indicated in the respective requests from the user space. (This flag
|
||||
- * attribute deprecated for %NL80211_CMD_START_AP, use
|
||||
- * %NL80211_ATTR_AP_SETTINGS_FLAGS)
|
||||
+ * is indicated in the respective requests from the user space.
|
||||
@@ -2340,8 +2391,10 @@ enum nl80211_commands {
|
||||
*
|
||||
* @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this
|
||||
* u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED.
|
||||
@@ -2655,13 +2615,8 @@ enum nl80211_commands {
|
||||
* switching on a different channel during CAC detection on the selected
|
||||
* radar channel.
|
||||
* @NL80211_ATTR_IFTYPE_EXT_CAPA: Nested attribute of the following attributes:
|
||||
* %NL80211_ATTR_IFTYPE, %NL80211_ATTR_EXT_CAPA,
|
||||
- * %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities per
|
||||
- * interface type.
|
||||
+ * %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities and
|
||||
+ * other interface-type specific capabilities per interface type. For MLO,
|
||||
+ * %NL80211_ATTR_EML_CAPABILITY and %NL80211_ATTR_MLD_CAPA_AND_OPS are
|
||||
+ * present.
|
||||
*
|
||||
- * @NL80211_ATTR_AP_SETTINGS_FLAGS: u32 attribute contains ap settings flags,
|
||||
- * enumerated in &enum nl80211_ap_settings_flags. This attribute shall be
|
||||
- * used with %NL80211_CMD_START_AP request.
|
||||
- *
|
||||
- * @NL80211_ATTR_EHT_CAPABILITY: EHT Capability information element (from
|
||||
- * association request when used with NL80211_CMD_NEW_STATION). Can be set
|
||||
- * only if %NL80211_STA_FLAG_WME is set.
|
||||
* @NL80211_ATTR_MU_MIMO_GROUP_DATA: array of 24 bytes that defines a MU-MIMO
|
||||
* groupID for monitor mode.
|
||||
@@ -2663,6 +2716,44 @@ enum nl80211_commands {
|
||||
* association request when used with NL80211_CMD_NEW_STATION). Can be set
|
||||
* only if %NL80211_STA_FLAG_WME is set.
|
||||
*
|
||||
+ * @NL80211_ATTR_MLO_LINK_ID: A (u8) link ID for use with MLO, to be used with
|
||||
+ * various commands that need a link ID to operate.
|
||||
+ * @NL80211_ATTR_MLO_LINKS: A nested array of links, each containing some
|
||||
+ * per-link information and a link ID.
|
||||
+ * @NL80211_ATTR_MLD_ADDR: An MLD address, used with various commands such as
|
||||
+ * authenticate/associate.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_MLO_SUPPORT: Flag attribute to indicate user space supports MLO
|
||||
+ * connection. Used with %NL80211_CMD_CONNECT. If this attribute is not
|
||||
+ * included in NL80211_CMD_CONNECT drivers must not perform MLO connection.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_MAX_NUM_AKM_SUITES: U16 attribute. Indicates maximum number of
|
||||
+ * AKM suites allowed for %NL80211_CMD_CONNECT, %NL80211_CMD_ASSOCIATE and
|
||||
+ * %NL80211_CMD_START_AP in %NL80211_CMD_GET_WIPHY response. If this
|
||||
+ * attribute is not present userspace shall consider maximum number of AKM
|
||||
+ * suites allowed as %NL80211_MAX_NR_AKM_SUITES which is the legacy maximum
|
||||
+ * number prior to the introduction of this attribute.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_EML_CAPABILITY: EML Capability information (u16)
|
||||
+ * @NL80211_ATTR_MLD_CAPA_AND_OPS: MLD Capabilities and Operations (u16)
|
||||
+ *
|
||||
+ * @NL80211_ATTR_TX_HW_TIMESTAMP: Hardware timestamp for TX operation in
|
||||
+ * nanoseconds (u64). This is the device clock timestamp so it will
|
||||
+ * probably reset when the device is stopped or the firmware is reset.
|
||||
+ * When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the frame TX
|
||||
+ * timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
|
||||
+ * the ack TX timestamp.
|
||||
+ * @NL80211_ATTR_RX_HW_TIMESTAMP: Hardware timestamp for RX operation in
|
||||
+ * nanoseconds (u64). This is the device clock timestamp so it will
|
||||
+ * probably reset when the device is stopped or the firmware is reset.
|
||||
+ * When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the ack RX
|
||||
+ * timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
|
||||
+ * the incoming frame RX timestamp.
|
||||
+ * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
|
||||
+ * (re)associations.
|
||||
+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
|
||||
+ * transmit power to stay within regulatory limits. u32, dBi.
|
||||
*
|
||||
+ *
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
@@ -3171,11 +3126,7 @@ enum nl80211_attrs {
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3177,6 +3268,23 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_RADAR_BACKGROUND,
|
||||
NL80211_ATTR_DISABLE_EHT,
|
||||
|
||||
- NL80211_ATTR_AP_SETTINGS_FLAGS,
|
||||
-
|
||||
- NL80211_ATTR_EHT_CAPABILITY,
|
||||
-
|
||||
- NL80211_ATTR_DISABLE_EHT,
|
||||
+ NL80211_ATTR_MLO_LINKS,
|
||||
+ NL80211_ATTR_MLO_LINK_ID,
|
||||
+ NL80211_ATTR_MLD_ADDR,
|
||||
+
|
||||
+ NL80211_ATTR_MLO_SUPPORT,
|
||||
+
|
||||
+ NL80211_ATTR_MAX_NUM_AKM_SUITES,
|
||||
+
|
||||
+ NL80211_ATTR_EML_CAPABILITY,
|
||||
+ NL80211_ATTR_MLD_CAPA_AND_OPS,
|
||||
+
|
||||
+ NL80211_ATTR_TX_HW_TIMESTAMP,
|
||||
+ NL80211_ATTR_RX_HW_TIMESTAMP,
|
||||
+ NL80211_ATTR_TD_BITMAP,
|
||||
+
|
||||
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
|
||||
|
||||
+
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
@@ -3232,8 +3183,6 @@ enum nl80211_attrs {
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -3231,6 +3339,11 @@ enum nl80211_attrs {
|
||||
#define NL80211_HE_MIN_CAPABILITY_LEN 16
|
||||
#define NL80211_HE_MAX_CAPABILITY_LEN 54
|
||||
#define NL80211_MAX_NR_CIPHER_SUITES 5
|
||||
#define NL80211_MAX_NR_AKM_SUITES 2
|
||||
-#define NL80211_EHT_MIN_CAPABILITY_LEN 13
|
||||
-#define NL80211_EHT_MAX_CAPABILITY_LEN 51
|
||||
|
||||
#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10
|
||||
|
||||
@@ -3261,7 +3210,7 @@ enum nl80211_attrs {
|
||||
* and therefore can't be created in the normal ways, use the
|
||||
* %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE
|
||||
* commands to create and destroy one
|
||||
- * @NL80211_IFTYPE_OCB: Outside Context of a BSS
|
||||
+ * @NL80211_IF_TYPE_OCB: Outside Context of a BSS
|
||||
* This mode corresponds to the MIB variable dot11OCBActivated=true
|
||||
* @NL80211_IFTYPE_NAN: NAN device interface type (not a netdev)
|
||||
* @NL80211_IFTYPE_MAX: highest interface type number currently defined
|
||||
@@ -3403,56 +3352,6 @@ enum nl80211_he_ru_alloc {
|
||||
};
|
||||
|
||||
/**
|
||||
- * enum nl80211_eht_gi - EHT guard interval
|
||||
- * @NL80211_RATE_INFO_EHT_GI_0_8: 0.8 usec
|
||||
- * @NL80211_RATE_INFO_EHT_GI_1_6: 1.6 usec
|
||||
- * @NL80211_RATE_INFO_EHT_GI_3_2: 3.2 usec
|
||||
- */
|
||||
-enum nl80211_eht_gi {
|
||||
- NL80211_RATE_INFO_EHT_GI_0_8,
|
||||
- NL80211_RATE_INFO_EHT_GI_1_6,
|
||||
- NL80211_RATE_INFO_EHT_GI_3_2,
|
||||
-};
|
||||
-
|
||||
-/**
|
||||
- * enum nl80211_eht_ru_alloc - EHT RU allocation values
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_52: 52-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_52P26: 52+26-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_106: 106-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_106P26: 106+26 tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_242: 242-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_484: 484-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_484P242: 484+242 tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_996: 996-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_996P484: 996+484 tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242: 996+484+242 tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_2x996: 2x996-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484: 2x996+484 tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_3x996: 3x996-tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484: 3x996+484 tone RU allocation
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC_4x996: 4x996-tone RU allocation
|
||||
- */
|
||||
-enum nl80211_eht_ru_alloc {
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_26,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_52,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_52P26,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_106,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_106P26,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_242,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_484,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_484P242,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_996,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_996P484,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_2x996,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_3x996,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC_4x996,
|
||||
-};
|
||||
-
|
||||
-/**
|
||||
* enum nl80211_rate_info - bitrate information
|
||||
*
|
||||
* These attribute types are used with %NL80211_STA_INFO_TXRATE
|
||||
@@ -3491,13 +3390,6 @@ enum nl80211_eht_ru_alloc {
|
||||
* @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1)
|
||||
* @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then
|
||||
* non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc)
|
||||
- * @NL80211_RATE_INFO_320_MHZ_WIDTH: 320 MHz bitrate
|
||||
- * @NL80211_RATE_INFO_EHT_MCS: EHT MCS index (u8, 0-15)
|
||||
- * @NL80211_RATE_INFO_EHT_NSS: EHT NSS value (u8, 1-8)
|
||||
- * @NL80211_RATE_INFO_EHT_GI: EHT guard interval identifier
|
||||
- * (u8, see &enum nl80211_eht_gi)
|
||||
- * @NL80211_RATE_INFO_EHT_RU_ALLOC: EHT RU allocation, if not present then
|
||||
- * non-OFDMA was used (u8, see &enum nl80211_eht_ru_alloc)
|
||||
* @__NL80211_RATE_INFO_AFTER_LAST: internal use
|
||||
*/
|
||||
enum nl80211_rate_info {
|
||||
@@ -3519,11 +3411,6 @@ enum nl80211_rate_info {
|
||||
NL80211_RATE_INFO_HE_GI,
|
||||
NL80211_RATE_INFO_HE_DCM,
|
||||
NL80211_RATE_INFO_HE_RU_ALLOC,
|
||||
- NL80211_RATE_INFO_320_MHZ_WIDTH,
|
||||
- NL80211_RATE_INFO_EHT_MCS,
|
||||
- NL80211_RATE_INFO_EHT_NSS,
|
||||
- NL80211_RATE_INFO_EHT_GI,
|
||||
- NL80211_RATE_INFO_EHT_RU_ALLOC,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_RATE_INFO_AFTER_LAST,
|
||||
@@ -3834,20 +3721,13 @@ enum nl80211_mpath_info {
|
||||
* capabilities IE
|
||||
* @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as
|
||||
* defined in HE capabilities IE
|
||||
+ * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
|
||||
+ * defined
|
||||
* @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
|
||||
* given for all 6 GHz band channels
|
||||
* @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are
|
||||
* advertised on this band/for this iftype (binary)
|
||||
- * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC: EHT MAC capabilities as in EHT
|
||||
- * capabilities element
|
||||
- * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY: EHT PHY capabilities as in EHT
|
||||
- * capabilities element
|
||||
- * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET: EHT supported NSS/MCS as in EHT
|
||||
- * capabilities element
|
||||
- * @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as
|
||||
- * defined in EHT capabilities element
|
||||
* @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
|
||||
- * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined
|
||||
*/
|
||||
enum nl80211_band_iftype_attr {
|
||||
__NL80211_BAND_IFTYPE_ATTR_INVALID,
|
||||
@@ -3859,10 +3739,6 @@ enum nl80211_band_iftype_attr {
|
||||
NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
|
||||
NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
|
||||
NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS,
|
||||
- NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC,
|
||||
- NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,
|
||||
- NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,
|
||||
- NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
|
||||
@@ -4007,10 +3883,6 @@ enum nl80211_wmm_rule {
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
|
||||
* on this channel in current regulatory domain.
|
||||
- * @NL80211_FREQUENCY_ATTR_NO_320MHZ: any 320 MHz channel using this channel
|
||||
- * as the primary or any of the secondary channels isn't possible
|
||||
- * @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
|
||||
- * in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||
* currently defined
|
||||
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||
@@ -4047,8 +3919,6 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_4MHZ,
|
||||
NL80211_FREQUENCY_ATTR_8MHZ,
|
||||
NL80211_FREQUENCY_ATTR_16MHZ,
|
||||
- NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
- NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
|
||||
@@ -4247,7 +4117,6 @@ enum nl80211_sched_scan_match_attr {
|
||||
* @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
|
||||
* @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed
|
||||
* @NL80211_RRF_NO_HE: HE operation not allowed
|
||||
- * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed
|
||||
*/
|
||||
enum nl80211_reg_rule_flags {
|
||||
NL80211_RRF_NO_OFDM = 1<<0,
|
||||
@@ -4266,7 +4135,6 @@ enum nl80211_reg_rule_flags {
|
||||
NL80211_RRF_NO_80MHZ = 1<<15,
|
||||
NL80211_RRF_NO_160MHZ = 1<<16,
|
||||
NL80211_RRF_NO_HE = 1<<17,
|
||||
- NL80211_RRF_NO_320MHZ = 1<<18,
|
||||
};
|
||||
|
||||
#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
|
||||
@@ -4764,8 +4632,6 @@ enum nl80211_key_mode {
|
||||
* @NL80211_CHAN_WIDTH_4: 4 MHz OFDM channel
|
||||
* @NL80211_CHAN_WIDTH_8: 8 MHz OFDM channel
|
||||
* @NL80211_CHAN_WIDTH_16: 16 MHz OFDM channel
|
||||
- * @NL80211_CHAN_WIDTH_320: 320 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
|
||||
- * attribute must be provided as well
|
||||
*/
|
||||
enum nl80211_chan_width {
|
||||
NL80211_CHAN_WIDTH_20_NOHT,
|
||||
@@ -4781,7 +4647,6 @@ enum nl80211_chan_width {
|
||||
NL80211_CHAN_WIDTH_4,
|
||||
NL80211_CHAN_WIDTH_8,
|
||||
NL80211_CHAN_WIDTH_16,
|
||||
- NL80211_CHAN_WIDTH_320,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -5096,7 +4961,6 @@ enum nl80211_txrate_gi {
|
||||
* @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
|
||||
* @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
|
||||
* @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs
|
||||
- * @NL80211_BAND_LC: light communication band (placeholder)
|
||||
* @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
|
||||
* since newer kernel versions may support more bands
|
||||
*/
|
||||
@@ -5106,7 +4970,6 @@ enum nl80211_band {
|
||||
NL80211_BAND_60GHZ,
|
||||
NL80211_BAND_6GHZ,
|
||||
NL80211_BAND_S1GHZ,
|
||||
- NL80211_BAND_LC,
|
||||
|
||||
NUM_NL80211_BANDS,
|
||||
};
|
||||
@@ -5673,7 +5536,7 @@ enum nl80211_iface_limit_attrs {
|
||||
* => allows 8 of AP/GO that can have BI gcd >= min gcd
|
||||
*
|
||||
* numbers = [ #{STA} <= 2 ], channels = 2, max = 2
|
||||
- * => allows two STAs on the same or on different channels
|
||||
+ * => allows two STAs on different channels
|
||||
*
|
||||
* numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4
|
||||
* => allows a STA plus three P2P interfaces
|
||||
@@ -5718,7 +5581,7 @@ enum nl80211_if_combination_attrs {
|
||||
* @NL80211_PLINK_ESTAB: mesh peer link is established
|
||||
* @NL80211_PLINK_HOLDING: mesh peer link is being closed or cancelled
|
||||
* @NL80211_PLINK_BLOCKED: all frames transmitted from this mesh
|
||||
- * plink are discarded, except for authentication frames
|
||||
+ * plink are discarded
|
||||
* @NUM_NL80211_PLINK_STATES: number of peer link states
|
||||
* @MAX_NL80211_PLINK_STATES: highest numerical value of plink states
|
||||
*/
|
||||
@@ -5855,15 +5718,13 @@ enum nl80211_tdls_operation {
|
||||
NL80211_TDLS_DISABLE_LINK,
|
||||
};
|
||||
|
||||
-/**
|
||||
+
|
||||
+/*
|
||||
* enum nl80211_ap_sme_features - device-integrated AP features
|
||||
- * @NL80211_AP_SME_SA_QUERY_OFFLOAD: SA Query procedures offloaded to driver
|
||||
- * when user space indicates support for SA Query procedures offload during
|
||||
- * "start ap" with %NL80211_AP_SETTINGS_SA_QUERY_OFFLOAD_SUPPORT.
|
||||
- */
|
||||
+ * Reserved for future use, no bits are defined in
|
||||
+ * NL80211_ATTR_DEVICE_AP_SME yet.
|
||||
enum nl80211_ap_sme_features {
|
||||
- NL80211_AP_SME_SA_QUERY_OFFLOAD = 1 << 0,
|
||||
};
|
||||
+ * NL80211_MAX_NR_AKM_SUITES is obsolete when %NL80211_ATTR_MAX_NUM_AKM_SUITES
|
||||
+ * present in %NL80211_CMD_GET_WIPHY response.
|
||||
+ */
|
||||
#define NL80211_MAX_NR_AKM_SUITES 2
|
||||
#define NL80211_EHT_MIN_CAPABILITY_LEN 13
|
||||
#define NL80211_EHT_MAX_CAPABILITY_LEN 51
|
||||
@@ -4853,6 +4966,8 @@ enum nl80211_bss_scan_width {
|
||||
* Contains a nested array of signal strength attributes (u8, dBm),
|
||||
* using the nesting index as the antenna number.
|
||||
* @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
|
||||
+ * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8).
|
||||
+ * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it.
|
||||
* @__NL80211_BSS_AFTER_LAST: internal
|
||||
* @NL80211_BSS_MAX: highest BSS attribute
|
||||
*/
|
||||
@@ -4878,6 +4993,8 @@ enum nl80211_bss {
|
||||
NL80211_BSS_PARENT_BSSID,
|
||||
NL80211_BSS_CHAIN_SIGNAL,
|
||||
NL80211_BSS_FREQUENCY_OFFSET,
|
||||
+ NL80211_BSS_MLO_LINK_ID,
|
||||
+ NL80211_BSS_MLD_ADDR,
|
||||
|
||||
/**
|
||||
* enum nl80211_feature_flags - device/driver features
|
||||
@@ -6166,11 +6027,6 @@ enum nl80211_feature_flags {
|
||||
* @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision
|
||||
* detection and change announcemnts.
|
||||
*
|
||||
- * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD: Driver running in AP mode supports
|
||||
- * FILS encryption and decryption for (Re)Association Request and Response
|
||||
- * frames. Userspace has to share FILS AAD details to the driver by using
|
||||
- * @NL80211_CMD_SET_FILS_AAD.
|
||||
- *
|
||||
/* keep last */
|
||||
__NL80211_BSS_AFTER_LAST,
|
||||
@@ -5874,7 +5991,7 @@ enum nl80211_ap_sme_features {
|
||||
* @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up
|
||||
* the connected inactive stations in AP mode.
|
||||
* @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
|
||||
- * to work properly to suppport receiving regulatory hints from
|
||||
+ * to work properly to support receiving regulatory hints from
|
||||
* cellular base stations.
|
||||
* @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: (no longer available, only
|
||||
* here to reserve the value for API/ABI compatibility)
|
||||
@@ -6174,6 +6291,14 @@ enum nl80211_feature_flags {
|
||||
* @NL80211_EXT_FEATURE_RADAR_BACKGROUND: Device supports background radar/CAC
|
||||
* detection.
|
||||
*
|
||||
@@ -6239,7 +6095,6 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_SECURE_RTT,
|
||||
NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
|
||||
+ * @NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE: Device can perform a MAC address
|
||||
+ * change without having to bring the underlying network device down
|
||||
+ * first. For example, in station mode this can be used to vary the
|
||||
+ * origin MAC address prior to a connection to a new AP for privacy
|
||||
+ * or other reasons. Note that certain driver specific restrictions
|
||||
+ * might apply, e.g. no scans in progress, no offchannel operations
|
||||
+ * in progress, and no active connections.
|
||||
+ *
|
||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||
*/
|
||||
@@ -6241,6 +6366,7 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_BSS_COLOR,
|
||||
- NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
|
||||
NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
|
||||
NL80211_EXT_FEATURE_RADAR_BACKGROUND,
|
||||
+ NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE,
|
||||
|
||||
/* add new features before the definition below */
|
||||
@@ -7548,7 +7403,7 @@ enum nl80211_sar_specs_attrs {
|
||||
* @NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY: Used by the kernel
|
||||
* to advertise the maximum profile periodicity supported by the driver
|
||||
* if EMA is enabled. Driver should indicate EMA support to the userspace
|
||||
- * by setting wiphy->ema_max_profile_periodicity to
|
||||
+ * by setting wiphy->mbssid_max_ema_profile_periodicity to
|
||||
* a non-zero value.
|
||||
*
|
||||
* @NL80211_MBSSID_CONFIG_ATTR_INDEX: Mandatory parameter to pass the index of
|
||||
@@ -7567,7 +7422,7 @@ enum nl80211_sar_specs_attrs {
|
||||
*
|
||||
* @NL80211_MBSSID_CONFIG_ATTR_EMA: Flag used to enable EMA AP feature.
|
||||
* Setting this flag is permitted only if the driver advertises EMA support
|
||||
- * by setting wiphy->ema_max_profile_periodicity to non-zero.
|
||||
+ * by setting wiphy->mbssid_max_ema_profile_periodicity to non-zero.
|
||||
*
|
||||
* @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal
|
||||
* @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute
|
||||
@@ -7586,20 +7441,4 @@ enum nl80211_mbssid_config_attributes {
|
||||
NL80211_MBSSID_CONFIG_ATTR_MAX = __NL80211_MBSSID_CONFIG_ATTR_LAST - 1,
|
||||
};
|
||||
|
||||
-/**
|
||||
- * enum nl80211_ap_settings_flags - AP settings flags
|
||||
- *
|
||||
- * @NL80211_AP_SETTINGS_EXTERNAL_AUTH_SUPPORT: AP supports external
|
||||
- * authentication.
|
||||
- * @NL80211_AP_SETTINGS_SA_QUERY_OFFLOAD_SUPPORT: Userspace supports SA Query
|
||||
- * procedures offload to driver. If driver advertises
|
||||
- * %NL80211_AP_SME_SA_QUERY_OFFLOAD in AP SME features, userspace shall
|
||||
- * ignore SA Query procedures and validations when this flag is set by
|
||||
- * userspace.
|
||||
- */
|
||||
-enum nl80211_ap_settings_flags {
|
||||
- NL80211_AP_SETTINGS_EXTERNAL_AUTH_SUPPORT = 1 << 0,
|
||||
- NL80211_AP_SETTINGS_SA_QUERY_OFFLOAD_SUPPORT = 1 << 1,
|
||||
-};
|
||||
-
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
--- a/event.c
|
||||
+++ b/event.c
|
||||
@@ -1292,9 +1292,6 @@ static int print_event(struct nl_msg *ms
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
parse_ch_switch_notify(tb, gnlh->cmd);
|
||||
break;
|
||||
- case NL80211_CMD_ASSOC_COMEBACK: /* 147 */
|
||||
- parse_assoc_comeback(tb, gnlh->cmd);
|
||||
- break;
|
||||
default:
|
||||
printf("unknown event %d (%s)\n",
|
||||
gnlh->cmd, command_name(gnlh->cmd));
|
||||
--- a/info.c
|
||||
+++ b/info.c
|
||||
@@ -164,7 +164,6 @@ static void ext_feat_print(enum nl80211_
|
||||
ext_feat_case(PROT_RANGE_NEGO_AND_MEASURE,
|
||||
"support for MFP in range measurement negotiation/procedure");
|
||||
ext_feat_case(BSS_COLOR, "BSS coloring support");
|
||||
- ext_feat_case(FILS_CRYPTO_OFFLOAD, "FILS crypto offload");
|
||||
ext_feat_case(RADAR_BACKGROUND, "Radar background support");
|
||||
}
|
||||
}
|
||||
--- a/interface.c
|
||||
+++ b/interface.c
|
||||
@@ -362,8 +362,6 @@ char *channel_width_name(enum nl80211_ch
|
||||
return "5 MHz";
|
||||
case NL80211_CHAN_WIDTH_10:
|
||||
return "10 MHz";
|
||||
- case NL80211_CHAN_WIDTH_320:
|
||||
- return "320 MHz";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -508,7 +508,6 @@ static int parse_freqs(struct chandef *c
|
||||
case NL80211_CHAN_WIDTH_40:
|
||||
case NL80211_CHAN_WIDTH_80:
|
||||
case NL80211_CHAN_WIDTH_160:
|
||||
- case NL80211_CHAN_WIDTH_320:
|
||||
need_cf1 = true;
|
||||
break;
|
||||
case NL80211_CHAN_WIDTH_1:
|
||||
@@ -626,10 +625,6 @@ int parse_freqchan(struct chandef *chand
|
||||
.width = NL80211_CHAN_WIDTH_160,
|
||||
.freq1_diff = 0,
|
||||
.chantype = -1 },
|
||||
- { .name = "320MHz",
|
||||
- .width = NL80211_CHAN_WIDTH_320,
|
||||
- .freq1_diff = 0,
|
||||
- .chantype = -1 },
|
||||
};
|
||||
const struct chanmode *chanmode_selected = NULL;
|
||||
unsigned int freq;
|
||||
@@ -1599,48 +1594,6 @@ void print_eht_info(struct nlattr *nl_if
|
||||
print_iftype_line(tb[NL80211_BAND_IFTYPE_ATTR_IFTYPES]);
|
||||
printf("\n");
|
||||
|
||||
- if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC]) {
|
||||
- len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC]);
|
||||
- if (len > sizeof(mac_cap))
|
||||
- len = sizeof(mac_cap);
|
||||
- memcpy(mac_cap,
|
||||
- nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC]),
|
||||
- len);
|
||||
- }
|
||||
-
|
||||
- if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]) {
|
||||
- len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]);
|
||||
-
|
||||
- if (len > sizeof(phy_cap))
|
||||
- len = sizeof(phy_cap);
|
||||
-
|
||||
- memcpy(phy_cap,
|
||||
- nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY]),
|
||||
- len);
|
||||
- }
|
||||
-
|
||||
- if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET]) {
|
||||
- len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET]);
|
||||
- if (len > sizeof(mcs_set))
|
||||
- len = sizeof(mcs_set);
|
||||
- memcpy(mcs_set,
|
||||
- nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET]),
|
||||
- len);
|
||||
-
|
||||
- // Assume that all parts of the MCS set are present
|
||||
- mcs_len = sizeof(mcs_set);
|
||||
- }
|
||||
-
|
||||
- if (tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]) {
|
||||
- len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]);
|
||||
- if (len > sizeof(ppet))
|
||||
- len = sizeof(ppet);
|
||||
- memcpy(ppet,
|
||||
- nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]),
|
||||
- len);
|
||||
- ppet_len = len;
|
||||
- }
|
||||
-
|
||||
if (tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY]) {
|
||||
len = nla_len(tb[NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY]);
|
||||
|
||||
--- a/reg.c
|
||||
+++ b/reg.c
|
||||
@@ -210,7 +210,6 @@ static int print_reg_handler(struct nl_m
|
||||
PARSE_FLAG(NL80211_RRF_NO_80MHZ, "NO-80MHZ");
|
||||
PARSE_FLAG(NL80211_RRF_NO_160MHZ, "NO-160MHZ");
|
||||
PARSE_FLAG(NL80211_RRF_NO_HE, "NO-HE");
|
||||
- PARSE_FLAG(NL80211_RRF_NO_320MHZ, "NO-320MHZ");
|
||||
|
||||
/* Kernels that support NO_IR always turn on both flags */
|
||||
if ((flags & NL80211_RRF_NO_IR) && (flags & __NL80211_RRF_NO_IBSS)) {
|
||||
--- a/station.c
|
||||
+++ b/station.c
|
||||
@@ -239,8 +239,6 @@ void parse_bitrate(struct nlattr *bitrat
|
||||
pos += snprintf(pos, buflen - (pos - buf), " 80P80MHz");
|
||||
if (rinfo[NL80211_RATE_INFO_160_MHZ_WIDTH])
|
||||
pos += snprintf(pos, buflen - (pos - buf), " 160MHz");
|
||||
- if (rinfo[NL80211_RATE_INFO_320_MHZ_WIDTH])
|
||||
- pos += snprintf(pos, buflen - (pos - buf), " 320MHz");
|
||||
if (rinfo[NL80211_RATE_INFO_SHORT_GI])
|
||||
pos += snprintf(pos, buflen - (pos - buf), " short GI");
|
||||
if (rinfo[NL80211_RATE_INFO_VHT_NSS])
|
||||
@@ -261,18 +259,6 @@ void parse_bitrate(struct nlattr *bitrat
|
||||
if (rinfo[NL80211_RATE_INFO_HE_RU_ALLOC])
|
||||
pos += snprintf(pos, buflen - (pos - buf),
|
||||
" HE-RU-ALLOC %d", nla_get_u8(rinfo[NL80211_RATE_INFO_HE_RU_ALLOC]));
|
||||
- if (rinfo[NL80211_RATE_INFO_EHT_MCS])
|
||||
- pos += snprintf(pos, buflen - (pos - buf),
|
||||
- " EHT-MCS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_EHT_MCS]));
|
||||
- if (rinfo[NL80211_RATE_INFO_EHT_NSS])
|
||||
- pos += snprintf(pos, buflen - (pos - buf),
|
||||
- " EHT-NSS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_EHT_NSS]));
|
||||
- if (rinfo[NL80211_RATE_INFO_EHT_GI])
|
||||
- pos += snprintf(pos, buflen - (pos - buf),
|
||||
- " EHT-GI %d", nla_get_u8(rinfo[NL80211_RATE_INFO_EHT_GI]));
|
||||
- if (rinfo[NL80211_RATE_INFO_EHT_RU_ALLOC])
|
||||
- pos += snprintf(pos, buflen - (pos - buf),
|
||||
- " EHT-RU-ALLOC %d", nla_get_u8(rinfo[NL80211_RATE_INFO_EHT_RU_ALLOC]));
|
||||
}
|
||||
|
||||
static char *get_chain_signal(struct nlattr *attr_list)
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
case NL80211_CMD_JOIN_IBSS:
|
||||
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
|
||||
printf("IBSS %s joined\n", macbuf);
|
||||
@@ -1292,9 +1295,9 @@ static int print_event(struct nl_msg *ms
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
parse_ch_switch_notify(tb, gnlh->cmd);
|
||||
@@ -1295,9 +1298,9 @@ static int print_event(struct nl_msg *ms
|
||||
case NL80211_CMD_ASSOC_COMEBACK: /* 147 */
|
||||
parse_assoc_comeback(tb, gnlh->cmd);
|
||||
break;
|
||||
+#endif
|
||||
default:
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
--- a/info.c
|
||||
+++ b/info.c
|
||||
@@ -308,6 +308,7 @@ next:
|
||||
@@ -309,6 +309,7 @@ next:
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
if (tb_band[NL80211_BAND_ATTR_RATES]) {
|
||||
printf("\t\tBitrates (non-HT):\n");
|
||||
nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
|
||||
@@ -324,6 +325,7 @@ next:
|
||||
@@ -325,6 +326,7 @@ next:
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -389,6 +391,7 @@ next:
|
||||
@@ -390,6 +392,7 @@ next:
|
||||
printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
|
||||
int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
|
||||
int i;
|
||||
@@ -400,6 +403,7 @@ next:
|
||||
@@ -401,6 +404,7 @@ next:
|
||||
cipher_name(ciphers[i]));
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
|
||||
tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
|
||||
@@ -417,9 +421,11 @@ next:
|
||||
@@ -418,9 +422,11 @@ next:
|
||||
print_iftype_list("\tSupported interface modes", "\t\t",
|
||||
tb_msg[NL80211_ATTR_SUPPORTED_IFTYPES]);
|
||||
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
|
||||
struct nlattr *nl_combi;
|
||||
@@ -509,6 +515,7 @@ broken_combination:
|
||||
@@ -510,6 +516,7 @@ broken_combination:
|
||||
printf("\tinterface combinations are not supported\n");
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
|
||||
printf("\tSupported commands:\n");
|
||||
nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
|
||||
@@ -606,6 +613,7 @@ broken_combination:
|
||||
@@ -607,6 +614,7 @@ broken_combination:
|
||||
printf("\t\t * wake up on TCP connection\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
|
||||
if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
|
||||
printf("\tDevice supports roaming.\n");
|
||||
@@ -644,6 +652,7 @@ broken_combination:
|
||||
@@ -645,6 +653,7 @@ broken_combination:
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
|
||||
unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
|
||||
|
||||
@@ -708,6 +717,7 @@ broken_combination:
|
||||
@@ -709,6 +718,7 @@ broken_combination:
|
||||
if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR)
|
||||
printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n");
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])
|
||||
printf("\tDevice supports T-DLS.\n");
|
||||
@@ -773,6 +783,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
|
||||
@@ -774,6 +784,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
|
||||
"List all wireless devices and their capabilities.");
|
||||
TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
|
||||
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
|
||||
int argc, char **argv, enum id_input id)
|
||||
{
|
||||
@@ -784,6 +795,7 @@ static int handle_commands(struct nl8021
|
||||
@@ -785,6 +796,7 @@ static int handle_commands(struct nl8021
|
||||
}
|
||||
TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
|
||||
"list all known commands and their decimal & hex value");
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
ifeq ($(NO_PKG_CONFIG),)
|
||||
--- a/station.c
|
||||
+++ b/station.c
|
||||
@@ -777,10 +777,12 @@ static int handle_station_set_plink(stru
|
||||
@@ -791,10 +791,12 @@ static int handle_station_set_plink(stru
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
|
@ -305,7 +305,7 @@
|
|||
|
||||
static int handle_station_set_vlan(struct nl80211_state *state,
|
||||
struct nl_msg *msg,
|
||||
@@ -875,11 +877,13 @@ static int handle_station_set_mesh_power
|
||||
@@ -889,11 +891,13 @@ static int handle_station_set_mesh_power
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
|
@ -321,7 +321,7 @@
|
|||
struct nl_msg *msg,
|
||||
--- a/interface.c
|
||||
+++ b/interface.c
|
||||
@@ -627,9 +627,11 @@ static int handle_interface_wds_peer(str
|
||||
@@ -629,9 +629,11 @@ static int handle_interface_wds_peer(str
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
|
|
@ -333,7 +333,7 @@
|
|||
|
||||
static int set_mcast_rate(struct nl80211_state *state,
|
||||
struct nl_msg *msg,
|
||||
@@ -719,6 +721,7 @@ static int handle_chan(struct nl80211_st
|
||||
@@ -721,6 +723,7 @@ static int handle_chan(struct nl80211_st
|
||||
return handle_chanfreq(state, msg, true, argc, argv, id);
|
||||
}
|
||||
|
||||
|
|
@ -341,7 +341,7 @@
|
|||
SECTION(switch);
|
||||
COMMAND(switch, freq,
|
||||
"<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n"
|
||||
@@ -990,3 +993,4 @@ COMMAND(set, tidconf, "[peer <MAC addres
|
||||
@@ -992,3 +995,4 @@ COMMAND(set, tidconf, "[peer <MAC addres
|
||||
" $ iw dev wlan0 set tidconf peer xx:xx:xx:xx:xx:xx tids 0x2 bitrates auto\n"
|
||||
" $ iw dev wlan0 set tidconf peer xx:xx:xx:xx:xx:xx tids 0x2 bitrates limit vht-mcs-5 4:9\n"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,33 +1,35 @@
|
|||
--- a/info.c 2018-04-24 15:21:57.715128889 +0200
|
||||
+++ b/info.c 2018-04-24 15:18:56.415126745 +0200
|
||||
@@ -190,6 +190,10 @@ static int print_phy_handler(struct nl_m
|
||||
diff --git a/info.c b/info.c
|
||||
index 4ea6a53..e1af878 100644
|
||||
--- a/info.c
|
||||
+++ b/info.c
|
||||
@@ -302,6 +302,10 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
|
||||
|
||||
if (tb_freq[NL80211_FREQUENCY_ATTR_RADAR])
|
||||
print_flag("radar detection", &open);
|
||||
+
|
||||
+ /* do not use short range device channels */
|
||||
+ if (tb_freq[NL80211_FREQUENCY_ATTR_SRD_CHANNEL])
|
||||
+ print_flag("SRD", &open);
|
||||
+
|
||||
+ /* do not use short range device channels */
|
||||
+ if (tb_freq[NL80211_FREQUENCY_ATTR_SRD_CHANNEL])
|
||||
+ print_flag("SRD", &open);
|
||||
next:
|
||||
if (open)
|
||||
printf(")");
|
||||
--- a/nl80211.h 2018-04-24 15:21:57.695128889 +0200
|
||||
+++ b/nl80211.h 2018-04-24 15:18:56.415126745 +0200
|
||||
@@ -3369,6 +3369,8 @@ enum nl80211_wmm_rule {
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
|
||||
* on this channel in current regulatory domain.
|
||||
+* @NL80211_FREQUENCY_ATTR_SRD_CHANNEL: short range devices mode
|
||||
+* on this channel in current regulatory domain.
|
||||
diff --git a/nl80211.h b/nl80211.h
|
||||
index 9a16ad4..9aad3f1 100644
|
||||
--- a/nl80211.h
|
||||
+++ b/nl80211.h
|
||||
@@ -4124,6 +4124,8 @@ enum nl80211_wmm_rule {
|
||||
* as the primary or any of the secondary channels isn't possible
|
||||
* @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
|
||||
* in current regulatory domain.
|
||||
+ * @NL80211_FREQUENCY_ATTR_SRD_CHANNEL: short range devices mode
|
||||
+ * on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||
* currently defined
|
||||
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||
@@ -3398,6 +3400,9 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_4MHZ,
|
||||
NL80211_FREQUENCY_ATTR_8MHZ,
|
||||
@@ -4162,6 +4164,7 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_16MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
+ NL80211_FREQUENCY_ATTR_SRD_CHANNEL,
|
||||
|
||||
/* keep last */
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
--- a/info.c 2019-10-14 19:59:03.178904032 +0200
|
||||
+++ b/info.c 2019-10-14 19:58:11.990848600 +0200
|
||||
@@ -202,6 +202,11 @@ static int print_phy_handler(struct nl_m
|
||||
/* do not use short range device channels */
|
||||
if (tb_freq[NL80211_FREQUENCY_ATTR_SRD_CHANNEL])
|
||||
print_flag("SRD", &open);
|
||||
diff --git a/info.c b/info.c
|
||||
index e1af878..ef2e896 100644
|
||||
--- a/info.c
|
||||
+++ b/info.c
|
||||
@@ -306,6 +306,9 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
|
||||
/* do not use short range device channels */
|
||||
if (tb_freq[NL80211_FREQUENCY_ATTR_SRD_CHANNEL])
|
||||
print_flag("SRD", &open);
|
||||
+
|
||||
+
|
||||
+ if (tb_freq[NL80211_FREQUENCY_ATTR_INDOOR_ONLY])
|
||||
+ print_flag("indoor", &open);
|
||||
+
|
||||
+ if (tb_freq[NL80211_FREQUENCY_ATTR_INDOOR_ONLY])
|
||||
+ print_flag("indoor", &open);
|
||||
next:
|
||||
if (open)
|
||||
printf(")");
|
||||
|
|
|
|||
|
|
@ -1,35 +1,14 @@
|
|||
From 929cbc1b2c140cee08e5f2657314356e0fa4fa18 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:24:53 +0200
|
||||
Subject: [PATCH] backport of build patches fromopenwrt
|
||||
commit 1b52fb23c0c7bcc09dbdef5f4b2c1e8632dca68f
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:00:21 2023 +0200
|
||||
|
||||
---
|
||||
Kconfig.local | 111 -----------------
|
||||
Kconfig.sources | 3 -
|
||||
Makefile | 116 +++++++++---------
|
||||
Makefile.kernel | 2 -
|
||||
Makefile.real | 9 +-
|
||||
compat/main.c | 25 ----
|
||||
drivers/net/wireless/broadcom/b43/Kconfig | 12 +-
|
||||
drivers/net/wireless/broadcom/b43/main.c | 4 +-
|
||||
.../net/wireless/broadcom/b43legacy/Kconfig | 8 +-
|
||||
.../net/wireless/broadcom/b43legacy/main.c | 4 +-
|
||||
.../net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||
.../broadcom/brcm80211/brcmsmac/Makefile | 2 +-
|
||||
.../broadcom/brcm80211/brcmsmac/led.h | 2 +-
|
||||
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 18 +--
|
||||
kconf/Makefile | 4 +-
|
||||
kconf/conf.c | 30 +----
|
||||
kconf/confdata.c | 4 +-
|
||||
local-symbols | 37 ------
|
||||
net/wireless/Kconfig | 8 +-
|
||||
19 files changed, 103 insertions(+), 298 deletions(-)
|
||||
backports-build
|
||||
|
||||
diff --git a/Kconfig.local b/Kconfig.local
|
||||
index 19a25e3..3a694ea 100644
|
||||
index 4ce75a5..ad7a431 100644
|
||||
--- a/Kconfig.local
|
||||
+++ b/Kconfig.local
|
||||
@@ -1357,117 +1357,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
@@ -1414,117 +1414,6 @@ config BACKPORTED_USB_NET_AQC111
|
||||
config BACKPORTED_USB_RTL8153_ECM
|
||||
tristate
|
||||
default USB_RTL8153_ECM
|
||||
|
|
@ -148,10 +127,16 @@ index 19a25e3..3a694ea 100644
|
|||
tristate
|
||||
default USB_ACM
|
||||
diff --git a/Kconfig.sources b/Kconfig.sources
|
||||
index 2ea4d8a..0aa62a3 100644
|
||||
index 2ea4d8a..d74affd 100644
|
||||
--- a/Kconfig.sources
|
||||
+++ b/Kconfig.sources
|
||||
@@ -10,9 +10,6 @@ source "$BACKPORT_DIR/drivers/soc/qcom/Kconfig"
|
||||
@@ -4,15 +4,10 @@ source "$BACKPORT_DIR/compat/Kconfig"
|
||||
# these are copied from the kernel
|
||||
source "$BACKPORT_DIR/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/net/mac80211/Kconfig"
|
||||
-source "$BACKPORT_DIR/net/qrtr/Kconfig"
|
||||
-source "$BACKPORT_DIR/drivers/bus/mhi/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/soc/qcom/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
|
||||
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
|
||||
|
||||
|
|
@ -312,12 +297,16 @@ index 77c2670..c431b71 100644
|
|||
|
||||
.PHONY: defconfig-help
|
||||
diff --git a/Makefile.kernel b/Makefile.kernel
|
||||
index 11ce417..2de87f5 100644
|
||||
index 11ce417..7071d14 100644
|
||||
--- a/Makefile.kernel
|
||||
+++ b/Makefile.kernel
|
||||
@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
@@ -39,12 +39,8 @@ obj-y += compat/
|
||||
|
||||
obj-$(CPTCFG_CFG80211) += net/wireless/
|
||||
obj-$(CPTCFG_MAC80211) += net/mac80211/
|
||||
-obj-$(CPTCFG_QRTR) += net/qrtr/
|
||||
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
|
||||
obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
-obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
|
||||
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
|
||||
-obj-$(CPTCFG_SSB) += drivers/ssb/
|
||||
-obj-$(CPTCFG_BCMA) += drivers/bcma/
|
||||
|
|
@ -351,8 +340,37 @@ index 6550802..d0a8c20 100644
|
|||
@echo " done."
|
||||
|
||||
.PHONY: modules
|
||||
diff --git a/backport-include/linux/bcma/bcma_driver_chipcommon.h b/backport-include/linux/bcma/bcma_driver_chipcommon.h
|
||||
new file mode 100644
|
||||
index 0000000..42e028b
|
||||
--- /dev/null
|
||||
+++ b/backport-include/linux/bcma/bcma_driver_chipcommon.h
|
||||
@@ -0,0 +1,10 @@
|
||||
+#ifndef __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+#define __BACKPORT_BCMA_DRIVER_CHIPCOMMON_H
|
||||
+
|
||||
+#include_next <linux/bcma/bcma_driver_chipcommon.h>
|
||||
+
|
||||
+#ifndef BCMA_CC_SROM_CONTROL_OTP_PRESENT
|
||||
+#define BCMA_CC_SROM_CONTROL_OTP_PRESENT 0x00000020
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/backport-include/linux/skbuff.h b/backport-include/linux/skbuff.h
|
||||
index c1592c2..3cc8fa1 100644
|
||||
--- a/backport-include/linux/skbuff.h
|
||||
+++ b/backport-include/linux/skbuff.h
|
||||
@@ -144,4 +144,8 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
|
||||
#define napi_build_skb build_skb
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(5,11,0)
|
||||
+#define napi_build_skb build_skb
|
||||
+#endif
|
||||
+
|
||||
#endif /* __BACKPORT_SKBUFF_H */
|
||||
diff --git a/compat/main.c b/compat/main.c
|
||||
index 2540e75..c812f7b 100644
|
||||
index d4f3340..651ab63 100644
|
||||
--- a/compat/main.c
|
||||
+++ b/compat/main.c
|
||||
@@ -19,31 +19,6 @@ MODULE_LICENSE("GPL");
|
||||
|
|
@ -387,6 +405,23 @@ index 2540e75..c812f7b 100644
|
|||
void backport_dependency_symbol(void)
|
||||
{
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/Kconfig b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
index 7430aaf..f5f58a5 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
|
||||
@@ -25,9 +25,9 @@ config ATH11K_PCI
|
||||
tristate "Atheros ath11k PCI support"
|
||||
depends on m
|
||||
depends on ATH11K && PCI
|
||||
- select MHI_BUS
|
||||
- select QRTR
|
||||
- select QRTR_MHI
|
||||
+ depends on MHI_BUS
|
||||
+ depends on QRTR
|
||||
+ depends on QRTR_MHI
|
||||
help
|
||||
This module adds support for PCIE bus
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
index 2e196b5..84cbe38 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
|
|
@ -434,7 +469,7 @@ index 2e196b5..84cbe38 100644
|
|||
|
||||
config B43_PHY_G
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||
index 836766e..f378356 100644
|
||||
index 1e5f845..82cb56c 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -2853,7 +2853,7 @@ static struct ssb_device *b43_ssb_gpio_dev(struct b43_wldev *dev)
|
||||
|
|
@ -446,7 +481,7 @@ index 836766e..f378356 100644
|
|||
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
|
||||
#else
|
||||
return bus->chipco.dev;
|
||||
@@ -4870,7 +4870,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
|
||||
@@ -4871,7 +4871,7 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
|
||||
}
|
||||
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
|
||||
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
|
||||
|
|
@ -488,7 +523,7 @@ index 6ba7eb7..b924f63 100644
|
|||
|
||||
# LED support
|
||||
diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
index d098c41..0f0fac4 100644
|
||||
index 8e77306..160389d 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43legacy/main.c
|
||||
@@ -1907,7 +1907,7 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev)
|
||||
|
|
@ -510,7 +545,7 @@ index d098c41..0f0fac4 100644
|
|||
#endif
|
||||
gpiodev = bus->chipco.dev ? : pcidev;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
index c5e6a50..64f6d2f 100644
|
||||
index 400dc88..b2d97b8 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -8,7 +8,7 @@ config BRCMSMAC
|
||||
|
|
@ -519,70 +554,35 @@ index c5e6a50..64f6d2f 100644
|
|||
depends on BCMA_POSSIBLE
|
||||
- select BCMA
|
||||
+ depends on BCMA
|
||||
select NEW_LEDS if BCMA_DRIVER_GPIO
|
||||
select LEDS_CLASS if BCMA_DRIVER_GPIO
|
||||
select BRCMUTIL
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
index 50239f6..e90b34e 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
|
||||
@@ -42,6 +42,6 @@ brcmsmac-y := \
|
||||
brcms_trace_events.o \
|
||||
debug.o
|
||||
|
||||
-brcmsmac-$(CPTCFG_BCMA_DRIVER_GPIO) += led.o
|
||||
+brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
|
||||
|
||||
obj-$(CPTCFG_BRCMSMAC) += brcmsmac.o
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
index f58fd74..d65f5c2 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
|
||||
@@ -24,7 +24,7 @@ struct brcms_led {
|
||||
struct gpio_desc *gpiod;
|
||||
};
|
||||
|
||||
-#ifdef CPTCFG_BCMA_DRIVER_GPIO
|
||||
+#ifdef CONFIG_BCMA_DRIVER_GPIO
|
||||
void brcms_led_unregister(struct brcms_info *wl);
|
||||
int brcms_led_register(struct brcms_info *wl);
|
||||
#else
|
||||
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
index 9ae7403..bb9f44f 100644
|
||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
@@ -11470,6 +11470,15 @@ static const struct attribute_group ipw_attribute_group = {
|
||||
.attrs = ipw_sysfs_entries,
|
||||
};
|
||||
|
||||
+#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
+static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||
+ if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||
+ return -EINVAL;
|
||||
+ ndev->mtu = new_mtu;
|
||||
+ return 0;
|
||||
+}
|
||||
depends on FW_LOADER
|
||||
depends on CORDIC
|
||||
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
|
||||
index 36af26e..beb0589 100644
|
||||
--- a/drivers/net/wireless/mac80211_hwsim.c
|
||||
+++ b/drivers/net/wireless/mac80211_hwsim.c
|
||||
@@ -5363,7 +5363,9 @@ static struct genl_family hwsim_genl_family __genl_ro_after_init = {
|
||||
.module = THIS_MODULE,
|
||||
.small_ops = hwsim_ops,
|
||||
.n_small_ops = ARRAY_SIZE(hwsim_ops),
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,0)
|
||||
.resv_start_op = HWSIM_CMD_DEL_MAC_ADDR + 1,
|
||||
+#endif
|
||||
+
|
||||
#ifdef CPTCFG_IPW2200_PROMISCUOUS
|
||||
static int ipw_prom_open(struct net_device *dev)
|
||||
{
|
||||
@@ -11518,15 +11527,6 @@ static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb,
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
-static int __change_mtu(struct net_device *ndev, int new_mtu){
|
||||
- if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
|
||||
- return -EINVAL;
|
||||
- ndev->mtu = new_mtu;
|
||||
- return 0;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static const struct net_device_ops ipw_prom_netdev_ops = {
|
||||
#if LINUX_VERSION_IS_LESS(4,10,0)
|
||||
.ndo_change_mtu = __change_mtu,
|
||||
.mcgrps = hwsim_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
|
||||
};
|
||||
diff --git a/drivers/staging/rtl8723bs/Kconfig b/drivers/staging/rtl8723bs/Kconfig
|
||||
index b51916c..b46ff98 100644
|
||||
--- a/drivers/staging/rtl8723bs/Kconfig
|
||||
+++ b/drivers/staging/rtl8723bs/Kconfig
|
||||
@@ -5,7 +5,6 @@ config RTL8723BS
|
||||
depends on m
|
||||
depends on WLAN && MMC && CFG80211
|
||||
depends on m
|
||||
- select CFG80211_WEXT
|
||||
depends on CRYPTO
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
help
|
||||
diff --git a/kconf/Makefile b/kconf/Makefile
|
||||
index 2004c44..a2790b1 100644
|
||||
--- a/kconf/Makefile
|
||||
|
|
@ -668,10 +668,25 @@ index df26c7b..1038c30 100644
|
|||
* We have different type of choice blocks.
|
||||
* If curr.tri equals to mod then we can select several
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 0aaef6d..354f8eb 100644
|
||||
index 6a098b4..f46b7b7 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -451,43 +451,6 @@ USB_VL600=
|
||||
@@ -65,14 +65,6 @@ MAC80211_MESH_PS_DEBUG=
|
||||
MAC80211_TDLS_DEBUG=
|
||||
MAC80211_DEBUG_COUNTERS=
|
||||
MAC80211_STA_HASH_MAX_SIZE=
|
||||
-QRTR=
|
||||
-QRTR_SMD=
|
||||
-QRTR_TUN=
|
||||
-QRTR_MHI=
|
||||
-MHI_BUS=
|
||||
-MHI_BUS_DEBUG=
|
||||
-MHI_BUS_PCI_GENERIC=
|
||||
-MHI_BUS_EP=
|
||||
QCOM_AOSS_QMP=
|
||||
QCOM_COMMAND_DB=
|
||||
QCOM_CPR=
|
||||
@@ -470,43 +462,6 @@ USB_VL600=
|
||||
USB_NET_CH9200=
|
||||
USB_NET_AQC111=
|
||||
USB_RTL8153_ECM=
|
||||
|
|
@ -715,39 +730,17 @@ index 0aaef6d..354f8eb 100644
|
|||
USB_ACM=
|
||||
USB_PRINTER=
|
||||
USB_WDM=
|
||||
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
|
||||
index f3cb47e..5f173c8 100644
|
||||
--- a/net/wireless/Kconfig
|
||||
+++ b/net/wireless/Kconfig
|
||||
@@ -188,7 +188,7 @@ config CFG80211_WEXT_EXPORT
|
||||
endif # CFG80211
|
||||
|
||||
config LIB80211
|
||||
- tristate
|
||||
+ tristate "lib80211"
|
||||
depends on m
|
||||
default n
|
||||
help
|
||||
@@ -198,19 +198,19 @@ config LIB80211
|
||||
Drivers should select this themselves if needed.
|
||||
|
||||
config LIB80211_CRYPT_WEP
|
||||
- tristate
|
||||
+ tristate "lib80211 WEP support"
|
||||
depends on m
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
|
||||
config LIB80211_CRYPT_CCMP
|
||||
- tristate
|
||||
+ tristate "lib80211 CCMP support"
|
||||
depends on m
|
||||
depends on CRYPTO
|
||||
depends on CRYPTO_AES
|
||||
depends on CRYPTO_CCM
|
||||
|
||||
config LIB80211_CRYPT_TKIP
|
||||
- tristate
|
||||
+ tristate "lib80211 TKIP support"
|
||||
depends on m
|
||||
select BPAUTO_CRYPTO_LIB_ARC4
|
||||
|
||||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||
index b53ba42..777c141 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -17233,7 +17233,9 @@ static struct genl_family nl80211_fam __genl_ro_after_init = {
|
||||
.n_ops = ARRAY_SIZE(nl80211_ops),
|
||||
.small_ops = nl80211_small_ops,
|
||||
.n_small_ops = ARRAY_SIZE(nl80211_small_ops),
|
||||
+#if LINUX_VERSION_IS_GEQ(6,1,0)
|
||||
.resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1,
|
||||
+#endif
|
||||
.mcgrps = nl80211_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
|
||||
.parallel_ops = true,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,18 +1,8 @@
|
|||
From 963c2ed48698063d6b684cabbf31b9c07cab9fd8 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:27:59 +0200
|
||||
Subject: [PATCH] backport of ath patches from openwrt
|
||||
commit 3d0b9e6dcde6e58a2f71372cbb85396a0e703a9c
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:01:34 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/Kconfig | 5 +-
|
||||
drivers/net/wireless/ath/Makefile | 2 +-
|
||||
drivers/net/wireless/ath/ath.h | 7 ---
|
||||
drivers/net/wireless/ath/ath5k/pci.c | 26 +++++++++-
|
||||
drivers/net/wireless/ath/regd.c | 72 ++++++++++++++++++--------
|
||||
drivers/net/wireless/ath/regd_common.h | 3 ++
|
||||
local-symbols | 1 +
|
||||
net/wireless/reg.c | 3 ++
|
||||
8 files changed, 88 insertions(+), 31 deletions(-)
|
||||
backports-ath
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/Kconfig b/drivers/net/wireless/ath/Kconfig
|
||||
index 0a2f4a5..3cb2efe 100644
|
||||
|
|
@ -312,7 +302,7 @@ index 2afdebf..3ba9fc3 100644
|
|||
REGULATORY_CUSTOM_REG;
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
|
||||
index c4bd26e..364011e 100644
|
||||
index cdb1e9a..2574f80 100644
|
||||
--- a/drivers/net/wireless/ath/regd_common.h
|
||||
+++ b/drivers/net/wireless/ath/regd_common.h
|
||||
@@ -32,6 +32,7 @@ enum EnumRd {
|
||||
|
|
@ -323,7 +313,7 @@ index c4bd26e..364011e 100644
|
|||
FRANCE_RES = 0x31,
|
||||
FCC3_FCCA = 0x3A,
|
||||
FCC3_WORLD = 0x3B,
|
||||
@@ -172,6 +173,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
||||
@@ -173,6 +174,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
||||
{FCC2_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC2_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_FCCA, CTL_FCC, CTL_FCC},
|
||||
|
|
@ -331,7 +321,7 @@ index c4bd26e..364011e 100644
|
|||
{FCC3_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC4_FCCA, CTL_FCC, CTL_FCC},
|
||||
@@ -483,6 +485,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
@@ -486,6 +488,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
{CTRY_UAE, NULL1_WORLD, "AE"},
|
||||
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
|
||||
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
|
||||
|
|
@ -340,10 +330,10 @@ index c4bd26e..364011e 100644
|
|||
{CTRY_UNITED_STATES3, FCC3_FCCA, "US"},
|
||||
/* This "PS" is for US public safety actually... to support this we
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 354f8eb..9af5dbe 100644
|
||||
index f46b7b7..2d2635f 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -106,6 +106,7 @@ ADM8211=
|
||||
@@ -102,6 +102,7 @@ ADM8211=
|
||||
ATH_COMMON=
|
||||
WLAN_VENDOR_ATH=
|
||||
ATH_DEBUG=
|
||||
|
|
@ -352,10 +342,10 @@ index 354f8eb..9af5dbe 100644
|
|||
ATH_REG_DYNAMIC_USER_REG_HINTS=
|
||||
ATH_REG_DYNAMIC_USER_CERT_TESTING=
|
||||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||
index 8f96b31..48ab1bb 100644
|
||||
index c76ff9d..a39adb2 100644
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3309,6 +3309,8 @@ void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band,
|
||||
@@ -3370,6 +3370,8 @@ void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band,
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request = NULL, *lr;
|
||||
|
||||
|
|
@ -364,7 +354,7 @@ index 8f96b31..48ab1bb 100644
|
|||
/* IE len must be evenly divisible by 2 */
|
||||
if (country_ie_len & 0x01)
|
||||
return;
|
||||
@@ -3560,6 +3562,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
|
||||
@@ -3621,6 +3623,7 @@ static bool is_wiphy_all_set_reg_flag(enum ieee80211_regulatory_flags flag)
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,23 +1,11 @@
|
|||
From adec6feb0823e369ccb1a5aff5ffc148fd22514b Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:28:52 +0200
|
||||
Subject: [PATCH] backport of ath5k patches from openwrt
|
||||
commit f1bd9597a658be89408fab53f32c49dcbe73cabe
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:01:57 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath5k/ath5k.h | 1 +
|
||||
drivers/net/wireless/ath/ath5k/base.c | 8 +-
|
||||
drivers/net/wireless/ath/ath5k/debug.c | 93 +++++++++++++++++++
|
||||
drivers/net/wireless/ath/ath5k/dma.c | 8 ++
|
||||
drivers/net/wireless/ath/ath5k/initvals.c | 6 ++
|
||||
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 9 +-
|
||||
drivers/net/wireless/ath/ath5k/pci.c | 2 +
|
||||
drivers/net/wireless/ath/ath5k/reset.c | 2 +
|
||||
include/linux/ath5k_platform.h | 30 ++++++
|
||||
9 files changed, 150 insertions(+), 9 deletions(-)
|
||||
create mode 100644 include/linux/ath5k_platform.h
|
||||
backports-ath5
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
index 0433631..cff4f6f 100644
|
||||
index 308a429..0e6d184 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
|
||||
@@ -1372,6 +1372,7 @@ struct ath5k_hw {
|
||||
|
|
@ -29,7 +17,7 @@ index 0433631..cff4f6f 100644
|
|||
|
||||
/* Antenna Control */
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
|
||||
index 54fdf8d..74f3591 100644
|
||||
index 469ebc4..97bb797 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/base.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
||||
@@ -465,6 +465,9 @@ ath5k_chan_set(struct ath5k_hw *ah, struct cfg80211_chan_def *chandef)
|
||||
|
|
@ -42,7 +30,7 @@ index 54fdf8d..74f3591 100644
|
|||
/*
|
||||
* To switch channels clear any pending DMA operations;
|
||||
* wait long enough for the RX fifo to drain, reset the
|
||||
@@ -1963,7 +1966,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
@@ -2009,7 +2012,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
|
||||
}
|
||||
|
||||
if ((ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs +
|
||||
|
|
@ -51,7 +39,7 @@ index 54fdf8d..74f3591 100644
|
|||
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
|
||||
u64 tsf = ath5k_hw_get_tsf64(ah);
|
||||
u32 tsftu = TSF_TO_TU(tsf);
|
||||
@@ -2049,7 +2052,7 @@ ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf)
|
||||
@@ -2095,7 +2098,7 @@ ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf)
|
||||
|
||||
intval = ah->bintval & AR5K_BEACON_PERIOD;
|
||||
if (ah->opmode == NL80211_IFTYPE_AP && ah->num_ap_vifs
|
||||
|
|
@ -60,7 +48,7 @@ index 54fdf8d..74f3591 100644
|
|||
intval /= ATH_BCBUF; /* staggered multi-bss beacons */
|
||||
if (intval < 15)
|
||||
ATH5K_WARN(ah, "intval %u is too low, min 15\n",
|
||||
@@ -2515,6 +2518,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -2561,6 +2564,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
#endif
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
|
|
@ -180,10 +168,10 @@ index 4b41160..257101e 100644
|
|||
|
||||
/* functions used in other places */
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/dma.c b/drivers/net/wireless/ath/ath5k/dma.c
|
||||
index e6c52f7..53e075e 100644
|
||||
index d9e376e..db06ff8 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/dma.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/dma.c
|
||||
@@ -869,10 +869,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
|
||||
@@ -854,10 +854,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
|
||||
* guess we can tweak it and see how it goes ;-)
|
||||
*/
|
||||
if (ah->ah_version != AR5K_AR5210) {
|
||||
|
|
@ -222,7 +210,7 @@ index ee1c2fa..122fe1c 100644
|
|||
{ AR5K_TOPS, 8 },
|
||||
{ AR5K_RXNOFRM, 8 },
|
||||
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
index 532eeac..c40a08f 100644
|
||||
index 11ed30d..7de7e71 100644
|
||||
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
|
||||
@@ -86,13 +86,8 @@ ath5k_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,39 +1,8 @@
|
|||
From 9899eb509a1f4a270d6b6fbf9e2c86e0012a137a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:29:42 +0200
|
||||
Subject: [PATCH] backport of ath9k patches from openwrt
|
||||
commit 74097ec7ee9fb8412c4416a92c6a805d3141735e
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:02:16 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath.h | 1 +
|
||||
drivers/net/wireless/ath/ath9k/Kconfig | 13 +
|
||||
drivers/net/wireless/ath/ath9k/Makefile | 1 +
|
||||
drivers/net/wireless/ath/ath9k/ahb.c | 260 ++++++++++++-
|
||||
drivers/net/wireless/ath/ath9k/ani.h | 2 +-
|
||||
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 72 ++--
|
||||
drivers/net/wireless/ath/ath9k/ar9002_phy.h | 11 +
|
||||
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 95 +----
|
||||
drivers/net/wireless/ath/ath9k/ath9k.h | 34 +-
|
||||
.../wireless/ath/ath9k/ath9k_pci_owl_loader.c | 105 +++--
|
||||
drivers/net/wireless/ath/ath9k/channel.c | 7 +
|
||||
drivers/net/wireless/ath/ath9k/common.c | 21 +-
|
||||
drivers/net/wireless/ath/ath9k/debug.c | 202 ++++++++++
|
||||
drivers/net/wireless/ath/ath9k/eeprom.c | 12 +-
|
||||
drivers/net/wireless/ath/ath9k/gpio.c | 365 ++++++++++++++++--
|
||||
drivers/net/wireless/ath/ath9k/hsr.c | 247 ++++++++++++
|
||||
drivers/net/wireless/ath/ath9k/hsr.h | 48 +++
|
||||
drivers/net/wireless/ath/ath9k/hw-ops.h | 6 +
|
||||
drivers/net/wireless/ath/ath9k/hw.c | 154 ++++++--
|
||||
drivers/net/wireless/ath/ath9k/hw.h | 14 +
|
||||
drivers/net/wireless/ath/ath9k/init.c | 105 ++++-
|
||||
drivers/net/wireless/ath/ath9k/mac.c | 9 +-
|
||||
drivers/net/wireless/ath/ath9k/main.c | 12 +
|
||||
drivers/net/wireless/ath/ath9k/pci.c | 1 +
|
||||
drivers/net/wireless/ath/ath9k/phy.h | 3 +
|
||||
include/linux/ath9k_platform.h | 7 +
|
||||
local-symbols | 1 +
|
||||
27 files changed, 1561 insertions(+), 247 deletions(-)
|
||||
create mode 100644 drivers/net/wireless/ath/ath9k/hsr.c
|
||||
create mode 100644 drivers/net/wireless/ath/ath9k/hsr.h
|
||||
backports-ath9k
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
|
||||
index cfe535a..bb30fd7 100644
|
||||
|
|
@ -72,7 +41,7 @@ index eed0f3a..d2ea086 100644
|
|||
bool "Atheros ath9k debugging"
|
||||
depends on ATH9K && DEBUG_FS
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/Makefile b/drivers/net/wireless/ath/ath9k/Makefile
|
||||
index 847c8a8..6427bc6 100644
|
||||
index 01d6f41..81dee52 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/Makefile
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Makefile
|
||||
@@ -17,6 +17,7 @@ ath9k-$(CPTCFG_ATH9K_DFS_CERTIFIED) += dfs.o
|
||||
|
|
@ -84,7 +53,7 @@ index 847c8a8..6427bc6 100644
|
|||
ath9k-$(CPTCFG_ATH9K_DEBUGFS) += debug.o
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
index cdefb8e..839d780 100644
|
||||
index 9cd12b2..d6c381b 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -20,7 +20,15 @@
|
||||
|
|
@ -358,7 +327,7 @@ index cdefb8e..839d780 100644
|
|||
|
||||
if (!dev_get_platdata(&pdev->dev)) {
|
||||
dev_err(&pdev->dev, "no platform data specified\n");
|
||||
@@ -122,13 +371,16 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
||||
@@ -118,13 +367,16 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
||||
sc->mem = mem;
|
||||
sc->irq = irq;
|
||||
|
||||
|
|
@ -376,7 +345,7 @@ index cdefb8e..839d780 100644
|
|||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_irq;
|
||||
@@ -159,6 +411,9 @@ static int ath_ahb_remove(struct platform_device *pdev)
|
||||
@@ -155,6 +407,9 @@ static int ath_ahb_remove(struct platform_device *pdev)
|
||||
free_irq(sc->irq, sc);
|
||||
ieee80211_free_hw(sc->hw);
|
||||
}
|
||||
|
|
@ -386,7 +355,7 @@ index cdefb8e..839d780 100644
|
|||
|
||||
return 0;
|
||||
}
|
||||
@@ -168,6 +423,9 @@ static struct platform_driver ath_ahb_driver = {
|
||||
@@ -164,6 +419,9 @@ static struct platform_driver ath_ahb_driver = {
|
||||
.remove = ath_ahb_remove,
|
||||
.driver = {
|
||||
.name = "ath9k",
|
||||
|
|
@ -546,7 +515,7 @@ index 2b58245..d20a936 100644
|
|||
#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
index 7ec5610..6f1a46d 100644
|
||||
index ac40b93..c8ddb56 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -42,20 +42,6 @@ static const int cycpwrThr1_table[] =
|
||||
|
|
@ -570,7 +539,7 @@ index 7ec5610..6f1a46d 100644
|
|||
static const u8 ofdm2pwr[] = {
|
||||
ALL_TARGET_LEGACY_6_24,
|
||||
ALL_TARGET_LEGACY_6_24,
|
||||
@@ -1077,11 +1063,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
@@ -1068,11 +1054,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_channel *chan = ah->curchan;
|
||||
struct ar5416AniState *aniState = &ah->ani;
|
||||
|
|
@ -582,7 +551,7 @@ index 7ec5610..6f1a46d 100644
|
|||
s32 value, value2;
|
||||
|
||||
switch (cmd & ah->ani_function) {
|
||||
@@ -1095,61 +1076,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
@@ -1086,61 +1067,6 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
|
||||
*/
|
||||
u32 on = param ? 1 : 0;
|
||||
|
||||
|
|
@ -644,7 +613,7 @@ index 7ec5610..6f1a46d 100644
|
|||
if (on)
|
||||
REG_SET_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
@@ -1927,6 +1853,26 @@ void ar9003_hw_init_rate_txpower(struct ath_hw *ah, u8 *rate_array,
|
||||
@@ -1918,6 +1844,26 @@ void ar9003_hw_init_rate_txpower(struct ath_hw *ah, u8 *rate_array,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -671,7 +640,7 @@ index 7ec5610..6f1a46d 100644
|
|||
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
|
||||
@@ -1963,6 +1909,7 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
@@ -1954,6 +1900,7 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
|
||||
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
|
||||
|
||||
|
|
@ -680,7 +649,7 @@ index 7ec5610..6f1a46d 100644
|
|||
ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
|
||||
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
index ebffd4b..3b6c037 100644
|
||||
index f86b16d..49c9596 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -24,6 +24,8 @@
|
||||
|
|
@ -759,173 +728,8 @@ index ebffd4b..3b6c037 100644
|
|||
#endif
|
||||
|
||||
#ifdef CPTCFG_ATH9K_DEBUGFS
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
index 56d1a77..708c896 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
|
||||
@@ -19,9 +19,14 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ath9k_platform.h>
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
+#include <linux/workqueue.h>
|
||||
|
||||
struct owl_ctx {
|
||||
+ struct pci_dev *pdev;
|
||||
struct completion eeprom_load;
|
||||
+ struct work_struct work;
|
||||
+ struct nvmem_cell *cell;
|
||||
};
|
||||
|
||||
#define EEPROM_FILENAME_LEN 100
|
||||
@@ -42,6 +47,12 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
|
||||
u32 bar0;
|
||||
bool swap_needed = false;
|
||||
|
||||
+ /* also note that we are doing *u16 operations on the file */
|
||||
+ if (cal_len > 4096 || cal_len < 0x200 || (cal_len & 1) == 1) {
|
||||
+ dev_err(&pdev->dev, "eeprom has an invalid size.\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
if (*cal_data != AR5416_EEPROM_MAGIC) {
|
||||
if (*cal_data != swab16(AR5416_EEPROM_MAGIC)) {
|
||||
dev_err(&pdev->dev, "invalid calibration data\n");
|
||||
@@ -99,38 +110,31 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void owl_fw_cb(const struct firmware *fw, void *context)
|
||||
+static void owl_rescan(struct pci_dev *pdev)
|
||||
{
|
||||
- struct pci_dev *pdev = (struct pci_dev *)context;
|
||||
- struct owl_ctx *ctx = (struct owl_ctx *)pci_get_drvdata(pdev);
|
||||
- struct pci_bus *bus;
|
||||
-
|
||||
- complete(&ctx->eeprom_load);
|
||||
-
|
||||
- if (!fw) {
|
||||
- dev_err(&pdev->dev, "no eeprom data received.\n");
|
||||
- goto release;
|
||||
- }
|
||||
-
|
||||
- /* also note that we are doing *u16 operations on the file */
|
||||
- if (fw->size > 4096 || fw->size < 0x200 || (fw->size & 1) == 1) {
|
||||
- dev_err(&pdev->dev, "eeprom file has an invalid size.\n");
|
||||
- goto release;
|
||||
- }
|
||||
-
|
||||
- if (ath9k_pci_fixup(pdev, (const u16 *)fw->data, fw->size))
|
||||
- goto release;
|
||||
+ struct pci_bus *bus = pdev->bus;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
- bus = pdev->bus;
|
||||
pci_stop_and_remove_bus_device(pdev);
|
||||
/* the device should come back with the proper
|
||||
* ProductId. But we have to initiate a rescan.
|
||||
*/
|
||||
pci_rescan_bus(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
+}
|
||||
+
|
||||
+static void owl_fw_cb(const struct firmware *fw, void *context)
|
||||
+{
|
||||
+ struct owl_ctx *ctx = (struct owl_ctx *)context;
|
||||
+
|
||||
+ complete(&ctx->eeprom_load);
|
||||
|
||||
-release:
|
||||
+ if (fw) {
|
||||
+ ath9k_pci_fixup(ctx->pdev, (const u16 *)fw->data, fw->size);
|
||||
+ owl_rescan(ctx->pdev);
|
||||
+ } else {
|
||||
+ dev_err(&ctx->pdev->dev, "no eeprom data received.\n");
|
||||
+ }
|
||||
release_firmware(fw);
|
||||
}
|
||||
|
||||
@@ -152,6 +156,43 @@ static const char *owl_get_eeprom_name(struct pci_dev *pdev)
|
||||
return eeprom_name;
|
||||
}
|
||||
|
||||
+static void owl_nvmem_work(struct work_struct *work)
|
||||
+{
|
||||
+ struct owl_ctx *ctx = container_of(work, struct owl_ctx, work);
|
||||
+ void *buf;
|
||||
+ size_t len;
|
||||
+
|
||||
+ complete(&ctx->eeprom_load);
|
||||
+
|
||||
+ buf = nvmem_cell_read(ctx->cell, &len);
|
||||
+ if (!IS_ERR(buf)) {
|
||||
+ ath9k_pci_fixup(ctx->pdev, buf, len);
|
||||
+ kfree(buf);
|
||||
+ owl_rescan(ctx->pdev);
|
||||
+ } else {
|
||||
+ dev_err(&ctx->pdev->dev, "no nvmem data received.\n");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int owl_nvmem_probe(struct owl_ctx *ctx)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ ctx->cell = devm_nvmem_cell_get(&ctx->pdev->dev, "calibration");
|
||||
+ if (IS_ERR(ctx->cell)) {
|
||||
+ err = PTR_ERR(ctx->cell);
|
||||
+ if (err == -ENOENT || err == -EOPNOTSUPP)
|
||||
+ return 1; /* not present, try firmware_request */
|
||||
+
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ INIT_WORK(&ctx->work, owl_nvmem_work);
|
||||
+ schedule_work(&ctx->work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int owl_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
@@ -164,21 +205,27 @@ static int owl_probe(struct pci_dev *pdev,
|
||||
|
||||
pcim_pin_device(pdev);
|
||||
|
||||
- eeprom_name = owl_get_eeprom_name(pdev);
|
||||
- if (!eeprom_name) {
|
||||
- dev_err(&pdev->dev, "no eeprom filename found.\n");
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
|
||||
init_completion(&ctx->eeprom_load);
|
||||
+ ctx->pdev = pdev;
|
||||
|
||||
pci_set_drvdata(pdev, ctx);
|
||||
+
|
||||
+ err = owl_nvmem_probe(ctx);
|
||||
+ if (err <= 0)
|
||||
+ return err;
|
||||
+
|
||||
+ eeprom_name = owl_get_eeprom_name(pdev);
|
||||
+ if (!eeprom_name) {
|
||||
+ dev_err(&pdev->dev, "no eeprom filename found.\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
err = request_firmware_nowait(THIS_MODULE, true, eeprom_name,
|
||||
- &pdev->dev, GFP_KERNEL, pdev, owl_fw_cb);
|
||||
+ &pdev->dev, GFP_KERNEL, ctx, owl_fw_cb);
|
||||
if (err)
|
||||
dev_err(&pdev->dev, "failed to request caldata (%d).\n", err);
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
|
||||
index 1a926fc..a37f270 100644
|
||||
index 86c59bd..49cf036 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/channel.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/channel.c
|
||||
@@ -15,6 +15,7 @@
|
||||
|
|
@ -1010,10 +814,10 @@ index 099f3d4..86d4a50 100644
|
|||
return channel;
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
index 75395f3..490574c 100644
|
||||
index fb87075..33c469c 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1364,6 +1364,198 @@ void ath9k_deinit_debug(struct ath_softc *sc)
|
||||
@@ -1413,6 +1413,199 @@ void ath9k_deinit_debug(struct ath_softc *sc)
|
||||
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
|
||||
}
|
||||
|
||||
|
|
@ -1052,7 +856,8 @@ index 75395f3..490574c 100644
|
|||
+ } else {
|
||||
+ bytes = 2;
|
||||
+ }
|
||||
+ copy_to_user(user_buf, from, bytes);
|
||||
+ if (copy_to_user(user_buf, from, bytes))
|
||||
+ return -EFAULT;
|
||||
+ user_buf += bytes;
|
||||
+ }
|
||||
+ return *ppos - pos;
|
||||
|
|
@ -1212,7 +1017,7 @@ index 75395f3..490574c 100644
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1383,6 +1575,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1432,6 +1625,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
ath9k_tx99_init_debug(sc);
|
||||
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
|
||||
|
||||
|
|
@ -1229,35 +1034,6 @@ index 75395f3..490574c 100644
|
|||
debugfs_create_devm_seqfile(sc->dev, "dma", sc->debug.debugfs_phy,
|
||||
read_file_dma);
|
||||
debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy,
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||
index c22d457..e6b3cd4 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
|
||||
@@ -135,13 +135,23 @@ static bool ath9k_hw_nvram_read_firmware(const struct firmware *eeprom_blob,
|
||||
offset, data);
|
||||
}
|
||||
|
||||
+static bool ath9k_hw_nvram_read_nvmem(struct ath_hw *ah, off_t offset,
|
||||
+ u16 *data)
|
||||
+{
|
||||
+ return ath9k_hw_nvram_read_array(ah->nvmem_blob,
|
||||
+ ah->nvmem_blob_len / sizeof(u16),
|
||||
+ offset, data);
|
||||
+}
|
||||
+
|
||||
bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_platform_data *pdata = ah->dev->platform_data;
|
||||
bool ret;
|
||||
|
||||
- if (ah->eeprom_blob)
|
||||
+ if (ah->nvmem_blob)
|
||||
+ ret = ath9k_hw_nvram_read_nvmem(ah, off, data);
|
||||
+ else if (ah->eeprom_blob)
|
||||
ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data);
|
||||
else if (pdata && !pdata->use_eeprom)
|
||||
ret = ath9k_hw_nvram_read_pdata(pdata, off, data);
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
index a8101c9..37a796b 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
|
|
@ -2273,7 +2049,7 @@ index 09e750b..bd9b021 100644
|
|||
|
||||
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
index ebd5871..6252006 100644
|
||||
index 6243626..8d756dc 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -36,6 +36,7 @@
|
||||
|
|
@ -2322,16 +2098,7 @@ index ebd5871..6252006 100644
|
|||
bool reset_power_on;
|
||||
bool htc_reset_init;
|
||||
|
||||
@@ -977,6 +988,8 @@ struct ath_hw {
|
||||
bool disable_5ghz;
|
||||
|
||||
const struct firmware *eeprom_blob;
|
||||
+ u16 *nvmem_blob; /* devres managed */
|
||||
+ size_t nvmem_blob_len;
|
||||
|
||||
struct ath_dynack dynack;
|
||||
|
||||
@@ -1076,6 +1089,7 @@ void ath9k_hw_check_nav(struct ath_hw *ah);
|
||||
@@ -1078,6 +1089,7 @@ void ath9k_hw_check_nav(struct ath_hw *ah);
|
||||
bool ath9k_hw_check_alive(struct ath_hw *ah);
|
||||
|
||||
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
|
||||
|
|
@ -2340,18 +2107,10 @@ index ebd5871..6252006 100644
|
|||
/* Generic hw timer primitives */
|
||||
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
||||
index d09d75e..06176a2 100644
|
||||
index f67f1f1..165d920 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_net.h>
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
#include <linux/relay.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
@@ -47,7 +48,7 @@ int ath9k_modparam_nohwcrypt;
|
||||
@@ -48,7 +48,7 @@ int ath9k_modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, ath9k_modparam_nohwcrypt, int, 0444);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
|
||||
|
||||
|
|
@ -2360,65 +2119,7 @@ index d09d75e..06176a2 100644
|
|||
module_param_named(blink, ath9k_led_blink, int, 0444);
|
||||
MODULE_PARM_DESC(blink, "Enable LED blink on activity");
|
||||
|
||||
@@ -568,6 +569,57 @@ static void ath9k_eeprom_release(struct ath_softc *sc)
|
||||
release_firmware(sc->sc_ah->eeprom_blob);
|
||||
}
|
||||
|
||||
+static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)
|
||||
+{
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct nvmem_cell *cell;
|
||||
+ void *buf;
|
||||
+ size_t len;
|
||||
+ int err;
|
||||
+
|
||||
+ cell = devm_nvmem_cell_get(sc->dev, "calibration");
|
||||
+ if (IS_ERR(cell)) {
|
||||
+ err = PTR_ERR(cell);
|
||||
+
|
||||
+ /* nvmem cell might not be defined, or the nvmem
|
||||
+ * subsystem isn't included. In this case, follow
|
||||
+ * the established "just return 0;" convention of
|
||||
+ * ath9k_init_platform to say:
|
||||
+ * "All good. Nothing to see here. Please go on."
|
||||
+ */
|
||||
+ if (err == -ENOENT || err == -EOPNOTSUPP)
|
||||
+ return 0;
|
||||
+
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ buf = nvmem_cell_read(cell, &len);
|
||||
+ if (IS_ERR(buf))
|
||||
+ return PTR_ERR(buf);
|
||||
+
|
||||
+ /* run basic sanity checks on the returned nvram cell length.
|
||||
+ * That length has to be a multiple of a "u16" (i.e.: & 1).
|
||||
+ * Furthermore, it has to be more than "let's say" 512 bytes
|
||||
+ * but less than the maximum of AR9300_EEPROM_SIZE (16kb).
|
||||
+ */
|
||||
+ if (((len & 1) == 1) || (len < 512) || (len >= AR9300_EEPROM_SIZE)) {
|
||||
+ kfree(buf);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ /* devres manages the calibration values release on shutdown */
|
||||
+ ah->nvmem_blob = (u16 *)devm_kmemdup(sc->dev, buf, len, GFP_KERNEL);
|
||||
+ kfree(buf);
|
||||
+ if (!ah->nvmem_blob)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ah->nvmem_blob_len = len;
|
||||
+ ah->ah_flags &= ~AH_USE_EEPROM;
|
||||
+ ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int ath9k_init_platform(struct ath_softc *sc)
|
||||
{
|
||||
struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||
@@ -644,6 +696,12 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
@@ -696,6 +696,12 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2431,18 +2132,7 @@ index d09d75e..06176a2 100644
|
|||
static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -704,6 +762,10 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ ret = ath9k_nvmem_request_eeprom(sc);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
if (ath9k_led_active_high != -1)
|
||||
ah->config.led_active_high = ath9k_led_active_high == 1;
|
||||
|
||||
@@ -747,6 +809,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
@@ -803,6 +809,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
if (ret)
|
||||
goto err_hw;
|
||||
|
||||
|
|
@ -2452,7 +2142,7 @@ index d09d75e..06176a2 100644
|
|||
ret = ath9k_init_queues(sc);
|
||||
if (ret)
|
||||
goto err_queues;
|
||||
@@ -814,7 +879,8 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc)
|
||||
@@ -870,7 +879,8 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc)
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
|
||||
ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
|
||||
|
||||
|
|
@ -2462,7 +2152,7 @@ index d09d75e..06176a2 100644
|
|||
}
|
||||
|
||||
static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -826,6 +892,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
@@ -882,6 +892,7 @@ static const struct ieee80211_iface_limit if_limits[] = {
|
||||
BIT(NL80211_IFTYPE_AP) },
|
||||
{ .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO) },
|
||||
|
|
@ -2470,7 +2160,7 @@ index d09d75e..06176a2 100644
|
|||
};
|
||||
|
||||
#ifdef CPTCFG_ATH9K_CHANNEL_CONTEXT
|
||||
@@ -906,6 +973,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
@@ -962,6 +973,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
|
||||
|
|
@ -2478,7 +2168,7 @@ index d09d75e..06176a2 100644
|
|||
|
||||
if (ath9k_ps_enable)
|
||||
ieee80211_hw_set(hw, SUPPORTS_PS);
|
||||
@@ -918,9 +986,6 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
@@ -974,9 +986,6 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
IEEE80211_RADIOTAP_MCS_HAVE_STBC;
|
||||
}
|
||||
|
||||
|
|
@ -2488,7 +2178,7 @@ index d09d75e..06176a2 100644
|
|||
hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR |
|
||||
NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
|
||||
NL80211_FEATURE_P2P_GO_CTWIN;
|
||||
@@ -993,6 +1058,18 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
@@ -1049,6 +1058,18 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
|
||||
}
|
||||
|
||||
|
|
@ -2507,7 +2197,7 @@ index d09d75e..06176a2 100644
|
|||
int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -1033,11 +1110,15 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
@@ -1089,13 +1110,15 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
|
||||
|
||||
#ifdef CPTCFG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
|
|
@ -2517,14 +2207,14 @@ index d09d75e..06176a2 100644
|
|||
ARRAY_SIZE(ath9k_tpt_blink));
|
||||
#endif
|
||||
|
||||
+ wiphy_read_of_freq_limits(hw->wiphy);
|
||||
+
|
||||
wiphy_read_of_freq_limits(hw->wiphy);
|
||||
|
||||
+ ath_get_initial_entropy(sc);
|
||||
+
|
||||
/* Register with mac80211 */
|
||||
error = ieee80211_register_hw(hw);
|
||||
if (error)
|
||||
@@ -1121,25 +1202,25 @@ static int __init ath9k_init(void)
|
||||
@@ -1179,25 +1202,25 @@ static int __init ath9k_init(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
@ -2582,7 +2272,7 @@ index 58d02c1..c9d2bf3 100644
|
|||
ath9k_hw_disable_mib_counters(ah);
|
||||
}
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
|
||||
index c6f4dea..063d1b1 100644
|
||||
index ed87a37..0647f33 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
|
@ -2670,10 +2360,10 @@ index 76860a4..e210108 100644
|
|||
|
||||
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 9af5dbe..395c284 100644
|
||||
index 2d2635f..7d5b2d3 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -133,6 +133,7 @@ ATH9K_WOW=
|
||||
@@ -129,6 +129,7 @@ ATH9K_WOW=
|
||||
ATH9K_RFKILL=
|
||||
ATH9K_CHANNEL_CONTEXT=
|
||||
ATH9K_PCOEM=
|
||||
|
|
|
|||
|
|
@ -1,30 +1,8 @@
|
|||
From 08eadf05f847b1b2472f8d5a0afcab03f832923f Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:30:15 +0200
|
||||
Subject: [PATCH] backport of ath10k patches from openwrt
|
||||
commit 276cc12705ba0643a320dc9bf73903b077bad629
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:02:43 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/Kconfig | 16 +++
|
||||
drivers/net/wireless/ath/ath10k/Makefile | 3 +-
|
||||
drivers/net/wireless/ath/ath10k/core.c | 122 ++++++++++++++++++--
|
||||
drivers/net/wireless/ath/ath10k/core.h | 19 ++++
|
||||
drivers/net/wireless/ath/ath10k/htt.h | 4 +
|
||||
drivers/net/wireless/ath/ath10k/htt_tx.c | 61 +++++-----
|
||||
drivers/net/wireless/ath/ath10k/hw.h | 1 +
|
||||
drivers/net/wireless/ath/ath10k/leds.c | 101 +++++++++++++++++
|
||||
drivers/net/wireless/ath/ath10k/leds.h | 41 +++++++
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 132 +++++++++++++++++++---
|
||||
drivers/net/wireless/ath/ath10k/pci.c | 16 +++
|
||||
drivers/net/wireless/ath/ath10k/thermal.h | 2 +-
|
||||
drivers/net/wireless/ath/ath10k/txrx.c | 15 ++-
|
||||
drivers/net/wireless/ath/ath10k/wmi-ops.h | 32 ++++++
|
||||
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +
|
||||
drivers/net/wireless/ath/ath10k/wmi.c | 54 +++++++++
|
||||
drivers/net/wireless/ath/ath10k/wmi.h | 35 ++++++
|
||||
local-symbols | 2 +
|
||||
18 files changed, 606 insertions(+), 52 deletions(-)
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.c
|
||||
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
|
||||
backports-ath10k
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
|
||||
index 49373f9..5d53bc3 100644
|
||||
|
|
@ -75,10 +53,10 @@ index 24d846a..e040d84 100644
|
|||
ath10k_core-$(CONFIG_PM) += wow.o
|
||||
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
|
||||
index 58e86e6..3b34c59 100644
|
||||
index 5eb131a..e1b49c5 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -8,10 +8,12 @@
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/of.h>
|
||||
|
|
@ -86,12 +64,7 @@ index 58e86e6..3b34c59 100644
|
|||
#include <linux/property.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/pm_qos.h>
|
||||
+#include <linux/nvmem-consumer.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include "core.h"
|
||||
@@ -25,6 +27,7 @@
|
||||
@@ -26,6 +27,7 @@
|
||||
#include "testmode.h"
|
||||
#include "wmi-ops.h"
|
||||
#include "coredump.h"
|
||||
|
|
@ -99,39 +72,7 @@ index 58e86e6..3b34c59 100644
|
|||
|
||||
unsigned int ath10k_debug_mask;
|
||||
EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
@@ -32,9 +35,11 @@ EXPORT_SYMBOL(ath10k_debug_mask);
|
||||
static unsigned int ath10k_cryptmode_param;
|
||||
static bool uart_print;
|
||||
static bool skip_otp;
|
||||
-static bool rawmode;
|
||||
static bool fw_diag_log;
|
||||
|
||||
+/* frame mode values are mapped as per enum ath10k_hw_txrx_mode */
|
||||
+unsigned int ath10k_frame_mode = ATH10K_HW_TXRX_NATIVE_WIFI;
|
||||
+
|
||||
unsigned long ath10k_coredump_mask = BIT(ATH10K_FW_CRASH_DUMP_REGISTERS) |
|
||||
BIT(ATH10K_FW_CRASH_DUMP_CE_DATA);
|
||||
|
||||
@@ -43,15 +48,16 @@ module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);
|
||||
module_param_named(cryptmode, ath10k_cryptmode_param, uint, 0644);
|
||||
module_param(uart_print, bool, 0644);
|
||||
module_param(skip_otp, bool, 0644);
|
||||
-module_param(rawmode, bool, 0644);
|
||||
module_param(fw_diag_log, bool, 0644);
|
||||
+module_param_named(frame_mode, ath10k_frame_mode, uint, 0644);
|
||||
module_param_named(coredump_mask, ath10k_coredump_mask, ulong, 0444);
|
||||
|
||||
MODULE_PARM_DESC(debug_mask, "Debugging mask");
|
||||
MODULE_PARM_DESC(uart_print, "Uart target debugging");
|
||||
MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
|
||||
MODULE_PARM_DESC(cryptmode, "Crypto mode: 0-hardware, 1-software");
|
||||
-MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
|
||||
+MODULE_PARM_DESC(frame_mode,
|
||||
+ "Datapath frame mode (0: raw, 1: native wifi (default), 2: ethernet)");
|
||||
MODULE_PARM_DESC(coredump_mask, "Bitfield of what to include in firmware crash file");
|
||||
MODULE_PARM_DESC(fw_diag_log, "Diag based fw log debugging");
|
||||
|
||||
@@ -61,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -65,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca988x hw2.0",
|
||||
|
|
@ -139,7 +80,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -134,6 +141,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -146,6 +149,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
|
|
@ -147,7 +88,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||
@@ -351,6 +359,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -387,6 +391,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
|
|
@ -155,7 +96,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.otp_exe_param = 0x00000700,
|
||||
@@ -393,6 +402,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -433,6 +438,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
|
|
@ -163,7 +104,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -442,6 +452,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
@@ -486,6 +492,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
|
|
@ -171,143 +112,7 @@ index 58e86e6..3b34c59 100644
|
|||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||
@@ -952,7 +963,8 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar)
|
||||
}
|
||||
|
||||
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||
bmi_board_id_param = BMI_PARAM_GET_FLASH_BOARD_ID;
|
||||
else
|
||||
bmi_board_id_param = BMI_PARAM_GET_EEPROM_BOARD_ID;
|
||||
@@ -1199,6 +1211,7 @@ success:
|
||||
static int ath10k_core_fetch_board_data_api_1(struct ath10k *ar, int bd_ie_type)
|
||||
{
|
||||
const struct firmware *fw;
|
||||
+ char boardname[100];
|
||||
|
||||
if (bd_ie_type == ATH10K_BD_IE_BOARD) {
|
||||
if (!ar->hw_params.fw.board) {
|
||||
@@ -1206,9 +1219,19 @@ static int ath10k_core_fetch_board_data_api_1(struct ath10k *ar, int bd_ie_type)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ scnprintf(boardname, sizeof(boardname), "board-%s-%s.bin",
|
||||
+ ath10k_bus_str(ar->hif.bus), dev_name(ar->dev));
|
||||
+
|
||||
ar->normal_mode_fw.board = ath10k_fetch_fw_file(ar,
|
||||
ar->hw_params.fw.dir,
|
||||
- ar->hw_params.fw.board);
|
||||
+ boardname);
|
||||
+ if (IS_ERR(ar->normal_mode_fw.board)) {
|
||||
+ fw = ath10k_fetch_fw_file(ar,
|
||||
+ ar->hw_params.fw.dir,
|
||||
+ ar->hw_params.fw.board);
|
||||
+ ar->normal_mode_fw.board = fw;
|
||||
+ }
|
||||
+
|
||||
if (IS_ERR(ar->normal_mode_fw.board))
|
||||
return PTR_ERR(ar->normal_mode_fw.board);
|
||||
|
||||
@@ -1743,7 +1766,8 @@ static int ath10k_download_and_run_otp(struct ath10k *ar)
|
||||
|
||||
/* As of now pre-cal is valid for 10_4 variants */
|
||||
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
||||
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
||||
bmi_otp_exe_param = BMI_PARAM_FLASH_SECTION_ALL;
|
||||
|
||||
ret = ath10k_bmi_execute(ar, address, bmi_otp_exe_param, &result);
|
||||
@@ -1870,6 +1894,39 @@ out_free:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
|
||||
+{
|
||||
+ struct nvmem_cell *cell;
|
||||
+ void *buf;
|
||||
+ size_t len;
|
||||
+ int ret;
|
||||
+
|
||||
+ cell = devm_nvmem_cell_get(ar->dev, cell_name);
|
||||
+ if (IS_ERR(cell)) {
|
||||
+ ret = PTR_ERR(cell);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ buf = nvmem_cell_read(cell, &len);
|
||||
+ if (IS_ERR(buf))
|
||||
+ return PTR_ERR(buf);
|
||||
+
|
||||
+ if (ar->hw_params.cal_data_len != len) {
|
||||
+ kfree(buf);
|
||||
+ ath10k_warn(ar, "invalid calibration data length in nvmem-cell '%s': %zu != %u\n",
|
||||
+ cell_name, len, ar->hw_params.cal_data_len);
|
||||
+ return -EMSGSIZE;
|
||||
+ }
|
||||
+
|
||||
+ ret = ath10k_download_board_data(ar, buf, len);
|
||||
+ kfree(buf);
|
||||
+ if (ret)
|
||||
+ ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n",
|
||||
+ cell_name, ret);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
|
||||
struct ath10k_fw_file *fw_file)
|
||||
{
|
||||
@@ -2104,6 +2161,18 @@ static int ath10k_core_pre_cal_download(struct ath10k *ar)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ ret = ath10k_download_cal_nvmem(ar, "pre-calibration");
|
||||
+ if (ret == 0) {
|
||||
+ ar->cal_mode = ATH10K_PRE_CAL_MODE_NVMEM;
|
||||
+ goto success;
|
||||
+ } else if (ret == -EPROBE_DEFER) {
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
+ "boot did not find a pre-calibration nvmem-cell, try file next: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
ret = ath10k_download_cal_file(ar, ar->pre_cal_file);
|
||||
if (ret == 0) {
|
||||
ar->cal_mode = ATH10K_PRE_CAL_MODE_FILE;
|
||||
@@ -2170,6 +2239,18 @@ static int ath10k_download_cal_data(struct ath10k *ar)
|
||||
"pre cal download procedure failed, try cal file: %d\n",
|
||||
ret);
|
||||
|
||||
+ ret = ath10k_download_cal_nvmem(ar, "calibration");
|
||||
+ if (ret == 0) {
|
||||
+ ar->cal_mode = ATH10K_CAL_MODE_NVMEM;
|
||||
+ goto done;
|
||||
+ } else if (ret == -EPROBE_DEFER) {
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
+ "boot did not find a calibration nvmem-cell, try file next: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
ret = ath10k_download_cal_file(ar, ar->cal_file);
|
||||
if (ret == 0) {
|
||||
ar->cal_mode = ATH10K_CAL_MODE_FILE;
|
||||
@@ -2487,7 +2568,7 @@ static int ath10k_core_init_firmware_features(struct ath10k *ar)
|
||||
ar->htt.max_num_amsdu = ATH10K_HTT_MAX_NUM_AMSDU_DEFAULT;
|
||||
ar->htt.max_num_ampdu = ATH10K_HTT_MAX_NUM_AMPDU_DEFAULT;
|
||||
|
||||
- if (rawmode) {
|
||||
+ if (ath10k_frame_mode == ATH10K_HW_TXRX_RAW) {
|
||||
if (!test_bit(ATH10K_FW_FEATURE_RAW_MODE_SUPPORT,
|
||||
fw_file->fw_features)) {
|
||||
ath10k_err(ar, "rawmode = 1 requires support from firmware");
|
||||
@@ -3084,6 +3165,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
|
||||
@@ -3231,6 +3238,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
|
||||
goto err_hif_stop;
|
||||
}
|
||||
|
||||
|
|
@ -318,16 +123,16 @@ index 58e86e6..3b34c59 100644
|
|||
return 0;
|
||||
|
||||
err_hif_stop:
|
||||
@@ -3250,6 +3335,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
@@ -3397,6 +3408,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
+ of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
||||
+
|
||||
ret = ath10k_core_init_firmware_features(ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "fatal problem with firmware features: %d\n",
|
||||
@@ -3342,9 +3429,18 @@ static void ath10k_core_register_work(struct work_struct *work)
|
||||
@@ -3489,9 +3502,18 @@ static void ath10k_core_register_work(struct work_struct *work)
|
||||
goto err_spectral_destroy;
|
||||
}
|
||||
|
||||
|
|
@ -346,7 +151,7 @@ index 58e86e6..3b34c59 100644
|
|||
err_spectral_destroy:
|
||||
ath10k_spectral_destroy(ar);
|
||||
err_debug_destroy:
|
||||
@@ -3369,6 +3465,16 @@ int ath10k_core_register(struct ath10k *ar,
|
||||
@@ -3516,6 +3538,16 @@ int ath10k_core_register(struct ath10k *ar,
|
||||
|
||||
queue_work(ar->workqueue, &ar->register_work);
|
||||
|
||||
|
|
@ -363,7 +168,7 @@ index 58e86e6..3b34c59 100644
|
|||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ath10k_core_register);
|
||||
@@ -3380,6 +3486,8 @@ void ath10k_core_unregister(struct ath10k *ar)
|
||||
@@ -3527,6 +3559,8 @@ void ath10k_core_unregister(struct ath10k *ar)
|
||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||
return;
|
||||
|
||||
|
|
@ -373,7 +178,7 @@ index 58e86e6..3b34c59 100644
|
|||
/* Stop spectral before unregistering from mac80211 to remove the
|
||||
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
|
||||
index 4f5ca94..dfe7b0e 100644
|
||||
index d80ab4e..db8ff31 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.h
|
||||
@@ -14,6 +14,7 @@
|
||||
|
|
@ -384,33 +189,7 @@ index 4f5ca94..dfe7b0e 100644
|
|||
|
||||
#include "htt.h"
|
||||
#include "htc.h"
|
||||
@@ -877,8 +878,10 @@ enum ath10k_cal_mode {
|
||||
ATH10K_CAL_MODE_FILE,
|
||||
ATH10K_CAL_MODE_OTP,
|
||||
ATH10K_CAL_MODE_DT,
|
||||
+ ATH10K_CAL_MODE_NVMEM,
|
||||
ATH10K_PRE_CAL_MODE_FILE,
|
||||
ATH10K_PRE_CAL_MODE_DT,
|
||||
+ ATH10K_PRE_CAL_MODE_NVMEM,
|
||||
ATH10K_CAL_MODE_EEPROM,
|
||||
};
|
||||
|
||||
@@ -898,10 +901,14 @@ static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode)
|
||||
return "otp";
|
||||
case ATH10K_CAL_MODE_DT:
|
||||
return "dt";
|
||||
+ case ATH10K_CAL_MODE_NVMEM:
|
||||
+ return "nvmem";
|
||||
case ATH10K_PRE_CAL_MODE_FILE:
|
||||
return "pre-cal-file";
|
||||
case ATH10K_PRE_CAL_MODE_DT:
|
||||
return "pre-cal-dt";
|
||||
+ case ATH10K_PRE_CAL_MODE_NVMEM:
|
||||
+ return "pre-cal-nvmem";
|
||||
case ATH10K_CAL_MODE_EEPROM:
|
||||
return "eeprom";
|
||||
}
|
||||
@@ -1249,6 +1256,13 @@ struct ath10k {
|
||||
@@ -1252,6 +1253,13 @@ struct ath10k {
|
||||
bool utf_monitor;
|
||||
} testmode;
|
||||
|
||||
|
|
@ -424,7 +203,7 @@ index 4f5ca94..dfe7b0e 100644
|
|||
struct {
|
||||
/* protected by data_lock */
|
||||
u32 rx_crc_err_drop;
|
||||
@@ -1298,6 +1312,10 @@ struct ath10k {
|
||||
@@ -1301,6 +1309,10 @@ struct ath10k {
|
||||
s32 tx_power_2g_limit;
|
||||
s32 tx_power_5g_limit;
|
||||
|
||||
|
|
@ -435,16 +214,8 @@ index 4f5ca94..dfe7b0e 100644
|
|||
/* must be last */
|
||||
u8 drv_priv[] __aligned(sizeof(void *));
|
||||
};
|
||||
@@ -1311,6 +1329,7 @@ static inline bool ath10k_peer_stats_enabled(struct ath10k *ar)
|
||||
return false;
|
||||
}
|
||||
|
||||
+extern unsigned int ath10k_frame_mode;
|
||||
extern unsigned long ath10k_coredump_mask;
|
||||
|
||||
void ath10k_core_napi_sync_disable(struct ath10k *ar);
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt.h b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
index ec689e3..4c70917 100644
|
||||
index f06cf39..da2a7c1 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt.h
|
||||
@@ -235,7 +235,11 @@ enum htt_rx_ring_flags {
|
||||
|
|
@ -459,118 +230,11 @@ index ec689e3..4c70917 100644
|
|||
#define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
||||
#define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
||||
#define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
|
||||
index b793eac..9863343 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
|
||||
@@ -1295,7 +1295,6 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
|
||||
struct ath10k *ar = htt->ar;
|
||||
int res, data_len;
|
||||
struct htt_cmd_hdr *cmd_hdr;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct htt_data_tx_desc *tx_desc;
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct sk_buff *tmp_skb;
|
||||
@@ -1306,11 +1305,15 @@ static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txm
|
||||
u16 flags1 = 0;
|
||||
u16 msdu_id = 0;
|
||||
|
||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ if (!is_eth) {
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
+
|
||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ }
|
||||
}
|
||||
|
||||
data_len = msdu->len;
|
||||
@@ -1407,7 +1410,6 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
|
||||
{
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct ath10k_hif_sg_item sg_items[2];
|
||||
@@ -1439,15 +1441,19 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
|
||||
txbuf_paddr = htt->txbuf.paddr +
|
||||
(sizeof(struct ath10k_htt_txbuf_32) * msdu_id);
|
||||
|
||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
- } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
- txmode == ATH10K_HW_TXRX_RAW &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ if (!is_eth) {
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
+
|
||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
+ txmode == ATH10K_HW_TXRX_RAW &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ }
|
||||
}
|
||||
|
||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
||||
@@ -1609,7 +1615,6 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
|
||||
{
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
|
||||
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
|
||||
struct ath10k_hif_sg_item sg_items[2];
|
||||
@@ -1641,15 +1646,19 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
|
||||
txbuf_paddr = htt->txbuf.paddr +
|
||||
(sizeof(struct ath10k_htt_txbuf_64) * msdu_id);
|
||||
|
||||
- if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
- ieee80211_is_deauth(hdr->frame_control) ||
|
||||
- ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
- } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
- txmode == ATH10K_HW_TXRX_RAW &&
|
||||
- ieee80211_has_protected(hdr->frame_control)) {
|
||||
- skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ if (!is_eth) {
|
||||
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)msdu->data;
|
||||
+
|
||||
+ if ((ieee80211_is_action(hdr->frame_control) ||
|
||||
+ ieee80211_is_deauth(hdr->frame_control) ||
|
||||
+ ieee80211_is_disassoc(hdr->frame_control)) &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ } else if (!(skb_cb->flags & ATH10K_SKB_F_NO_HWCRYPT) &&
|
||||
+ txmode == ATH10K_HW_TXRX_RAW &&
|
||||
+ ieee80211_has_protected(hdr->frame_control)) {
|
||||
+ skb_put(msdu, IEEE80211_CCMP_MIC_LEN);
|
||||
+ }
|
||||
}
|
||||
|
||||
skb_cb->paddr = dma_map_single(dev, msdu->data, msdu->len,
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
index 79ae9e4..9d65f3e 100644
|
||||
index 98f08ca..1398e4b 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/hw.h
|
||||
@@ -517,6 +517,7 @@ struct ath10k_hw_params {
|
||||
@@ -519,6 +519,7 @@ struct ath10k_hw_params {
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
|
|
@ -733,7 +397,7 @@ index 0000000..a0f5c84
|
|||
+#endif
|
||||
+#endif /* _LEDS_H_ */
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
index 266ba48..7a5311b 100644
|
||||
index f7faefd..dd7b91f 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -24,6 +24,7 @@
|
||||
|
|
@ -744,7 +408,7 @@ index 266ba48..7a5311b 100644
|
|||
|
||||
/*********/
|
||||
/* Rates */
|
||||
@@ -1020,6 +1021,40 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
|
||||
@@ -1027,6 +1028,40 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
|
||||
return ar->last_wmi_vdev_start_status;
|
||||
}
|
||||
|
||||
|
|
@ -785,7 +449,7 @@ index 266ba48..7a5311b 100644
|
|||
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
{
|
||||
struct cfg80211_chan_def *chandef = NULL;
|
||||
@@ -1052,7 +1087,8 @@ static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
@@ -1059,7 +1094,8 @@ static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = channel->max_power * 2;
|
||||
arg.channel.max_reg_power = channel->max_reg_power * 2;
|
||||
|
|
@ -795,7 +459,7 @@ index 266ba48..7a5311b 100644
|
|||
|
||||
reinit_completion(&ar->vdev_setup_done);
|
||||
reinit_completion(&ar->vdev_delete_done);
|
||||
@@ -1498,7 +1534,8 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif,
|
||||
@@ -1505,7 +1541,8 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif,
|
||||
arg.channel.min_power = 0;
|
||||
arg.channel.max_power = chandef->chan->max_power * 2;
|
||||
arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
|
||||
|
|
@ -805,7 +469,7 @@ index 266ba48..7a5311b 100644
|
|||
|
||||
if (arvif->vdev_type == WMI_VDEV_TYPE_AP) {
|
||||
arg.ssid = arvif->u.ap.ssid;
|
||||
@@ -3426,7 +3463,8 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
@@ -3436,7 +3473,8 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
ch->min_power = 0;
|
||||
ch->max_power = channel->max_power * 2;
|
||||
ch->max_reg_power = channel->max_reg_power * 2;
|
||||
|
|
@ -815,136 +479,7 @@ index 266ba48..7a5311b 100644
|
|||
ch->reg_class_id = 0; /* FIXME */
|
||||
|
||||
/* FIXME: why use only legacy modes, why not any
|
||||
@@ -3710,6 +3748,9 @@ ath10k_mac_tx_h_get_txmode(struct ath10k *ar,
|
||||
const struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb);
|
||||
__le16 fc = hdr->frame_control;
|
||||
|
||||
+ if (IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
|
||||
+ return ATH10K_HW_TXRX_ETHERNET;
|
||||
+
|
||||
if (!vif || vif->type == NL80211_IFTYPE_MONITOR)
|
||||
return ATH10K_HW_TXRX_RAW;
|
||||
|
||||
@@ -3870,6 +3911,12 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
|
||||
bool noack = false;
|
||||
|
||||
cb->flags = 0;
|
||||
+
|
||||
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
|
||||
+ cb->flags |= ATH10K_SKB_F_QOS; /* Assume data frames are QoS */
|
||||
+ goto finish_cb_fill;
|
||||
+ }
|
||||
+
|
||||
if (!ath10k_tx_h_use_hwcrypto(vif, skb))
|
||||
cb->flags |= ATH10K_SKB_F_NO_HWCRYPT;
|
||||
|
||||
@@ -3908,6 +3955,7 @@ static void ath10k_mac_tx_h_fill_cb(struct ath10k *ar,
|
||||
cb->flags |= ATH10K_SKB_F_RAW_TX;
|
||||
}
|
||||
|
||||
+finish_cb_fill:
|
||||
cb->vif = vif;
|
||||
cb->txq = txq;
|
||||
cb->airtime_est = airtime;
|
||||
@@ -4031,7 +4079,11 @@ static int ath10k_mac_tx(struct ath10k *ar,
|
||||
ath10k_tx_h_seq_no(vif, skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_ETHERNET:
|
||||
- ath10k_tx_h_8023(skb);
|
||||
+ /* Convert 802.11->802.3 header only if the frame was erlier
|
||||
+ * encapsulated to 802.11 by mac80211. Otherwise pass it as is.
|
||||
+ */
|
||||
+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP))
|
||||
+ ath10k_tx_h_8023(skb);
|
||||
break;
|
||||
case ATH10K_HW_TXRX_RAW:
|
||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags) &&
|
||||
@@ -4643,12 +4695,10 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct ieee80211_sta *sta = control->sta;
|
||||
struct ieee80211_txq *txq = NULL;
|
||||
- struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
enum ath10k_hw_txrx_mode txmode;
|
||||
enum ath10k_mac_tx_path txpath;
|
||||
bool is_htt;
|
||||
bool is_mgmt;
|
||||
- bool is_presp;
|
||||
int ret;
|
||||
u16 airtime;
|
||||
|
||||
@@ -4662,8 +4712,14 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,
|
||||
is_mgmt = (txpath == ATH10K_MAC_TX_HTT_MGMT);
|
||||
|
||||
if (is_htt) {
|
||||
+ bool is_presp = false;
|
||||
+
|
||||
spin_lock_bh(&ar->htt.tx_lock);
|
||||
- is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
||||
+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) {
|
||||
+ struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
+
|
||||
+ is_presp = ieee80211_is_probe_resp(hdr->frame_control);
|
||||
+ }
|
||||
|
||||
ret = ath10k_htt_tx_inc_pending(htt);
|
||||
if (ret) {
|
||||
@@ -5463,6 +5519,30 @@ static int ath10k_mac_set_txbf_conf(struct ath10k_vif *arvif)
|
||||
ar->wmi.vdev_param->txbf, value);
|
||||
}
|
||||
|
||||
+static void ath10k_update_vif_offload(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_vif *vif)
|
||||
+{
|
||||
+ struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
||||
+ struct ath10k *ar = hw->priv;
|
||||
+ u32 vdev_param;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ath10k_frame_mode != ATH10K_HW_TXRX_ETHERNET ||
|
||||
+ ar->wmi.vdev_param->tx_encap_type == WMI_VDEV_PARAM_UNSUPPORTED ||
|
||||
+ (vif->type != NL80211_IFTYPE_STATION &&
|
||||
+ vif->type != NL80211_IFTYPE_AP))
|
||||
+ vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED;
|
||||
+
|
||||
+ vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
||||
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
+ ATH10K_HW_TXRX_NATIVE_WIFI);
|
||||
+ /* 10.X firmware does not support this VDEV parameter. Do not warn */
|
||||
+ if (ret && ret != -EOPNOTSUPP) {
|
||||
+ ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
||||
+ arvif->vdev_id, ret);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* TODO:
|
||||
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE,
|
||||
@@ -5672,15 +5752,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
|
||||
|
||||
arvif->def_wep_key_idx = -1;
|
||||
|
||||
- vdev_param = ar->wmi.vdev_param->tx_encap_type;
|
||||
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
|
||||
- ATH10K_HW_TXRX_NATIVE_WIFI);
|
||||
- /* 10.X firmware does not support this VDEV parameter. Do not warn */
|
||||
- if (ret && ret != -EOPNOTSUPP) {
|
||||
- ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n",
|
||||
- arvif->vdev_id, ret);
|
||||
- goto err_vdev_delete;
|
||||
- }
|
||||
+ ath10k_update_vif_offload(hw, vif);
|
||||
|
||||
/* Configuring number of spatial stream for monitor interface is causing
|
||||
* target assert in qca9888 and qca6174.
|
||||
@@ -9368,6 +9440,7 @@ static const struct ieee80211_ops ath10k_ops = {
|
||||
.stop = ath10k_stop,
|
||||
.config = ath10k_config,
|
||||
.add_interface = ath10k_add_interface,
|
||||
+ .update_vif_offload = ath10k_update_vif_offload,
|
||||
.remove_interface = ath10k_remove_interface,
|
||||
.configure_filter = ath10k_configure_filter,
|
||||
.bss_info_changed = ath10k_bss_info_changed,
|
||||
@@ -9859,6 +9932,21 @@ static int ath10k_mac_init_rd(struct ath10k *ar)
|
||||
@@ -9909,6 +9947,21 @@ static int ath10k_mac_init_rd(struct ath10k *ar)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -966,20 +501,15 @@ index 266ba48..7a5311b 100644
|
|||
int ath10k_mac_register(struct ath10k *ar)
|
||||
{
|
||||
static const u32 cipher_suites[] = {
|
||||
@@ -10037,6 +10125,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
if (test_bit(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, ar->wmi.svc_map))
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TDLS_BUFFER_STA);
|
||||
@@ -10027,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
|
||||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
|
||||
- ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK);
|
||||
|
||||
+ if (ath10k_frame_mode == ATH10K_HW_TXRX_ETHERNET) {
|
||||
+ if (ar->wmi.vdev_param->tx_encap_type !=
|
||||
+ WMI_VDEV_PARAM_UNSUPPORTED)
|
||||
+ ieee80211_hw_set(ar->hw, SUPPORTS_TX_ENCAP_OFFLOAD);
|
||||
+ }
|
||||
+
|
||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
ar->hw->wiphy->max_remain_on_channel_duration = 5000;
|
||||
@@ -10211,6 +10305,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
|
||||
ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL);
|
||||
@@ -10267,6 +10319,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
|
||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||
|
||||
|
|
@ -993,7 +523,7 @@ index 266ba48..7a5311b 100644
|
|||
if (ret) {
|
||||
ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
index f6191b5..e9e08b0 100644
|
||||
index f0daff6..63fcf7f 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_config_wlan[] = {
|
||||
|
|
@ -1045,7 +575,7 @@ index f6191b5..e9e08b0 100644
|
|||
},
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
index 5fdb020..d76c307 100644
|
||||
index 1f4de9f..fcfa3c2 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
|
||||
@@ -25,7 +25,7 @@ struct ath10k_thermal {
|
||||
|
|
@ -1057,39 +587,6 @@ index 5fdb020..d76c307 100644
|
|||
int ath10k_thermal_register(struct ath10k *ar);
|
||||
void ath10k_thermal_unregister(struct ath10k *ar);
|
||||
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c
|
||||
index 6f8b642..08e079e 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/txrx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
|
||||
@@ -43,6 +43,7 @@ out:
|
||||
int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
const struct htt_tx_done *tx_done)
|
||||
{
|
||||
+ struct ieee80211_tx_status status;
|
||||
struct ath10k *ar = htt->ar;
|
||||
struct device *dev = ar->dev;
|
||||
struct ieee80211_tx_info *info;
|
||||
@@ -128,7 +129,19 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt,
|
||||
info->status.is_valid_ack_signal = true;
|
||||
}
|
||||
|
||||
- ieee80211_tx_status(htt->ar->hw, msdu);
|
||||
+ memset(&status, 0, sizeof(status));
|
||||
+ status.skb = msdu;
|
||||
+ status.info = info;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ if (txq)
|
||||
+ status.sta = txq->sta;
|
||||
+
|
||||
+ ieee80211_tx_status_ext(htt->ar->hw, &status);
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
/* we do not own the msdu anymore */
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
index aa57d80..f3f6b59 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
|
||||
|
|
@ -1142,7 +639,7 @@ index aa57d80..f3f6b59 100644
|
|||
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
||||
{
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
index 7efbe03..6a391b2 100644
|
||||
index 876410a..6724ea9 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
|
||||
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops = {
|
||||
|
|
@ -1155,7 +652,7 @@ index 7efbe03..6a391b2 100644
|
|||
|
||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
index 416f2b9..ed57499 100644
|
||||
index c80ca74..c7f0c09 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct ath10k *ar, u32 vdev_id,
|
||||
|
|
@ -1255,7 +752,7 @@ index 416f2b9..ed57499 100644
|
|||
|
||||
int ath10k_wmi_attach(struct ath10k *ar)
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
index 01bfd09..1a39a9a 100644
|
||||
index 6de3cc4..29270d0 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
|
||||
@@ -3030,6 +3030,41 @@ enum wmi_10_4_feature_mask {
|
||||
|
|
@ -1301,10 +798,10 @@ index 01bfd09..1a39a9a 100644
|
|||
/* contains enum wmi_host_platform_type */
|
||||
__le32 host_platform_config;
|
||||
diff --git a/local-symbols b/local-symbols
|
||||
index 395c284..ee80d12 100644
|
||||
index 7d5b2d3..ca938d6 100644
|
||||
--- a/local-symbols
|
||||
+++ b/local-symbols
|
||||
@@ -165,6 +165,8 @@ ATH10K_SNOC=
|
||||
@@ -161,6 +161,8 @@ ATH10K_SNOC=
|
||||
ATH10K_DEBUG=
|
||||
ATH10K_DEBUGFS=
|
||||
ATH10K_SPECTRAL=
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,19 @@
|
|||
commit 6bad7c2d0da897bf5d333811a54d637becf99362
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:04:20 2023 +0200
|
||||
|
||||
backports-mt7601u
|
||||
|
||||
diff --git a/drivers/net/wireless/mediatek/mt7601u/usb.h b/drivers/net/wireless/mediatek/mt7601u/usb.h
|
||||
index 9fdf359..66481b7 100644
|
||||
--- a/drivers/net/wireless/mediatek/mt7601u/usb.h
|
||||
+++ b/drivers/net/wireless/mediatek/mt7601u/usb.h
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "mt7601u.h"
|
||||
|
||||
-#define MT7601U_FIRMWARE "mt7601u.bin"
|
||||
+#define MT7601U_FIRMWARE "mediatek/mt7601u.bin"
|
||||
|
||||
#define MT_VEND_REQ_MAX_RETRY 10
|
||||
#define MT_VEND_REQ_TOUT_MS 300
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,24 +1,14 @@
|
|||
From 7230aa4b1ad120a06c0607563c4358c609bbe8b3 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:31:25 +0200
|
||||
Subject: [PATCH] backport of mwl patches from openwrt
|
||||
commit 7d323c9234b0f03c3589fa450b8aff35746b3a57
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:12:25 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/marvell/libertas/cfg.c | 4 +
|
||||
drivers/net/wireless/marvell/libertas/main.c | 1 +
|
||||
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 96 +++++++++++++++++--
|
||||
drivers/net/wireless/marvell/mwifiex/decl.h | 4 +-
|
||||
drivers/net/wireless/marvell/mwifiex/main.h | 2 +
|
||||
.../wireless/marvell/mwifiex/sta_cmdresp.c | 5 +-
|
||||
.../net/wireless/marvell/mwifiex/uap_cmd.c | 3 +-
|
||||
drivers/net/wireless/marvell/mwl8k.c | 5 +-
|
||||
8 files changed, 105 insertions(+), 15 deletions(-)
|
||||
backports-mwl
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
index 4e3de68..c861532 100644
|
||||
index 3e065cb..3406241 100644
|
||||
--- a/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
|
||||
@@ -2053,6 +2053,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
|
||||
@@ -2052,6 +2052,8 @@ struct wireless_dev *lbs_cfg_alloc(struct device *dev)
|
||||
goto err_wiphy_new;
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +17,7 @@ index 4e3de68..c861532 100644
|
|||
return wdev;
|
||||
|
||||
err_wiphy_new:
|
||||
@@ -2127,6 +2129,8 @@ int lbs_cfg_register(struct lbs_private *priv)
|
||||
@@ -2126,6 +2128,8 @@ int lbs_cfg_register(struct lbs_private *priv)
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
|
||||
wdev->wiphy->reg_notifier = lbs_reg_notifier;
|
||||
|
||||
|
|
@ -37,7 +27,7 @@ index 4e3de68..c861532 100644
|
|||
if (ret < 0)
|
||||
pr_err("cannot register wiphy device\n");
|
||||
diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c
|
||||
index 64fc5e4..7048794 100644
|
||||
index 78e8b5a..b56a495 100644
|
||||
--- a/drivers/net/wireless/marvell/libertas/main.c
|
||||
+++ b/drivers/net/wireless/marvell/libertas/main.c
|
||||
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
|
||||
|
|
@ -49,10 +39,10 @@ index 64fc5e4..7048794 100644
|
|||
dev->ml_priv = priv;
|
||||
SET_NETDEV_DEV(dev, dmdev);
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
index 171a257..b0b8b1f 100644
|
||||
index d3339d6..3971cdd 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
|
||||
@@ -28,6 +28,85 @@
|
||||
@@ -16,6 +16,85 @@
|
||||
|
||||
static void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
|
@ -138,7 +128,7 @@ index 171a257..b0b8b1f 100644
|
|||
/*
|
||||
* This function initializes a command node.
|
||||
*
|
||||
@@ -205,8 +284,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||
@@ -193,8 +272,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||
cmd_code != HostCmd_CMD_FUNC_SHUTDOWN &&
|
||||
cmd_code != HostCmd_CMD_FUNC_INIT) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -149,7 +139,7 @@ index 171a257..b0b8b1f 100644
|
|||
mwifiex_recycle_cmd_node(adapter, cmd_node);
|
||||
queue_work(adapter->workqueue, &adapter->main_work);
|
||||
return -1;
|
||||
@@ -660,8 +739,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
@@ -653,8 +732,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
/* Return error, since the command preparation failed */
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -160,7 +150,7 @@ index 171a257..b0b8b1f 100644
|
|||
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
|
||||
return -1;
|
||||
}
|
||||
@@ -900,8 +979,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
|
||||
@@ -902,8 +981,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
|
||||
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
|
||||
if (ret) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -172,7 +162,7 @@ index 171a257..b0b8b1f 100644
|
|||
mwifiex_init_fw_complete(adapter);
|
||||
return -1;
|
||||
} else if (adapter->last_init_cmd == cmdresp_no)
|
||||
@@ -1264,8 +1344,8 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
|
||||
@@ -1273,8 +1353,8 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter,
|
||||
|
||||
if (command != HostCmd_CMD_802_11_PS_MODE_ENH) {
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -184,10 +174,10 @@ index 171a257..b0b8b1f 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/decl.h b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
index 6bd23c9..518dce4 100644
|
||||
index 88648c0..cc3fbf1 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/decl.h
|
||||
@@ -30,7 +30,7 @@
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
#define MWIFIEX_BSS_COEX_COUNT 2
|
||||
|
|
@ -196,7 +186,7 @@ index 6bd23c9..518dce4 100644
|
|||
|
||||
#define MWIFIEX_DMA_ALIGN_SZ 64
|
||||
#define MWIFIEX_RX_HEADROOM 64
|
||||
@@ -112,7 +112,7 @@
|
||||
@@ -100,7 +100,7 @@
|
||||
#define MWIFIEX_RATE_INDEX_OFDM0 4
|
||||
|
||||
#define MWIFIEX_MAX_STA_NUM 3
|
||||
|
|
@ -206,10 +196,10 @@ index 6bd23c9..518dce4 100644
|
|||
|
||||
#define MWIFIEX_A_BAND_START_FREQ 5000
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
index 5923c5c..0d30f61 100644
|
||||
index 63f861e..7e29f10 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||
@@ -1106,6 +1106,8 @@ void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
|
||||
@@ -1099,6 +1099,8 @@ void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter);
|
||||
void mwifiex_cancel_scan(struct mwifiex_adapter *adapter);
|
||||
|
||||
|
|
@ -219,10 +209,10 @@ index 5923c5c..0d30f61 100644
|
|||
struct cmd_ctrl_node *cmd_node);
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
index 6b5d35d..ae6554f 100644
|
||||
index 7b69d27..d1c8b16 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||
@@ -48,8 +48,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
|
||||
@@ -36,8 +36,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
|
||||
struct host_cmd_ds_802_11_ps_mode_enh *pm;
|
||||
|
||||
mwifiex_dbg(adapter, ERROR,
|
||||
|
|
@ -235,10 +225,10 @@ index 6b5d35d..ae6554f 100644
|
|||
if (adapter->curr_cmd->wait_q_enabled)
|
||||
adapter->cmd_wait_q.status = -1;
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
index 18e8977..29b8af5 100644
|
||||
index e78a201..d67f6c1 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
|
||||
@@ -806,7 +806,8 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
@@ -794,7 +794,8 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||
break;
|
||||
default:
|
||||
mwifiex_dbg(priv->adapter, ERROR,
|
||||
|
|
@ -249,10 +239,10 @@ index 18e8977..29b8af5 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
|
||||
index 529e325..fa1f639 100644
|
||||
index 13bcb12..5cad1e4 100644
|
||||
--- a/drivers/net/wireless/marvell/mwl8k.c
|
||||
+++ b/drivers/net/wireless/marvell/mwl8k.c
|
||||
@@ -5699,6 +5699,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
@@ -5703,6 +5703,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||
|
||||
static const struct pci_device_id mwl8k_pci_id_table[] = {
|
||||
|
|
@ -260,7 +250,7 @@ index 529e325..fa1f639 100644
|
|||
{ PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, },
|
||||
{ PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, },
|
||||
@@ -6284,6 +6285,8 @@ static int mwl8k_probe(struct pci_dev *pdev,
|
||||
@@ -6288,6 +6289,8 @@ static int mwl8k_probe(struct pci_dev *pdev,
|
||||
|
||||
priv->running_bsses = 0;
|
||||
|
||||
|
|
@ -269,7 +259,7 @@ index 529e325..fa1f639 100644
|
|||
return rc;
|
||||
|
||||
err_stop_firmware:
|
||||
@@ -6317,8 +6320,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||
@@ -6321,8 +6324,6 @@ static void mwl8k_remove(struct pci_dev *pdev)
|
||||
return;
|
||||
priv = hw->priv;
|
||||
|
||||
|
|
@ -1,27 +1,8 @@
|
|||
From a1dd3f2a734c1e96a7c8fd1ae64126e901a966d5 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 14:30:49 +0200
|
||||
Subject: [PATCH] backport of brcm patches from openwrt
|
||||
commit e6cf19d7a1de6cadb950fb64f560cd6f6c2f6759
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:16:19 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/broadcom/b43/Kconfig | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/Makefile | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/b43.h | 3 +
|
||||
drivers/net/wireless/broadcom/b43/dma.h | 2 +-
|
||||
drivers/net/wireless/broadcom/b43/main.c | 82 ++++++++++++--
|
||||
drivers/net/wireless/broadcom/b43/pio.h | 34 +++++-
|
||||
.../net/wireless/broadcom/brcm80211/Kconfig | 2 +-
|
||||
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 102 ++++++++++++++++++
|
||||
.../broadcom/brcm80211/brcmfmac/common.c | 27 +++--
|
||||
.../broadcom/brcm80211/brcmfmac/common.h | 1 +
|
||||
.../broadcom/brcm80211/brcmfmac/core.c | 12 ++-
|
||||
.../broadcom/brcm80211/brcmfmac/core.h | 8 ++
|
||||
.../broadcom/brcm80211/brcmfmac/firmware.c | 14 +++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/of.c | 71 ++++++++++++
|
||||
.../wireless/broadcom/brcm80211/brcmfmac/of.h | 7 ++
|
||||
.../broadcom/brcm80211/brcmfmac/sdio.c | 47 +++++++-
|
||||
.../broadcom/brcm80211/brcmsmac/channel.c | 19 ++--
|
||||
17 files changed, 396 insertions(+), 39 deletions(-)
|
||||
backports-bcrm
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/Kconfig b/drivers/net/wireless/broadcom/b43/Kconfig
|
||||
index 84cbe38..5f008b4 100644
|
||||
|
|
@ -77,7 +58,7 @@ index dfebc64..ec72414 100644
|
|||
#define B43_DMA0_RX_FW351_BUFSIZE (B43_DMA0_RX_FW351_FO + IEEE80211_MAX_FRAME_LEN)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
|
||||
index f378356..86ab6fb 100644
|
||||
index ed8a1fe..a39436b 100644
|
||||
--- a/drivers/net/wireless/broadcom/b43/main.c
|
||||
+++ b/drivers/net/wireless/broadcom/b43/main.c
|
||||
@@ -72,6 +72,11 @@ MODULE_FIRMWARE("b43/ucode40.fw");
|
||||
|
|
@ -92,7 +73,7 @@ index f378356..86ab6fb 100644
|
|||
static int modparam_bad_frames_preempt;
|
||||
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
|
||||
MODULE_PARM_DESC(bad_frames_preempt,
|
||||
@@ -109,7 +114,7 @@ static int b43_modparam_pio = 0;
|
||||
@@ -109,7 +114,7 @@ static int b43_modparam_pio;
|
||||
module_param_named(pio, b43_modparam_pio, int, 0644);
|
||||
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
|
||||
|
||||
|
|
@ -161,7 +142,7 @@ index f378356..86ab6fb 100644
|
|||
|
||||
if (phy->type == B43_PHYTYPE_B) {
|
||||
value16 = b43_read16(dev, 0x005E);
|
||||
@@ -3978,7 +3993,6 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
@@ -3979,7 +3994,6 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
struct b43_wldev *dev = wl->current_dev;
|
||||
struct b43_phy *phy = &dev->phy;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
|
|
@ -169,7 +150,7 @@ index f378356..86ab6fb 100644
|
|||
int err = 0;
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -4021,11 +4035,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
@@ -4022,11 +4036,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
|
||||
/* Antennas for RX and management frame TX. */
|
||||
|
|
@ -183,7 +164,7 @@ index f378356..86ab6fb 100644
|
|||
|
||||
if (wl->radio_enabled != phy->radio_on) {
|
||||
if (wl->radio_enabled) {
|
||||
@@ -5168,6 +5180,47 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
@@ -5169,6 +5181,47 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -230,8 +211,8 @@ index f378356..86ab6fb 100644
|
|||
+
|
||||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.tx = b43_op_tx,
|
||||
.conf_tx = b43_op_conf_tx,
|
||||
@@ -5189,6 +5242,8 @@ static const struct ieee80211_ops b43_hw_ops = {
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
@@ -5191,6 +5244,8 @@ static const struct ieee80211_ops b43_hw_ops = {
|
||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||
.get_survey = b43_op_get_survey,
|
||||
.rfkill_poll = b43_rfkill_poll,
|
||||
|
|
@ -240,7 +221,7 @@ index f378356..86ab6fb 100644
|
|||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5490,6 +5545,8 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)
|
||||
@@ -5492,6 +5547,8 @@ static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl)
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
|
|
@ -249,7 +230,7 @@ index f378356..86ab6fb 100644
|
|||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5581,6 +5638,9 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
|
||||
@@ -5583,6 +5640,9 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
|
||||
|
||||
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
|
||||
|
||||
|
|
@ -311,7 +292,7 @@ index ffbfec6..a3742b7 100644
|
|||
|
||||
#endif /* B43_PIO_H_ */
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/Kconfig b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
index 64f6d2f..c163838 100644
|
||||
index b2d97b8..597a4c3 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/Kconfig
|
||||
@@ -1,6 +1,6 @@
|
||||
|
|
@ -323,10 +304,10 @@ index 64f6d2f..c163838 100644
|
|||
|
||||
config BRCMSMAC
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
index 7a58e05..9e629c2 100644
|
||||
index ea8409e..16a08e2 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -715,8 +715,36 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,
|
||||
@@ -713,8 +713,36 @@ static struct wireless_dev *brcmf_cfg80211_add_iface(struct wiphy *wiphy,
|
||||
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
struct brcmf_pub *drvr = cfg->pub;
|
||||
struct wireless_dev *wdev;
|
||||
|
|
@ -363,71 +344,7 @@ index 7a58e05..9e629c2 100644
|
|||
brcmf_dbg(TRACE, "enter: %s type %d\n", name, type);
|
||||
err = brcmf_vif_add_validate(wiphy_to_cfg(wiphy), type);
|
||||
if (err) {
|
||||
@@ -2892,6 +2920,63 @@ done:
|
||||
return err;
|
||||
}
|
||||
|
||||
+static int
|
||||
+brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+ int idx, struct survey_info *survey)
|
||||
+{
|
||||
+ struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
|
||||
+ struct brcmf_if *ifp = netdev_priv(ndev);
|
||||
+ struct brcmu_chan ch;
|
||||
+ enum nl80211_band band = 0;
|
||||
+ s32 err = 0;
|
||||
+ int noise;
|
||||
+ u32 freq;
|
||||
+ u32 chanspec;
|
||||
+
|
||||
+ memset(survey, 0, sizeof(struct survey_info));
|
||||
+ if (idx != 0) {
|
||||
+ if (idx >= cfg->pub->num_chan_stats || cfg->pub->chan_stats == NULL)
|
||||
+ return -ENOENT;
|
||||
+ if (cfg->pub->chan_stats[idx].freq == 0)
|
||||
+ return -ENOENT;
|
||||
+ survey->filled = SURVEY_INFO_NOISE_DBM;
|
||||
+ survey->channel = ieee80211_get_channel(wiphy, cfg->pub->chan_stats[idx].freq);
|
||||
+ survey->noise = cfg->pub->chan_stats[idx].noise;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
|
||||
+ if (err) {
|
||||
+ brcmf_err("chanspec failed (%d)\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ ch.chspec = chanspec;
|
||||
+ cfg->d11inf.decchspec(&ch);
|
||||
+
|
||||
+ switch (ch.band) {
|
||||
+ case BRCMU_CHAN_BAND_2G:
|
||||
+ band = NL80211_BAND_2GHZ;
|
||||
+ break;
|
||||
+ case BRCMU_CHAN_BAND_5G:
|
||||
+ band = NL80211_BAND_5GHZ;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ freq = ieee80211_channel_to_frequency(ch.control_ch_num, band);
|
||||
+ survey->channel = ieee80211_get_channel(wiphy, freq);
|
||||
+
|
||||
+ err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PHY_NOISE, &noise);
|
||||
+ if (err) {
|
||||
+ brcmf_err("Could not get noise (%d)\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ survey->filled = SURVEY_INFO_NOISE_DBM | SURVEY_INFO_IN_USE;
|
||||
+ survey->noise = le32_to_cpu(noise);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
|
||||
int idx, u8 *mac, struct station_info *sinfo)
|
||||
@@ -2946,6 +3031,10 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
|
||||
@@ -2948,6 +2976,10 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
|
||||
* preference in cfg struct to apply this to
|
||||
* FW later while initializing the dongle
|
||||
*/
|
||||
|
|
@ -438,42 +355,8 @@ index 7a58e05..9e629c2 100644
|
|||
cfg->pwr_save = enabled;
|
||||
if (!check_vif_up(ifp->vif)) {
|
||||
|
||||
@@ -2989,6 +3078,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
struct brcmu_chan ch;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
+ int i;
|
||||
u16 notify_capability;
|
||||
u16 notify_interval;
|
||||
u8 *notify_ie;
|
||||
@@ -3013,6 +3103,17 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
|
||||
band = NL80211_BAND_5GHZ;
|
||||
|
||||
freq = ieee80211_channel_to_frequency(channel, band);
|
||||
+ for (i = 0;i < cfg->pub->num_chan_stats;i++) {
|
||||
+ if (freq == cfg->pub->chan_stats[i].freq)
|
||||
+ break;
|
||||
+ if (cfg->pub->chan_stats[i].freq == 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i < cfg->pub->num_chan_stats) {
|
||||
+ cfg->pub->chan_stats[i].freq = freq;
|
||||
+ cfg->pub->chan_stats[i].noise = bi->phy_noise;
|
||||
+ }
|
||||
+
|
||||
bss_data.chan = ieee80211_get_channel(wiphy, freq);
|
||||
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
|
||||
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
|
||||
@@ -5541,6 +5642,7 @@ static struct cfg80211_ops brcmf_cfg80211_ops = {
|
||||
.leave_ibss = brcmf_cfg80211_leave_ibss,
|
||||
.get_station = brcmf_cfg80211_get_station,
|
||||
.dump_station = brcmf_cfg80211_dump_station,
|
||||
+ .dump_survey = brcmf_cfg80211_dump_survey,
|
||||
.set_tx_power = brcmf_cfg80211_set_tx_power,
|
||||
.get_tx_power = brcmf_cfg80211_get_tx_power,
|
||||
.add_key = brcmf_cfg80211_add_key,
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
index 3512a3f..bb7cbe2 100644
|
||||
index 7c0d1f0..62c3e47 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
|
||||
@@ -59,7 +59,11 @@ static int brcmf_fcmode;
|
||||
|
|
@ -488,183 +371,11 @@ index 3512a3f..bb7cbe2 100644
|
|||
module_param_named(roamoff, brcmf_roamoff, int, 0400);
|
||||
MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine");
|
||||
|
||||
@@ -202,13 +206,24 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
|
||||
char *ptr;
|
||||
s32 err;
|
||||
|
||||
- /* retreive mac address */
|
||||
- err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
- sizeof(ifp->mac_addr));
|
||||
- if (err < 0) {
|
||||
- bphy_err(drvr, "Retrieving cur_etheraddr failed, %d\n", err);
|
||||
- goto done;
|
||||
+ if (is_valid_ether_addr(ifp->mac_addr)) {
|
||||
+ /* set mac address */
|
||||
+ err = brcmf_fil_iovar_data_set(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
+ ETH_ALEN);
|
||||
+ if (err < 0) {
|
||||
+ bphy_err(ifp->drvr, "Setting cur_etheraddr failed, %d\n", err);
|
||||
+ goto done;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* retrieve mac address */
|
||||
+ err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr,
|
||||
+ sizeof(ifp->mac_addr));
|
||||
+ if (err < 0) {
|
||||
+ bphy_err(drvr, "Retrieving cur_etheraddr failed, %d\n", err);
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
memcpy(ifp->drvr->mac, ifp->mac_addr, sizeof(ifp->drvr->mac));
|
||||
memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN);
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
index 8b5f499..15accc8 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
|
||||
@@ -50,6 +50,7 @@ struct brcmf_mp_device {
|
||||
bool ignore_probe_fail;
|
||||
struct brcmfmac_pd_cc *country_codes;
|
||||
const char *board_type;
|
||||
+ unsigned char mac[ETH_ALEN];
|
||||
union {
|
||||
struct brcmfmac_sdio_pd sdio;
|
||||
} bus;
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
index 9fbedb8..96e2311 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/inetdevice.h>
|
||||
+#include <linux/property.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <net/addrconf.h>
|
||||
@@ -1226,7 +1227,8 @@ static int brcmf_bus_started(struct brcmf_pub *drvr, struct cfg80211_ops *ops)
|
||||
brcmf_dbg(TRACE, "\n");
|
||||
|
||||
/* add primary networking interface */
|
||||
- ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d", NULL);
|
||||
+ ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d",
|
||||
+ is_valid_ether_addr(drvr->settings->mac) ? drvr->settings->mac : NULL);
|
||||
if (IS_ERR(ifp))
|
||||
return PTR_ERR(ifp);
|
||||
|
||||
@@ -1361,6 +1363,8 @@ int brcmf_attach(struct device *dev)
|
||||
|
||||
/* Link to bus module */
|
||||
drvr->hdrlen = 0;
|
||||
+ drvr->chan_stats = vzalloc(256 * sizeof(struct brcmf_chan_stats));
|
||||
+ drvr->num_chan_stats = 256;
|
||||
|
||||
/* Attach and link in the protocol */
|
||||
ret = brcmf_proto_attach(drvr);
|
||||
@@ -1443,6 +1447,12 @@ void brcmf_detach(struct device *dev)
|
||||
if (drvr == NULL)
|
||||
return;
|
||||
|
||||
+ drvr->num_chan_stats = 0;
|
||||
+ if (drvr->chan_stats) {
|
||||
+ vfree(drvr->chan_stats);
|
||||
+ drvr->chan_stats = NULL;
|
||||
+ }
|
||||
+
|
||||
#ifdef CONFIG_INET
|
||||
unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
index 8212c9d..c57b8bb 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
|
||||
@@ -91,6 +91,11 @@ struct brcmf_rev_info {
|
||||
u32 nvramrev;
|
||||
};
|
||||
|
||||
+struct brcmf_chan_stats {
|
||||
+ u32 freq;
|
||||
+ int noise;
|
||||
+};
|
||||
+
|
||||
/* Common structure for module and instance linkage */
|
||||
struct brcmf_pub {
|
||||
/* Linkage ponters */
|
||||
@@ -100,6 +105,9 @@ struct brcmf_pub {
|
||||
struct cfg80211_ops *ops;
|
||||
struct brcmf_cfg80211_info *config;
|
||||
|
||||
+ int num_chan_stats;
|
||||
+ struct brcmf_chan_stats *chan_stats;
|
||||
+
|
||||
/* Internal brcmf items */
|
||||
uint hdrlen; /* Total BRCMF header length (proto + bus) */
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
index dcbe55b..3ddc390 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
|
||||
@@ -431,6 +431,7 @@ struct brcmf_fw {
|
||||
struct brcmf_fw_request *req;
|
||||
u32 curpos;
|
||||
void (*done)(struct device *dev, int err, struct brcmf_fw_request *req);
|
||||
+ struct completion *completion;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
@@ -655,6 +656,8 @@ static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
|
||||
fwctx->req = NULL;
|
||||
}
|
||||
fwctx->done(fwctx->dev, ret, fwctx->req);
|
||||
+ if (fwctx->completion)
|
||||
+ complete(fwctx->completion);
|
||||
kfree(fwctx);
|
||||
}
|
||||
|
||||
@@ -695,6 +698,8 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
{
|
||||
struct brcmf_fw_item *first = &req->items[0];
|
||||
struct brcmf_fw *fwctx;
|
||||
+ struct completion completion;
|
||||
+ unsigned long time_left;
|
||||
char *alt_path = NULL;
|
||||
int ret;
|
||||
|
||||
@@ -712,6 +717,9 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
fwctx->dev = dev;
|
||||
fwctx->req = req;
|
||||
fwctx->done = fw_cb;
|
||||
+
|
||||
+ init_completion(&completion);
|
||||
+ fwctx->completion = &completion;
|
||||
|
||||
/* First try alternative board-specific path if any */
|
||||
if (fwctx->req->board_type)
|
||||
@@ -730,6 +738,12 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
|
||||
if (ret < 0)
|
||||
brcmf_fw_request_done(NULL, fwctx);
|
||||
|
||||
+
|
||||
+ time_left = wait_for_completion_timeout(&completion,
|
||||
+ msecs_to_jiffies(5000));
|
||||
+ if (!time_left && fwctx)
|
||||
+ fwctx->completion = NULL;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
index 2f7bc3a..8cf1ad1 100644
|
||||
index fdd0c9a..453ce68 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
|
||||
@@ -5,11 +5,13 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_irq.h>
|
||||
+#include <linux/of_net.h>
|
||||
|
||||
#include <defs.h>
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "debug.h"
|
||||
#include "core.h"
|
||||
#include "common.h"
|
||||
|
|
@ -672,7 +383,7 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
#include "of.h"
|
||||
|
||||
static int brcmf_of_get_country_codes(struct device *dev,
|
||||
@@ -58,6 +60,36 @@ static int brcmf_of_get_country_codes(struct device *dev,
|
||||
@@ -65,6 +66,36 @@ static int brcmf_of_get_country_codes(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -709,7 +420,7 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
@@ -90,6 +122,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
@@ -106,6 +137,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
of_node_put(root);
|
||||
}
|
||||
|
||||
|
|
@ -718,16 +429,7 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
|
||||
return;
|
||||
|
||||
@@ -97,6 +131,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
if (err)
|
||||
brcmf_err("failed to get OF country code map (err=%d)\n", err);
|
||||
|
||||
+ of_get_mac_address(np, settings->mac);
|
||||
+
|
||||
if (bus_type != BRCMF_BUSTYPE_SDIO)
|
||||
return;
|
||||
|
||||
@@ -118,3 +154,38 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
@@ -136,3 +169,38 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
sdio->oob_irq_nr = irq;
|
||||
sdio->oob_irq_flags = irqf;
|
||||
}
|
||||
|
|
@ -767,28 +469,32 @@ index 2f7bc3a..8cf1ad1 100644
|
|||
+ return count ? fwnames : NULL;
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
index 10bf522..5b39a39 100644
|
||||
index 10bf522..4977e0c 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
@@ -5,9 +5,16 @@
|
||||
@@ -5,9 +5,20 @@
|
||||
#ifdef CONFIG_OF
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings);
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
|
||||
+#endif
|
||||
#else
|
||||
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
}
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+static struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
#endif /* CONFIG_OF */
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
index f7961b2..3c5989b 100644
|
||||
index e265a2e..912495f 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -35,6 +35,7 @@
|
||||
|
|
@ -799,7 +505,7 @@ index f7961b2..3c5989b 100644
|
|||
|
||||
#define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500)
|
||||
#define CTL_DONE_TIMEOUT msecs_to_jiffies(2500)
|
||||
@@ -633,7 +634,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");
|
||||
@@ -634,7 +635,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt");
|
||||
/* per-board firmware binaries */
|
||||
MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.bin");
|
||||
|
||||
|
|
@ -808,7 +514,7 @@ index f7961b2..3c5989b 100644
|
|||
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
|
||||
@@ -659,6 +660,9 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
@@ -662,6 +663,9 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752)
|
||||
};
|
||||
|
||||
|
|
@ -818,18 +524,9 @@ index f7961b2..3c5989b 100644
|
|||
#define TXCTL_CREDITS 2
|
||||
|
||||
static void pkt_align(struct sk_buff *p, int len, int align)
|
||||
@@ -4140,7 +4144,7 @@ int brcmf_sdio_get_fwname(struct device *dev, const char *ext, u8 *fw_name)
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
- ARRAY_SIZE(brcmf_sdio_fwnames),
|
||||
+ brcmf_sdio_fwnames_count,
|
||||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return -ENOMEM;
|
||||
@@ -4196,6 +4200,9 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = {
|
||||
#define BRCMF_SDIO_FW_CODE 0
|
||||
@@ -4193,6 +4197,9 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = {
|
||||
#define BRCMF_SDIO_FW_NVRAM 1
|
||||
#define BRCMF_SDIO_FW_CLM 2
|
||||
|
||||
+static struct brcmf_fw_request *
|
||||
+brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus);
|
||||
|
|
@ -837,7 +534,7 @@ index f7961b2..3c5989b 100644
|
|||
static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
struct brcmf_fw_request *fwreq)
|
||||
{
|
||||
@@ -4211,6 +4218,22 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
@@ -4208,6 +4215,22 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||
|
||||
brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err);
|
||||
|
||||
|
|
@ -860,7 +557,7 @@ index f7961b2..3c5989b 100644
|
|||
if (err)
|
||||
goto fail;
|
||||
|
||||
@@ -4419,7 +4442,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus)
|
||||
@@ -4418,7 +4441,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus)
|
||||
|
||||
fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev,
|
||||
brcmf_sdio_fwnames,
|
||||
|
|
@ -869,7 +566,7 @@ index f7961b2..3c5989b 100644
|
|||
fwnames, ARRAY_SIZE(fwnames));
|
||||
if (!fwreq)
|
||||
return NULL;
|
||||
@@ -4437,6 +4460,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
@@ -4438,6 +4461,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
struct brcmf_sdio *bus;
|
||||
struct workqueue_struct *wq;
|
||||
struct brcmf_fw_request *fwreq;
|
||||
|
|
@ -879,7 +576,7 @@ index f7961b2..3c5989b 100644
|
|||
|
||||
brcmf_dbg(TRACE, "Enter\n");
|
||||
|
||||
@@ -4519,6 +4545,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
@@ -4520,6 +4546,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||
|
||||
brcmf_dbg(INFO, "completed!!\n");
|
||||
|
||||
|
|
@ -1,37 +1,14 @@
|
|||
From e3b2a5bb9212437f59b215bc4d5f9052667dd40e Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Wed, 14 Sep 2022 15:09:20 +0200
|
||||
Subject: [PATCH] netmodule patches
|
||||
commit a2eea5b3a4bf890eac5791b36092e1d301b48709
|
||||
Author: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Tue Jul 11 18:30:32 2023 +0200
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath10k/htt_rx.c | 6 ++--
|
||||
drivers/net/wireless/ath/ath10k/mac.c | 28 +++++++++++++---
|
||||
drivers/net/wireless/ath/ath10k/pci.c | 2 +-
|
||||
drivers/net/wireless/ath/regd.c | 2 +-
|
||||
drivers/net/wireless/ath/regd.h | 3 +-
|
||||
drivers/net/wireless/ath/regd_common.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/cmd.c | 7 ----
|
||||
drivers/net/wireless/ti/wlcore/cmd.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/conf.h | 3 ++
|
||||
drivers/net/wireless/ti/wlcore/init.c | 22 ++++++++++---
|
||||
drivers/net/wireless/ti/wlcore/main.c | 28 ++++++++++++----
|
||||
include/net/cfg80211.h | 12 +++++--
|
||||
include/net/mac80211.h | 8 +++--
|
||||
include/uapi/linux/nl80211.h | 3 ++
|
||||
net/mac80211/cfg.c | 13 ++++++++
|
||||
net/mac80211/iface.c | 4 +++
|
||||
net/mac80211/main.c | 10 +++---
|
||||
net/wireless/core.c | 41 ++++++++++++++++++++----
|
||||
net/wireless/nl80211.c | 14 ++++++++
|
||||
net/wireless/reg.c | 27 +++++++++++++---
|
||||
net/wireless/wext-compat.c | 3 +-
|
||||
21 files changed, 188 insertions(+), 50 deletions(-)
|
||||
netmodule patches
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
index adbaeb6..6bdddb0 100644
|
||||
index e76aab9..5e90c7d 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
|
||||
@@ -3862,8 +3862,10 @@ static void ath10k_fetch_10_2_tx_stats(struct ath10k *ar, u8 *data)
|
||||
@@ -3997,8 +3997,10 @@ static void ath10k_fetch_10_2_tx_stats(struct ath10k *ar, u8 *data)
|
||||
spin_lock_bh(&ar->data_lock);
|
||||
peer = ath10k_peer_find_by_id(ar, peer_id);
|
||||
if (!peer || !peer->sta) {
|
||||
|
|
@ -45,10 +22,10 @@ index adbaeb6..6bdddb0 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
index 7a5311b..a96ec1c 100644
|
||||
index dd7b91f..0ea944e 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
@@ -2990,10 +2990,11 @@ static int ath10k_mac_txpower_setup(struct ath10k *ar, int txpower)
|
||||
@@ -3000,10 +3000,11 @@ static int ath10k_mac_txpower_setup(struct ath10k *ar, int txpower)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +38,7 @@ index 7a5311b..a96ec1c 100644
|
|||
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
@@ -3002,10 +3003,28 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
@@ -3012,10 +3013,28 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
if (arvif->txpower == INT_MIN)
|
||||
continue;
|
||||
|
||||
|
|
@ -92,7 +69,7 @@ index 7a5311b..a96ec1c 100644
|
|||
}
|
||||
|
||||
if (txpower == -1)
|
||||
@@ -3020,6 +3039,7 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
@@ -3030,6 +3049,7 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -100,7 +77,7 @@ index 7a5311b..a96ec1c 100644
|
|||
|
||||
static int ath10k_mac_set_sar_power(struct ath10k *ar)
|
||||
{
|
||||
@@ -9623,7 +9643,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||
@@ -9638,7 +9658,7 @@ static const struct ieee80211_iface_limit ath10k_10x_if_limits[] = {
|
||||
#endif
|
||||
},
|
||||
{
|
||||
|
|
@ -110,7 +87,7 @@ index 7a5311b..a96ec1c 100644
|
|||
},
|
||||
};
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
index e9e08b0..7bfa164 100644
|
||||
index 63fcf7f..c3166c1 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/pci.c
|
||||
@@ -28,7 +28,7 @@ enum ath10k_pci_reset_mode {
|
||||
|
|
@ -136,10 +113,10 @@ index 3ba9fc3..9c8ff76 100644
|
|||
|
||||
if (reg->country_code == CTRY_DEFAULT) {
|
||||
diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
|
||||
index 8d5a16b..bb59c9d 100644
|
||||
index 774419c..c5c27af 100644
|
||||
--- a/drivers/net/wireless/ath/regd.h
|
||||
+++ b/drivers/net/wireless/ath/regd.h
|
||||
@@ -254,7 +254,8 @@ enum CountryCode {
|
||||
@@ -255,7 +255,8 @@ enum CountryCode {
|
||||
CTRY_JAPAN59 = 4059,
|
||||
CTRY_AUSTRALIA2 = 5000,
|
||||
CTRY_CANADA2 = 5001,
|
||||
|
|
@ -150,10 +127,10 @@ index 8d5a16b..bb59c9d 100644
|
|||
|
||||
bool ath_is_world_regd(struct ath_regulatory *reg);
|
||||
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
|
||||
index 364011e..4db829c 100644
|
||||
index 2574f80..f1a867a 100644
|
||||
--- a/drivers/net/wireless/ath/regd_common.h
|
||||
+++ b/drivers/net/wireless/ath/regd_common.h
|
||||
@@ -498,6 +498,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
@@ -501,6 +501,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
||||
{CTRY_VIET_NAM, NULL1_WORLD, "VN"},
|
||||
{CTRY_YEMEN, NULL1_WORLD, "YE"},
|
||||
{CTRY_ZIMBABWE, ETSI1_WORLD, "ZW"},
|
||||
|
|
@ -162,10 +139,10 @@ index 364011e..4db829c 100644
|
|||
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
index 8b798b5..bf1b921 100644
|
||||
index a939fd8..92fc2d4 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
|
||||
@@ -1568,13 +1568,6 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
@@ -1566,13 +1566,6 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates,
|
||||
wlvif->band));
|
||||
|
||||
|
|
@ -251,10 +228,10 @@ index 03b49ba..5275d6b 100644
|
|||
rc.long_retry_limit = 10;
|
||||
rc.aflags = 0;
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
|
||||
index 8448549..2c8977c 100644
|
||||
index b0fb78e..8d8162f 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/main.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/main.c
|
||||
@@ -2271,13 +2271,15 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||
@@ -2252,13 +2252,15 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||
for (i = 0; i < CONF_TX_MAX_AC_COUNT; i++)
|
||||
wl12xx_allocate_rate_policy(wl,
|
||||
&wlvif->ap.ucast_rate_idx[i]);
|
||||
|
|
@ -277,7 +254,7 @@ index 8448549..2c8977c 100644
|
|||
/* TODO: this seems to be used only for STA, check it */
|
||||
wlvif->rate_set = CONF_TX_ENABLED_RATES;
|
||||
}
|
||||
@@ -3542,6 +3544,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
@@ -3515,6 +3517,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
key_type = KEY_AES;
|
||||
key_conf->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE;
|
||||
break;
|
||||
|
|
@ -287,7 +264,7 @@ index 8448549..2c8977c 100644
|
|||
case WL1271_CIPHER_SUITE_GEM:
|
||||
key_type = KEY_GEM;
|
||||
break;
|
||||
@@ -5798,9 +5803,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
@@ -5731,9 +5736,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct wl1271 *wl = hw->priv;
|
||||
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
|
||||
|
|
@ -304,7 +281,7 @@ index 8448549..2c8977c 100644
|
|||
wl1271_debug(DEBUG_MAC80211, "mac80211 get_rssi");
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -6214,6 +6226,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6146,6 +6158,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WLAN_CIPHER_SUITE_TKIP,
|
||||
WLAN_CIPHER_SUITE_CCMP,
|
||||
WL1271_CIPHER_SUITE_GEM,
|
||||
|
|
@ -312,7 +289,7 @@ index 8448549..2c8977c 100644
|
|||
};
|
||||
|
||||
/* The tx descriptor buffer */
|
||||
@@ -6277,6 +6290,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6209,6 +6222,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WIPHY_FLAG_IBSS_RSN;
|
||||
|
||||
wl->hw->wiphy->features |= NL80211_FEATURE_AP_SCAN;
|
||||
|
|
@ -321,19 +298,18 @@ index 8448549..2c8977c 100644
|
|||
/* make sure all our channels fit in the scanned_ch bitmask */
|
||||
BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
|
||||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
|
||||
index ab83553..2bf72f3 100644
|
||||
index 9e4361e..2dbe3ca 100644
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -136,6 +136,8 @@ enum ieee80211_channel_flags {
|
||||
IEEE80211_CHAN_4MHZ = 1<<16,
|
||||
IEEE80211_CHAN_8MHZ = 1<<17,
|
||||
@@ -143,6 +143,7 @@ enum ieee80211_channel_flags {
|
||||
IEEE80211_CHAN_16MHZ = 1<<18,
|
||||
+ IEEE80211_CHAN_SRD = 1<<19,
|
||||
+
|
||||
IEEE80211_CHAN_NO_320MHZ = 1<<19,
|
||||
IEEE80211_CHAN_NO_EHT = 1<<20,
|
||||
+ IEEE80211_CHAN_SRD = 1<<21,
|
||||
};
|
||||
|
||||
#define IEEE80211_CHAN_NO_HT40 \
|
||||
@@ -3871,6 +3873,8 @@ struct mgmt_frame_regs {
|
||||
@@ -4086,6 +4087,8 @@ struct mgmt_frame_regs {
|
||||
* return 0 if successful
|
||||
* @set_antenna_gain: set antenna gain to reduce maximum tx power if necessary
|
||||
*
|
||||
|
|
@ -342,7 +318,7 @@ index ab83553..2bf72f3 100644
|
|||
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
|
||||
* functions to adjust rfkill hw state
|
||||
*
|
||||
@@ -4204,6 +4208,7 @@ struct cfg80211_ops {
|
||||
@@ -4436,6 +4439,7 @@ struct cfg80211_ops {
|
||||
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
int *dbm);
|
||||
int (*set_antenna_gain)(struct wiphy *wiphy, int dbi);
|
||||
|
|
@ -350,7 +326,7 @@ index ab83553..2bf72f3 100644
|
|||
|
||||
void (*rfkill_poll)(struct wiphy *wiphy);
|
||||
|
||||
@@ -5268,6 +5273,9 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
@@ -5533,6 +5537,9 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
* @requested_name: Request a particular name.
|
||||
* NULL is valid value, and means use the default phy%d naming.
|
||||
*
|
||||
|
|
@ -360,7 +336,7 @@ index ab83553..2bf72f3 100644
|
|||
* Create a new wiphy and associate the given operations with it.
|
||||
* @sizeof_priv bytes are allocated for private use.
|
||||
*
|
||||
@@ -5275,7 +5283,7 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
@@ -5540,7 +5547,7 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
|
||||
* assigned to each netdev's ieee80211_ptr for proper operation.
|
||||
*/
|
||||
struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
|
|
@ -369,7 +345,7 @@ index ab83553..2bf72f3 100644
|
|||
|
||||
/**
|
||||
* wiphy_new - create a new wiphy for use with cfg80211
|
||||
@@ -5292,7 +5300,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
@@ -5557,7 +5564,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
|
||||
int sizeof_priv)
|
||||
{
|
||||
|
|
@ -379,10 +355,10 @@ index ab83553..2bf72f3 100644
|
|||
|
||||
/**
|
||||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
|
||||
index c85050f..07c8277 100644
|
||||
index 9b466dd..04c0bf1 100644
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -4309,11 +4309,15 @@ struct ieee80211_ops {
|
||||
@@ -4586,11 +4586,15 @@ struct ieee80211_ops {
|
||||
* @requested_name: Requested name for this device.
|
||||
* NULL is valid value, and means use the default naming (phy%d)
|
||||
*
|
||||
|
|
@ -399,7 +375,7 @@ index c85050f..07c8277 100644
|
|||
|
||||
/**
|
||||
* ieee80211_alloc_hw - Allocate a new hardware device
|
||||
@@ -4333,7 +4337,7 @@ static inline
|
||||
@@ -4610,7 +4614,7 @@ static inline
|
||||
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
|
||||
const struct ieee80211_ops *ops)
|
||||
{
|
||||
|
|
@ -409,33 +385,31 @@ index c85050f..07c8277 100644
|
|||
|
||||
/**
|
||||
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
|
||||
index 019f065..190af2f 100644
|
||||
index ba4aa09..b5326af 100644
|
||||
--- a/include/uapi/linux/nl80211.h
|
||||
+++ b/include/uapi/linux/nl80211.h
|
||||
@@ -3883,6 +3883,8 @@ enum nl80211_wmm_rule {
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
|
||||
* on this channel in current regulatory domain.
|
||||
@@ -4121,6 +4121,8 @@ enum nl80211_wmm_rule {
|
||||
* as the primary or any of the secondary channels isn't possible
|
||||
* @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
|
||||
* in current regulatory domain.
|
||||
+ * @NL80211_FREQUENCY_ATTR_SRD_CHANNEL: short range devices mode
|
||||
+ * on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||
* currently defined
|
||||
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||
@@ -3919,6 +3921,9 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_4MHZ,
|
||||
NL80211_FREQUENCY_ATTR_8MHZ,
|
||||
@@ -4159,6 +4161,7 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_16MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
+ NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
+ NL80211_FREQUENCY_ATTR_SRD_CHANNEL,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
|
||||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
|
||||
index abe7318..fc59297 100644
|
||||
index fcbd717..487c3a1 100644
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -2825,6 +2825,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||
@@ -3059,6 +3059,18 @@ static int ieee80211_set_antenna_gain(struct wiphy *wiphy, int dbi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +428,7 @@ index abe7318..fc59297 100644
|
|||
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
|
||||
{
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
@@ -4530,6 +4542,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
@@ -4970,6 +4982,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
.set_tx_power = ieee80211_set_tx_power,
|
||||
.get_tx_power = ieee80211_get_tx_power,
|
||||
.set_antenna_gain = ieee80211_set_antenna_gain,
|
||||
|
|
@ -463,12 +437,12 @@ index abe7318..fc59297 100644
|
|||
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
|
||||
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
|
||||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
|
||||
index b777921..ba9c038 100644
|
||||
index a18f80d..aebeca6 100644
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -66,6 +66,10 @@ bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata)
|
||||
if (sdata->ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
||||
power = min(power, sdata->ap_power_level);
|
||||
if (sdata->deflink.ap_power_level != IEEE80211_UNSET_POWER_LEVEL)
|
||||
power = min(power, sdata->deflink.ap_power_level);
|
||||
|
||||
+ if (sdata->local->user_antenna_gain > 0) {
|
||||
+ power -= sdata->local->user_antenna_gain;
|
||||
|
|
@ -478,7 +452,7 @@ index b777921..ba9c038 100644
|
|||
sdata->vif.bss_conf.txpower = power;
|
||||
ieee80211_hw_config(sdata->local, 0);
|
||||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
|
||||
index 09e5bf1..72238e9 100644
|
||||
index 83a1482..d5e14ed 100644
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -96,7 +96,7 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local)
|
||||
|
|
@ -502,7 +476,7 @@ index 09e5bf1..72238e9 100644
|
|||
}
|
||||
|
||||
if (local->hw.conf.power_level != power) {
|
||||
@@ -548,7 +546,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = {
|
||||
@@ -627,7 +625,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = {
|
||||
|
||||
struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
const struct ieee80211_ops *ops,
|
||||
|
|
@ -511,7 +485,7 @@ index 09e5bf1..72238e9 100644
|
|||
{
|
||||
struct ieee80211_local *local;
|
||||
int priv_size, i;
|
||||
@@ -588,7 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
@@ -671,7 +669,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
|
||||
*/
|
||||
priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
|
||||
|
||||
|
|
@ -521,7 +495,7 @@ index 09e5bf1..72238e9 100644
|
|||
if (!wiphy)
|
||||
return NULL;
|
||||
diff --git a/net/wireless/core.c b/net/wireless/core.c
|
||||
index 2ddaaae..fbb56ee 100644
|
||||
index 387e8eb..f540ab2 100644
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -123,6 +123,19 @@ static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev,
|
||||
|
|
@ -553,7 +527,7 @@ index 2ddaaae..fbb56ee 100644
|
|||
{
|
||||
static atomic_t wiphy_counter = ATOMIC_INIT(0);
|
||||
|
||||
@@ -454,17 +467,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
@@ -443,17 +456,31 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
|
||||
|
||||
rdev->ops = ops;
|
||||
|
||||
|
|
@ -592,10 +566,10 @@ index 2ddaaae..fbb56ee 100644
|
|||
/* give it a proper name */
|
||||
if (requested_name && requested_name[0]) {
|
||||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||
index bc6b5ac..6cd3b76 100644
|
||||
index 507c868..ec2eadd 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -1129,6 +1129,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||
@@ -1127,6 +1127,10 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -606,7 +580,7 @@ index bc6b5ac..6cd3b76 100644
|
|||
if (large) {
|
||||
if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
|
||||
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_HT40_MINUS))
|
||||
@@ -3710,6 +3714,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||
@@ -3828,6 +3832,16 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
|
|
@ -624,7 +598,7 @@ index bc6b5ac..6cd3b76 100644
|
|||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||
index 48ab1bb..185460d 100644
|
||||
index a39adb2..bcb635f 100644
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -69,6 +69,7 @@
|
||||
|
|
@ -635,7 +609,7 @@ index 48ab1bb..185460d 100644
|
|||
|
||||
/**
|
||||
* enum reg_request_treatment - regulatory request treatment
|
||||
@@ -1812,11 +1813,21 @@ static void handle_channel_single_rule(struct wiphy *wiphy,
|
||||
@@ -1845,11 +1846,21 @@ static void handle_channel_single_rule(struct wiphy *wiphy,
|
||||
MBI_TO_DBI(power_rule->max_antenna_gain));
|
||||
chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
|
||||
|
||||
|
|
@ -661,7 +635,7 @@ index 48ab1bb..185460d 100644
|
|||
}
|
||||
|
||||
if (chan->orig_mpwr) {
|
||||
@@ -1929,6 +1940,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
|
||||
@@ -1962,6 +1973,10 @@ static void handle_channel_adjacent_rules(struct wiphy *wiphy,
|
||||
chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
||||
}
|
||||
|
||||
|
|
@ -672,7 +646,7 @@ index 48ab1bb..185460d 100644
|
|||
if (chan->orig_mpwr) {
|
||||
/* Devices that use REGULATORY_COUNTRY_IE_FOLLOW_POWER
|
||||
* will always follow the passed country IE power settings.
|
||||
@@ -2551,6 +2566,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||
@@ -2612,6 +2627,10 @@ static void handle_channel_custom(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
chan->max_power = chan->max_reg_power;
|
||||
|
|
@ -684,10 +658,10 @@ index 48ab1bb..185460d 100644
|
|||
|
||||
static void handle_band_custom(struct wiphy *wiphy,
|
||||
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
|
||||
index a32065d..3a545c4 100644
|
||||
index ddf340b..5ea36cc 100644
|
||||
--- a/net/wireless/wext-compat.c
|
||||
+++ b/net/wireless/wext-compat.c
|
||||
@@ -964,7 +964,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||
@@ -990,7 +990,8 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
|
||||
/* well... oh well */
|
||||
data->txpower.fixed = 1;
|
||||
data->txpower.disabled = rfkill_blocked(rdev->wiphy.rfkill);
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
|
||||
index e1b49c5..3e2f96c 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3408,8 +3408,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
|
||||
|
||||
device_get_mac_address(ar->dev, ar->mac_addr);
|
||||
|
||||
- of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
||||
-
|
||||
ret = ath10k_core_init_firmware_features(ar);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "fatal problem with firmware features: %d\n",
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
|
||||
index 165d920..445006d 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -669,6 +669,7 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
enum ath_bus_type bus_type = common->bus_ops->ath_bus_type;
|
||||
+ const char *mac;
|
||||
char eeprom_name[100];
|
||||
int ret;
|
||||
|
||||
@@ -691,7 +692,9 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
}
|
||||
|
||||
- of_get_mac_address(np, common->macaddr);
|
||||
+ mac = of_get_mac_address(np);
|
||||
+ if (!IS_ERR(mac))
|
||||
+ ether_addr_copy(common->macaddr, mac);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
|
||||
index aebeca6..2b058c2 100644
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -948,7 +948,9 @@ static const struct net_device_ops ieee80211_dataif_8023_ops = {
|
||||
.ndo_set_rx_mode = ieee80211_set_multicast_list,
|
||||
.ndo_set_mac_address = ieee80211_change_mac,
|
||||
.ndo_get_stats64 = ieee80211_get_stats64,
|
||||
+#if LINUX_VERSION_IS_GEQ(5,13,0)
|
||||
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
|
||||
+#endif
|
||||
.ndo_setup_tc = ieee80211_netdev_setup_tc,
|
||||
};
|
||||
|
||||
|
|
@ -13,22 +13,24 @@ include nrsw-modules.${NM_TARGET}.inc
|
|||
|
||||
SHRT_VER = "${@d.getVar('PV', True).split('-')[0]}"
|
||||
|
||||
SRC_URI = "http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v${SHRT_VER}/backports-${PV}.tar.gz \
|
||||
file://config.${NM_TARGET} \
|
||||
SRC_URI = "http://mirror2.openwrt.org/sources/backports-${PV}.tar.xz \
|
||||
file://0001-backport-of-build-patches-from-openwrt.patch \
|
||||
file://0002-backport-of-subsys-patches-from-openwrt.patch \
|
||||
file://0003-backport-of-ath-patches-from-openwrt.patch \
|
||||
file://0003-backport-of-ath-patches-from-openwrt.patch \
|
||||
file://0004-backport-of-ath5k-patches-from-openwrt.patch \
|
||||
file://0005-backport-of-ath9k-patches-from-openwrt.patch \
|
||||
file://0006-backport-of-ath10k-patches-from-openwrt.patch \
|
||||
file://0007-backport-of-brcm-patches-from-openwrt.patch \
|
||||
file://0008-backport-of-mwl-patches-from-openwrt.patch \
|
||||
file://0009-backport-of-rt2x00-patches-from-openwrt.patch \
|
||||
file://0010-netmodule-patches.patch \
|
||||
file://0007-backport-of-ath11k-patches-from-openwrt.patch \
|
||||
file://0008-backport-of-rt2x00-patches-from-openwrt.patch \
|
||||
file://0009-backport-of-mt7601u-patches-from-openwrt.patch \
|
||||
file://0010-backport-of-mwl-patches-from-openwrt.patch \
|
||||
file://0011-backport-of-brcm-patches-from-openwrt.patch \
|
||||
file://0020-netmodule-patches.patch \
|
||||
file://0021-netmodule-kernel_5.10-compatible.patch \
|
||||
file://config.${NM_TARGET} \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "4c6b2af699e5e557dfc44bc7e30a10f1d6299a451ea50443084bdf7c850cbb24"
|
||||
|
||||
SRC_URI[sha256sum] = "5d39aca7e34c33cb9b3e366117b2e86841b7bdd37933679d6b1e61be6b150648"
|
||||
|
||||
S = "${WORKDIR}/backports-${PV}"
|
||||
|
||||
Loading…
Reference in New Issue