ath9k_hw: fix division by zero in the ANI monitor code
authorFelix Fietkau <nbd@openwrt.org>
Tue, 12 Oct 2010 14:08:01 +0000 (16:08 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Oct 2010 19:48:44 +0000 (15:48 -0400)
commite49f913750bb8745085cc4c547912c330cd3eacb
tree989230a1b47ada33ad2c0e8407456e2ec354f667
parent898c914a0871ea7e5557b77156d4358c0f15d98a
ath9k_hw: fix division by zero in the ANI monitor code

The commit "ath9k_hw: remove code duplication in phy error counter handling"
split off some duplicate code into a separate function, but did not have a
return code for aborting ANI processing based on counter values.
This introduced a divide by zero issue.
This patch adds the missing return code check in ath9k_hw_ani_monitor

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ani.c