Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2017 23:29:57 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313492 - head/sys/net80211
Message-ID:  <201702092329.v19NTvpu022604@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Thu Feb  9 23:29:57 2017
New Revision: 313492
URL: https://svnweb.freebsd.org/changeset/base/313492

Log:
  [net80211] don't bother doing fragmentation if the driver supports fragmentation offload.
  
  Tested:
  
  * ath10k, which does its own fragmentation in firmware.

Modified:
  head/sys/net80211/ieee80211_output.c

Modified: head/sys/net80211/ieee80211_output.c
==============================================================================
--- head/sys/net80211/ieee80211_output.c	Thu Feb  9 23:20:55 2017	(r313491)
+++ head/sys/net80211/ieee80211_output.c	Thu Feb  9 23:29:57 2017	(r313492)
@@ -1631,12 +1631,20 @@ ieee80211_encap(struct ieee80211vap *vap
 			    __func__);
 	}
 
+	/*
+	 * Check if xmit fragmentation is required.
+	 *
+	 * If the hardware does fragmentation offload, then don't bother
+	 * doing it here.
+	 */
+	if (IEEE80211_CONF_FRAG_OFFLOAD(ic))
+		txfrag = 0;
+	else
+		txfrag = (m->m_pkthdr.len > vap->iv_fragthreshold &&
+		    !IEEE80211_IS_MULTICAST(wh->i_addr1) &&
+		    (vap->iv_caps & IEEE80211_C_TXFRAG) &&
+		    (m->m_flags & (M_FF | M_AMPDU_MPDU)) == 0);
 
-	/* check if xmit fragmentation is required */
-	txfrag = (m->m_pkthdr.len > vap->iv_fragthreshold &&
-	    !IEEE80211_IS_MULTICAST(wh->i_addr1) &&
-	    (vap->iv_caps & IEEE80211_C_TXFRAG) &&
-	    (m->m_flags & (M_FF | M_AMPDU_MPDU)) == 0);
 	if (key != NULL) {
 		/*
 		 * IEEE 802.1X: send EAPOL frames always in the clear.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702092329.v19NTvpu022604>