--- zzzz-none-000/linux-4.19.183/drivers/net/bonding/bond_3ad.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/drivers/net/bonding/bond_3ad.c 2023-06-28 08:54:19.000000000 +0000 @@ -397,6 +397,18 @@ port->actor_system_priority = BOND_AD_INFO(bond).system.sys_priority; } +#if defined(CONFIG_BCM_KF_KBONDING) && defined(CONFIG_BCM_KERNEL_BONDING) +static inline u32 __get_agg_async_linkspeed(struct port *port) +{ + struct bonding *bond = __get_bond_by_port(port); + + if (bond == NULL) + return BOND_ASYNC_LINKSPEED_OFF; + + return bond->params.async_linkspeed; +} +#endif /* defined(CONFIG_BCM_KF_KBONDING) && defined(CONFIG_BCM_KERNEL_BONDING) */ + /* Conversions */ /** @@ -2433,7 +2445,12 @@ speed = __get_link_speed(port); ospeed = (old_oper_key & AD_SPEED_KEY_MASKS) >> 1; duplex = __get_duplex(port); - port->actor_admin_port_key |= (speed << 1) | duplex; +#if defined(CONFIG_BCM_KF_KBONDING) && defined(CONFIG_BCM_KERNEL_BONDING) + if (__get_agg_async_linkspeed(port)) + port->actor_admin_port_key |= __get_duplex(port); + else +#endif /* defined(CONFIG_BCM_KF_KBONDING) && defined(CONFIG_BCM_KERNEL_BONDING) */ + port->actor_admin_port_key |= (speed << 1) | duplex; } port->actor_oper_port_key = port->actor_admin_port_key;