On 2020-11-11 00:02, Lorenzo Bianconi wrote: > Rely on mt76_phy instead of mt76_dev in tx_queue_skb signature. > This is a preliminary patch to move data queues in mt76_phy and add > dbdc support to mt7915 driver > > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> > --- > drivers/net/wireless/mediatek/mt76/dma.c | 3 +- > drivers/net/wireless/mediatek/mt76/mt76.h | 4 +-- > .../wireless/mediatek/mt76/mt7603/beacon.c | 28 ++++++++++--------- > .../net/wireless/mediatek/mt76/mt76x02_mmio.c | 11 ++++---- > drivers/net/wireless/mediatek/mt76/sdio.c | 3 +- > drivers/net/wireless/mediatek/mt76/testmode.c | 3 +- > drivers/net/wireless/mediatek/mt76/tx.c | 19 +++++++------ > drivers/net/wireless/mediatek/mt76/usb.c | 3 +- > 8 files changed, 41 insertions(+), 33 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h > index d2e36f5f92b6..8a9c87301fea 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76.h > +++ b/drivers/net/wireless/mediatek/mt76/mt76.h > @@ -167,7 +167,7 @@ struct mt76_queue_ops { > int idx, int n_desc, int bufsize, > u32 ring_base); > > - int (*tx_queue_skb)(struct mt76_dev *dev, enum mt76_txq_id qid, > + int (*tx_queue_skb)(struct mt76_phy *phy, enum mt76_txq_id qid, > struct sk_buff *skb, struct mt76_wcid *wcid, > struct ieee80211_sta *sta); > > @@ -749,7 +749,7 @@ static inline u16 mt76_rev(struct mt76_dev *dev) > #define mt76_init_queues(dev) (dev)->mt76.queue_ops->init(&((dev)->mt76)) > #define mt76_queue_alloc(dev, ...) (dev)->mt76.queue_ops->alloc(&((dev)->mt76), __VA_ARGS__) > #define mt76_tx_queue_skb_raw(dev, ...) (dev)->mt76.queue_ops->tx_queue_skb_raw(&((dev)->mt76), __VA_ARGS__) > -#define mt76_tx_queue_skb(dev, ...) (dev)->mt76.queue_ops->tx_queue_skb(&((dev)->mt76), __VA_ARGS__) > +#define mt76_tx_queue_skb(phy, ...) (phy)->mt76->dev->queue_ops->tx_queue_skb((phy)->mt76, __VA_ARGS__) I'd prefer having a second macro here for the case where we pass a dev instead of a phy, so we don't have to change all the older drivers to use mdev->queue_ops->... directly. - Felix