From nobody@FreeBSD.org  Thu Mar  4 19:19:42 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 519C31065674
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  4 Mar 2010 19:19:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 3F7538FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  4 Mar 2010 19:19:42 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o24JJgVx073707
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 4 Mar 2010 19:19:42 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o24JJf2u073706;
	Thu, 4 Mar 2010 19:19:41 GMT
	(envelope-from nobody)
Message-Id: <201003041919.o24JJf2u073706@www.freebsd.org>
Date: Thu, 4 Mar 2010 19:19:41 GMT
From: Alexander Egorenkov <egorenar@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ieee80211] Incorrect "SM power save mode" HT capability constants
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         144476
>Category:       kern
>Synopsis:       [ieee80211] Incorrect "SM power save mode" HT capability constants
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rpaulo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 04 19:20:02 UTC 2010
>Closed-Date:    Thu Mar 18 16:56:32 UTC 2010
>Last-Modified:  Thu Mar 18 17:00:13 UTC 2010
>Originator:     Alexander Egorenkov
>Release:        FreeBSD 7.2 STABLE
>Organization:
>Environment:
FreeBSD dantooine 7.2-RELEASE FreeBSD 7.2-RELEASE #1: Sat Feb 27 18:41:55 CET 2010     root@dantooine:/usr/obj/usr/src/sys/MYKERNEL  i386
>Description:
I was testing my 802.11n mode device driver and captured an association process with my AP. I noticed that 2 "SM power save mode" HT capability constants
were incorrectly defined in header file ieee80211.h. That caused the net80211 stack to send wrong HT capability to my AP during association.

The incorrectly defined constants are IEEE80211_HTCAP_SMPS_OFF and
IEEE80211_HTCAP_SMPS_ENA.

Code snippet:
--------------------------------

#define	IEEE80211_HTCAP_SMPS		0x000c	/* SM Power Save mode */
#define	IEEE80211_HTCAP_SMPS_OFF	0x0000	/* none (static mode) */
#define	IEEE80211_HTCAP_SMPS_DYNAMIC	0x0004	/* send RTS first */
/* NB: SMPS value 2 is reserved */
#define	IEEE80211_HTCAP_SMPS_ENA	0x000c	/* enabled */


--------------------------------

The comments for the both constants are also wrong.
>How-To-Repeat:

>Fix:
I checked the IEEE 802.11n specification and the right values for these constants are:

IEEE80211_HTCAP_SMPS_OFF = 0x000c
IEEE80211_HTCAP_SMPS_ENA = 0x0000

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 4 19:22:44 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144476 

From: Alexander Egorenkov <egorenar@googlemail.com>
To: bug-followup@FreeBSD.org, egorenar@gmail.com
Cc:  
Subject: Re: kern/144476: [ieee80211] Incorrect "SM power save mode" HT 
	capability constants
Date: Thu, 4 Mar 2010 21:20:27 +0100

 --001636c5a6836596760480ff54dd
 Content-Type: multipart/alternative; boundary=001636c5a6836596680480ff54db
 
 --001636c5a6836596680480ff54db
 Content-Type: text/plain; charset=ISO-8859-1
 
 Here is a patch i used on my system.
 After i applied the patch and recompiled the kernel i got higher download
 rates :-)
 
 --001636c5a6836596680480ff54db
 Content-Type: text/html; charset=ISO-8859-1
 
 Here is a patch i used on my system.<br>After i applied the patch and recompiled the kernel i got higher download rates :-)<br>
 
 --001636c5a6836596680480ff54db--
 --001636c5a6836596760480ff54dd
 Content-Type: application/octet-stream; name="ieee80211.h.patch"
 Content-Disposition: attachment; filename="ieee80211.h.patch"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_g6e03p0p0
 
 LS0tIGllZWU4MDIxMS5oLm9yaWcJMjAxMC0wMy0wNCAyMToxODoxMy4wMDAwMDAwMDAgKzAxMDAK
 KysrIGllZWU4MDIxMS5oCTIwMTAtMDMtMDQgMjE6MTc6MTYuMDAwMDAwMDAwICswMTAwCkBAIC01
 MzEsMTAgKzUzMSwxMCBAQAogI2RlZmluZQlJRUVFODAyMTFfSFRDQVBfTERQQwkJMHgwMDAxCS8q
 IExEUEMgc3VwcG9ydGVkICovCiAjZGVmaW5lCUlFRUU4MDIxMV9IVENBUF9DSFdJRFRINDAJMHgw
 MDAyCS8qIDIwLzQwIHN1cHBvcnRlZCAqLwogI2RlZmluZQlJRUVFODAyMTFfSFRDQVBfU01QUwkJ
 MHgwMDBjCS8qIFNNIFBvd2VyIFNhdmUgbW9kZSAqLwotI2RlZmluZQlJRUVFODAyMTFfSFRDQVBf
 U01QU19PRkYJMHgwMDAwCS8qIG5vbmUgKHN0YXRpYyBtb2RlKSAqLworI2RlZmluZQlJRUVFODAy
 MTFfSFRDQVBfU01QU19PRkYJMHgwMDBjCS8qIGRpc2FibGVkICovCiAjZGVmaW5lCUlFRUU4MDIx
 MV9IVENBUF9TTVBTX0RZTkFNSUMJMHgwMDA0CS8qIHNlbmQgUlRTIGZpcnN0ICovCiAvKiBOQjog
 U01QUyB2YWx1ZSAyIGlzIHJlc2VydmVkICovCi0jZGVmaW5lCUlFRUU4MDIxMV9IVENBUF9TTVBT
 X0VOQQkweDAwMGMJLyogZW5hYmxlZCAqLworI2RlZmluZQlJRUVFODAyMTFfSFRDQVBfU01QU19F
 TkEJMHgwMDAwCS8qIGVuYWJsZWQgKHN0YXRpYyBtb2RlKSAqLwogI2RlZmluZQlJRUVFODAyMTFf
 SFRDQVBfR1JFRU5GSUVMRAkweDAwMTAJLyogR3JlZW5maWVsZCBzdXBwb3J0ZWQgKi8KICNkZWZp
 bmUJSUVFRTgwMjExX0hUQ0FQX1NIT1JUR0kyMAkweDAwMjAJLyogU2hvcnQgR0kgaW4gMjBNSHog
 Ki8KICNkZWZpbmUJSUVFRTgwMjExX0hUQ0FQX1NIT1JUR0k0MAkweDAwNDAJLyogU2hvcnQgR0kg
 aW4gNDBNSHogKi8K
 --001636c5a6836596760480ff54dd--

From: Alexander Egorenkov <egorenar@googlemail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/144476: [ieee80211] Incorrect "SM power save mode" HT 
	capability constants
Date: Fri, 5 Mar 2010 12:38:55 +0100

 --001636d3467b1713e404810c2906
 Content-Type: text/plain; charset=ISO-8859-1
 
 I also noticed that net80211stack on FreeBSD 7.2 doesn't parse and update
 the MIMO PS state of nodes from beacon or association frames.
 But net80211 on FreeBSD 8 implements this functionality. Could it be also
 fixed please. Thanks.
 
 --001636d3467b1713e404810c2906
 Content-Type: text/html; charset=ISO-8859-1
 
 I also noticed that net80211stack on FreeBSD 7.2 doesn&#39;t parse and update the MIMO PS state of nodes from beacon or association frames.<br>But net80211 on FreeBSD 8 implements this functionality. Could it be also fixed please. Thanks.<br>
 
 --001636d3467b1713e404810c2906--
Responsible-Changed-From-To: freebsd-net->rpaulo 
Responsible-Changed-By: rpaulo 
Responsible-Changed-When: Thu Mar 11 06:58:03 UTC 2010 
Responsible-Changed-Why:  
Grab it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144476 
State-Changed-From-To: open->closed 
State-Changed-By: rpaulo 
State-Changed-When: Thu Mar 18 16:56:22 UTC 2010 
State-Changed-Why:  
Fixed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144476 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/144476: commit references a PR
Date: Thu, 18 Mar 2010 16:55:57 +0000 (UTC)

 Author: rpaulo
 Date: Thu Mar 18 16:55:47 2010
 New Revision: 205282
 URL: http://svn.freebsd.org/changeset/base/205282
 
 Log:
   Fix HTCAP's SM power save bits to match the ones in HEAD.
   
   PR:		144476
   Submitted by:	Alexander Egorenkov <egorenar at gmail.com>
 
 Modified:
   stable/7/sys/net80211/ieee80211.h
 
 Modified: stable/7/sys/net80211/ieee80211.h
 ==============================================================================
 --- stable/7/sys/net80211/ieee80211.h	Thu Mar 18 15:28:17 2010	(r205281)
 +++ stable/7/sys/net80211/ieee80211.h	Thu Mar 18 16:55:47 2010	(r205282)
 @@ -531,10 +531,10 @@ struct ieee80211_ie_htcap {
  #define	IEEE80211_HTCAP_LDPC		0x0001	/* LDPC supported */
  #define	IEEE80211_HTCAP_CHWIDTH40	0x0002	/* 20/40 supported */
  #define	IEEE80211_HTCAP_SMPS		0x000c	/* SM Power Save mode */
 -#define	IEEE80211_HTCAP_SMPS_OFF	0x0000	/* none (static mode) */
 +#define	IEEE80211_HTCAP_SMPS_OFF	0x000c	/* disabled */
  #define	IEEE80211_HTCAP_SMPS_DYNAMIC	0x0004	/* send RTS first */
  /* NB: SMPS value 2 is reserved */
 -#define	IEEE80211_HTCAP_SMPS_ENA	0x000c	/* enabled */
 +#define	IEEE80211_HTCAP_SMPS_ENA	0x0000	/* enabled (static mode) */
  #define	IEEE80211_HTCAP_GREENFIELD	0x0010	/* Greenfield supported */
  #define	IEEE80211_HTCAP_SHORTGI20	0x0020	/* Short GI in 20MHz */
  #define	IEEE80211_HTCAP_SHORTGI40	0x0040	/* Short GI in 40MHz */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
