From patchwork Thu Oct 22 08:52:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1386091 X-Patchwork-Delegate: mail@david-bauer.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=narfation.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=tTG440rk; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=Ro3At8h3; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CH1PK0YDnz9sVW for ; Thu, 22 Oct 2020 19:53:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=TJkcOX4OGGez73S2ElNbdrbOI2tHLW1F6zysmlk2pxQ=; b=tTG440rkko9Gk1973S+yqxu3WE EcBgKKu5asHJtUJ/R8a01H/rSY5r7kREdDq5pMAzpyvBxZzbvyEBcHJeocnUHITff5db6qZ+x1Wz6 zdcCnIIjOow/h1xpaR6RSU45TKlBE/nrWZUCAcBxWXG8Q+m3pnR/Co7jswwHN06ROtaZogKsGGWI5 U6uBETqEXAiRUC6kmFeCiXOUIl0yvuBfHXgP02gdZ4heQON0WSlQrJjL6qaX+zIERLyX8nDp1jCFP wsvm1hToJiWSVvwlV0HvY1qgo3BxQvW2nF12Oc6M1j5pkCqoEu7tsjfeMvqWz0p6Mi8z0y6AjMw3j Dq6B/Ccg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVWKe-0006CW-A9; Thu, 22 Oct 2020 08:52:24 +0000 Received: from dvalin.narfation.org ([213.160.73.56]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVWKb-0006Bu-Kf for openwrt-devel@lists.openwrt.org; Thu, 22 Oct 2020 08:52:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1603356738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=RUJmjvAcZVDJLbx7X6CpRpMXQcC2dIoTsbB8nta8YWQ=; b=Ro3At8h3buzkaCf2SvfxMM6Kqf9sJChsgdH3tNH6qmxWSNKiZd0emeQNET0zjf6+2e6Uc9 4ZP9EyrJTAwEMBAlQymsL1kbMPffhZEmZUV6CfVym/sLvKNjQf4/Ti4aA3vD3TZWOyw6qF 46DR22XqUtuh6Pz0bTHRgqH21c1dTyM= From: Sven Eckelmann To: openwrt-devel@lists.openwrt.org Subject: [PATCH] mac80211: Fix wpa_supplicant config removal ubus call Date: Thu, 22 Oct 2020 10:52:08 +0200 Message-Id: <20201022085208.1921554-1-sven@narfation.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201022_045221_791871_9164272D X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [213.160.73.56 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sven Eckelmann , John Crispin Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org If mac80211_setup_supplicant() is called with enabled=0 then it should just destroy the interface and remove the configuration from wpa_supplicant. But the ubus method call always returned Command failed: Method not found because the actual name of the method is "config_remove". Fixes: b5516603dd90 ("mac80211: more wifi reconf related fixes") Signed-off-by: Sven Eckelmann --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 42144375b4..c8e952b7a3 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -627,7 +627,7 @@ mac80211_setup_supplicant() { local spobj="$(ubus -S list | grep wpa_supplicant.${ifname})" [ "$enable" = 0 ] && { - ubus call wpa_supplicant.${phy} config_del "{\"iface\":\"$ifname\"}" + ubus call wpa_supplicant.${phy} config_remove "{\"iface\":\"$ifname\"}" ip link set dev "$ifname" down iw dev "$ifname" del return 0