]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: wilc1000: fix multi-vif management when deleting a vif
authorAjay Singh <ajay.kathat@microchip.com>
Mon, 15 Jan 2024 14:56:34 +0000 (15:56 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:20 +0000 (18:19 -0400)
commitb66b008f1d3715a9b424b2b360ede91d2295ef12
treeaae812f242212bff6811863ebd07babb1933496a
parent4041c60a9d543b3ad50225385b072ba68e96166e
wifi: wilc1000: fix multi-vif management when deleting a vif

[ Upstream commit 12cfc9c8d3faf887a202c89bc312202445fca7e8 ]

Adding then removing a second vif currently makes the first vif not working
anymore. This is visible for example when we have a first interface
connected to some access point:
- create a wpa_supplicant.conf with some AP credentials
- wpa_supplicant -Dnl80211 -c /etc/wpa_supplicant.conf -i wlan0
- dhclient wlan0
- iw phy phy0 interface add wlan1 type managed
- iw dev wlan1 del
wlan0 does not manage properly traffic anymore (eg: ping not working)

This is due to vif mode being incorrectly reconfigured with some default
values in del_virtual_intf, affecting by default first vif.

Prevent first vif from being affected on second vif removal by removing vif
mode change command in del_virtual_intf

Fixes: 9bc061e88054 ("staging: wilc1000: added support to dynamically add/remove interfaces")
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Co-developed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240115-wilc_1000_fixes-v1-5-54d29463a738@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/microchip/wilc1000/cfg80211.c