Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2501024rdb; Tue, 12 Sep 2023 04:05:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhy2oYUZ2SVfHJ3itxgfoR0N7ZFYYYiHYobI07+uAmTSmUCcIRUUIPVg+Vf4A49NZZyyrO X-Received: by 2002:a17:90b:2251:b0:273:f848:e3c4 with SMTP id hk17-20020a17090b225100b00273f848e3c4mr5573395pjb.17.1694516754556; Tue, 12 Sep 2023 04:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694516754; cv=none; d=google.com; s=arc-20160816; b=vg5g0cVxEBXEpWy3hX/xYIfoGRy+/ty0LG661nmkUlIy7/k6CAMM5Z2fE92RNd9LDu 6miuhmnPcdBrKllIP1evyhgS4/UIeqoHimbxsTV61Fpa/nECJMTyWAEM5wp3RnVR2QMM uuuB82g2OJgM0Bgm/9/2ZZh7WpyB4YlBoCODY2Q/SPd/v923NbP4hZlZB7AHBiS7JJCA a0y8tobM6AEYPvf/+klC6nRE/YNFT6EQ4PK/29GxSryntjxfyF1az2s/Y1kSed+uN2Gy C6g8Zqf//kOrXXN0pzFNq0cyZ5lP0XLJsnX+soKuk9Cx3xeo2uy6GnPCoeK5D4sNwpm8 1slw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=WdrUuVSZ9WRITa1Q6VvDaXcLq4GleKiHNXwuo+2pzBs=; fh=+DRdcquvoP+14eDc3IaqrRmTQDCYfw9s2E2s6R8SbOQ=; b=wul5LZflJNwO5vBBeGz1f1bx9gB/6j9hl6lH4nZvRbv2i+aDKJp0Sp7dc7d+DKhvKA u63Cq+q76wzTik3QCwtbf7Ggke5wOCbt6/7Vgskbq20FWPl4iKue+HkAgj42Lch1n2j7 /j3xWsTnmSgsiz2cwFU2Gsm9ISz7MmzB2e37jLaEJZydZ61b9j3q+9xQES8zESXWnGd5 m6K3Y4l08+rJTJMBd9ZjG6Hx3rK/AoxN+1VuAg2+0NCDOOiH/JgPrUYTiQcY3K/gj06v eKzRyQFf025g8hrchPo8GW3c/7I2VZGpYoA0nw6GMWZbhUwXVcY6bl369q7+jN651b0I Al8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=I0G9dSQd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id x89-20020a17090a6c6200b00273fc50cf8dsi4872036pjj.156.2023.09.12.04.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 04:05:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=I0G9dSQd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6F43781F35B3; Tue, 12 Sep 2023 00:04:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231326AbjILHEY (ORCPT + 99 others); Tue, 12 Sep 2023 03:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231208AbjILHEW (ORCPT ); Tue, 12 Sep 2023 03:04:22 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35F8BE78; Tue, 12 Sep 2023 00:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1694502259; x=1726038259; h=from:date:subject:mime-version:content-transfer-encoding: message-id:to:cc; bh=WdrUuVSZ9WRITa1Q6VvDaXcLq4GleKiHNXwuo+2pzBs=; b=I0G9dSQd+fYDB0/k6n48d/G+GfHoZVB0Hn0UFJdoYZDTQSSXgZPJLK8p +RXGYufmdwdtGmlSF8zpW0Zg1CP5c/gvhP02SNGy44iI2OtQvIS2IDOw6 oEZnDEsH/IUZAk88nk5nIo9N5kpGFHCf0dKRNC9dlUyEipSMuO9HM/RCC U5oKjQQsp78Q/ZIwgCAaJZwbU/X3V8MLdB/R5yu3fxTET/UPF/C8KokkX tla4bt+dbHR1ls5VpcTbjWKcYCeikZx5HPhuzYpY/etV/at3fBhEy+vkv sBbmlZ1RzGEAi3XFxd5xya9QRc8N0ilAIVZxP6Io+JoHSmIxaHGNUrwXr g==; From: Stefan x Nilsson Date: Tue, 12 Sep 2023 09:04:13 +0200 Subject: [PATCH net-next] qmi_wwan: Add rawip module param MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20230912-qmiraw-v1-1-21bc812fa0cf@axis.com> X-B4-Tracking: v=1; b=H4sIAGwNAGUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2MDCyML3cLczKLEct0ki6TkpMTUFEOTxCQloOKCotS0zAqwQdGxtbUAUEv f0lgAAAA= To: =?utf-8?q?Bj=C3=B8rn_Mork?= , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: , , , , Stefan x Nilsson X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 12 Sep 2023 00:04:31 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Certain QMI modems will start communicating in rawip mode after bootup, and will not work properly if communication starts off in ethernet mode. So add a module parameter, rawip_as_default, that can be used to load the qmi driver in rawip mode. The advantage compared to changing rawip at a later point using sysfs is that the os will not detect the device and start talking to it while the driver is still in incorrect mode. Signed-off-by: Stefan x Nilsson --- drivers/net/usb/qmi_wwan.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 344af3c5c836..968c60ececf8 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -46,6 +46,10 @@ * commands on a serial interface */ +/* Module parameters */ +static bool rawip_as_default; +module_param(rawip_as_default, bool, 0644); + /* driver specific data */ struct qmi_wwan_state { struct usb_driver *subdriver; @@ -843,6 +847,13 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf) } dev->net->netdev_ops = &qmi_wwan_netdev_ops; dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group; + + /* Set the driver into rawip mode if requested by module param */ + if (rawip_as_default) { + info->flags |= QMI_WWAN_FLAG_RAWIP; + qmi_wwan_netdev_setup(dev->net); + } + err: return status; } --- base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c change-id: 20230828-qmiraw-b8bcbaed14ab Best regards, -- Stefan x Nilsson