mt76: mt7615: move mt7615_mac_wtbl_addr in mac.h
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 2 Apr 2020 18:18:52 +0000 (20:18 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 12 May 2020 17:52:29 +0000 (19:52 +0200)
Move mt7615_mac_wtbl_addr in mac.h and add inline qualifier in order to
be reused adding usb support to mt7615 driver

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/mac.h

index 6c8a479a3a11f2c62184a849596b535147a3b3b2..6800ca3706bddf9ca802deeeaa6c3b7c602d3b19 100644 (file)
@@ -723,11 +723,6 @@ void mt7615_txp_skb_unmap(struct mt76_dev *dev,
                mt7615_txp_skb_unmap_hw(dev, &txp->hw);
 }
 
-static u32 mt7615_mac_wtbl_addr(struct mt7615_dev *dev, int wcid)
-{
-       return MT_WTBL_BASE(dev) + wcid * MT_WTBL_ENTRY_SIZE;
-}
-
 bool mt7615_mac_wtbl_update(struct mt7615_dev *dev, int idx, u32 mask)
 {
        mt76_rmw(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_WLAN_IDX,
index 422a140fd812ca358d2a3cd382c3d2c37e3018b5..2c368b99cc0c7d67008980a29b4792431b81d67d 100644 (file)
@@ -407,4 +407,9 @@ mt7615_txwi_to_txp(struct mt76_dev *dev, struct mt76_txwi_cache *t)
        return (struct mt7615_txp_common *)(txwi + MT_TXD_SIZE);
 }
 
+static inline u32 mt7615_mac_wtbl_addr(struct mt7615_dev *dev, int wcid)
+{
+       return MT_WTBL_BASE(dev) + wcid * MT_WTBL_ENTRY_SIZE;
+}
+
 #endif