{
state->link = !!(bmsr & BMSR_LSTATUS);
state->an_complete = !!(bmsr & BMSR_ANEGCOMPLETE);
- /* If there is no link or autonegotiation is disabled, the LP advertisement
- * data is not meaningful, so don't go any further.
+
+ /* If the link is down, the advertisement data is undefined. */
+ if (!state->link)
+ return;
+
+ /* If in-band is disabled, then the advertisement data is not
+ * meaningful.
*/
- if (!state->link || !linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
- state->advertising))
+ if (neg_mode != PHYLINK_PCS_NEG_INBAND_ENABLED)
return;
switch (state->interface) {