Re: Setting HT capabilities in net80211



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@xxxxxxxxxxx> 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


Attachment: ieee80211_var.h.patch
Description: Binary data

Attachment: ieee80211.c.patch
Description: Binary data

Attachment: ieee80211_ht.c.patch
Description: Binary data

_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"

Relevant Pages

  • capabilities patch (v 0.1)
    ... Linux capabilities, which attempts to make them useful. ... * Second, a much more extensive change, the patch introduces a third ... static inline int security_capget (struct task_struct *target, ... static inline int security_capset_check (struct task_struct *target, ...
    (Linux-Kernel)
  • Re: [PATCH] 2.6.23: Filesystem capabilities 0.17
    ... If we stick with the current upstream file capabilities patch, ... +void fscap_drop(struct inode *inode) ... int vfs_statfs(struct dentry *dentry, struct kstatfs *buf) ... +static inline void fscap_mount ...
    (Linux-Kernel)
  • Re: [PATCH 1/2] BDI: Provide backing device capability information
    ... capabilities available on backing devices directly or on the backing devices ... static int rd_open(struct inode *inode, ...
    (Linux-Kernel)
  • Re: [PATCH 3/3] CRED: Move the effective capabilities into the cred struct
    ... capabilities of another, ... information around the kernel beyond the confines of the task struct. ... This is needed in order to deal with asynchronous i/o where security ...
    (Linux-Kernel)
  • Re: Driver for Microsoft USB Fingerprint Reader
    ... On our usb_device_id, we specify the vendor of the device, etc. ... he have some kind of struct that is complex enough to ... unsigned int height; ... pointer to our structure describing the device capabilities, ...
    (Linux-Kernel)