From owner-svn-src-all@freebsd.org Sat Jan 21 21:03:28 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 4BE06CBA182; Sat, 21 Jan 2017 21:03:28 +0000 (UTC) (envelope-from avos@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 1B8541E4F; Sat, 21 Jan 2017 21:03:28 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0LL3Ri8033833; Sat, 21 Jan 2017 21:03:27 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0LL3RMm033831; Sat, 21 Jan 2017 21:03:27 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201701212103.v0LL3RMm033831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 21 Jan 2017 21:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312607 - head/sys/dev/ath 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: Sat, 21 Jan 2017 21:03:28 -0000 Author: avos Date: Sat Jan 21 21:03:26 2017 New Revision: 312607 URL: https://svnweb.freebsd.org/changeset/base/312607 Log: ath: adapt LDPC support checks Set both IEEE80211_HTCAP_LDPC and IEEE80211_HTC_TXLDPC capability flags if LDPC is supported + set 'do_ldpc = 1' only when it is not disabled, not just supported. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9277 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jan 21 20:34:20 2017 (r312606) +++ head/sys/dev/ath/if_ath.c Sat Jan 21 21:03:26 2017 (r312607) @@ -1178,7 +1178,8 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_has_ldpc = 1; device_printf(sc->sc_dev, "[HT] LDPC transmit/receive enabled\n"); - ic->ic_htcaps |= IEEE80211_HTCAP_LDPC; + ic->ic_htcaps |= IEEE80211_HTCAP_LDPC | + IEEE80211_HTC_TXLDPC; } Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sat Jan 21 20:34:20 2017 (r312606) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Jan 21 21:03:26 2017 (r312607) @@ -239,7 +239,7 @@ ath_tx_rate_fill_rcflags(struct ath_soft * it if any of the rate entries aren't 11n. */ do_ldpc = 0; - if ((ni->ni_vap->iv_htcaps & IEEE80211_HTCAP_LDPC) && + if ((ni->ni_vap->iv_flags_ht & IEEE80211_FHT_LDPC_TX) && (ni->ni_htcap & IEEE80211_HTCAP_LDPC)) do_ldpc = 1;