]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mt76: move ampdu_ref from mt76_dev to driver struct
authorFelix Fietkau <nbd@nbd.name>
Wed, 6 Nov 2019 19:04:56 +0000 (20:04 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 14 Feb 2020 09:03:10 +0000 (10:03 +0100)
It is only used by the driver

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7603/mac.c
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
drivers/net/wireless/mediatek/mt76/mt76x02.h
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c

index 4e1aaae2164ff2f0a840bfc89bc77a09c01d0cd4..5b648efc43fa6f7875482b26a7ef2963ceebd9cf 100644 (file)
@@ -502,7 +502,6 @@ struct mt76_dev {
        spinlock_t rx_lock;
        struct napi_struct napi[__MT_RXQ_MAX];
        struct sk_buff_head rx_skb[__MT_RXQ_MAX];
-       u32 ampdu_ref;
 
        struct list_head txwi_cache;
        struct mt76_sw_queue q_tx[2 * __MT_TXQ_MAX];
index ab9ac6e07159fd82676d2575c248035045da0e6c..2a384fd0f088f16843c99275b6de11cbab6d6f78 100644 (file)
@@ -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 */
                if (dev->rx_ampdu_ts != rxd[12]) {
-                       if (!++dev->mt76.ampdu_ref)
-                               dev->mt76.ampdu_ref++;
+                       if (!++dev->ampdu_ref)
+                               dev->ampdu_ref++;
                }
                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;
index 63ec1fa71aba1651b1e61ab51896d0d0a0eeb926..12fd2db2df10cc6b277a5dbe54234decc4127d19 100644 (file)
@@ -118,6 +118,7 @@ struct mt7603_dev {
        u32 false_cca_ofdm, false_cca_cck;
        unsigned long last_cca_adj;
 
+       u32 ampdu_ref;
        __le32 rx_ampdu_ts;
        u8 rssi_offset[3];
 
index 38abb3dab549427c40d7f50956593dc65f9dbef3..bf9c8006eb159183bf4ddcab99949039be668245 100644 (file)
@@ -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 */
                if (dev->rx_ampdu_ts != rxd[12]) {
-                       if (!++dev->mt76.ampdu_ref)
-                               dev->mt76.ampdu_ref++;
+                       if (!++dev->ampdu_ref)
+                               dev->ampdu_ref++;
                }
                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;
index 9c27b355a4455fe40e65391fb1bf79d774263a94..17ec75a2bcfbcdb102e4c6f1547d78b0237d7b9f 100644 (file)
@@ -90,6 +90,7 @@ struct mt7615_dev {
        u32 omac_mask;
 
        __le32 rx_ampdu_ts;
+       u32 ampdu_ref;
 
        struct list_head sta_poll_list;
        spinlock_t sta_poll_lock;
index f00a9a6ee670e45c73dacc2e316d85158efce304..ba4c14eea22d99c1d178d114eb639d41ce77303f 100644 (file)
@@ -86,6 +86,7 @@ struct mt76x02_dev {
        DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status);
        spinlock_t txstatus_fifo_lock;
        u32 tx_airtime;
+       u32 ampdu_ref;
 
        struct sk_buff *rx_head;
 
index 098792b86b7380e4ff124657d232c56789d6904f..5b512e4ce6b88ae1945700c7e2f785c7e18f0a7e 100644 (file)
@@ -824,7 +824,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
 
        if (rxinfo & MT_RXINFO_AMPDU) {
                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,
@@ -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
                 */
                if (rxinfo & MT_RXINFO_RSSI) {
-                       if (!++dev->mt76.ampdu_ref)
-                               dev->mt76.ampdu_ref++;
+                       if (!++dev->ampdu_ref)
+                               dev->ampdu_ref++;
                }
        }