Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp839125ybi; Fri, 12 Jul 2019 05:30:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjPpkJ0KBI3o1yVQceXhxRdB35XanEgFyIyFOAu9t+VaVdDomklb1o0zQn34GguFR3QBS0 X-Received: by 2002:a65:430a:: with SMTP id j10mr10905371pgq.374.1562934637503; Fri, 12 Jul 2019 05:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934637; cv=none; d=google.com; s=arc-20160816; b=ETZfTBW16qORCv2+A855iIsyAkm0KkDC2MjrzKeUzxTWIXIzb/g90TfKuPHKoyK5cv FwT70DOCf5Bqu2ULXX5/f5gbkYxTDaQZJhK8i+MnN1XrgTjip8D/uFX9EC0RJ7XOJy6C hlgq/Vgrfr8Sl0avkLuMuPlFj0GIZk/fawx/U3WD6WBTa341fKlAJzOlEjcl6iumjk5t ZbFlhMCWk9mReVdP6Ai/VcrZ9YYq99f99Qr05EZMkPwvzN6D8qBMtbIUAe2HVpm1rkdp sWfuR+8KTHaYCK1ytRupKS/uiTUeOwzkRegMZY+/gyR/FnKdV1v7fiUUpgicDqLUvVxb cN8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/qOCzYKw5qn+dekiga3ow6ZMis4ASIvzjxhNV/0Dj4o=; b=Jz0hbun9fr6FI6aq5g79uWzXDLCKv4H/A5nEZHTVHE/U05xxFw+i4hi+khkAMbPxaa 7yrACuCAvdhCl1CA6VfcxMCjOyeOFw0dddCmyvz0bIjnGpTy7/7xhkTBnoHh4gLVJiHe uPGy1WyNzTVVj1lakYOYaapgKbGk1TRhB8pMhdVFD+XPj+kZFaqxMG+5CB/eoYtywSZr VspyG6sHNIYNO/yW5I4SQBb85fChaqorWRq2mACsFiF8df4dHWrzYsutaZTDq+7GjuPd pJTZWD6+E268IAcYlWqdfQtVLDOGUucR+9Vret8x3FTPsuq6ivF2gRQ3OVAG9n5z9X5t tMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1mHgpIxC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si8072292pgb.427.2019.07.12.05.30.22; Fri, 12 Jul 2019 05:30:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1mHgpIxC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728767AbfGLM2N (ORCPT + 99 others); Fri, 12 Jul 2019 08:28:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:41704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728757AbfGLM2K (ORCPT ); Fri, 12 Jul 2019 08:28:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03D7C2084B; Fri, 12 Jul 2019 12:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934490; bh=kD7Fglm7ijDxctsdE46ohXgEikesjUR13C+dfx4w0IA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1mHgpIxCHeeTKKugr16lqVvVRFVDgjLNAXFG1Zipi/mGnhwVGPyRV2pMhlqVKBwxt 65gK2npbrUMn90pm4mMwOJmA8CynhWw7I5SuRWdBGQX/O4UFCNB7QBAwaF8qCo+Dad OcweatPTj+Z1cyTdRkdjB8Ugh2ujh09Eq+vPh8z0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniele Palmas , Reinhard Speyerer , "David S. Miller" , Sasha Levin Subject: [PATCH 5.1 070/138] qmi_wwan: extend permitted QMAP mux_id value range Date: Fri, 12 Jul 2019 14:18:54 +0200 Message-Id: <20190712121631.354103819@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 36815b416fa48766ac5a98e4b2dc3ebc5887222e ] Permit mux_id values up to 254 to be used in qmimux_register_device() for compatibility with ip(8) and the rmnet driver. Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support") Cc: Daniele Palmas Signed-off-by: Reinhard Speyerer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- Documentation/ABI/testing/sysfs-class-net-qmi | 4 ++-- drivers/net/usb/qmi_wwan.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-net-qmi b/Documentation/ABI/testing/sysfs-class-net-qmi index 7122d6264c49..c310db4ccbc2 100644 --- a/Documentation/ABI/testing/sysfs-class-net-qmi +++ b/Documentation/ABI/testing/sysfs-class-net-qmi @@ -29,7 +29,7 @@ Contact: Bjørn Mork Description: Unsigned integer. - Write a number ranging from 1 to 127 to add a qmap mux + Write a number ranging from 1 to 254 to add a qmap mux based network device, supported by recent Qualcomm based modems. @@ -46,5 +46,5 @@ Contact: Bjørn Mork Description: Unsigned integer. - Write a number ranging from 1 to 127 to delete a previously + Write a number ranging from 1 to 254 to delete a previously created qmap mux based network device. diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 44ada5c38756..128c8a327d8e 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -363,8 +363,8 @@ static ssize_t add_mux_store(struct device *d, struct device_attribute *attr, c if (kstrtou8(buf, 0, &mux_id)) return -EINVAL; - /* mux_id [1 - 0x7f] range empirically found */ - if (mux_id < 1 || mux_id > 0x7f) + /* mux_id [1 - 254] for compatibility with ip(8) and the rmnet driver */ + if (mux_id < 1 || mux_id > 254) return -EINVAL; if (!rtnl_trylock()) -- 2.20.1