linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] mt76: add 3dBm for reporting txpower also for 1x1
@ 2019-03-13 13:34 Stanislaw Gruszka
  2019-03-13 13:38 ` Felix Fietkau
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislaw Gruszka @ 2019-03-13 13:34 UTC (permalink / raw)
  To: linux-wireless; +Cc: Felix Fietkau, Lorenzo Bianconi, Stanislaw Gruszka

It's not clear for my why we should add 3dBm for 2x2 devices
and not for 1x1. 3dBm looks rater like minimal txpower and
hardware transmit at 3dBm + dev->txpower_cur / 2 .

With the change reported txpower value are closer to regulatory
values, but honestly I have no idea what should be reported.

Perhaps also some better comment should be added.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mac80211.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 851caabbecda..b04652729112 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -733,15 +733,9 @@ int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 		     int *dbm)
 {
 	struct mt76_dev *dev = hw->priv;
-	int n_chains = hweight8(dev->antenna_mask);
 
 	*dbm = dev->txpower_cur / 2;
-
-	/* convert from per-chain power to combined
-	 * output on 2x2 devices
-	 */
-	if (n_chains > 1)
-		*dbm += 3;
+	*dbm += 3;
 
 	return 0;
 }
-- 
1.9.3


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

end of thread, other threads:[~2019-03-14 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-13 13:34 [RFC] mt76: add 3dBm for reporting txpower also for 1x1 Stanislaw Gruszka
2019-03-13 13:38 ` Felix Fietkau
2019-03-13 14:11   ` Tom Psyborg
2019-03-13 14:21     ` Felix Fietkau
2019-03-14 13:50   ` Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).