Reinette Chatre 1a34c04380 iwlwifi: fix userspace setting of sleep_level_override
The sleep_level_override debugfs file is used by the user to request a
static power index instead of the dynamic sleep values. Users are expected
to provide value from 1 to 5 as an index or -1 to disable it.

The problem at the moment is that users can also provide 0 to this file
which, together with the value 1, is translated to index 1. This is
confusing and even more so when users write 0 to sleep_level_override and
then read 1 from it afterwards.

Modify checking to treat 0 as invalid.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:47:58 -04:00
..
2009-09-22 07:17:27 -07:00
2009-10-04 15:05:10 -07:00
2009-08-15 12:58:45 +09:00
2009-10-04 15:05:10 -07:00
2009-10-04 15:05:10 -07:00
2009-10-07 01:10:46 -07:00
2009-10-04 15:05:10 -07:00
2009-09-24 07:21:05 -07:00
2009-10-04 15:05:10 -07:00
2009-09-23 07:39:43 -07:00
2009-08-26 20:06:52 -07:00
2009-09-24 21:22:33 +01:00
2009-10-17 23:57:24 -07:00
2009-10-27 16:47:55 -04:00
2009-10-04 15:05:10 -07:00
2009-09-23 22:26:32 +09:30
2009-10-04 22:53:41 +02:00
2009-10-04 15:05:10 -07:00
2009-09-23 10:07:49 -07:00