mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-27 04:10:47 +00:00
The original implementation only checked if each field was less than, but didn't check for greater than before proceeding to the next field. This caused incorrect clock selection behavior in the PTP Best Master Clock Algorithm (BMCA). The fix expands each comparison to explicitly check both < and > conditions, returning the appropriate result immediately. This ensures proper precedence evaluation according to IEEE 1588 specification: - gm_priority1 - gm_quality (class, accuracy, variance) - gm_priority2 - gm_identity Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||
| Makefile | ||
| ptpd.c | ||
| ptpv2.h | ||