From owner-svn-src-all@freebsd.org Mon Apr 18 00:26:12 2016 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 62A65AEE64A; Mon, 18 Apr 2016 00:26:12 +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 1A73C1257; Mon, 18 Apr 2016 00:26:12 +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 u3I0QBYP030824; Mon, 18 Apr 2016 00:26:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3I0QB6f030823; Mon, 18 Apr 2016 00:26:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201604180026.u3I0QB6f030823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 18 Apr 2016 00:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298174 - 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.21 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: Mon, 18 Apr 2016 00:26:12 -0000 Author: adrian Date: Mon Apr 18 00:26:11 2016 New Revision: 298174 URL: https://svnweb.freebsd.org/changeset/base/298174 Log: [net80211] put in a comment about the not-quite-correctness of A-MPDU parameters. Although we correctly (now!) calculate the right A-MPDU parameters, the ioctl() has some faulty logic for choosing which to display. The BSS params are what were advertised to us, and we would have chosen the lower of theirs/ours when advertising the HT bits back at them. So, we /should/ track and fix that so we display the correct A-MPDU density and size. However, since I'm a forgetful type, and I don't want to have to re-learn that this is wrong, drop in a comment so I or someone else fixes it. Or, when I discover this again in 4 years, I don't have to go digging too much to remember. Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Sun Apr 17 23:22:32 2016 (r298173) +++ head/sys/net80211/ieee80211_ioctl.c Mon Apr 18 00:26:11 2016 (r298174) @@ -1020,6 +1020,10 @@ ieee80211_ioctl_get80211(struct ieee8021 if (vap->iv_opmode == IEEE80211_M_HOSTAP) ireq->i_val = vap->iv_ampdu_rxmax; else if (vap->iv_state == IEEE80211_S_RUN || vap->iv_state == IEEE80211_S_SLEEP) + /* + * XXX TODO: this isn't completely correct, as we've + * negotiated the higher of the two. + */ ireq->i_val = MS(vap->iv_bss->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); else @@ -1028,6 +1032,10 @@ ieee80211_ioctl_get80211(struct ieee8021 case IEEE80211_IOC_AMPDU_DENSITY: if (vap->iv_opmode == IEEE80211_M_STA && (vap->iv_state == IEEE80211_S_RUN || vap->iv_state == IEEE80211_S_SLEEP)) + /* + * XXX TODO: this isn't completely correct, as we've + * negotiated the higher of the two. + */ ireq->i_val = MS(vap->iv_bss->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); else