Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2010 17:17:21 +0100
From:      Alexander Egorenkov <egorenar@googlemail.com>
To:        Rui Paulo <rpaulo@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Setting HT capabilities in net80211
Message-ID:  <2d3b7e441003130817y1210508fycb3cb22a9a7198d1@mail.gmail.com>
In-Reply-To: <6A317237-60A2-440A-9DBC-511545C34B36@FreeBSD.org>
References:  <2d3b7e441003042348h2150de3eub5a7af5248b5e947@mail.gmail.com> <4B92F057.9080508@errno.com> <2d3b7e441003070004r74646cdci268a5101056c50e2@mail.gmail.com> <FF382027-F72F-40BA-B14C-7F2F72DD684A@gmail.com> <2d3b7e441003102332l1cc9b9ddh1e62fce61129248@mail.gmail.com> <6A317237-60A2-440A-9DBC-511545C34B36@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--001636c5bc0296e6e50481b0fb48
Content-Type: text/plain; charset=ISO-8859-1

I have finally patched net80211 on my system and added HT extended
capabilities support.

Here are the patches.

I added a new variable to ieee80211com struct.
It seems that only the lowest 16 bit of ic_htcaps are used, an alternative
to a new variable would be to use the highest 16 bit of ic_htcaps.

Here is a code snippet from my driver which sets ic_htextcaps:

ic->ic_htextcaps = IEEE80211_HTCAP_MCSFBACK_UNSOL |
        IEEE80211_HTCAP_HTC |
        IEEE80211_HTCAP_RDR;

I also captured an association process with 802.11n AP and it seems the
capabilities were set right.

Alex.

On Thu, Mar 11, 2010 at 8:44 AM, Rui Paulo <rpaulo@freebsd.org> wrote:

>
> On 11 Mar 2010, at 16:32, Alexander Egorenkov wrote:
>
>  There are already constants defined in iee80211.h.
>> E.g. IEEE80211_HTCAP_MCSFBACK_UNSOL.
>>
>> But the problem is that e.g. IEEE80211_HTCAP_MCSFBACK_UNSOL is equal to
>> 0x0200
>> and the capabilty constant IEEE80211_HTCAP_RXSTBC_2STREAM has the same
>> value.
>> So we cannot use ic_htcap field for both capabilities because they will
>> overwrite each other.
>>
>> But  we can add a new field to ieee80211com struct like ic_htextcaps where
>> all the extended
>> HT capabilities can be set. And this new field can be checked in function
>> ieee80211_add_htcap_body.
>>
>
> I'm okay with this route.
>
>
>  Another option is to change the value of IEEE80211_HTCAP_MCSFBACK_UNSOL
>> and all other extended capability constant which conflict with normal HT
>> capability constants.
>>
>
> I think you don't want to do this because sooner or later you'll need
> ic_htextcaps.
>
> --
> Rui Paulo
>
>

--001636c5bc0296e6e50481b0fb48
Content-Type: application/octet-stream; name="ieee80211_var.h.patch"
Content-Disposition: attachment; filename="ieee80211_var.h.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g6qm8zm20

LS0tIGllZWU4MDIxMV92YXIuaC5vcmlnCTIwMTAtMDMtMTMgMTA6MzY6MzMuMDAwMDAwMDAwICsw
MTAwCisrKyBpZWVlODAyMTFfdmFyLmgJMjAxMC0wMy0xMyAxMToyMjo0MC4wMDAwMDAwMDAgKzAx
MDAKQEAgLTEzNyw2ICsxMzcsNyBAQAogCXVpbnQzMl90CQlpY19mbGFnc192ZW47CS8qIHZlbmRv
ciBzdGF0ZSBmbGFncyAqLwogCXVpbnQzMl90CQlpY19jYXBzOwkvKiBjYXBhYmlsaXRpZXMgKi8K
IAl1aW50MzJfdAkJaWNfaHRjYXBzOwkvKiBIVCBjYXBhYmlsaXRpZXMgKi8KKwl1aW50MzJfdAkJ
aWNfaHRleHRjYXBzOwkvKiBIVCBleHRlbmRlZCBjYXBhYmlsaXRpZXMgKi8KIAl1aW50MzJfdAkJ
aWNfY3J5cHRvY2FwczsJLyogY3J5cHRvIGNhcGFiaWxpdGllcyAqLwogCXVpbnQ4X3QJCQlpY19t
b2RlY2Fwc1syXTsJLyogc2V0IG9mIG1vZGUgY2FwYWJpbGl0aWVzICovCiAJdWludDhfdAkJCWlj
X3Byb21pc2M7CS8qIHZhcCdzIG5lZWRpbmcgcHJvbWlzYyBtb2RlICovCkBAIC0zNDAsNiArMzQx
LDcgQEAKIAl1aW50MzJfdAkJaXZfZmxhZ3NfdmVuOwkvKiB2ZW5kb3Igc3RhdGUgZmxhZ3MgKi8K
IAl1aW50MzJfdAkJaXZfY2FwczsJLyogY2FwYWJpbGl0aWVzICovCiAJdWludDMyX3QJCWl2X2h0
Y2FwczsJLyogSFQgY2FwYWJpbGl0aWVzICovCisJdWludDMyX3QJCWl2X2h0ZXh0Y2FwczsJLyog
SFQgZXh0ZW5kZWQgY2FwYWJpbGl0aWVzICovCiAJZW51bSBpZWVlODAyMTFfb3Btb2RlCWl2X29w
bW9kZTsJLyogb3BlcmF0aW9uIG1vZGUgKi8KIAllbnVtIGllZWU4MDIxMV9zdGF0ZQlpdl9zdGF0
ZTsJLyogc3RhdGUgbWFjaGluZSBzdGF0ZSAqLwogCWVudW0gaWVlZTgwMjExX3N0YXRlCWl2X25z
dGF0ZTsJLyogcGVuZGluZyBzdGF0ZSAqLwo=
--001636c5bc0296e6e50481b0fb48
Content-Type: application/octet-stream; name="ieee80211.c.patch"
Content-Disposition: attachment; filename="ieee80211.c.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g6qm950c1

LS0tIGllZWU4MDIxMS5jLm9yaWcJMjAxMC0wMy0xMyAxMDozODo1NC4wMDAwMDAwMDAgKzAxMDAK
KysrIGllZWU4MDIxMS5jCTIwMTAtMDMtMTMgMTA6Mzk6MjEuMDAwMDAwMDAwICswMTAwCkBAIC00
MDUsNiArNDA1LDcgQEAKIAl2YXAtPml2X2ZsYWdzX3ZlbiA9IGljLT5pY19mbGFnc192ZW47CiAJ
dmFwLT5pdl9jYXBzID0gaWMtPmljX2NhcHMgJn4gSUVFRTgwMjExX0NfT1BNT0RFOwogCXZhcC0+
aXZfaHRjYXBzID0gaWMtPmljX2h0Y2FwczsKKwl2YXAtPml2X2h0ZXh0Y2FwcyA9IGljLT5pY19o
dGV4dGNhcHM7CiAJdmFwLT5pdl9vcG1vZGUgPSBvcG1vZGU7CiAJdmFwLT5pdl9jYXBzIHw9IGll
ZWU4MDIxMV9vcGNhcFtvcG1vZGVdOwogCXN3aXRjaCAob3Btb2RlKSB7Cg==
--001636c5bc0296e6e50481b0fb48
Content-Type: application/octet-stream; name="ieee80211_ht.c.patch"
Content-Disposition: attachment; filename="ieee80211_ht.c.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g6qm99o72

LS0tIGllZWU4MDIxMV9odC5jLm9yaWcJMjAxMC0wMy0xMyAxMDozNjo0Mi4wMDAwMDAwMDAgKzAx
MDAKKysrIGllZWU4MDIxMV9odC5jCTIwMTAtMDMtMTMgMTA6NDk6MTguMDAwMDAwMDAwICswMTAw
CkBAIC0yMzA0LDcgKzIzMDQsNyBAQAogCWZybSArPSAyOwkJCQlcCiB9IHdoaWxlICgwKQogCXN0
cnVjdCBpZWVlODAyMTF2YXAgKnZhcCA9IG5pLT5uaV92YXA7Ci0JdWludDE2X3QgY2FwczsKKwl1
aW50MTZfdCBjYXBzLCBleHRjYXBzOwogCWludCByeG1heCwgZGVuc2l0eTsKIAogCS8qIEhUIGNh
cGFiaWxpdGllcyAqLwpAQCAtMjM2Miw4ICsyMzYyLDE3IEBACiAJICovCiAJaWVlZTgwMjExX3Nl
dF9odHJhdGVzKGZybSwgJmllZWU4MDIxMV9yYXRlc2V0XzExbik7CiAKLQlmcm0gKz0gc2l6ZW9m
KHN0cnVjdCBpZWVlODAyMTFfaWVfaHRjYXApIC0KKwlmcm0gKz0gX19vZmZzZXRvZihzdHJ1Y3Qg
aWVlZTgwMjExX2llX2h0Y2FwLCBoY19leHRjYXApIC0KIAkJX19vZmZzZXRvZihzdHJ1Y3QgaWVl
ZTgwMjExX2llX2h0Y2FwLCBoY19tY3NzZXQpOworCisJLyogSFQgZXh0ZW5kZWQgY2FwYWJpbGl0
aWVzICovCisJZXh0Y2FwcyA9IHZhcC0+aXZfaHRleHRjYXBzICYgMHhmZmZmOworCisJQUREU0hP
UlQoZnJtLCBleHRjYXBzKTsKKworCWZybSArPSBzaXplb2Yoc3RydWN0IGllZWU4MDIxMV9pZV9o
dGNhcCkgLQorCQlfX29mZnNldG9mKHN0cnVjdCBpZWVlODAyMTFfaWVfaHRjYXAsIGhjX3R4YmYp
OworCiAJcmV0dXJuIGZybTsKICN1bmRlZiBBRERTSE9SVAogfQo=
--001636c5bc0296e6e50481b0fb48--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2d3b7e441003130817y1210508fycb3cb22a9a7198d1>