@@ -116,8 +116,8 @@ void mt76x02_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
void mt76x02_config_mac_addr_list(struct mt76x02_dev *dev);
-void mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
- unsigned int idx);
+int mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
+ unsigned int idx);
int mt76x02_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif);
void mt76x02_remove_interface(struct ieee80211_hw *hw,
@@ -207,8 +207,8 @@ void mt76x02_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
}
EXPORT_SYMBOL_GPL(mt76x02_sta_remove);
-void mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
- unsigned int idx)
+int mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
+ unsigned int idx)
{
struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
struct mt76_txq *mtxq;
@@ -220,6 +220,8 @@ void mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif,
mtxq->wcid = &mvif->group_wcid;
mt76_txq_init(&dev->mt76, vif->txq);
+
+ return 0;
}
EXPORT_SYMBOL_GPL(mt76x02_vif_init);
@@ -248,8 +250,7 @@ mt76x02_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
if (vif->type == NL80211_IFTYPE_STATION)
idx += 8;
- mt76x02_vif_init(dev, vif, idx);
- return 0;
+ return mt76x02_vif_init(dev, vif, idx);
}
EXPORT_SYMBOL_GPL(mt76x02_add_interface);
@@ -55,8 +55,7 @@ static int mt76x2u_add_interface(struct ieee80211_hw *hw,
if (!ether_addr_equal(dev->mt76.macaddr, vif->addr))
mt76x02_mac_setaddr(dev, vif->addr);
- mt76x02_vif_init(dev, vif, idx);
- return 0;
+ return mt76x02_vif_init(dev, vif, idx);
}
static int
This is a preliminary patch to add xdp support to mt76 driver since mt76x02_vif_init will be used to xdp_rxq_info data structure and can return an error code Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 4 ++-- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 9 +++++---- drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-)