mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: fix signal strength reporting on single-stream devices
The second chain value is 0 if the second chain is disabled, which would make the reported signal strength 0 as well. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+6
-2
@@ -583,12 +583,16 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
|
||||
|
||||
status->rate_idx = i;
|
||||
|
||||
status->chains = BIT(0) | BIT(1);
|
||||
status->chains = dev->mt76.antenna_mask;
|
||||
status->chain_signal[0] = FIELD_GET(MT_RXV4_IB_RSSI0, rxdg3) +
|
||||
dev->rssi_offset[0];
|
||||
status->chain_signal[1] = FIELD_GET(MT_RXV4_IB_RSSI1, rxdg3) +
|
||||
dev->rssi_offset[1];
|
||||
status->signal = max(status->chain_signal[0], status->chain_signal[1]);
|
||||
|
||||
status->signal = status->chain_signal[0];
|
||||
if (status->chains & BIT(1))
|
||||
status->signal = max(status->signal,
|
||||
status->chain_signal[1]);
|
||||
|
||||
if (FIELD_GET(MT_RXV1_FRAME_MODE, rxdg0) == 1)
|
||||
status->bw = RATE_INFO_BW_40;
|
||||
|
||||
Reference in New Issue
Block a user