Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3511181pxf; Mon, 15 Mar 2021 11:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCHg6Bu6EVEALMIGp+ist5TGXpdqq6srV+NsXuQG5mqN3DUDQZC54y/Z3KjVDEa8PoNqf4 X-Received: by 2002:a17:906:9714:: with SMTP id k20mr24940933ejx.519.1615831758968; Mon, 15 Mar 2021 11:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831758; cv=none; d=google.com; s=arc-20160816; b=KT6Lob4+UOjXR6+2eKBiFvmwwNu5nqXIq0KDMAPPUKJn9fX29i2LRW0dDA4jkaoXTd 2biFpTyS9yHALFFYPQrsGSKTjHFoU4YZZxtWzhWTkzxSIEMlFzsnK5RzTWeUXMAiPBh1 9Uhmks2A0ecG+tlqh+sX/ww9LhLAoIvCehoG18ciZfBVIfuVHHJHsa2veyBg36JMjs+N fFssWqXtxv7MV93BFLV6af1+X8z3Gw8lPjMwfvhlWTFGtvTAY3XmjxOc813C17jBQolr l81ZwZ8aSHB7ZiRqZmAqchj0Vzht5NQboIrJnKQALjqhTtC288waQ5UOzU+yoItEA+I3 UqXw== 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=dW263LUIhP66I/ohiGHKVFK44/ScdfmRYHcmULRLFTA=; b=SC8uLAvaJgA2bXOj9BRitHy48ZKzYGCGwg7PtAdf2aCH+Cnl0ry1Q0eYhtx+Pj4P+U Hxeec+ljaPjVMkiFMfcvM5ljiaigvLzgO6eigntGUkkXHZnbBXX0BU1vMCppHvsvgI6N TxFNsVph4toLwPmsKRiJzOoD89hQccjYXhR8jbj1TnnZ0/B/F1OM0V2ZsVJ395D6BAPn RAifOxiavYTHtjzRGhHfrwepYP19nRwuDe8yIfpjcmS8vgAIa89DIRpTpg0HUvfQ3l7X R5VNrYTBhFdUM/qXdrxpaBEKXIURZzIK8SusYQjVW/Lgnnii+ELpJK5Xi/TG+ca+fs6r 3DCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gQbuPEWh; 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 m21si11147752edp.392.2021.03.15.11.08.47; Mon, 15 Mar 2021 11:09:18 -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=gQbuPEWh; 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 S234554AbhCOOJa (ORCPT + 99 others); Mon, 15 Mar 2021 10:09:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:36756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhCON6P (ORCPT ); Mon, 15 Mar 2021 09:58:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9148864F1A; Mon, 15 Mar 2021 13:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816683; bh=1O7DPwMACBX9Y6FQA21+rcoyO3J9Vp+pOkkJNgitLWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQbuPEWhBHqVNZ0XnIcm3LLhXSxEkczZeGJqbJ/AplYASYickUeMmjON+NwCK8Xqr KxHbf8TaqALl3HHpu+xhQa06+n1ub6aLHw7jI1cne3rZPVO7ouRg8C4jj5tFdUaFvH afIu+HUoGCsDk/IqCd2wsvlhrNPBAJ3qVC3DGmyg= 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.11 062/306] net: usb: qmi_wwan: allow qmimux add/del with master up Date: Mon, 15 Mar 2021 14:52:05 +0100 Message-Id: <20210315135509.747732429@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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 @@ -396,13 +396,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; @@ -432,13 +425,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");