From owner-freebsd-bugs@FreeBSD.ORG Sun Feb 17 00:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C7BFDBC3 for ; Sun, 17 Feb 2013 00:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id AFAAA159 for ; Sun, 17 Feb 2013 00:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1H0A18S044269 for ; Sun, 17 Feb 2013 00:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1H0A1AH044268; Sun, 17 Feb 2013 00:10:01 GMT (envelope-from gnats) Resent-Date: Sun, 17 Feb 2013 00:10:01 GMT Resent-Message-Id: <201302170010.r1H0A1AH044268@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, PseudoCylon Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8A97CBB5 for ; Sun, 17 Feb 2013 00:07:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 6621E151 for ; Sun, 17 Feb 2013 00:07:44 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r1H07ho6038723 for ; Sun, 17 Feb 2013 00:07:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r1H07hqk038722; Sun, 17 Feb 2013 00:07:43 GMT (envelope-from nobody) Message-Id: <201302170007.r1H07hqk038722@red.freebsd.org> Date: Sun, 17 Feb 2013 00:07:43 GMT From: PseudoCylon To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/176201: 11n station includes unrelated ht params into ASSOC_REQ packet X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 00:10:01 -0000 >Number: 176201 >Category: kern >Synopsis: 11n station includes unrelated ht params into ASSOC_REQ packet >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 17 00:10:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: PseudoCylon >Release: 9.1-PRERELEASE >Organization: >Environment: 9.1-RELEASE #5: Sun Feb 3 16:22:34 MST 2013 root@mb0:/usr/obj/usr/src/sys/U300 amd64 >Description: When an 11n capable station try to associate with an AP, the station does not include maximum Rx size and ampdu density set by the driver into an association request packet. So that, the AP might generate ampdu packets bigger than the station can handle. Detailed discussion can be found here. http://lists.freebsd.org/pipermail/freebsd-wireless/2013-February/002878.html >How-To-Repeat: 1) Set up an 11n station. 2) Capture an ASSOC_REQ packet sent by the station. 3) Read HT params in the packet. >Fix: In a brief testing, attached patch fixed the issue. But, need to be checked the patch doesn't break anything. Patch attached with submission follows: diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 495c949..9fc5a45 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2652,9 +2652,6 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni) caps |= IEEE80211_HTCAP_CHWIDTH40; else caps &= ~IEEE80211_HTCAP_CHWIDTH40; - /* use advertised setting (XXX locally constraint) */ - rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); - density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); /* * NB: Hardware might support HT40 on some but not all @@ -2672,9 +2669,11 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni) caps |= IEEE80211_HTCAP_CHWIDTH40; else caps &= ~IEEE80211_HTCAP_CHWIDTH40; - rxmax = vap->iv_ampdu_rxmax; - density = vap->iv_ampdu_density; } + + rxmax = vap->iv_ampdu_rxmax; + density = vap->iv_ampdu_density; + /* adjust short GI based on channel and config */ if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) == 0) caps &= ~IEEE80211_HTCAP_SHORTGI20; >Release-Note: >Audit-Trail: >Unformatted: