Commit 30684481 authored by Felix Fietkau's avatar Felix Fietkau

mt76: move ampdu_ref from mt76_dev to driver struct

It is only used by the driver
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c7d2d631
...@@ -502,7 +502,6 @@ struct mt76_dev { ...@@ -502,7 +502,6 @@ struct mt76_dev {
spinlock_t rx_lock; spinlock_t rx_lock;
struct napi_struct napi[__MT_RXQ_MAX]; struct napi_struct napi[__MT_RXQ_MAX];
struct sk_buff_head rx_skb[__MT_RXQ_MAX]; struct sk_buff_head rx_skb[__MT_RXQ_MAX];
u32 ampdu_ref;
struct list_head txwi_cache; struct list_head txwi_cache;
struct mt76_sw_queue q_tx[2 * __MT_TXQ_MAX]; struct mt76_sw_queue q_tx[2 * __MT_TXQ_MAX];
......
...@@ -531,12 +531,12 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb) ...@@ -531,12 +531,12 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
/* all subframes of an A-MPDU have the same timestamp */ /* all subframes of an A-MPDU have the same timestamp */
if (dev->rx_ampdu_ts != rxd[12]) { if (dev->rx_ampdu_ts != rxd[12]) {
if (!++dev->mt76.ampdu_ref) if (!++dev->ampdu_ref)
dev->mt76.ampdu_ref++; dev->ampdu_ref++;
} }
dev->rx_ampdu_ts = rxd[12]; dev->rx_ampdu_ts = rxd[12];
status->ampdu_ref = dev->mt76.ampdu_ref; status->ampdu_ref = dev->ampdu_ref;
} }
remove_pad = rxd1 & MT_RXD1_NORMAL_HDR_OFFSET; remove_pad = rxd1 & MT_RXD1_NORMAL_HDR_OFFSET;
......
...@@ -118,6 +118,7 @@ struct mt7603_dev { ...@@ -118,6 +118,7 @@ struct mt7603_dev {
u32 false_cca_ofdm, false_cca_cck; u32 false_cca_ofdm, false_cca_cck;
unsigned long last_cca_adj; unsigned long last_cca_adj;
u32 ampdu_ref;
__le32 rx_ampdu_ts; __le32 rx_ampdu_ts;
u8 rssi_offset[3]; u8 rssi_offset[3];
......
...@@ -118,12 +118,12 @@ int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb) ...@@ -118,12 +118,12 @@ int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
/* all subframes of an A-MPDU have the same timestamp */ /* all subframes of an A-MPDU have the same timestamp */
if (dev->rx_ampdu_ts != rxd[12]) { if (dev->rx_ampdu_ts != rxd[12]) {
if (!++dev->mt76.ampdu_ref) if (!++dev->ampdu_ref)
dev->mt76.ampdu_ref++; dev->ampdu_ref++;
} }
dev->rx_ampdu_ts = rxd[12]; dev->rx_ampdu_ts = rxd[12];
status->ampdu_ref = dev->mt76.ampdu_ref; status->ampdu_ref = dev->ampdu_ref;
} }
remove_pad = rxd1 & MT_RXD1_NORMAL_HDR_OFFSET; remove_pad = rxd1 & MT_RXD1_NORMAL_HDR_OFFSET;
......
...@@ -90,6 +90,7 @@ struct mt7615_dev { ...@@ -90,6 +90,7 @@ struct mt7615_dev {
u32 omac_mask; u32 omac_mask;
__le32 rx_ampdu_ts; __le32 rx_ampdu_ts;
u32 ampdu_ref;
struct list_head sta_poll_list; struct list_head sta_poll_list;
spinlock_t sta_poll_lock; spinlock_t sta_poll_lock;
......
...@@ -86,6 +86,7 @@ struct mt76x02_dev { ...@@ -86,6 +86,7 @@ struct mt76x02_dev {
DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status); DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status);
spinlock_t txstatus_fifo_lock; spinlock_t txstatus_fifo_lock;
u32 tx_airtime; u32 tx_airtime;
u32 ampdu_ref;
struct sk_buff *rx_head; struct sk_buff *rx_head;
......
...@@ -824,7 +824,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, ...@@ -824,7 +824,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
if (rxinfo & MT_RXINFO_AMPDU) { if (rxinfo & MT_RXINFO_AMPDU) {
status->flag |= RX_FLAG_AMPDU_DETAILS; status->flag |= RX_FLAG_AMPDU_DETAILS;
status->ampdu_ref = dev->mt76.ampdu_ref; status->ampdu_ref = dev->ampdu_ref;
/* /*
* When receiving an A-MPDU subframe and RSSI info is not valid, * When receiving an A-MPDU subframe and RSSI info is not valid,
...@@ -832,8 +832,8 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, ...@@ -832,8 +832,8 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
* are coming. The last one will have valid RSSI info * are coming. The last one will have valid RSSI info
*/ */
if (rxinfo & MT_RXINFO_RSSI) { if (rxinfo & MT_RXINFO_RSSI) {
if (!++dev->mt76.ampdu_ref) if (!++dev->ampdu_ref)
dev->mt76.ampdu_ref++; dev->ampdu_ref++;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment