Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2526200lqp; Mon, 25 Mar 2024 01:09:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUnQPCOr4h6aRkclE+f2Zfl0autzbrOFF6gnD5qCg5ItnwCK2d7btGWs/Do6RPLNGwGhgJMKCz50s1eQQWFjR9SdQ7+XAIwkc90vVjVw== X-Google-Smtp-Source: AGHT+IGeMhDE5TzP9tnFxkuUEX4072wMbkNYBhJ2zmLxTEOB+oNtNoNTXeQpKeenRKPtb42yy1h6 X-Received: by 2002:a17:906:e247:b0:a46:c4c6:38 with SMTP id gq7-20020a170906e24700b00a46c4c60038mr4173112ejb.10.1711354186173; Mon, 25 Mar 2024 01:09:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711354186; cv=pass; d=google.com; s=arc-20160816; b=v7R1vL4odf3aWlSb5dTLbBslvCR9x+WnjBZWZfYvg30gWZFvs/rufnFbv0TlsrechG 6l831P4mQNWYQd69q2peyPRZ97ZLw3ap2D9YGfbIQqD7IEqX5HowZDI4Vzw+Njl3vfl/ 4UqbGuEOEcYITBnwfRfE6puDpvbki61XR/B4oNj3yExCTosnyhdptG2Ae+rkwyyMhCu5 Q1XV1dgcylDuvfGxLs6aX2F1V+pj3A9AZWr1L1H/stV54d6i2CtOeJYGK/y4io+NqBNO fOw2TzSyHE923nu6TSzIYeb8ssPpOk2auspvfrj3MxNkwXDVh9foLty2tNSmrlU84tpt 4D7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=B8oy6Ahy82qZS9m40Wkj3DR3jrA9ovpBCN76SxGsHRM=; fh=JfWUvpOeeP7Md9Dp9qqmGzgAiHNGATTlTeHQJbWXJoA=; b=ss2NYXBFExA5AaFrz7ETOzesUPSKnlz16/xLYnMJoRdlVJyjuEgSDw1jFf2FviMOMj DP/m2+yeUPPNho7KeACAVaZP69bKGhEuU53FHB8T1LZCHS6Reu3ysLHyIdqA0VpLX9LI SSbw6GopI+cKaLHLpacb22CB8e2Yds7CnCYhzHwxWgws9VBTdNqu+d0GUELK1UG6RP96 xXCTnA0kYrNVWT0eE2aAOlWqTmHZovP1AZu1CJIqfl1N+U/P60Qqvd/n11IVJSHsQUk4 I3PVLfbEkA24BMC65W5kwGw7Dqg4+NfrwFAyi8ZuRk/0MirxNhVR7pT28zMWibbM9vES uFNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rQs6+edn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hk11-20020a170906c9cb00b00a474be83c0dsi1485454ejb.551.2024.03.25.01.09.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:09:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rQs6+edn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 567031F2FCFD for ; Mon, 25 Mar 2024 08:08:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF24E22694D; Mon, 25 Mar 2024 03:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rQs6+edn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 42880145B1D; Sun, 24 Mar 2024 23:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322020; cv=none; b=e2krg7GEpM5x2iSFtAayqL1FmYxl4k2eWk5XJBtJ/43SrLPBDCZlcRAGwcK+cecR6YAHNPC1xpf99C2XA+/FDkOZ3ExsvirSspLCzYA+R3r4BoRPzUw2GVnAPZmY3uyH/N/JsqQi3yZS4NHyUv9QuYL30iXESwsCuDRuZeK/ORw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322020; c=relaxed/simple; bh=LOdq1mNqCD1OLC2zN1bxNCWDll0+7fgycknYNHN/tG0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LXe+Mvlt906xbGc9pyaA+Hrm0imp7966Do8B3/J2mD9RXQkWQ+N1DlJneC1AjdVz2VPJhoOw545dC9LR6ioxzWAGAk9WmwA+RvRrwI1hf9ML5gvcCLzqjSBDUIo8O+YQgisZs7XM+1hb0T2Y26JX8fUBPnmChtzYA6qxv8EQwe4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rQs6+edn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DDD0C433C7; Sun, 24 Mar 2024 23:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322020; bh=LOdq1mNqCD1OLC2zN1bxNCWDll0+7fgycknYNHN/tG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rQs6+ednZ8g7vYVKrXlocmMWbS/dwgPipez23y34FkC4upMwFeUZ9dNyU1OcbgG95 PJtY7oppTonrZb2dxZZvLr6MgE0cxkOgPPSg6USxG/OwwScpI1Wr9cf1EIAdwqmbPn YQ9cTVdZ7IcAhX7hguMwOOGpX6TYb9CUZFaOMmQ1dg3VSGdFGqCIqIOshJQ2i4LoA+ iXzRMXrVWrJ6is4nHZE95uP6zmNzPZBfni32RVAf4EOJmcTwQRy3BpipLdXUcSxiwe w7vmLKirBTSVDHMj4GDhUky2sNwZo/I6O7Pe3dGlKlNFeYIRJG2B36zMMcxCwcnWLq dYG2FB+y7CVDg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ajay Singh , =?UTF-8?q?Alexis=20Lothor=C3=A9?= , Kalle Valo , Sasha Levin Subject: [PATCH 6.1 092/451] wifi: wilc1000: fix multi-vif management when deleting a vif Date: Sun, 24 Mar 2024 19:06:08 -0400 Message-ID: <20240324231207.1351418-93-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ajay Singh [ 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 Co-developed-by: Alexis Lothoré Signed-off-by: Alexis Lothoré Signed-off-by: Kalle Valo Link: https://msgid.link/20240115-wilc_1000_fixes-v1-5-54d29463a738@bootlin.com Signed-off-by: Sasha Levin --- 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 2f75dc4b47975..6f3245a43aef1 100644 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c @@ -1615,7 +1615,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--; -- 2.43.0