@@ -330,7 +330,8 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
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 |
- NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
+ NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
+ NETIF_F_SG;
hw->radiotap_timestamp.units_pos =
IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US;
@@ -368,7 +369,7 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
ieee80211_hw_set(hw, WANT_MONITOR_VIF);
ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
- hw->max_tx_fragments = 4;
+ hw->max_tx_fragments = 6;
if (phy->mt76->cap.has_2ghz) {
phy->mt76->sband_2g.sband.ht_cap.cap |=
@@ -57,6 +57,8 @@ mt7921_init_wiphy(struct ieee80211_hw *hw)
hw->max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_HE;
hw->netdev_features = NETIF_F_RXCSUM |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
+ if (mt76_is_mmio(&dev->mt76))
+ hw->netdev_features |= NETIF_F_SG;
hw->radiotap_timestamp.units_pos =
IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US;
@@ -104,7 +106,7 @@ mt7921_init_wiphy(struct ieee80211_hw *hw)
if (dev->pm.enable)
ieee80211_hw_set(hw, CONNECTION_MONITOR);
- hw->max_tx_fragments = 4;
+ hw->max_tx_fragments = 6;
return 0;
}
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 <nbd@nbd.name> --- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 5 +++-- drivers/net/wireless/mediatek/mt76/mt7921/init.c | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-)