Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp445812pxb; Wed, 18 Nov 2020 08:27:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhRl4jy5CuZg3qE9E7EC5gRNxEl7eHo6abc/eKdpaDeRsM4fiMhRGmQTdXqjIXE+Zdfckw X-Received: by 2002:a05:6402:1ca6:: with SMTP id cz6mr25870188edb.129.1605716840021; Wed, 18 Nov 2020 08:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605716840; cv=none; d=google.com; s=arc-20160816; b=O8JliuDaFVriDP57E8bBDYPTB2ZRusScUruEQmQ5TP7Xrr/7f8rlLUzimkWTUXPgYn SbzrMGRvT2hfDcjZ5YNgDU7oKvZJ7ivoHGh+Dv9SA4E9UobBhF8SaXHG3nyWBl8Sexmv 903gh5sFXahiuCiYxri9m74qEutwtcpAI2GQlBN1aAme9C5dFW9qBIzuHI2s3RS9t7ib erOs+T9ZxI7vKUVMih6iicz7lZmnb+RAYs+HegXwNV6haIOJXR/CRvya0pBwcozYT9ED VDRicEK8O+LLszWUOePWtBkmx4ZDkPomuU8rfyn5augFcHGUWaRmDh5fkfCLJQapaoe3 Sh2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ekvqy56ckgkxkmcD/kBF83vV+LGLeR2jZE41352dUaY=; b=05Wirt9mMOpceZ0Nglz/6NI0otFQXSKw64iQHqKlLd6BJMIhQ+UmbKqmJFQqdJ5kTb HjZngP9z96sS7h5UmKVTT+6NQgVCNvjJnsmXUi0eSdirVt5glzllWOgXJAhcev10U4gO t2fMjDUNNToDo9ihAyRqj/JVd/kANt8AyDO+6GALtD2TSXStWTZu83qCadyqYufdKvuI GuLmq/OJ5dNNNdH9UKNflMSioUlp6Ek239tnqxpPESf+kgiRenSOoRtiR4K3ogV1Zie8 md0hUVOGQEOVEqboVjvuca6xHszH+r50hM5/GfB9cHNCL9Wtn18g3OW5OSsWqxbfZ5AM 523A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a12si16085179edy.403.2020.11.18.08.26.57; Wed, 18 Nov 2020 08:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727758AbgKRQXp (ORCPT + 99 others); Wed, 18 Nov 2020 11:23:45 -0500 Received: from mailout01.rmx.de ([94.199.90.91]:45024 "EHLO mailout01.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727442AbgKRQXo (ORCPT ); Wed, 18 Nov 2020 11:23:44 -0500 Received: from kdin02.retarus.com (kdin02.dmz1.retloc [172.19.17.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout01.rmx.de (Postfix) with ESMTPS id 4Cbp5m5Cm6z2SVYc; Wed, 18 Nov 2020 17:23:40 +0100 (CET) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin02.retarus.com (Postfix) with ESMTPS id 4Cbp4s6v5lz2TSCp; Wed, 18 Nov 2020 17:22:53 +0100 (CET) Received: from N95HX1G2.wgnetz.xx (192.168.54.25) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 18 Nov 2020 17:22:49 +0100 From: Christian Eggers To: Richard Cochran , Andrew Lunn , Heiner Kallweit , Jakub Kicinski CC: Vladimir Oltean , Russell King , "David S . Miller" , , , Christian Eggers , "Kurt Kanzenbach" Subject: [PATCH net-next v2 1/3] net: ptp: introduce common defines for PTP message types Date: Wed, 18 Nov 2020 17:22:01 +0100 Message-ID: <20201118162203.24293-2-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201118162203.24293-1-ceggers@arri.de> References: <20201118162203.24293-1-ceggers@arri.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.54.25] X-RMX-ID: 20201118-172259-4Cbp4s6v5lz2TSCp-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using PTP wide defines will obsolete different driver internal defines and uses of magic numbers. Signed-off-by: Christian Eggers Cc: Kurt Kanzenbach --- include/linux/ptp_classify.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h index 56b2d7d66177..cc0da0b134a4 100644 --- a/include/linux/ptp_classify.h +++ b/include/linux/ptp_classify.h @@ -31,6 +31,11 @@ #define PTP_CLASS_V2_VLAN (PTP_CLASS_V2 | PTP_CLASS_VLAN) #define PTP_CLASS_L4 (PTP_CLASS_IPV4 | PTP_CLASS_IPV6) +#define PTP_MSGTYPE_SYNC 0x0 +#define PTP_MSGTYPE_DELAY_REQ 0x1 +#define PTP_MSGTYPE_PDELAY_REQ 0x2 +#define PTP_MSGTYPE_PDELAY_RESP 0x3 + #define PTP_EV_PORT 319 #define PTP_GEN_BIT 0x08 /* indicates general message, if set in message type */ @@ -138,7 +143,7 @@ static inline u8 ptp_get_msgtype(const struct ptp_header *hdr, /* The return is meaningless. The stub function would not be * executed since no available header from ptp_parse_header. */ - return 0; + return PTP_MSGTYPE_SYNC; } #endif #endif /* _PTP_CLASSIFY_H_ */ -- Christian Eggers Embedded software developer Arnold & Richter Cine Technik GmbH & Co. Betriebs KG Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918 Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477 Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler