]> git.baikalelectronics.ru Git - kernel.git/commit
Bonding: return HWTSTAMP_FLAG_BONDED_PHC_INDEX to notify user space
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 29 Dec 2021 08:09:38 +0000 (16:09 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Dec 2021 20:31:37 +0000 (12:31 -0800)
commit68fdb07136b13c59dedc69c7ef8fb8a1f3786ff0
tree595ea610c3512b1c17863a046bb91ab149e268fa
parentfd7c9e9f9cb163e3dd27afd4817ed80212025a40
Bonding: return HWTSTAMP_FLAG_BONDED_PHC_INDEX to notify user space

If the userspace program is distributed in binary form (distro package),
there is no way to know on which kernel versions it will run.

Let's only check if the flag was set when do SIOCSHWTSTAMP. And return
hwtstamp_config with flag HWTSTAMP_FLAG_BONDED_PHC_INDEX to notify
userspace whether the new feature is supported or not.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Fixes: ae2567e0ea4e ("Bonding: force user to add HWTSTAMP_FLAG_BONDED_PHC_INDEX when get/set HWTSTAMP")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/bonding/bond_main.c