From patchwork Fri Jan 22 15:15:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 368649 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1601980jam; Fri, 22 Jan 2021 07:14:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6XQlryTHanQNCC+RAlPgw0FnbrzewEwU8qjyYDgYeBlkScHp3P8buNu/bTAbWvtRmiRBI X-Received: by 2002:a17:907:1119:: with SMTP id qu25mr3246793ejb.268.1611328450998; Fri, 22 Jan 2021 07:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611328450; cv=none; d=google.com; s=arc-20160816; b=Huc8eE/YGjO0LjwLyFqzDabdZY2mPl1dAu+GM254CfEbPWqoEX07eiXCJIajyMczfM LRvn4fdyLEB3tizqSxfRNpWuEwtbjpPhKLsEPEq4X7kNsaJoCHWkPQcZXVJGe/QIDFNB er1dDduSoALP9WkBYEgiXSgg1nv/vwmqEgQ3vX3dtmNdlcZVyHH8tqlJAqH0eZlPfrz2 lq2WAfTTsd7kU/IqxViqnhZURE9BH8MkFJWkpkEbMqYkQb4qaTn2NPT7c2qwxEntfsyn M4TpqPzIvVY/YBB7C59iyA1dutqUfveRyoUfXR2Cce9Bx3WgzYpABCCb4f4BuznfjFOw EuiA== 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=mn6O2bBi2EbzByGFrsSlwzOHB9bYWAcVoVZch/5H50w=; b=MZEgmm9UZ/XU+Mm0d27t72mmfi1wXyHt92LXjdARi4+eWb02wQo3oz0LiWqFIl9bTH CIOhJZfaSbWukNnb636g4/V7bLRjYtIn5k3h7fLiX5kopqX9BzsMZwI0oqafyAsyccOR GyZ9nNpuFtxi7V7y65RykB38ITYkmSzDtywLFMC8XVc4GSqZzomtAf+xW8bpUuhRYJJP o3Sg4KgVBNgqCHxeJpuxJC3ZFZaFNWIWxUuJJ1rzTegN3BrWW4S4EnXT/TIbWm5oC61h 4s6YKZRJ7hkbE+0UN2fSAqaLGvvPitC1fuddcyOo29uh/1q2PWSSrlNFTQG2ZetF1RSE kT1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RL8RnyOu; 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 ia15si3008413ejc.443.2021.01.22.07.14.10; Fri, 22 Jan 2021 07:14:10 -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=RL8RnyOu; 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 S1728110AbhAVPNA (ORCPT + 7 others); Fri, 22 Jan 2021 10:13:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729095AbhAVPI6 (ORCPT ); Fri, 22 Jan 2021 10:08:58 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51178C06178B for ; Fri, 22 Jan 2021 07:08:15 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id g10so5418232wrx.1 for ; Fri, 22 Jan 2021 07:08:15 -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=mn6O2bBi2EbzByGFrsSlwzOHB9bYWAcVoVZch/5H50w=; b=RL8RnyOuEeLjkRSeDATQ9WqU4Y2lYjDzKl/HmgSuPqjLhEBbJo/1fLAu1l/WvcPxja MAyRljDmBr7Ah7uLjtJEFCPR5W9oBAToSypkBn6oRXz12aY2r7NE687i6S9TghXBQayD XmGvX6JpmNfUcp6IVFSL+9SK3f873jznbHOpGGQkKAErn9rhja20hw+kWfwebCKOcntb Ff+NcXu/alllJo4tRZEgvbwQiKGUr3/vSprlDWfrKPho02hPfc7k/t+YbvSkBLQmPkFw 3rEz5tQW0Gz/3MsJRnDiBQbr2J52KooJT9Qk8AeaJj/e8T5AjBzXeM0D+YZoJjxEWCe2 0ZLw== 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=mn6O2bBi2EbzByGFrsSlwzOHB9bYWAcVoVZch/5H50w=; b=dKJOtFqi7Rme2clhNxokaePk1KDKdQcskuNsfhh8BL+eocIRe1yLGQNdf7DKNF7mq8 lmpZ9C6A1df1+WFmBDlynEsk3jsk7FBpPY7KnQJTBNKe5YhwJOeGIITwb7d9xPFlvF9M 6wJw9VFkM3FQY2sfJedDFzN/qV05Zh/slqky6BkvnRu7TtOU0EPxz86kwPyanonX0A8Y VbenG3N6swyydhXHLejjj7xi1tNi5F1PAMo2X2vxPf5NQwLCatmbl2FTn1jfNA2u+YIU 57pdvbCmwV4ukm/V74Qj4w2xAtqPS2McGR8SVI/W85rXs/tY68VtyGs/ixGzgznV8XeG NqGQ== X-Gm-Message-State: AOAM530M6pwRo1EFw0lM04Xyv2QUP/kATESeRmX3pbjFkuX4flTyCeri Of6pCr/7AJUPPvLtNF5IUL526A== X-Received: by 2002:adf:fb05:: with SMTP id c5mr4867793wrr.69.1611328093963; Fri, 22 Jan 2021 07:08:13 -0800 (PST) Received: from localhost.localdomain ([88.122.66.28]) by smtp.gmail.com with ESMTPSA id r13sm435131wmh.9.2021.01.22.07.08.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jan 2021 07:08:13 -0800 (PST) From: Loic Poulain To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Loic Poulain Subject: [PATCH v2 net-next] net: mhi: Set wwan device type Date: Fri, 22 Jan 2021 16:15:54 +0100 Message-Id: <1611328554-1414-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 --- v2: rebase on net-next 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 5f3a4cc..a5a214d 100644 --- a/drivers/net/mhi_net.c +++ b/drivers/net/mhi_net.c @@ -248,6 +248,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) { @@ -267,6 +271,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); /* All MHI net channels have 128 ring elements (at least for now) */ mhi_netdev->rx_queue_sz = 128;