Commit 36815b41 authored by Reinhard Speyerer's avatar Reinhard Speyerer Committed by David S. Miller

qmi_wwan: extend permitted QMAP mux_id value range

Permit mux_id values up to 254 to be used in qmimux_register_device()
for compatibility with ip(8) and the rmnet driver.

Fixes: c6adf779 ("net: usb: qmi_wwan: add qmap mux protocol support")
Cc: Daniele Palmas <dnlplm@gmail.com>
Signed-off-by: default avatarReinhard Speyerer <rspmn@arcor.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8fdde1c
...@@ -29,7 +29,7 @@ Contact: Bjørn Mork <bjorn@mork.no> ...@@ -29,7 +29,7 @@ Contact: Bjørn Mork <bjorn@mork.no>
Description: Description:
Unsigned integer. 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 based network device, supported by recent Qualcomm based
modems. modems.
...@@ -46,5 +46,5 @@ Contact: Bjørn Mork <bjorn@mork.no> ...@@ -46,5 +46,5 @@ Contact: Bjørn Mork <bjorn@mork.no>
Description: Description:
Unsigned integer. 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. created qmap mux based network device.
...@@ -429,8 +429,8 @@ static ssize_t add_mux_store(struct device *d, struct device_attribute *attr, c ...@@ -429,8 +429,8 @@ static ssize_t add_mux_store(struct device *d, struct device_attribute *attr, c
if (kstrtou8(buf, 0, &mux_id)) if (kstrtou8(buf, 0, &mux_id))
return -EINVAL; return -EINVAL;
/* mux_id [1 - 0x7f] range empirically found */ /* mux_id [1 - 254] for compatibility with ip(8) and the rmnet driver */
if (mux_id < 1 || mux_id > 0x7f) if (mux_id < 1 || mux_id > 254)
return -EINVAL; return -EINVAL;
if (!rtnl_trylock()) if (!rtnl_trylock())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment