Commit 2bd7f3d2 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Felix Fietkau

mt76x02: enable support for IBSS and MESH

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: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent dbb2b22b
...@@ -140,10 +140,16 @@ void mt76x02_init_device(struct mt76x02_dev *dev) ...@@ -140,10 +140,16 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
hw->max_rate_tries = 1; hw->max_rate_tries = 1;
hw->extra_tx_headroom = 2; 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)) { if (mt76_is_usb(dev)) {
hw->extra_tx_headroom += sizeof(struct mt76x02_txwi) + hw->extra_tx_headroom += sizeof(struct mt76x02_txwi) +
MT_DMA_HDR_LEN; MT_DMA_HDR_LEN;
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
} else { } else {
INIT_DELAYED_WORK(&dev->wdt_work, mt76x02_wdt_work); INIT_DELAYED_WORK(&dev->wdt_work, mt76x02_wdt_work);
...@@ -152,18 +158,9 @@ void mt76x02_init_device(struct mt76x02_dev *dev) ...@@ -152,18 +158,9 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
wiphy->reg_notifier = mt76x02_regd_notifier; wiphy->reg_notifier = mt76x02_regd_notifier;
wiphy->iface_combinations = mt76x02_if_comb; wiphy->iface_combinations = mt76x02_if_comb;
wiphy->n_iface_combinations = ARRAY_SIZE(mt76x02_if_comb); wiphy->n_iface_combinations = ARRAY_SIZE(mt76x02_if_comb);
wiphy->interface_modes = wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
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->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
/* init led callbacks */ /* init led callbacks */
if (IS_ENABLED(CONFIG_MT76_LEDS)) { if (IS_ENABLED(CONFIG_MT76_LEDS)) {
dev->mt76.led_cdev.brightness_set = dev->mt76.led_cdev.brightness_set =
...@@ -172,6 +169,8 @@ void mt76x02_init_device(struct mt76x02_dev *dev) ...@@ -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->sta_data_size = sizeof(struct mt76x02_sta);
hw->vif_data_size = sizeof(struct mt76x02_vif); hw->vif_data_size = sizeof(struct mt76x02_vif);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment