Message ID | 20241016035848.292603-1-mohan.prasad@microchip.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Michal Kubecek |
Headers | show |
Series | [ethtool] netlink: settings: Fix for wrong auto-negotiation state | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/netlink/settings.c b/netlink/settings.c index dbfb520..a454bfb 100644 --- a/netlink/settings.c +++ b/netlink/settings.c @@ -546,7 +546,7 @@ int linkmodes_reply_cb(const struct nlmsghdr *nlhdr, void *data) (autoneg == AUTONEG_DISABLE) ? "off" : "on"); else print_bool(PRINT_JSON, "auto-negotiation", NULL, - autoneg == AUTONEG_DISABLE); + (autoneg == AUTONEG_DISABLE) ? false : true); } if (tb[ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG]) { uint8_t val;
Auto-negotiation state in json format showed the opposite state due to wrong comparison. Fix for returning the correct auto-neg state implemented. Signed-off-by: Mohan Prasad J <mohan.prasad@microchip.com> --- netlink/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)