Add a boolean to phylink_config to indicate whether a driver has not been updated for the changes in commit 7cceb599d15d ("net: phylink: avoid mac_config calls"), and thus are reliant on the old behaviour. We were currently keying the phylink behaviour on the presence of a PCS, but this is sub-optimal for modern drivers that may not have a PCS. This commit merely introduces the new flag, but does not add any use, since we need all legacy drivers to set this flag before it can be used. Once these legacy drivers have been updated, we can remove this flag.
Unified · Split
| @@ -84,6 +84,8 @@ enum phylink_op_type { · 83 unmodified lines | |||
| 84 | * struct phylink_config - PHYLINK configuration structure | 84 | * struct phylink_config - PHYLINK configuration structure |
| 85 | * @dev: a pointer to a struct device associated with the MAC | 85 | * @dev: a pointer to a struct device associated with the MAC |
| 86 | * @type: operation type of PHYLINK instance | 86 | * @type: operation type of PHYLINK instance |
| 87 | * @legacy_pre_march2020: driver has not been updated for March 2020 updates | ||
| 88 | * (See commit 7cceb599d15d ("net: phylink: avoid mac_config calls") | ||
| 87 | * @pcs_poll: MAC PCS cannot provide link change interrupt | 89 | * @pcs_poll: MAC PCS cannot provide link change interrupt |
| 88 | * @poll_fixed_state: if true, starts link_poll, | 90 | * @poll_fixed_state: if true, starts link_poll, |
| 89 | * if MAC link is at %MLO_AN_FIXED mode. | 91 | * if MAC link is at %MLO_AN_FIXED mode. |
| @@ -97,6 +99,7 @@ enum phylink_op_type { · 7 unmodified lines | |||
| 97 | struct phylink_config { | 99 | struct phylink_config { |
| 98 | struct device *dev; | 100 | struct device *dev; |
| 99 | enum phylink_op_type type; | 101 | enum phylink_op_type type; |
| 102 | bool legacy_pre_march2020; | ||
| 100 | bool pcs_poll; | 103 | bool pcs_poll; |
| 101 | bool poll_fixed_state; | 104 | bool poll_fixed_state; |
| 102 | bool ovr_an_inband; | 105 | bool ovr_an_inband; |