iwlwifi: avoid too frequent recover from statistics
commit410f2bb30d27252cc55a5f41668de60de62e5dc8
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 4 Mar 2011 16:51:51 +0000 (4 17:51 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Mar 2011 19:06:50 +0000 (4 14:06 -0500)
treedb98f25482b239015fd7ec5027c971fca60ecce3
parent6198c387b25b528fd89a48bf67f0402d828ffa18
iwlwifi: avoid too frequent recover from statistics

Usually H/W generate statistics notify once per about 100ms, but
sometimes we can receive notify in shorter time, even 2 ms.

This can be problem for plcp health and ack health checking.

I.e. with 2 plcp errors happens randomly in 2 ms duration, we
exceed plcp delta threshold equal to 100 (2*100/2).

Also checking ack's in short time, can results not necessary false
positive and firmware reset, for example when channel is noised and
we do not receive ACKs frames or when remote device does not send
ACKs at the moment.

Patch change code to do statistic check and possible recovery only
if 99ms elapsed from last check. Forced delay should assure we have
good statistic data to estimate hardware state.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-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-dev.h
drivers/net/wireless/iwlwifi/iwl-rx.c