All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Theil <markus.theil@tu-ilmenau.de>
To: nbd@nbd.name
Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Markus Theil <markus.theil@tu-ilmenau.de>
Subject: [PATCH 1/4] mt76: mt76x02: ommit beacon slot clearing
Date: Sat, 16 Nov 2019 12:17:06 +0100	[thread overview]
Message-ID: <20191116111709.4686-2-markus.theil@tu-ilmenau.de> (raw)
In-Reply-To: <20191116111709.4686-1-markus.theil@tu-ilmenau.de>

mt76 hw does not send beacons from beacon slots, if the corresponding
bitmask is set accordingly. Therefore we can ommit clearing the beacon
memory. Clearing uses many usb calls, if usb drivers are used. These
calls unnecessarily slow down the beacon tasklet. Thanks to Stanislaw
Gruzska for pointing this out.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
index 4209209ac940..54fe449f01c9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
@@ -56,10 +56,6 @@ __mt76x02_mac_set_beacon(struct mt76x02_dev *dev, u8 bcn_idx,
 		ret = mt76x02_write_beacon(dev, beacon_addr, skb);
 		if (!ret)
 			dev->beacon_data_mask |= BIT(bcn_idx);
-	} else {
-		dev->beacon_data_mask &= ~BIT(bcn_idx);
-		for (i = 0; i < beacon_len; i += 4)
-			mt76_wr(dev, beacon_addr + i, 0);
 	}
 
 	mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xff00 | ~dev->beacon_data_mask);
@@ -241,17 +237,11 @@ EXPORT_SYMBOL_GPL(mt76x02_enqueue_buffered_bc);
 
 void mt76x02_init_beacon_config(struct mt76x02_dev *dev)
 {
-	int i;
-
 	mt76_clear(dev, MT_BEACON_TIME_CFG, (MT_BEACON_TIME_CFG_TIMER_EN |
 					     MT_BEACON_TIME_CFG_TBTT_EN |
 					     MT_BEACON_TIME_CFG_BEACON_TX));
 	mt76_set(dev, MT_BEACON_TIME_CFG, MT_BEACON_TIME_CFG_SYNC_MODE);
 	mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xffff);
-
-	for (i = 0; i < 8; i++)
-		mt76x02_mac_set_beacon(dev, i, NULL);
-
 	mt76x02_set_beacon_offsets(dev);
 }
 EXPORT_SYMBOL_GPL(mt76x02_init_beacon_config);
-- 
2.24.0


  reply	other threads:[~2019-11-16 11:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16 11:17 [PATCH 0/4] mt76: channel switch support for USB devices Markus Theil
2019-11-16 11:17 ` Markus Theil [this message]
2019-11-16 11:44   ` [PATCH 1/4] mt76: mt76x02: ommit beacon slot clearing Markus Theil
2019-11-16 11:17 ` [PATCH 2/4] mt76: mt76x02: split beaconing Markus Theil
2019-11-16 12:51   ` Lorenzo Bianconi
2019-11-16 11:17 ` [PATCH 3/4] mt76: speed up usb bulk copy Markus Theil
2019-11-16 11:43   ` Lorenzo Bianconi
2019-11-19 10:58     ` Stanislaw Gruszka
2019-11-16 11:17 ` [PATCH 4/4] mt76: mt76x02: add channel switch support for usb interfaces Markus Theil
2019-11-16 11:45   ` Lorenzo Bianconi
2019-11-16 12:13     ` Markus Theil
2019-11-16 12:43       ` Lorenzo Bianconi
2019-11-17  3:44   ` kbuild test robot
2019-11-17  3:44     ` kbuild test robot
2019-11-17  3:44   ` [RFC PATCH] mt76: mt76x02: mt76x2u_channel_switch_beacon() can be static kbuild test robot
2019-11-17  3:44     ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191116111709.4686-2-markus.theil@tu-ilmenau.de \
    --to=markus.theil@tu-ilmenau.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.