mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7615: introduce mt7615_txwi_to_txp utility routine
Introduce mt7615_txwi_to_txp utility routine to convert mt76_txwi_cache into mt7615_txp and remove duplicated code Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
496c78e4f0
commit
67973788f4
@@ -317,4 +317,17 @@ enum mt7615_cipher_type {
|
||||
MT_CIPHER_GCMP_256,
|
||||
};
|
||||
|
||||
static inline struct mt7615_txp *
|
||||
mt7615_txwi_to_txp(struct mt76_dev *dev, struct mt76_txwi_cache *t)
|
||||
{
|
||||
u8 *txwi;
|
||||
|
||||
if (!t)
|
||||
return NULL;
|
||||
|
||||
txwi = mt76_get_txwi_ptr(dev, t);
|
||||
|
||||
return (struct mt7615_txp *)(txwi + MT_TXD_SIZE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user