Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp834667ybi; Fri, 12 Jul 2019 05:26:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQ9+rU3hNv9Jus+hE8HMSXPpjs9D/D60jQjiPFuPws7XrF5mOg2cm5IjOQW/7aKVYxry0e X-Received: by 2002:a17:902:a417:: with SMTP id p23mr11026009plq.136.1562934367791; Fri, 12 Jul 2019 05:26:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934367; cv=none; d=google.com; s=arc-20160816; b=whMnOR4Wtm9QOwFqw3OJhpE9Wb5gFYPgmDg8Wq8/vW36E8OH5SinlEdjo5cXfIHAzZ 1u7g7EXQoQvo2njmlSohWcA+6I9RY3fxqSAziGxz2ilLuDP8uaDLNoL0cfnUmYHLjd5d 9xG50/dod5Ydiv3RLMRK/ojul/sLSKQ769NwpFGKePwImIMbIA2Y8qqpFOOPtARTISWh 1GVeJYoUqMrK9+Ta2b0cquZLGa9kjyRzS40CvKMI3tDcLnKFBHVNUk9yaIaxOrEKvTcy WXphjo3U0Vo9rrMXaNF8o+Lrt8XPGU7gIT4jEnKypHsCfSg6e6EcjJVbvCOXZfIpRS0h BfMw== 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=rTj+mYPBHZPtgdQ6joTkmVhoOLJWHiH/fe/wW455eNorFYvVEv3sOH2JvrmAWfTikb lDqoB0R4xrlGYzHEbQwnXrUKnFioG47We8u818Ti1aNIulNEarsp+qfah1XO9KPqGDAK XzoAKRQYXSsdbcNnmnk0BuFMhm2N+wyQZ7dxShxUifLsrpjR7bz7rqMlUlRfVzciaKNb dd4SwfOhxZQ22jcy5Ni86VXg9Axw9AAsdq+kHQmAM7PXSqqowYUilpfuJ4d4q746GcQx sTd1MlmzfDUOuVn2qD1HnmK4VHuWz//Doo68Lt6jd4A/gj+Mfb8NoDjFHY5VrA+8ECU6 R+Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0RiIgUz6; 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 q4si8327044pfg.286.2019.07.12.05.25.51; Fri, 12 Jul 2019 05:26:07 -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=0RiIgUz6; 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 S1728184AbfGLMYw (ORCPT + 99 others); Fri, 12 Jul 2019 08:24:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:33988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728180AbfGLMYu (ORCPT ); Fri, 12 Jul 2019 08:24:50 -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 5229D2084B; Fri, 12 Jul 2019 12:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934289; bh=kD7Fglm7ijDxctsdE46ohXgEikesjUR13C+dfx4w0IA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0RiIgUz6+66Mos+BiN22OEhVIPEyIY5MHAc6E307ujmo8kXiruqLFLmLiNkvNqOTI wEqcceS9FE19Gx4IlW3TNOIbY8eG077nbGDEgfbbrk8aLgeJg1F5dZ7d5S3vAROxzm dsvoIWtfxujwidoivgs0kw0x/00NezOYnIj9TVpI= 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 4.19 44/91] qmi_wwan: extend permitted QMAP mux_id value range Date: Fri, 12 Jul 2019 14:18:47 +0200 Message-Id: <20190712121623.887647543@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@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