From patchwork Wed Jan 20 13:53:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 367089 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp812927jam; Wed, 20 Jan 2021 13:09:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcDnVmCtUQZz9r18pG7IdSpeA3BcICgCzOY89G46xPxB4SrCXmpkvSDzX1A84PaFjlXck8 X-Received: by 2002:aa7:d88e:: with SMTP id u14mr8514249edq.72.1611176961745; Wed, 20 Jan 2021 13:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611176961; cv=none; d=google.com; s=arc-20160816; b=Q7+5m/U9shEC3q7yDUN+gJERi/XbQlDsjA2dimQO6kYaQNIsEuFRNnUZlWf5m68HGW 3Qr7C9fjKPgRXLxQsQyT+sWGm8o0+UjbQNxNZaN+lI80lIpGckFLm9zwrLGsZYNNgvbB 0alF+2h3J1a924DEuMbEWoSEmqjRc39WiQUiuwnwuggdq743rWUqnLY+5Gii2EWZgs3K /jYIF02EQvIEPPtVhlJG8Q8/femOV93zRObuv353a/292yn2rs1QenDl7FgYGpVGKPgK USwNgufg3mZiTnIQR5xZm3j8SjQRT0mRqqjl9Hh/x6Z2n19xneTqkqQRglaviR6AFNFG cvpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=NsFMlNDSNcVbWw/lz8xxqlxojYW8hjqlbDkbn60XW6Y=; b=bCe7/jYAw78a4nFodkerqle8CB/6+dH7wcfuVCWyjVPEW3Bor3MPINf6WCMhnqh3X/ hxkJ6ouPmN33wAQFuoKbCsdkkai/oWWW/VOfiPQ2tynDAiwuVpTPtKbpQPU2wD4IFqIK +bQJ4JC/w6i+R1uoAITWa8DQQFi9jx+9ylksjo6VkgOphEQFF5L/FQ8/4FgPV5YvaaS1 O5+9Cq7HLIet0i9X3ZIM7JzhXcjLZWd+QMEeb1SQOPeQSdR/N84xvsXLkyaoqmq2eGEi zgJbLFQA/vL/sMycpSzg/6SziIPvKwQarwCdVR+uGXXn2tCDWCtClXsZJPXs6Uv7nBsR jTSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v6TMTwiW; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si1341771edy.394.2021.01.20.13.09.21; Wed, 20 Jan 2021 13:09:21 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v6TMTwiW; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732231AbhATU4G (ORCPT + 7 others); Wed, 20 Jan 2021 15:56:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732919AbhATNyC (ORCPT ); Wed, 20 Jan 2021 08:54:02 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B77A3C061575 for ; Wed, 20 Jan 2021 05:46:02 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id v15so19511001wrx.4 for ; Wed, 20 Jan 2021 05:46:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NsFMlNDSNcVbWw/lz8xxqlxojYW8hjqlbDkbn60XW6Y=; b=v6TMTwiWU54mvhMtdVsph3UY35FzKCQE3WLBqxB2kNTHeGLUZkxSdkp7tb0UysaRsy rR9SXO9SjMXrD+QlekHk43JAIpPV9sl4IiDLOpWS+71OTud+A3N64lO2j0F0e12MoP1o 9WIiDaXh/JYVE7GySr7AHry3TpEB7FbggwY7zBENRExZJrSmuTeD+20rKmSy2b2A0gCE LifDe9O0BubJk0CoCSO8T37flR81zm/P6vScEKsWfVvpZunYWGka62gE2PnjpO/HDpak 8VphnBT1AVJVOEV3p5bb3WkvZYqp7ZuEbrPySLPnjbQFf9GbvVA+f0KI4pfAgNhTfGxP wDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NsFMlNDSNcVbWw/lz8xxqlxojYW8hjqlbDkbn60XW6Y=; b=H8mV/aIOiO6nupzobUb5WX3TPgbpSO0MBDTK80CIHmAPxYF+WiwvQDrzdrFH+lcfGL DA4pmaH+EQuPvfVyWjfvKjSwpJQ/KyAtvNLAG14nFVcMqIgX11xNLpv9RzwlHL7OX7mC Bwus9M/wAclT586ewcx0wkgs6sYs4toaHuo7HqHY1WlKmsB/LNhSW/dk92rD38VYAU5i hGj+kd3hWwFLCOmml0AKdy1Mz/cVl2kJ2HaXI+AXriXzeb+hud0FQUvN9YCfNxVRxj/a 4sQJC7k9VlxILmBRvv2Z0JUq9Tp/6Dnr4j4oiJGbGCwCFni8BcC3WqAEAajWSSf4Uvn2 umjA== X-Gm-Message-State: AOAM532BNB9Y6zHlEkwhVrvTf5GjV5xNSERVHEdzu/LlU1JZy7Qj/em3 7l8gpD+yfpVIBx9N+n3auekC8w== X-Received: by 2002:adf:eb4e:: with SMTP id u14mr9484527wrn.99.1611150361424; Wed, 20 Jan 2021 05:46:01 -0800 (PST) Received: from localhost.localdomain ([88.122.66.28]) by smtp.gmail.com with ESMTPSA id j2sm3982403wrh.78.2021.01.20.05.46.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jan 2021 05:46:01 -0800 (PST) From: Loic Poulain To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Loic Poulain Subject: [PATCH net-next] net: mhi: Set wwan device type Date: Wed, 20 Jan 2021 14:53:41 +0100 Message-Id: <1611150821-15698-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The 'wwan' devtype is meant for devices that require additional configuration to be used, like WWAN specific APN setup over AT/QMI commands, rmnet link creation, etc. This is the case for MHI (Modem host Interface) netdev which targets modem/WWAN endpoints. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.4 diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index f83562d..e3f9c0d 100644 --- a/drivers/net/mhi_net.c +++ b/drivers/net/mhi_net.c @@ -234,6 +234,10 @@ static void mhi_net_rx_refill_work(struct work_struct *work) schedule_delayed_work(&mhi_netdev->rx_refill, HZ / 2); } +static struct device_type wwan_type = { + .name = "wwan", +}; + static int mhi_net_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id) { @@ -253,6 +257,7 @@ static int mhi_net_probe(struct mhi_device *mhi_dev, mhi_netdev->ndev = ndev; mhi_netdev->mdev = mhi_dev; SET_NETDEV_DEV(ndev, &mhi_dev->dev); + SET_NETDEV_DEVTYPE(ndev, &wwan_type); INIT_DELAYED_WORK(&mhi_netdev->rx_refill, mhi_net_rx_refill_work); u64_stats_init(&mhi_netdev->stats.rx_syncp);