From owner-svn-src-all@freebsd.org Thu Feb 9 23:29:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9800CCD8FF4; Thu, 9 Feb 2017 23:29:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6519FCAD; Thu, 9 Feb 2017 23:29:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19NTvaB022605; Thu, 9 Feb 2017 23:29:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19NTvpu022604; Thu, 9 Feb 2017 23:29:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702092329.v19NTvpu022604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Feb 2017 23:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313492 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 23:29:58 -0000 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.