Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3508646pxf; Mon, 15 Mar 2021 11:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6IxCtFjGuah7Rottxvq+WpIAPBabpM0XU/kE49ZUnzQj8JPdXxOZF53BqxAzhEJLMmsQ2 X-Received: by 2002:a17:907:3ea0:: with SMTP id hs32mr24661504ejc.411.1615831559741; Mon, 15 Mar 2021 11:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831559; cv=none; d=google.com; s=arc-20160816; b=qKzOdO8BVknYgaYjqe5zWNd86uZI7NwfiAvh2lEjbJp7bUZrS9kQTV3ynZRnMjnVjy WPUaIn0JVHwMqgJlWm5+kZuvdXRCoISE7IV/kBsxeu1t+mDT8Emw2aCYRSjr0BYL+JZv vD8ZtQyISZGAz84f7axnmif2bMUfBi8xctafJVIANWkYqJKZ4L9Djbno4HCF+Uj3aAjo 9hIDGaeKkQnu8EsEv7JYqh3ofUdbiCHE+z4U+GPIub+kFzjCDagCIBOKqK2OPG8xKcRR fY+6AoPVFpW+Gj8vLY64otzY43b1UAoLR01nitpwKrKntf4jmLtx5o5HJqFeZhLzsO6o Q1NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g3VDbO9vPb/JkzI3y8mhtvu2EfBFLx2Dg5WIv+cus7E=; b=vgAJWEOaUgqqWEGtbnJHs4pX8T471zbnpPscHdvBwFOskTIni5AEHAhGIrbhWzGrEc PBkMZTjqCbjMiPcq9Utlh8Jr01tFgrb6zvjGtajmz7LjhDkL2jzyKlA8xQYFc1LXSmTe xq4HOM8fWowjpBKXeoZKZDWkeCag9hcoSL16jJEAakv+xJFpYtTzRkCQUao5JIdqrGYd L8cdBNaw86+A401PlhXPO+QQCY0y7Yfc/dOCjqZIeoUq6bXbdgABEEQ9rwcWPcbgso/C tFr95MjPGLmDdU+AqA82dbyp54kpWNtXqewLv+uCubQhk/YsRGloAj396XVY09dZuUrt aKXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eEOjrSb3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si11709607edq.5.2021.03.15.11.05.36; Mon, 15 Mar 2021 11:05:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eEOjrSb3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235277AbhCOOH0 (ORCPT + 99 others); Mon, 15 Mar 2021 10:07:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:36594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232236AbhCON6A (ORCPT ); Mon, 15 Mar 2021 09:58:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 27F0B64F16; Mon, 15 Mar 2021 13:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816679; bh=YnPNlty5rkvQMDxpLsfMXXWngIF8DjlwcEGFXjnavLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eEOjrSb3oq11J9jcY+HOmNwS85oCDLm9L9ZlYtvLigkM4yZSiIvRoqTdS1MS+tNbd +pX4kQ81Hv7h00Cac44X6n8Yivi47erifita+F9liUxYFHSyj/qmAbinnTSUq0zBQP JAKbrglQ2NMBR3vaNqZ72EOEnbWbfdn26OMDadk4= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aleksander Morgado , Daniele Palmas , =?UTF-8?q?Bj=C3=B8rn=20Mork?= , "David S. Miller" Subject: [PATCH 5.10 051/290] net: usb: qmi_wwan: allow qmimux add/del with master up Date: Mon, 15 Mar 2021 14:52:24 +0100 Message-Id: <20210315135543.648433161@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Daniele Palmas commit 6c59cff38e66584ae3ac6c2f0cbd8d039c710ba7 upstream. There's no reason for preventing the creation and removal of qmimux network interfaces when the underlying interface is up. This makes qmi_wwan mux implementation more similar to the rmnet one, simplifying userspace management of the same logical interfaces. Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support") Reported-by: Aleksander Morgado Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/qmi_wwan.c | 14 -------------- 1 file changed, 14 deletions(-) --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -419,13 +419,6 @@ static ssize_t add_mux_store(struct devi goto err; } - /* we don't want to modify a running netdev */ - if (netif_running(dev->net)) { - netdev_err(dev->net, "Cannot change a running device\n"); - ret = -EBUSY; - goto err; - } - ret = qmimux_register_device(dev->net, mux_id); if (!ret) { info->flags |= QMI_WWAN_FLAG_MUX; @@ -455,13 +448,6 @@ static ssize_t del_mux_store(struct devi if (!rtnl_trylock()) return restart_syscall(); - /* we don't want to modify a running netdev */ - if (netif_running(dev->net)) { - netdev_err(dev->net, "Cannot change a running device\n"); - ret = -EBUSY; - goto err; - } - del_dev = qmimux_find_dev(dev, mux_id); if (!del_dev) { netdev_err(dev->net, "mux_id not present\n");