svn commit: r313492 - head/sys/net80211

Adrian Chadd adrian at FreeBSD.org
Thu Feb 9 23:29:58 UTC 2017


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.


More information about the svn-src-all mailing list