diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2019-04-02 11:47:56 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-05-01 13:03:58 +0200 |
commit | f3950a4141438f2a51337f470bedc9c8f952790a (patch) | |
tree | d1d4671a3d76c085ccaa9c0da0d2e38a0c8fcd79 /drivers/net/wireless/mediatek/mt76/mt76.h | |
parent | ce0fd825890856b1681e41bba639b5f3c39569e3 (diff) | |
download | lwn-f3950a4141438f2a51337f470bedc9c8f952790a.tar.gz lwn-f3950a4141438f2a51337f470bedc9c8f952790a.zip |
mt76: set txwi_size according to the driver value
Dynamically allocate txwi since new chipsets will use longer txwi
descriptors
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76.h')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 21c24a31bb61..aaed70a0b103 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -229,12 +229,10 @@ struct mt76_txq { }; struct mt76_txwi_cache { - u32 txwi[8]; - dma_addr_t dma_addr; struct list_head list; + dma_addr_t dma_addr; }; - struct mt76_rx_tid { struct rcu_head rcu_head; @@ -617,6 +615,12 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str, int mt76_eeprom_init(struct mt76_dev *dev, int len); void mt76_eeprom_override(struct mt76_dev *dev); +static inline u8 * +mt76_get_txwi_ptr(struct mt76_dev *dev, struct mt76_txwi_cache *t) +{ + return (u8 *)t - dev->drv->txwi_size; +} + /* increment with wrap-around */ static inline int mt76_incr(int val, int size) { |