From patchwork Fri Dec 11 12:26:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Bonn X-Patchwork-Id: 11968065 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 D9BD7C2BB40 for ; Fri, 11 Dec 2020 12:28:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD9A223EB3 for ; Fri, 11 Dec 2020 12:28:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405925AbgLKM1w (ORCPT ); Fri, 11 Dec 2020 07:27:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405452AbgLKM1i (ORCPT ); Fri, 11 Dec 2020 07:27:38 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 870DFC06179C for ; Fri, 11 Dec 2020 04:26:20 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id h19so13024831lfc.12 for ; Fri, 11 Dec 2020 04:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=norrbonn-se.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u+zB4aisBlYMRxDkDUv0BdgHZ/QQl8spoPtF5xMzNTQ=; b=s74/kpkqpRYIOuTw1+yWS+F3OaDRn/04LLTjGHo/46LVCKqL0ek5NET9q96m6gLDM2 6AQqdnjCZETRhtPl+LmQzSvVHqrduERFZoqnznoR8NAafZBq/BurgfWuPMCRV8+9odjO m7QWbVg+2mTTOgTI2uXzSSfztbHQHmZn6TLTfZPOEvXtdBCdCkGvlD6glqKiCb27Qvb9 MzVcdvRfYvjk/JXA2LeU0lCNK47VKmrRg0dY+kEegGMAG/xk5H3HtM1E0uWg4t7OPnMQ bK/rb8H/+wU+fuTANx5bBXzdy3RJfy68oDe+TM1vtHMxKmE9kj0Z19P9yjB4zmUJliFY 9jbg== 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=u+zB4aisBlYMRxDkDUv0BdgHZ/QQl8spoPtF5xMzNTQ=; b=oypdX0YZIxoXv9y28pArEz0kg+t7ljYPzhJ4uQde3bNKY/Ufj15U0Gokn1a5eqlD9r lVRRCs/3uGbj3qdsCOxiO7lW0F6+NQWuefylGdFUgavWlNXh4rvDVYZffeLJLabFMBoZ 8ZFuWuPh6eLXYERdt5SuFD1GTJZDA/ngt0RIJmrqtUglKg959EQuOyWsb1wtTMpQLdsS MwrFzHv5DP/1BWUVmwTbs4/Cq7RhHzypNyNACJ5FUkhafQfuhtLf+cyu/N7DDUAvV2sh N+csLYnmIhSGYNu9gKtRvDL71NKEmZbmY2MgrAaZvEZ4KRdnorqiRfvMHg1aGsXTpjhm OvSg== X-Gm-Message-State: AOAM531yGRmbygq3X8yKNl0OMhqAfTrkprS86tSt9MOQWAFkkjsE3Ylm cJ9gYaB1VI1Wt1IC5MhN4ADbx0XSLSITtg== X-Google-Smtp-Source: ABdhPJwQtpBtzvnpFjXft3O19GhThHsmHVHfbl7zvGmuPSdTWvQtPn6nBOOwY/BqsVuJDl7PN63Hdw== X-Received: by 2002:a19:f101:: with SMTP id p1mr2365670lfh.54.1607689578967; Fri, 11 Dec 2020 04:26:18 -0800 (PST) Received: from mimer.emblasoft.lan (h-137-65.A159.priv.bahnhof.se. [81.170.137.65]) by smtp.gmail.com with ESMTPSA id s8sm335818lfi.21.2020.12.11.04.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 04:26:18 -0800 (PST) From: Jonas Bonn To: netdev@vger.kernel.org Cc: pablo@netfilter.org, laforge@gnumonks.org, Jonas Bonn Subject: [PATCH net-next v2 05/12] gtp: set device type Date: Fri, 11 Dec 2020 13:26:05 +0100 Message-Id: <20201211122612.869225-6-jonas@norrbonn.se> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201211122612.869225-1-jonas@norrbonn.se> References: <20201211122612.869225-1-jonas@norrbonn.se> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Set the devtype to 'gtp' when setting up the link. Signed-off-by: Jonas Bonn Acked-by: Harald Welte --- drivers/net/gtp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 04d9de385549..a1bb02818977 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -610,6 +610,10 @@ static const struct net_device_ops gtp_netdev_ops = { .ndo_get_stats64 = dev_get_tstats64, }; +static const struct device_type gtp_type = { + .name = "gtp", +}; + static void gtp_link_setup(struct net_device *dev) { unsigned int max_gtp_header_len = sizeof(struct iphdr) + @@ -618,6 +622,7 @@ static void gtp_link_setup(struct net_device *dev) dev->netdev_ops = >p_netdev_ops; dev->needs_free_netdev = true; + SET_NETDEV_DEVTYPE(dev, >p_type); dev->hard_header_len = 0; dev->addr_len = 0;