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 v8 6/6] mt76: mt76x02: add channel switch support for usb interfaces
Date: Thu, 21 Nov 2019 19:00:01 +0100	[thread overview]
Message-ID: <20191121180001.22451-7-markus.theil@tu-ilmenau.de> (raw)
In-Reply-To: <20191121180001.22451-1-markus.theil@tu-ilmenau.de>

This patch enables channel switch support on mt76 usb interfaces.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 7 +++++++
 drivers/net/wireless/mediatek/mt76/mt76x02_util.c     | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 90c024f12302..b9bd6bfb2a9d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -210,6 +210,12 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
 
 	mt76x02_mac_set_beacon_prepare(dev);
 
+	mt76_csa_check(&dev->mt76);
+	if (dev->mt76.csa_complete) {
+		mt76_csa_finish(&dev->mt76);
+		goto out;
+	}
+
 	ieee80211_iterate_active_interfaces(mt76_hw(dev),
 		IEEE80211_IFACE_ITER_RESUME_ALL,
 		mt76x02_update_beacon_iter, dev);
@@ -224,6 +230,7 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
 
 	mt76x02_mac_set_beacon_finish(dev);
 
+out:
 	mt76x02u_restart_pre_tbtt_timer(dev);
 }
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index 1142aa39a226..85df9bfadd4c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -166,7 +166,6 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
 		wiphy->reg_notifier = mt76x02_regd_notifier;
 		wiphy->iface_combinations = mt76x02_if_comb;
 		wiphy->n_iface_combinations = ARRAY_SIZE(mt76x02_if_comb);
-		wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
 
 		/* init led callbacks */
 		if (IS_ENABLED(CONFIG_MT76_LEDS)) {
@@ -176,6 +175,7 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
 		}
 	}
 
+	wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
 	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
 
 	hw->sta_data_size = sizeof(struct mt76x02_sta);
-- 
2.24.0


  parent reply	other threads:[~2019-11-21 18:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 17:59 [PATCH v8 0/6] mt76: channel switch support for USB devices Markus Theil
2019-11-21 17:59 ` [PATCH v8 1/6] mt76: mt76x02: ommit beacon slot clearing Markus Theil
2019-11-21 17:59 ` [PATCH v8 2/6] mt76: mt76x02: split beaconing Markus Theil
2019-11-25 13:00   ` Stanislaw Gruszka
2019-11-25 14:07     ` Markus Theil
2019-11-25 16:59       ` Stanislaw Gruszka
2019-11-25 17:12         ` Felix Fietkau
2019-11-25 17:32           ` Stanislaw Gruszka
2019-11-26 10:44           ` Stanislaw Gruszka
2019-11-21 17:59 ` [PATCH v8 3/6] mt76: mt76x02: add check for invalid vif idx Markus Theil
2019-11-24  3:30   ` kbuild test robot
2019-11-24  3:30     ` kbuild test robot
2019-11-21 17:59 ` [PATCH v8 4/6] mt76: mt76x02: remove a copy call for usb speedup Markus Theil
2019-11-25 12:49   ` Stanislaw Gruszka
2019-11-21 18:00 ` [PATCH v8 5/6] mt76: speed up usb bulk copy Markus Theil
2019-11-21 18:00 ` Markus Theil [this message]
2019-11-25 13:04   ` [PATCH v8 6/6] mt76: mt76x02: add channel switch support for usb interfaces Stanislaw Gruszka
2019-11-25 14:51     ` Markus Theil
2019-11-25 15:32       ` Markus Theil
2019-11-25 17:02         ` Stanislaw Gruszka
2019-11-25 18:30           ` Markus Theil
2019-11-25 18:40             ` Markus Theil

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=20191121180001.22451-7-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.