On Mon, Feb 17, 2020 at 01:54:19PM -0800, Florian Fainelli wrote: > > > On 2/17/2020 9:23 AM, Russell King wrote: > > Propagate the resolved link parameters via the mac_link_up() call for > > MACs that do not automatically track their PCS state. > > > > Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> > > --- > > [snip] > > > > -static void macb_mac_link_up(struct phylink_config *config, unsigned int mode, > > - phy_interface_t interface, struct phy_device *phy) > > +static void macb_mac_link_up(struct phylink_config *config, > > + struct phy_device *phy, > > + unsigned int mode, phy_interface_t interface, > > + int speed, int duplex, > > + bool tx_pause, bool rx_pause) > > I have not been able to find an answer so I will ask this question, why > not pass a const struct phylink_link_state reference here instead of > splitting those link settings as individual function parameters? Or > maybe introduce a phylink_link_settings comprised of all of those 4 > settings and embed it within phylink_link_state as well? History of mac_config() has shown that passing something like struct phylink_link_state results in stuff that should not be used being used inspite of documentation saying otherwise. Passing just the appropriate state ensures that stuff which should not be used can't be got at. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up