On 11/20/2016 08:08 AM, Timur Tabi wrote: > On Mon, Nov 14, 2016 at 12:35 PM, Florian Fainelli <f.faine...@gmail.com> > wrote: >> if (!(drv->features & (SUPPORTED_Pause | SUPPORTED_AsymPause)) >> phydev->supported |= SUPPORTED_Pause | SUPPORTED_AsymPause; > > How about, if either bit is set in drv->features, then assume the phy > driver really knows what it's doing, and just copy those bits to > phydev->supported?
Yes, that seems completely reasonable to me. Thanks! > > if (drv->features & (SUPPORTED_Pause | SUPPORTED_AsymPause)) { > phydev->supported &= ~(SUPPORTED_Pause | SUPPORTED_AsymPause); > phydev->supported |= drv->features & (SUPPORTED_Pause | > SUPPORTED_AsymPause); > } else > phydev->supported |= SUPPORTED_Pause | SUPPORTED_AsymPause; > -- Florian