Search Linux Wireless

[PATCH 4/4] wifi: mt76: declare netdev support for scatter/gather on 7915e and 7921e

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index d3011965451d..ff49d3837b9e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -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 |=
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index b607f0a51c68..9543584abfb5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -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;
 }
-- 
2.36.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux