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? 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; -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.