From 717e72e29ff33730c518de87c84276c924015583 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 2 Oct 2022 17:53:01 +0200 Subject: [PATCH] wifi: mt76: declare netdev support for scatter/gather on 7915e and 7921e This helps with locally generated TCP traffic to avoid unnecessary data copying. Also bump the maximum number of fragments to the limit imposed by the firmware txp struct. Signed-off-by: Felix Fietkau --- mt7915/init.c | 2 +- mt7921/init.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mt7915/init.c b/mt7915/init.c index 0a5f7d85..e56c562b 100644 --- a/mt7915/init.c +++ b/mt7915/init.c @@ -329,7 +329,7 @@ mt7915_init_wiphy(struct ieee80211_hw *hw) hw->queues = 4; hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE; hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE; - hw->netdev_features = NETIF_F_RXCSUM; + hw->netdev_features = NETIF_F_RXCSUM | NETIF_F_SG; hw->radiotap_timestamp.units_pos = IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US; diff --git a/mt7921/init.c b/mt7921/init.c index 739d18fc..5b2905d1 100644 --- a/mt7921/init.c +++ b/mt7921/init.c @@ -56,6 +56,8 @@ mt7921_init_wiphy(struct ieee80211_hw *hw) hw->max_rx_aggregation_subframes = 256; hw->max_tx_aggregation_subframes = 256; hw->netdev_features = NETIF_F_RXCSUM; + if (mt76_is_mmio(&dev->mt76)) + hw->netdev_features |= NETIF_F_SG; hw->radiotap_timestamp.units_pos = IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US;