adfb21fb471a4998ea4ca4d686e00f02bc404991
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Thu, 14 Sep 2023 11:28:03 +0200
3 Subject: [PATCH] driver_nl80211: update drv->ifindex on removing the first
4 BSS
5
6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 ---
8
9 --- a/src/drivers/driver_nl80211.c
10 +++ b/src/drivers/driver_nl80211.c
11 @@ -8867,6 +8867,7 @@ static int wpa_driver_nl80211_if_remove(
12 if (drv->first_bss->next) {
13 drv->first_bss = drv->first_bss->next;
14 drv->ctx = drv->first_bss->ctx;
15 + drv->ifindex = drv->first_bss->ifindex;
16 os_free(bss);
17 } else {
18 wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to");