mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +00:00
hostapd: fix ucode reload issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
John Crispin
parent
970b22856f
commit
9a6e41adb8
@@ -0,0 +1,43 @@
|
||||
From: Harshitha Prem <quic_hprem@quicinc.com>
|
||||
Date: Wed, 22 Feb 2023 09:29:01 +0530
|
||||
Subject: [PATCH] nl80211: Add frequency info in start AP command
|
||||
|
||||
When ACS is configured in multiple BSS case, sometimes a virtual AP
|
||||
interface does not come up as the channel context information between
|
||||
different BSSs of the same band does not match.
|
||||
|
||||
Same behavior is observed in case of multiple band/hardware under a
|
||||
single wiphy, when we bring up multiple virtual interface in various
|
||||
bands simultaneously and the kernel maps a random channel as it has more
|
||||
than one channel context, e.g., say a 2.4 GHz channel to a 5 GHz virtual
|
||||
AP interface when the start AP command is sent. This is because the
|
||||
frequency information is not present in the command.
|
||||
|
||||
Add the frequency information into the start AP netlink command so that
|
||||
the kernel maps the appropriate channel context by parsing it instead of
|
||||
using a previous set channel information.
|
||||
|
||||
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
|
||||
---
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -167,6 +167,8 @@ static int nl80211_send_frame_cmd(struct
|
||||
const u16 *csa_offs, size_t csa_offs_len);
|
||||
static int wpa_driver_nl80211_probe_req_report(struct i802_bss *bss,
|
||||
int report);
|
||||
+static int nl80211_put_freq_params(struct nl_msg *msg,
|
||||
+ const struct hostapd_freq_params *freq);
|
||||
|
||||
#define IFIDX_ANY -1
|
||||
|
||||
@@ -4717,6 +4719,9 @@ static int wpa_driver_nl80211_set_ap(voi
|
||||
nla_nest_end(msg, spr);
|
||||
}
|
||||
|
||||
+ if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
|
||||
+ goto fail;
|
||||
+
|
||||
if (params->freq && params->freq->he_enabled) {
|
||||
struct nlattr *bss_color;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 14 Sep 2023 10:53:50 +0200
|
||||
Subject: [PATCH] driver_nl80211: fix setting QoS map on secondary BSSs
|
||||
|
||||
The setting is per-BSS, not per PHY
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10045,7 +10045,7 @@ static int nl80211_set_qos_map(void *pri
|
||||
wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
|
||||
qos_map_set, qos_map_set_len);
|
||||
|
||||
- if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_SET_QOS_MAP)) ||
|
||||
+ if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_QOS_MAP)) ||
|
||||
nla_put(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set)) {
|
||||
nlmsg_free(msg);
|
||||
return -ENOBUFS;
|
||||
@@ -0,0 +1,18 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 14 Sep 2023 11:28:03 +0200
|
||||
Subject: [PATCH] driver_nl80211: update drv->ifindex on removing the first
|
||||
BSS
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -8003,6 +8003,7 @@ static int wpa_driver_nl80211_if_remove(
|
||||
if (drv->first_bss->next) {
|
||||
drv->first_bss = drv->first_bss->next;
|
||||
drv->ctx = drv->first_bss->ctx;
|
||||
+ drv->ifindex = drv->first_bss->ifindex;
|
||||
os_free(bss);
|
||||
} else {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to");
|
||||
Reference in New Issue
Block a user