Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v9 2/2] mac80211:  Support ht-cap over-rides.
Date: Fri, 18 Nov 2011 09:31:04 -0800	[thread overview]
Message-ID: <4EC69658.8000309@candelatech.com> (raw)
In-Reply-To: <1321637322.10266.70.camel@jlt3.sipsolutions.net>

On 11/18/2011 09:28 AM, Johannes Berg wrote:
> On Fri, 2011-11-18 at 09:09 -0800, Ben Greear wrote:
>> On 11/18/2011 02:15 AM, Johannes Berg wrote:
>>> On Thu, 2011-11-17 at 13:54 -0800, greearb@candelatech.com wrote:
>>>
>>>> -void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
>>>> +bool ieee80111_cfg_override_disables_ht40(struct ieee80211_sub_if_data *sdata)
>>>> +{
>>>> +	const u16 flg = IEEE80211_HT_CAP_SUP_WIDTH_20_40;
>>>> +	if ((sdata->u.mgd.ht_capa_mask.cap_info&   flg)&&
>>>> +	    !(sdata->u.mgd.ht_capa.cap_info&   flg))
>>>> +		return true;
>>>
>>> This looks like it has endian bugs. Note that sband->ht_cap is
>>> ieee80211_sta_ht_cap, whereas sdata->u.mgd.ht_capa[_mask] is
>>> ieee80211_ht_cap -- the latter is in IEEE format (LE) while the former
>>> is in a complete different format that's easier to digest for the
>>> CPU :-)
>>
>> So, the ht-caps&  mask data coming from user-space via netlink
>> should be in network-byte order?
>
> It is that way right now, and that makes sense.

Ok, I think I am using host-byte-order currently in my iw
and hostap patches, which is why everything works for me.

But, I'll flip that all around....

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2011-11-18 17:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 21:54 [PATCH v9 1/2] wireless: Support ht-capabilities over-rides greearb
2011-11-17 21:54 ` [PATCH v9 2/2] mac80211: Support ht-cap over-rides greearb
2011-11-18 10:15   ` Johannes Berg
2011-11-18 17:09     ` Ben Greear
2011-11-18 17:28       ` Johannes Berg
2011-11-18 17:31         ` Ben Greear [this message]
2011-11-18 17:35           ` Johannes Berg
2011-11-18 10:04 ` [PATCH v9 1/2] wireless: Support ht-capabilities over-rides Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2011-11-08 23:15 [PATCH v9 2/2] mac80211: Support ht-cap over-rides greearb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC69658.8000309@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox