Message ID | 20240115-wilc_1000_fixes-v1-5-54d29463a738@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-26159-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1760939dyc; Mon, 15 Jan 2024 07:08:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRk/gCDQ7jfKEO3naDG092LkW8Btimk2hPTxSrPFi47yZrfHqrvga5lT906ES3I5psxEhX X-Received: by 2002:a05:6a00:1307:b0:6d9:a32b:a26b with SMTP id j7-20020a056a00130700b006d9a32ba26bmr3116221pfu.45.1705331305109; Mon, 15 Jan 2024 07:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705331305; cv=none; d=google.com; s=arc-20160816; b=dAkhEdLcTglQbac/h4dzrJ1jH6CtCcFQZQ3F1poaHWIw6ml0P1L9h7Vg9I6J3N9pO9 BwUXaitcxPEPttcZmwzxBD06PeovvPnqZtVUW37YOYctJXjk62dDpnU/s0X/m+rrrAVD XcKKEee4eWQ1C1N375l8Lwrgl4iCDEQpjwoSCVZATCVsQFtb+muKpT0pKHwBEaSGIxAX ddqhKk5OiB3516kAvoiEu/RIfz47Cwfy4S/EyIacuW9a1VJf4Fx5wqGuB+f8ncRcvXkT MzB/xzCSQ6VDBalJAppmxukjrRqkGsn4h/v8sEBJdr1DVKLFHk8X+d2MFksLkrwO/cX7 /mKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=KljMchxpu6sUXwdpmR1vxK0+FWcbaI+DBRqAnIQUPW8=; fh=fVWNSIr8Vd5WRJo6LslfqG3nFGLhcHDnKbQ0ZKCs5kk=; b=N8ItIlhdmU1dv+rButBLVp4qMr/qnk46iME6FmT4B7LtwyTo5tSicjxO6oRo/LoSdB urQkmWLpEtfH2Z266UsWFGPPnUnQiwUe6mwieriDUnt/h2g/029dDO9kPxSqKZCphCa2 EPduin+AIO8aA20TrAizSFEwjSLE8b37nnrEge5kt+955GP6+PIvu8v0XLCSAaA1Z4ID VhbMZaQlEGSLNC+FkmWPz7nzqfMmFebMUlAanO/JcBDk/K2gk9984TgvfQftdYZXtc8Q DsLXIvbRcXg/ZSbJ1WQS+TqRYbEu0KDDasWDAPSL6hdV3RUr2YaLLhyVqn5SGQAjnlIT +EYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=eQp3fu30; spf=pass (google.com: domain of linux-kernel+bounces-26159-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26159-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i3-20020a63cd03000000b005cf588da70fsi5365443pgg.643.2024.01.15.07.08.24 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 07:08:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26159-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=eQp3fu30; spf=pass (google.com: domain of linux-kernel+bounces-26159-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26159-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 061C2282B83 for <ouuuleilei@gmail.com>; Mon, 15 Jan 2024 15:08:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB77617756; Mon, 15 Jan 2024 15:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="eQp3fu30" Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7626018629; Mon, 15 Jan 2024 15:06:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 95A43C6473; Mon, 15 Jan 2024 14:59:22 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 954FAFF812; Mon, 15 Jan 2024 14:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1705330755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KljMchxpu6sUXwdpmR1vxK0+FWcbaI+DBRqAnIQUPW8=; b=eQp3fu301Pdbrj+5NEEwhB3xtfqdd9CrRZuNr4j+TnGsXarH/kVpLtdeYvHaixB6ExxMTG mN5jxpP6VHWMrGHwGj7dWEo8XkBAL36stLNgR+OTGWliEQh5zWQCnAUwF7ocfgo9DmCO+Y FVlIeszJvowU32RiBfsGCs+7M/eZvHgg+ZyyG9NxLS+iK76xCrhsaga0CSWs4g6FO5MEn0 cTtk9zBZkHmZFpLXEX+BI60Z8jUzQe+5DdIKsHkjXBqpoPjPDDE/1P6liFl1dU1ogyfolq wlBhNylR8C6qQrHEh1Es/3qrMzz73MpaZaQAW5moO2Knxum4b7Gv0yG/f5G04Q== From: =?utf-8?q?Alexis_Lothor=C3=A9?= <alexis.lothore@bootlin.com> Date: Mon, 15 Jan 2024 15:56:34 +0100 Subject: [PATCH 5/5] wifi: wilc1000: fix multi-vif management when deleting a vif Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240115-wilc_1000_fixes-v1-5-54d29463a738@bootlin.com> References: <20240115-wilc_1000_fixes-v1-0-54d29463a738@bootlin.com> In-Reply-To: <20240115-wilc_1000_fixes-v1-0-54d29463a738@bootlin.com> To: linux-wireless@vger.kernel.org Cc: Ajay Singh <ajay.kathat@microchip.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Kalle Valo <kvalo@kernel.org>, David Mosberger-Tang <davidm@egauge.net>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, linux-kernel@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9?= <alexis.lothore@bootlin.com> X-Mailer: b4 0.12.4 X-GND-Sasl: alexis.lothore@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788169478476800264 X-GMAIL-MSGID: 1788169478476800264 |
Series |
wifi: wilc1000: minor fixes
|
|
Commit Message
Alexis Lothoré
Jan. 15, 2024, 2:56 p.m. UTC
From: Ajay Singh <ajay.kathat@microchip.com> 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> --- This patch has been initiated by Ajay, and I reworked it a bit/split it. I could have just fixed the parameters passed to wilc_set_operation_mode, but I observed that even calling wilc_set_operation_mode seems faulty in del_virtual_intf: for example the thread in charge of sending commands to the chip is possibly not running (because interface is not up). Also, the vif mode is only configured in change_virtual_intf and not in add_virtual_intf, which tends to validate the removal from del_virtual_intf. --- drivers/net/wireless/microchip/wilc1000/cfg80211.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c index 2d0474e6404e..f03fd15c0c97 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -1609,7 +1609,6 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) cfg80211_unregister_netdevice(vif->ndev); vif->monitor_flag = 0; - wilc_set_operation_mode(vif, 0, 0, 0); mutex_lock(&wl->vif_mutex); list_del_rcu(&vif->list); wl->vif_num--;