cc_rxpoll.cycles can be zero under certain circumstances.
Skip this round of rx hang detection when this happens.
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:32956
TEST=Reboot system. Still waiting to see this message.
Change-Id: Id0a6d4b01137af4c36a27424615c30c52ed05fd8
Reviewed-on: https://gerrit.chromium.org/gerrit/28642
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
spin_lock_irqsave(&common->cc_lock, flags);
ath_hw_cycle_counters_update(common);
+ if (common->cc_rxpoll.cycles == 0) {
+ spin_unlock_irqrestore(&common->cc_lock, flags);
+ ath_info(common, "rxpoll cycles is zero. Skipping.");
+ ath9k_ps_restore(sc);
+ ath_start_rx_poll(sc, nmsec);
+ return;
+ }
+
rx_clear = common->cc_rxpoll.rx_busy * 100 / common->cc_rxpoll.cycles;
rx = common->cc_rxpoll.rx_frame * 100 / common->cc_rxpoll.cycles;
tx = common->cc_rxpoll.tx_frame * 100 / common->cc_rxpoll.cycles;