All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mt76x2: apply coverage class on slot time too
@ 2018-05-15 10:08 Lorenzo Bianconi
  2018-05-15 11:20 ` Felix Fietkau
  2018-05-23  7:56 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2018-05-15 10:08 UTC (permalink / raw)
  To: nbd; +Cc: linux-wireless, luca.bisti, gaetano.catalli

According to 802.11-2007 17.3.8.6 (slot time), the slot time should
be increased by 3 us * coverage class. Taking into account coverage
class in slot time configuration allows to increase by an order of
magnitude the throughput on a 4Km link in a noisy environment

Tested-by: Luca Bisti <luca.bisti@gmail.com>
Tested-by: Gaetano Catalli <gaetano.catalli@gmail.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 3 +++
 drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
index d21e4a7c1bb9..9eeb1d7631c2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
@@ -482,7 +482,10 @@ void mt76x2_set_tx_ackto(struct mt76x2_dev *dev)
 {
 	u8 ackto, sifs, slottime = dev->slottime;
 
+	/* As defined by IEEE 802.11-2007 17.3.8.6 */
 	slottime += 3 * dev->coverage_class;
+	mt76_rmw_field(dev, MT_BKOFF_SLOT_CFG,
+		       MT_BKOFF_SLOT_CFG_SLOTTIME, slottime);
 
 	sifs = mt76_get_field(dev, MT_XIFS_TIME_CFG,
 			      MT_XIFS_TIME_CFG_OFDM_SIFS);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
index 81c58f865c64..539dda8a59e2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
@@ -247,8 +247,7 @@ mt76x2_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 		int slottime = info->use_short_slot ? 9 : 20;
 
 		dev->slottime = slottime;
-		mt76_rmw_field(dev, MT_BKOFF_SLOT_CFG,
-			       MT_BKOFF_SLOT_CFG_SLOTTIME, slottime);
+		mt76x2_set_tx_ackto(dev);
 	}
 
 	mutex_unlock(&dev->mutex);
-- 
2.16.3

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

* Re: [PATCH] mt76x2: apply coverage class on slot time too
  2018-05-15 10:08 [PATCH] mt76x2: apply coverage class on slot time too Lorenzo Bianconi
@ 2018-05-15 11:20 ` Felix Fietkau
  2018-05-23  7:56 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2018-05-15 11:20 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: linux-wireless, luca.bisti, gaetano.catalli

On 2018-05-15 12:08, Lorenzo Bianconi wrote:
> According to 802.11-2007 17.3.8.6 (slot time), the slot time should
> be increased by 3 us * coverage class. Taking into account coverage
> class in slot time configuration allows to increase by an order of
> magnitude the throughput on a 4Km link in a noisy environment
> 
> Tested-by: Luca Bisti <luca.bisti@gmail.com>
> Tested-by: Gaetano Catalli <gaetano.catalli@gmail.com>
> 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: apply coverage class on slot time too
  2018-05-15 10:08 [PATCH] mt76x2: apply coverage class on slot time too Lorenzo Bianconi
  2018-05-15 11:20 ` Felix Fietkau
@ 2018-05-23  7:56 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-05-23  7:56 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, linux-wireless, luca.bisti, gaetano.catalli

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

> According to 802.11-2007 17.3.8.6 (slot time), the slot time should
> be increased by 3 us * coverage class. Taking into account coverage
> class in slot time configuration allows to increase by an order of
> magnitude the throughput on a 4Km link in a noisy environment
> 
> Tested-by: Luca Bisti <luca.bisti@gmail.com>
> Tested-by: Gaetano Catalli <gaetano.catalli@gmail.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> Acked-by: Felix Fietkau <nbd@nbd.name>

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

0d45d3fe42ef mt76x2: apply coverage class on slot time too

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

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-23  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-15 10:08 [PATCH] mt76x2: apply coverage class on slot time too Lorenzo Bianconi
2018-05-15 11:20 ` Felix Fietkau
2018-05-23  7:56 ` 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.