mt76: mt7615: fix possible division by 0 in mt7615_mac_update_mib_stats
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 6 Apr 2020 21:56:30 +0000 (23:56 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 12 May 2020 17:52:30 +0000 (19:52 +0200)
commit1855ad5360a18131e5c4b4afa1a1c5dea6e456c6
treeae973dad613ce743deb41b0712a026626fcf7eb4
parent9a865741d84ec08dfd04fc28a5fca210f919f54d
mt76: mt7615: fix possible division by 0 in mt7615_mac_update_mib_stats

Check that val is not zero before aggr_per estimation in order to avoid a
possible division by 0

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mac.c