From patchwork Mon Jun 21 22:50:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 12335901 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3860C48BE5 for ; Mon, 21 Jun 2021 22:51:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D43861164 for ; Mon, 21 Jun 2021 22:51:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232413AbhFUWxe (ORCPT ); Mon, 21 Jun 2021 18:53:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232375AbhFUWxa (ORCPT ); Mon, 21 Jun 2021 18:53:30 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F1D5C061574 for ; Mon, 21 Jun 2021 15:51:15 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id a16so5907421ljq.3 for ; Mon, 21 Jun 2021 15:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2RophEWmKGfalis8s/rgDbmaYuR38nADcNkhX8xfF5M=; b=pCyInXwcEMOjWDwY0QDL5DfN7Eu3+KdaCJHxAD6nvDyas1jUxC1pX2vJh+QohgHpoa EwlFnUmOOe53RZVnHcsTCKxr9F6shPuhG4LFZYB8H3ArTqycfZiDKOpnNloKtInOA4X+ NZd7z1A5USHf21YwfpqIhoeWGDzYT9a073114dl5Hp9+nsjIUiJSBV7Wj64NWYT4pQuI Obwi9CiC/S3oyMi/vyXryEV9dnytaOwbhLb9wxsXNGXkTGvarykP2Kjxlx/eyvmj4/Qe CdYRAPhq3YiBKhKu5yddKaBieWhLeYkHBI46QnDNcFiVs8bRbu6JxP2lsU68TYGfEnjW 0xig== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=2RophEWmKGfalis8s/rgDbmaYuR38nADcNkhX8xfF5M=; b=F+cdStwZoXu31J8BCfCEgLddAAdjt0YE45TuotavQLPH5zlVVq9Zq6ZvjLQUUEXjKM qgIBtFv8f6nAM1ZQG2MC+ui7cqoMWUR3KFwAoEP/svBVZZq2BjNVSU2c5TJgFJRN61Tf Sc+eZCM69vPVg5acn9WoyZ681s7YY0fB0hqs4M48tWUEsCMyKb2WfyfsbtQBOY27cdmL tzTtp5qri7Mx886rRmSAe0zYz4kj8n6vh5yIYG693yIopXYW0bHL8XopSSGgnJwMNZdQ 1ELuUw8FBF5TMBF1Vq+nN67Xl+HWBq/TxpljRdXt3GPJStr08sKXLvg8AUiHqKBVRq3n u95A== X-Gm-Message-State: AOAM531Wr7UoCwN6gRIqQOEfdA/T8Gz83GGHiQ/wzSBxflJeKT75tcog gOLsgvckF2aPg8sFdoCj9mI= X-Google-Smtp-Source: ABdhPJxqbqzVgFLZ1xg/2BvmPbkLCyqNXsF7jCNiQ5YWzsn2lXy3gucAg3DZVxr/M9wXphyVW7wMdw== X-Received: by 2002:a2e:b78f:: with SMTP id n15mr410680ljo.495.1624315873477; Mon, 21 Jun 2021 15:51:13 -0700 (PDT) Received: from rsa-laptop.internal.lan ([217.25.229.52]) by smtp.gmail.com with ESMTPSA id x207sm124826lff.53.2021.06.21.15.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 15:51:13 -0700 (PDT) From: Sergey Ryazanov To: Loic Poulain , Johannes Berg , "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, M Chetan Kumar , Intel Corporation Subject: [PATCH net-next v2 09/10] net: iosm: create default link via WWAN core Date: Tue, 22 Jun 2021 01:50:59 +0300 Message-Id: <20210621225100.21005-10-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210621225100.21005-1-ryazanov.s.a@gmail.com> References: <20210621225100.21005-1-ryazanov.s.a@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Utilize the just introduced WWAN core feature to create a default netdev for the default data (IP MUX) channel. Signed-off-by: Sergey Ryazanov CC: M Chetan Kumar CC: Intel Corporation --- v1 -> v2: * new patch drivers/net/wwan/iosm/iosm_ipc_imem_ops.h | 3 +++ drivers/net/wwan/iosm/iosm_ipc_wwan.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h index 84087cf33329..fd356dafbdd6 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h +++ b/drivers/net/wwan/iosm/iosm_ipc_imem_ops.h @@ -30,6 +30,9 @@ #define IP_MUX_SESSION_START 1 #define IP_MUX_SESSION_END 8 +/* Default IP MUX channel */ +#define IP_MUX_SESSION_DEFAULT 1 + /** * ipc_imem_sys_port_open - Open a port link to CP. * @ipc_imem: Imem instance. diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c index adb2bd40a404..d3cb28107836 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c +++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c @@ -317,8 +317,9 @@ struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev) ipc_wwan->dev = dev; ipc_wwan->ipc_imem = ipc_imem; + /* WWAN core will create a netdev for the default IP MUX channel */ if (wwan_register_ops(ipc_wwan->dev, &iosm_wwan_ops, ipc_wwan, - WWAN_NO_DEFAULT_LINK)) { + IP_MUX_SESSION_DEFAULT)) { kfree(ipc_wwan); return NULL; }