]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: mt7921: consider the invalid value for to_rssi
authorSean Wang <sean.wang@mediatek.com>
Mon, 10 May 2021 15:14:55 +0000 (23:14 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sat, 19 Jun 2021 07:22:44 +0000 (09:22 +0200)
commit628c9b7ed8b3e2f7128bc98b966e3b7e2c034934
tree56b2a82c34159f7807aaf7d3d97d05243113318c
parentb9745b33b7eb95c7124c75b7c44deb11f71c8943
mt76: mt7921: consider the invalid value for to_rssi

It is possible the RCPI from the certain antenna is an invalid value,
especially packets are receiving while the system is frequently entering
deep sleep mode, so consider calculating RSSI with the reasonable upper
bound to avoid report the wrong value to the mac80211 layer.

Fixes: 3b5ecf4fed10 ("mt76: mt7921: add MAC support")
Reviewed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/mac.c