]> git.karo-electronics.de Git - mv-sheeva.git/commit
iwlwifi: fix uCode event tracing
authorJohannes Berg <johannes.berg@intel.com>
Sat, 28 Jan 2012 16:30:50 +0000 (08:30 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 30 Jan 2012 20:48:32 +0000 (15:48 -0500)
commit2b2db58d65edcab4bcc9d6fdd2770bb0275cdac4
treeb03c0364b615db37901e19d3484d738f2d5f4f0b
parent0a79bb57d46c7ee93de0e262cebb46f6f6f6a1a7
iwlwifi: fix uCode event tracing

Fix multiple bugs in event tracing:

1) If you enable uCode tracing with the device down,
   it will still attempt to access the device and
   continuously log "MAC is in deep sleep!" errors.
   Fix this by only starting logging when the device
   is actually alive.

2) Now you can set the flag when the device is down,
   but logging doesn't happen when you bring it up.
   To fix that, start logging when the device comes
   alive. This means we don't log before -- we could
   do that but I don't need it right now.

3) For some reason we read the error instead of the
   event log -- use the right pointer.

4) Optimise SRAM reading of event log header.

5) Fix reading write pointer == capacity, which can
   happen due to racy SRAM access

6) Most importantly: fix an error where we would try
   to read WAY too many events (like 2^32-300) when
   we read the wrap counter before it is updated by
   the uCode -- this does happen in practice and will
   cause the driver to hang the machine.

7) Finally, change the timer to 10ms instead of 100ms
   as 100ms is too slow to capture all data with a
   normal event log and with 100ms the log will wrap
   multiple times before we have a chance to read it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-debugfs.c
drivers/net/wireless/iwlwifi/iwl-dev.h