mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD
authorRyder Lee <ryder.lee@mediatek.com>
Thu, 17 Jun 2021 20:39:00 +0000 (04:39 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 20 Oct 2021 08:36:36 +0000 (10:36 +0200)
Drop MT_DRV_AMSDU_OFFLOAD after introducing IEEE80211_OFFLOAD_ENCAP_ENABLED
flag in mac80211. Driver now checks vif->offload_flags to know encap offload
status of each interface.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7915/pci.c
drivers/net/wireless/mediatek/mt76/mt7921/pci.c

index 3658328f513b3b2dd0e88e277bef978269ddfff6..a8695d3d359eda0bf5229ffe84f65a9e7e6f9819 100644 (file)
@@ -337,12 +337,8 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
        ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
        ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
        ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
-
-       if (!(dev->drv->drv_flags & MT_DRV_AMSDU_OFFLOAD)) {
-               ieee80211_hw_set(hw, TX_AMSDU);
-               ieee80211_hw_set(hw, TX_FRAG_LIST);
-       }
-
+       ieee80211_hw_set(hw, TX_AMSDU);
+       ieee80211_hw_set(hw, TX_FRAG_LIST);
        ieee80211_hw_set(hw, MFP_CAPABLE);
        ieee80211_hw_set(hw, AP_LINK_PS);
        ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
index 8e7fedfd1758e93f402de360f5333104c5df75dd..783ea555fa60211c10debb1fa949041949af2bed 100644 (file)
@@ -346,7 +346,6 @@ struct mt76_hw_cap {
 #define MT_DRV_SW_RX_AIRTIME           BIT(2)
 #define MT_DRV_RX_DMA_HDR              BIT(3)
 #define MT_DRV_HW_MGMT_TXQ             BIT(4)
-#define MT_DRV_AMSDU_OFFLOAD           BIT(5)
 
 struct mt76_driver_ops {
        u32 drv_flags;
index 340b364da5f0dbc13ef042cd310206195e3e348b..e5a3f0ddaec3721b91573d89f102417a08f48af7 100644 (file)
@@ -222,8 +222,7 @@ static int mt7915_pci_probe(struct pci_dev *pdev,
        static const struct mt76_driver_ops drv_ops = {
                /* txwi_size = txd size + txp size */
                .txwi_size = MT_TXD_SIZE + sizeof(struct mt7915_txp),
-               .drv_flags = MT_DRV_TXWI_NO_FREE | MT_DRV_HW_MGMT_TXQ |
-                            MT_DRV_AMSDU_OFFLOAD,
+               .drv_flags = MT_DRV_TXWI_NO_FREE | MT_DRV_HW_MGMT_TXQ,
                .survey_flags = SURVEY_INFO_TIME_TX |
                                SURVEY_INFO_TIME_RX |
                                SURVEY_INFO_TIME_BSS_RX,
index 97ca8290881fc0448f53cdfda4dbd8861f919ab3..cd710360d1801d6548decef68fe4abaa707f52ff 100644 (file)
@@ -99,8 +99,7 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
        static const struct mt76_driver_ops drv_ops = {
                /* txwi_size = txd size + txp size */
                .txwi_size = MT_TXD_SIZE + sizeof(struct mt7921_txp_common),
-               .drv_flags = MT_DRV_TXWI_NO_FREE | MT_DRV_HW_MGMT_TXQ |
-                            MT_DRV_AMSDU_OFFLOAD,
+               .drv_flags = MT_DRV_TXWI_NO_FREE | MT_DRV_HW_MGMT_TXQ,
                .survey_flags = SURVEY_INFO_TIME_TX |
                                SURVEY_INFO_TIME_RX |
                                SURVEY_INFO_TIME_BSS_RX,