Linux wireless drivers development
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	linux-wireless@vger.kernel.org
Subject: [PATCH v3 7/7] mt76x02: enable support for IBSS and MESH
Date: Wed, 30 Jan 2019 17:02:19 +0100	[thread overview]
Message-ID: <1548864139-27729-8-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1548864139-27729-1-git-send-email-sgruszka@redhat.com>

Since we implement beconing on USB now, similar interfaces should be
supported for USB as are for MMIO. Tested only on IBSS mode and
AP mode (not enabled due to lack of PS buffering).

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
v3: enable only IBSS and MESH, do not change iface_combinations

 .../net/wireless/mediatek/mt76/mt76x02_util.c | 21 +++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index 724b13d91898..87ed00768bc7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -140,10 +140,16 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
 	hw->max_rate_tries = 1;
 	hw->extra_tx_headroom = 2;
 
+	wiphy->interface_modes =
+		BIT(NL80211_IFTYPE_STATION) |
+#ifdef CONFIG_MAC80211_MESH
+		BIT(NL80211_IFTYPE_MESH_POINT) |
+#endif
+		BIT(NL80211_IFTYPE_ADHOC);
+
 	if (mt76_is_usb(dev)) {
 		hw->extra_tx_headroom += sizeof(struct mt76x02_txwi) +
 					 MT_DMA_HDR_LEN;
-		wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
 	} else {
 		INIT_DELAYED_WORK(&dev->wdt_work, mt76x02_wdt_work);
 
@@ -152,18 +158,9 @@ 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->interface_modes =
-			BIT(NL80211_IFTYPE_STATION) |
-			BIT(NL80211_IFTYPE_AP) |
-#ifdef CONFIG_MAC80211_MESH
-			BIT(NL80211_IFTYPE_MESH_POINT) |
-#endif
-			BIT(NL80211_IFTYPE_ADHOC);
-
+		wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
 		wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
 
-		wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
-
 		/* init led callbacks */
 		if (IS_ENABLED(CONFIG_MT76_LEDS)) {
 			dev->mt76.led_cdev.brightness_set =
@@ -172,6 +169,8 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
 		}
 	}
 
+	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
+
 	hw->sta_data_size = sizeof(struct mt76x02_sta);
 	hw->vif_data_size = sizeof(struct mt76x02_vif);
 
-- 
2.19.2


  parent reply	other threads:[~2019-01-30 16:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 16:02 [PATCH v3 0/7] mt76x02: Beacon support for USB Stanislaw Gruszka
2019-01-30 16:02 ` [PATCH v3 1/7] mt76x02: use mask for vifs Stanislaw Gruszka
2019-01-30 16:02 ` [PATCH v3 2/7] mt76x02: use commmon add interface for mt76x2u Stanislaw Gruszka
2019-01-30 16:02 ` [PATCH v3 3/7] mt76x02: initialize mutli bss mode when set up address Stanislaw Gruszka
2019-01-30 16:02 ` [PATCH v3 4/7] mt76x02: minor beaconing init changes Stanislaw Gruszka
2019-01-30 16:02 ` [PATCH v3 5/7] mt76x02: init beacon config for mt76x2u Stanislaw Gruszka
2019-01-30 16:02 ` [PATCH v3 6/7] mt76: beaconing fixes for USB Stanislaw Gruszka
2019-01-30 16:02 ` Stanislaw Gruszka [this message]
2019-01-30 17:25 ` [PATCH v3 0/7] mt76x02: Beacon support " Felix Fietkau

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=1548864139-27729-8-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox