OpenCloudOS-Kernel/drivers/net/wireless/iwlwifi/dvm
Johannes Berg debff6184c iwlwifi: mvm: implement D3 testing
For testing the D3 (WoWLAN) firmware, it is useful to be able
to run the firmware with instrumentation while the host isn't
sleeping and can poke at the firmware debug logging etc.

Implement this by a debugfs file. When the file is opened the
D3 firmware is loaded and all regular commands are blocked.
While the file is being read, poll the firmware's PME status
flag and report EOF once it changes to non-zero. When it is
closed, do (most of) the resume processing. This lets a user
just "cat" the file. Pressing Ctrl-C to kill the cat process
will resume the firwmare as though the platform resumed for
non-wireless reason and when the firmware wants to wake up
reading from the file automatically completes.

Unlike in real suspend, only disable interrupts and don't
reset the TX/RX hardware while in the test mode. This is a
workaround for some interrupt problems that happen only when
the PCIe link isn't fully reset (presumably by changing the
PCI config space registers which the core PCI code does.)

Note that while regular operations are blocked from sending
commands to the firmware, they could still be made and cause
strange mac80211 issues. Therefore, while using this testing
feature you need to be careful to not try to disconnect, roam
or similar, and will see warnings for such attempts.

Als note that this requires an upcoming firmware change to
tell the driver the location of the PME status flag in SRAM.
D3 test will fail if the firmware doesn't report the pointer.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-05-29 21:56:57 +02:00
..
Makefile iwlwifi: refactor EEPROM reading/parsing 2012-06-06 13:24:19 +02:00
agn.h iwlwifi: dvm: constify configuration structs 2013-05-27 13:12:51 +02:00
calib.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
calib.h iwlwifi: a few fixes in license 2013-03-06 16:46:59 +01:00
commands.h Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-05-29 14:51:50 -04:00
debugfs.c iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read 2013-04-18 13:34:30 +02:00
dev.h iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
devices.c iwlwifi: dvm: constify configuration structs 2013-05-27 13:12:51 +02:00
led.c iwlwifi: update copyright 2013-01-24 13:00:55 +01:00
led.h iwlwifi: update copyright 2013-01-24 13:00:55 +01:00
lib.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
mac80211.c iwlwifi: mvm: implement D3 testing 2013-05-29 21:56:57 +02:00
main.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
power.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
power.h iwlwifi: update copyright 2013-01-24 13:00:55 +01:00
rs.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
rs.h iwlwifi: update copyright 2013-01-24 13:00:55 +01:00
rx.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
rxon.c Merge remote-tracking branch 'wireless-next/master' into mac80211-next 2013-04-22 15:31:43 +02:00
scan.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
sta.c iwlwifi: dvm: fix zero LQ CMD sending avoidance 2013-05-27 11:33:57 +02:00
testmode.c iwlwifi: a few fixes in license 2013-03-06 16:46:59 +01:00
tt.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
tt.h iwlwifi: update copyright 2013-01-24 13:00:55 +01:00
tx.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00
ucode.c iwlwifi: move some configuration parameters into DVM 2013-05-27 13:11:42 +02:00