Messages in this thread | | | Date | Tue, 12 Mar 2024 22:40:39 +0100 | From | Andrew Lunn <> | Subject | Re: [PATCH net 3/3] net: lan743x: Address problems with wake option flags configuration sequences |
| |
> I understand that the TI devices give the *impression* of supporting > both, but based on what I explained above, even if you accept > WAKE_MAGIC and WAKE_MAGICSEGURE on a set and report them both back > as enabled on a get; whatever behavior your hardware does will not > be fully compliant to both specs simultaneously anyway. I discussed > this with Raju and what we decided to do for our driver/device is > that if you pass both WAKE_MAGIC and WAKE_MAGICSEGURE flags to us we > will report them back as both being enabled in a subsequent get as > you suggested, but the behavior of our driver/hardware will be as if > you had only enabled WAKE_MAGIC.
So i agree having WAKE_MAGIC and WAKE_MAGICSECURE at the same time seems very odd. So i see no real problem limiting the driver to only one or the other. However, if the user does ask for both, i would say silently ignoring one is incorrect. You should return -EOPNOTUPP to make it clear you don't support both at the same time.
I would also say that silently ignore the Secure version is probably the worst choice. Things should be secure by default...
Andrew
| |