aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2017-02-09 23:29:57 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2017-02-09 23:29:57 +0000
commit43eafd0d1eec58b9762c98f937d20f70e3538ca0 (patch)
treea28ec782ebf21e4c8a7a25f9b3dd4a3102704bb2 /sys
parentaa36f34d525f14422826bba7ccae672bc204be59 (diff)
downloadsrc-43eafd0d1eec58b9762c98f937d20f70e3538ca0.tar.gz
src-43eafd0d1eec58b9762c98f937d20f70e3538ca0.zip
[net80211] don't bother doing fragmentation if the driver supports fragmentation offload.
Tested: * ath10k, which does its own fragmentation in firmware.
Notes
Notes: svn path=/head/; revision=313492
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_output.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index a4f0335000db..2842e3acaba8 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1631,12 +1631,20 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
__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.