net_tstamp: define new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 29 Dec 2021 08:09:37 +0000 (16:09 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Dec 2021 20:31:36 +0000 (12:31 -0800)
As we defined the new hwtstamp_config flag HWTSTAMP_FLAG_BONDED_PHC_INDEX
as enum, it's not easy for userspace program to check if the flag is
supported when build.

Let's define the new flag so user space could build it on old kernel with
ifdef check.

Fixes: 9c9211a3fc7a ("net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/net_tstamp.h

index e258e52cfd1fcbf8c9139916e45a52d172792472..55501e5e7ac84fe8e47072f7ccb7bc3a532237b1 100644 (file)
@@ -87,6 +87,7 @@ enum hwtstamp_flags {
         * will be the PHC index.
         */
        HWTSTAMP_FLAG_BONDED_PHC_INDEX = (1<<0),
+#define HWTSTAMP_FLAG_BONDED_PHC_INDEX HWTSTAMP_FLAG_BONDED_PHC_INDEX
 
        HWTSTAMP_FLAG_LAST = HWTSTAMP_FLAG_BONDED_PHC_INDEX,
        HWTSTAMP_FLAG_MASK = (HWTSTAMP_FLAG_LAST - 1) | HWTSTAMP_FLAG_LAST