On Wed, Oct 28, 2020 at 2:56 PM Tsuchiya Yuto <[email protected]> wrote:
>
> To make the ps_mode (power_save) control easier, this commit adds a new
> module parameter allow_ps_mode and set it false (disallowed) by default.
This sounds like a bad idea, as it breaks all the existing users who
expect this feature to be allowed. Seems like you should flip the
defaults. Without some better justification, NACK.
Also, I can't find the other 2 patches in this alleged series. Maybe
they're still making it through the mailing lists and archives.
Brian
> When this parameter is set to false, changing the power_save mode will
> be disallowed like the following:
>
> $ sudo iw dev mlan0 set power_save on
> command failed: Operation not permitted (-1)
>
> Signed-off-by: Tsuchiya Yuto <[email protected]>
On Wed, Oct 28, 2020 at 9:13 PM Brian Norris <[email protected]> wrote:
>
> On Wed, Oct 28, 2020 at 2:56 PM Tsuchiya Yuto <[email protected]> wrote:
> >
> > To make the ps_mode (power_save) control easier, this commit adds a new
> > module parameter allow_ps_mode and set it false (disallowed) by default.
This sounds like some form of access control, not something that makes
power control "easier"? What exactly is the use case.
Also, module params in networking devices are discouraged.
On Thu, 2020-10-29 at 13:04 -0400, Willem de Bruijn wrote:
> On Wed, Oct 28, 2020 at 9:13 PM Brian Norris <[email protected]> wrote:
> >
> > On Wed, Oct 28, 2020 at 2:56 PM Tsuchiya Yuto <[email protected]> wrote:
> > >
> > > To make the ps_mode (power_save) control easier, this commit adds a new
> > > module parameter allow_ps_mode and set it false (disallowed) by default.
>
> This sounds like some form of access control, not something that makes
> power control "easier"? What exactly is the use case.
Thanks for the review!
As I replied to Brian, userspace tools sometimes try to enable power_save
anyway regardless of default driver settings (expecting it's not broken,
but in fact it's broken), the module parameter like this is required.
So, the commit message is misleading. What will be "easier" is letting
userspace tools know power_save should be off, not the procedure of
toggling ps_mode state in the driver.
> Also, module params in networking devices are discouraged.
Even though it should be avoided, some upstream drivers provide a module
parameter like this to let users enable it if needed (since they disable
power_save by default because of stability on some devices) likw this
commit 0172b0292649 ("iwlagn: add power_save module parameter").