Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3522974pxf; Mon, 15 Mar 2021 11:26:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl7jxBWK3AAaLUZ99Cpr9vff30jPZuhlYfXbNTUINHYc7Z7kUjgbuU/r2rpaW4WiKd28Ru X-Received: by 2002:a17:906:fa04:: with SMTP id lo4mr25269471ejb.44.1615832816009; Mon, 15 Mar 2021 11:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832816; cv=none; d=google.com; s=arc-20160816; b=OPuMb7sy4nk1odX/vzr3LjbKHUtunpzrkMiQfOxq2trsJxHqxvIz70AQEsd1XQyNRS F8kzlD8CLFM60bVKvcGVu13C9u5eTKE0c3elM4WelOKmsigddI66Ls5tXzAX2XyuGkw9 Ugx7MrZBEcwwbWvTX030A4pGWbFlCs21T5CN1QPtVHQwzL7SDL4Pb4djQdZtEnzMsuom 5LPG6VdDosVp2bOqP4KbB/Fcfn4MwOApDv9IR66tjGDZwTXSndYuAPj4/4kDmHCPKMt0 0mtEpPemQ8Z0Y5Ch91JKRdIJvhrVZVIyYzZNAI9I2eczatI18/81m1uueNymNV4LcDk7 DAqw== 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=DOheAwkKDHDlNYzS4UI4O9e+aOz5K+9snp4brAU8aXw=; b=ZATMveEgciC5ovMNNYiYPGEtzbP46G7fWRVY3DgUa/p1Hc3Oez98PJR4sb+cMpYgK2 3lGGIDyohpTlMlCnH0nX8wbSgMTC3tVuEZzuKMNF2TKvSzmmKFz9duan230uNUiZCsfL Ha9ZQq4TCnNsAJ8NOcgnFxPB1ojHS6R7oe0KFHY6FI5gMXQaswALt2MiXsuct/lsXKSY AdbXvJnqFcwuqHxBTJqcSIrfYZVmyBMT8W1elEoIXfVakIFx0+cejX2I/UfuV858iVMK LbIlfCrKnyurL912ONi+6pwm56Bjla7qgF+siRT18zioR+yzSS1UsJFtwrIi2TvAofPQ ysPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1YMrEg07; 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 cw19si11289705edb.211.2021.03.15.11.26.31; Mon, 15 Mar 2021 11:26:55 -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=1YMrEg07; 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 S234303AbhCOOZi (ORCPT + 99 others); Mon, 15 Mar 2021 10:25:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:37670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232427AbhCON64 (ORCPT ); Mon, 15 Mar 2021 09:58:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3314364F40; Mon, 15 Mar 2021 13:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816715; bh=itJ8U0Bp7EtEKyhUtm3nAEiZShDwqJ9fXKGVeV80Vcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1YMrEg07z9QD/uBD2UPPfixNUYzrb75IUtwso5/+hXpei58+RYWBQfpyWKTOGbNCP 6OAEeh/aG5Kls6VVSBvgVIh9QEocMKUW7ja1g2Bwv2jG2rPhm+drmcMGOLI1uiUp/D 5cUTye0whcg9cZJoGg4P0IyfQb9jGbGLvqGs98Vc= 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 4.19 023/120] net: usb: qmi_wwan: allow qmimux add/del with master up Date: Mon, 15 Mar 2021 14:56:14 +0100 Message-Id: <20210315135720.755618615@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 @@ -378,13 +378,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; @@ -414,13 +407,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");