mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: introduce wed pointer in mt76_queue
Introduce mtk_wed_device pointer in mt76_queue structure in order to configure WED chip. Get rid of dev parameter in Q_READ and Q_WRITE macros. Introduce wed parameter to the following routine signatures: - mt76_init_queue - mt76_init_tx_queue This is a preliminary patch to introduce WED support for mt7996 since mt7996 runs two separate WED chips. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
d798d5d6f7
commit
48b0cedbf8
@@ -198,6 +198,7 @@ struct mt76_queue {
|
||||
u8 hw_idx;
|
||||
u8 flags;
|
||||
|
||||
struct mtk_wed_device *wed;
|
||||
u32 wed_regs;
|
||||
|
||||
dma_addr_t desc_dma;
|
||||
@@ -1120,15 +1121,16 @@ int mt76_get_of_data_from_nvmem(struct mt76_dev *dev, void *eep,
|
||||
|
||||
struct mt76_queue *
|
||||
mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
|
||||
int ring_base, u32 flags);
|
||||
int ring_base, void *wed, u32 flags);
|
||||
u16 mt76_calculate_default_rate(struct mt76_phy *phy,
|
||||
struct ieee80211_vif *vif, int rateidx);
|
||||
static inline int mt76_init_tx_queue(struct mt76_phy *phy, int qid, int idx,
|
||||
int n_desc, int ring_base, u32 flags)
|
||||
int n_desc, int ring_base, void *wed,
|
||||
u32 flags)
|
||||
{
|
||||
struct mt76_queue *q;
|
||||
|
||||
q = mt76_init_queue(phy->dev, qid, idx, n_desc, ring_base, flags);
|
||||
q = mt76_init_queue(phy->dev, qid, idx, n_desc, ring_base, wed, flags);
|
||||
if (IS_ERR(q))
|
||||
return PTR_ERR(q);
|
||||
|
||||
@@ -1142,7 +1144,7 @@ static inline int mt76_init_mcu_queue(struct mt76_dev *dev, int qid, int idx,
|
||||
{
|
||||
struct mt76_queue *q;
|
||||
|
||||
q = mt76_init_queue(dev, qid, idx, n_desc, ring_base, 0);
|
||||
q = mt76_init_queue(dev, qid, idx, n_desc, ring_base, NULL, 0);
|
||||
if (IS_ERR(q))
|
||||
return PTR_ERR(q);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user