All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mt76x2: fix avg_rssi estimation
       [not found] <cover.1525254116.git.lorenzo.bianconi@redhat.com>
@ 2018-05-02  9:46 ` Lorenzo Bianconi
  2018-05-03 11:38   ` Felix Fietkau
  2018-05-04 12:42   ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2018-05-02  9:46 UTC (permalink / raw)
  To: nbd; +Cc: linux-wireless

Add leftover filter coefficients in IIR rssi estimation

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c
index 038d1fe6c726..c1c38ca3330a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c
@@ -508,8 +508,10 @@ mt76x2_phy_update_channel_gain(struct mt76x2_dev *dev)
 	u8 gain_delta;
 	int low_gain;
 
-	dev->cal.avg_rssi[0] = (dev->cal.avg_rssi[0] * 15) / 16 + (rssi0 << 8);
-	dev->cal.avg_rssi[1] = (dev->cal.avg_rssi[1] * 15) / 16 + (rssi1 << 8);
+	dev->cal.avg_rssi[0] = (dev->cal.avg_rssi[0] * 15) / 16 +
+			       (rssi0 << 8) / 16;
+	dev->cal.avg_rssi[1] = (dev->cal.avg_rssi[1] * 15) / 16 +
+			       (rssi1 << 8) / 16;
 	dev->cal.avg_rssi_all = (dev->cal.avg_rssi[0] +
 				 dev->cal.avg_rssi[1]) / 512;
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mt76x2: fix avg_rssi estimation
  2018-05-02  9:46 ` [PATCH] mt76x2: fix avg_rssi estimation Lorenzo Bianconi
@ 2018-05-03 11:38   ` Felix Fietkau
  2018-05-04 12:42   ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2018-05-03 11:38 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: linux-wireless

On 2018-05-02 11:46, Lorenzo Bianconi wrote:
> Add leftover filter coefficients in IIR rssi estimation
> 
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: Felix Fietkau <nbd@nbd.name>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mt76x2: fix avg_rssi estimation
  2018-05-02  9:46 ` [PATCH] mt76x2: fix avg_rssi estimation Lorenzo Bianconi
  2018-05-03 11:38   ` Felix Fietkau
@ 2018-05-04 12:42   ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-05-04 12:42 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, linux-wireless

Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:

> Add leftover filter coefficients in IIR rssi estimation
> 
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> Acked-by: Felix Fietkau <nbd@nbd.name>

Patch applied to wireless-drivers-next.git, thanks.

c990affd5abc mt76x2: fix avg_rssi estimation

-- 
https://patchwork.kernel.org/patch/10375267/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-04 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1525254116.git.lorenzo.bianconi@redhat.com>
2018-05-02  9:46 ` [PATCH] mt76x2: fix avg_rssi estimation Lorenzo Bianconi
2018-05-03 11:38   ` Felix Fietkau
2018-05-04 12:42   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.