mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lars Melin <larsm17@gmail.com>
To: jackyphuti <jackympoka22@gmail.com>,
	bjorn@mork.no, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Copilot <223556219+Copilot@users.noreply.github.com>
Subject: Re: [PATCH] net: usb: qmi_wwan: add common Huawei modem IDs
Date: Sat, 19 Sep 2026 11:56:44 +0700	[thread overview]
Message-ID: <aef1ba1a-aa9b-4ba8-9456-6a99d350dde2@gmail.com> (raw)
In-Reply-To: <20260918193645.59374-1-jackympoka22@gmail.com>

On 2026-09-19 02:36, jackyphuti wrote:
> Add common Huawei product IDs to qmi_wwan fixed-interface mappings
> for broader generic Huawei modem coverage.
> 
> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
> Signed-off-by: jackyphuti <jackympoka22@gmail.com>
> ---
>   drivers/net/usb/qmi_wwan.c | 38 +++++++++++++++++++++++++-------------
>   1 file changed, 25 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index fdfdcf24ddcf..2809b6985f7a 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -216,10 +216,10 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
>   		if (netif_rx(skbn) != NET_RX_SUCCESS) {
>   			net->stats.rx_errors++;
>   			return 0;
> -		} else {
> -			dev_sw_netstats_rx_add(net, pkt_len);
>   		}
>   
> +		dev_sw_netstats_rx_add(net, pkt_len);
> +
>   skip:
>   		offset += len + qmimux_hdr_sz;
>   	}
> @@ -946,6 +946,13 @@ static const struct driver_info	qmi_wwan_info_quirk_dtr = {
>   };
>   
>   #define HUAWEI_VENDOR_ID	0x12D1
> +#define HUAWEI_PRODUCT_E1750	0x1406
> +#define HUAWEI_PRODUCT_E173	0x140c
> +#define HUAWEI_PRODUCT_K4505	0x1464
> +#define HUAWEI_PRODUCT_K3765	0x1465
> +#define HUAWEI_PRODUCT_K4605	0x14c6
> +#define HUAWEI_PRODUCT_E1820	0x14ac
> +#define HUAWEI_PRODUCT_E173S6	0x1c07
>   
>   /* map QMI/wwan function by a fixed interface number */
>   #define QMI_FIXED_INTF(vend, prod, num) \
> @@ -1024,23 +1031,23 @@ static const struct usb_device_id products[] = {
>   	},
>   	{	/* Novatel USB551L and MC551 */
>   		USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0xb001,
> -		                              USB_CLASS_COMM,
> -		                              USB_CDC_SUBCLASS_ETHERNET,
> -		                              USB_CDC_PROTO_NONE),
> +					      USB_CLASS_COMM,
> +					      USB_CDC_SUBCLASS_ETHERNET,
> +					      USB_CDC_PROTO_NONE),
>   		.driver_info        = (unsigned long)&qmi_wwan_info,
>   	},
>   	{	/* Novatel E362 */
>   		USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0x9010,
> -		                              USB_CLASS_COMM,
> -		                              USB_CDC_SUBCLASS_ETHERNET,
> -		                              USB_CDC_PROTO_NONE),
> +					      USB_CLASS_COMM,
> +					      USB_CDC_SUBCLASS_ETHERNET,
> +					      USB_CDC_PROTO_NONE),
>   		.driver_info        = (unsigned long)&qmi_wwan_info,
>   	},
>   	{	/* Novatel Expedite E371 */
>   		USB_DEVICE_AND_INTERFACE_INFO(0x1410, 0x9011,
> -		                              USB_CLASS_COMM,
> -		                              USB_CDC_SUBCLASS_ETHERNET,
> -		                              USB_CDC_PROTO_NONE),
> +					      USB_CLASS_COMM,
> +					      USB_CDC_SUBCLASS_ETHERNET,
> +					      USB_CDC_PROTO_NONE),
>   		.driver_info        = (unsigned long)&qmi_wwan_info,
>   	},
>   	{	/* Dell Wireless 5800 (Novatel E362) */
> @@ -1228,8 +1235,13 @@ static const struct usb_device_id products[] = {
>   	{QMI_QUIRK_SET_DTR(0x05c6, 0x9625, 4)},	/* YUGA CLM920-NC5 */
>   	{QMI_FIXED_INTF(0x0846, 0x68a2, 8)},
>   	{QMI_FIXED_INTF(0x0846, 0x68d3, 8)},	/* Netgear Aircard 779S */
> -	{QMI_FIXED_INTF(0x12d1, 0x140c, 1)},	/* Huawei E173 */
> -	{QMI_FIXED_INTF(0x12d1, 0x14ac, 1)},	/* Huawei E1820 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1750, 1)},	/* Huawei E1750 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 1)},	/* Huawei E173 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 1)},	/* Huawei K4505 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 1)},	/* Huawei K3765 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 1)},	/* Huawei K4605 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1820, 1)},	/* Huawei E1820 */
> +	{QMI_FIXED_INTF(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S6, 1)},	/* Huawei E173s-6 */
>   	{QMI_FIXED_INTF(0x1435, 0x0918, 3)},	/* Wistron NeWeb D16Q1 */
>   	{QMI_FIXED_INTF(0x1435, 0x0918, 4)},	/* Wistron NeWeb D16Q1 */
>   	{QMI_FIXED_INTF(0x1435, 0x0918, 5)},	/* Wistron NeWeb D16Q1 */


Hi,

The whitelist in qmi_wwan is based on numerical vid and pid,
redefining them with vendor name and product strings fills
no function. The driver is not a cross reference list for
numerical to name lookup.

Which of the products you are adding support for have you
tested and confirmed working under the qmi_wwan driver?

For which of the products do you have a verbose lsusb listing
so that you can confirm interface attributes before adding
them to qmi_wwan?
Please include these lsusb listings in the patch!

Here are my comments by product:

12d1:1406,1 only 2 endpoints, not qmi.
It is a serial AT cmd port according to the Huawei Windows driver.

12d1:140c,1 already supported, no need to redefine

12d1:1464,1 is qmi, interface already blacklisted in the option driver 
so can be added to qmi_wwan

12d1:1465,1 interface has ecm attributes, is probably qmi but this must
be confirmed and the interface must be blacklisted in the cdc_ether 
driver BEFORE being added to qmi_wwan!

12d1:14ac,1 already supported, no need to redefine

12d1:14c6,1 already supported in qmi_wwan by its interface attributes

12d1:1c07,1 jungo_ecm according to Huawei proprietary driver, may
well be qmi but that has to be tested on a physical device.


thanks
Lars

      reply	other threads:[~2026-09-19  4:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 19:36 jackyphuti
2026-09-19  4:56 ` Lars Melin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aef1ba1a-aa9b-4ba8-9456-6a99d350dde2@gmail.com \
    --to=larsm17@gmail.com \
    --cc=223556219+Copilot@users.noreply.github.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jackympoka22@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®