diff mbox series

[v2,7/7] mt76x02: enable support for IBSS, AP and MESH

Message ID 1548678108-9526-8-git-send-email-sgruszka@redhat.com (mailing list archive)
State Superseded
Delegated to: Kalle Valo
Headers show
Series mt76x02: Beacon support for USB | expand

Commit Message

Stanislaw Gruszka Jan. 28, 2019, 12:21 p.m. UTC
Since we implement beconing on USB now, similar interfaces should be
supported for USB as are for MMIO. Tested only for AP and IBSS modes.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
v2: set VHT_IBSS, vht reates are supported in ibss.

 .../net/wireless/mediatek/mt76/mt76x02_util.c | 23 ++++++++++---------
 1 file changed, 12 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index edc84699d621..7f3747d0791f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -150,19 +150,8 @@  void mt76x02_init_device(struct mt76x02_dev *dev)
 		mt76x02_dfs_init_detector(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->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)) {
@@ -172,6 +161,18 @@  void mt76x02_init_device(struct mt76x02_dev *dev)
 		}
 	}
 
+	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_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);