mt76: fix per-chain signal strength reporting
Subsystems (2)
Felix Fietkau
maintainerPATCH 1/2 mt76: fix per-chain signal strength reporting
Fix an off-by-one error that resulted in not reporting the signal strength for the first chain
--- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +1 -1
@@ -648,7 +648,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, status->chains =BIT (0 ); signal =mt76x02_mac_get_rssi (dev, rxwi->rssi[0 ],0 ); -for (i =1 ; i < nstreams; i++) { +for (i =0 ; i < nstreams; i++) { status->chains |=BIT (i); status->chain_signal[i] = mt76x02_mac_get_rssi(dev, rxwi->rssi[i],
Signature · 1 line
2.17.0
Felix Fietkau
maintainerPATCH 2/2 mt76: avoid scheduling tx queues for powersave stations
In case a tx queue wake call arrives after a client has transitioned to powersave, make sure that the queue is not kept active until the client has left powersave mode
--- drivers/net/wireless/mediatek/mt76/tx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/wireless/mediatek/mt76/tx.c +5 -0
@@ -396,6 +396,11 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,bool probe;int idx; +if (test_bit (MT_WCID_FLAG_PS , &wcid->flags)) { + *empty = true; +return 0 ; + } + skb =mt76_txq_dequeue (dev, mtxq, false);if (!skb) { *empty = true;
Signature · 1 line
2.17.0
Quoted 4 lines · Felix Fietkau
Fix an off-by-one error that resulted in not reporting the signal strength for the first chain
Signed-off-by Felix Fietkau <[email protected]>
Not sure how serious this bug is, but I think patch should be marked:
Thanks
Stanislaw
Quoted 20 lines
--- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +1
-1@@ -648,7 +648,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, status->chains =BIT (0 ); signal =mt76x02_mac_get_rssi (dev, rxwi->rssi[0 ],0 ); -for (i =1 ; i < nstreams; i++) { +for (i =0 ; i < nstreams; i++) { status->chains |=BIT (i); status->chain_signal[i] = mt76x02_mac_get_rssi(dev, rxwi->rssi[i],Signature · 1 line
2.17.0
Quoted 14 lines
Fix an off-by-one error that resulted in not reporting the signal strength for the first chain
Signed-off-by Felix Fietkau <[email protected]>--- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +0
-0
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, · line 650
Quoted 3 lines
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +0
-0@@ -648,7 +648,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, status->chains =BIT (0 ); signal =mt76x02_mac_get_rssi (dev, rxwi->rssi[0 ],0 );
Here I guess we can do:
signal = status->chain_signal[0] = mt76x02_mac_get_rssi(dev, rxwi->rssi[0], 0);
and avoid duplicated operations.
Regards,
Lorenzo
Quoted 8 lines
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +1
-2-for (i =1 ; i < nstreams; i++) { +for (i =0 ; i < nstreams; i++) { status->chains |=BIT (i); status->chain_signal[i] = mt76x02_mac_get_rssi(dev, rxwi->rssi[i], --2.17.0
Signature · 3 lines
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep