mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x2: make txwi cache storage area opaque in preparation for moving it to generic code
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+4
-3
@@ -15,7 +15,7 @@
|
||||
#include "mt76x2_dma.h"
|
||||
|
||||
struct mt76x2_txwi_cache {
|
||||
struct mt76x2_txwi txwi;
|
||||
u32 txwi[6];
|
||||
dma_addr_t dma_addr;
|
||||
struct list_head list;
|
||||
};
|
||||
@@ -135,7 +135,7 @@ mt76x2_tx_queue_skb(struct mt76_dev *cdev, struct mt76_queue *q,
|
||||
if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
|
||||
qsel = 0;
|
||||
|
||||
len = skb->len + sizeof(t->txwi);
|
||||
len = skb->len + sizeof(struct mt76x2_txwi);
|
||||
len += mt76x2_mac_skb_tx_overhead(dev, skb);
|
||||
tx_info = MT76_SET(MT_TXD_INFO_LEN, len) |
|
||||
MT76_SET(MT_TXD_INFO_QSEL, qsel) |
|
||||
@@ -148,7 +148,7 @@ mt76x2_tx_queue_skb(struct mt76_dev *cdev, struct mt76_queue *q,
|
||||
if (dma_mapping_error(dev->mt76.dev, addr))
|
||||
goto put_txwi;
|
||||
|
||||
idx = mt76_queue_add_buf(dev, q, t->dma_addr, sizeof(t->txwi),
|
||||
idx = mt76_queue_add_buf(dev, q, t->dma_addr, sizeof(struct mt76x2_txwi),
|
||||
addr, skb->len, tx_info);
|
||||
q->entry[idx].skb = skb;
|
||||
q->entry[idx].txwi = t;
|
||||
@@ -409,6 +409,7 @@ void mt76x2_dma_cleanup(struct mt76x2_dev *dev)
|
||||
struct mt76x2_txwi_cache *t;
|
||||
int i;
|
||||
|
||||
BUILD_BUG_ON(sizeof(t->txwi) < sizeof(struct mt76x2_txwi));
|
||||
BUILD_BUG_ON(MT_RX_HEADROOM < sizeof(struct mt76x2_rxwi));
|
||||
dev->q_rx.buf_offset = MT_RX_HEADROOM - sizeof(struct mt76x2_rxwi);
|
||||
dev->mcu.q_rx.buf_offset = MT_RX_HEADROOM - sizeof(struct mt76x2_rxwi);
|
||||
|
||||
+4
-2
@@ -153,12 +153,13 @@ void mt76x2_mac_wcid_set_rate(struct mt76x2_dev *dev, struct mt76_wcid *wcid,
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
}
|
||||
|
||||
void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
|
||||
void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, void *txwi_ptr,
|
||||
struct sk_buff *skb, struct mt76_wcid *wcid,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_tx_rate *rate = &info->control.rates[0];
|
||||
struct mt76x2_txwi *txwi = txwi_ptr;
|
||||
unsigned long flags;
|
||||
u16 rate_ht_mask = MT76_SET(MT_RXWI_RATE_PHY, BIT(1) | BIT(2));
|
||||
u16 txwi_flags = 0;
|
||||
@@ -441,9 +442,10 @@ void mt76x2_mac_poll_tx_status(struct mt76x2_dev *dev, bool irq)
|
||||
}
|
||||
|
||||
void mt76x2_mac_queue_txdone(struct mt76x2_dev *dev, struct sk_buff *skb,
|
||||
struct mt76x2_txwi *txwi)
|
||||
void *txwi_ptr)
|
||||
{
|
||||
struct mt76x2_tx_info *txi = mt76x2_skb_tx_info(skb);
|
||||
struct mt76x2_txwi *txwi = txwi_ptr;
|
||||
|
||||
mt76x2_mac_poll_tx_status(dev, false);
|
||||
|
||||
|
||||
+2
-2
@@ -161,7 +161,7 @@ void mt76x2_mac_resume(struct mt76x2_dev *dev);
|
||||
void mt76x2_mac_set_bssid(struct mt76x2_dev *dev, u8 idx, const u8 *addr);
|
||||
|
||||
int mt76x2_mac_process_rx(struct mt76x2_dev *dev, struct sk_buff *skb, void *rxwi);
|
||||
void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
|
||||
void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, void *txwi_ptr,
|
||||
struct sk_buff *skb, struct mt76_wcid *wcid,
|
||||
struct ieee80211_sta *sta);
|
||||
void mt76x2_mac_wcid_setup(struct mt76x2_dev *dev, u8 idx, u8 vif_idx, u8 *mac);
|
||||
@@ -179,7 +179,7 @@ int mt76x2_mac_set_beacon(struct mt76x2_dev *dev, u8 vif_idx, struct sk_buff *sk
|
||||
void mt76x2_mac_set_beacon_enable(struct mt76x2_dev *dev, u8 vif_idx, bool val);
|
||||
|
||||
void mt76x2_mac_queue_txdone(struct mt76x2_dev *dev, struct sk_buff *skb,
|
||||
struct mt76x2_txwi *txwi);
|
||||
void *txwi_ptr);
|
||||
|
||||
void mt76x2_mac_poll_tx_status(struct mt76x2_dev *dev, bool irq);
|
||||
void mt76x2_mac_process_tx_status_fifo(struct mt76x2_dev *dev);
|
||||
|
||||
Reference in New Issue
Block a user