From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v8 2/2] mac80211: Support ht-cap over-rides.
Date: Thu, 17 Nov 2011 09:22:12 -0800 [thread overview]
Message-ID: <4EC542C4.1040402@candelatech.com> (raw)
In-Reply-To: <1321529293.3997.28.camel@jlt3.sipsolutions.net>
On 11/17/2011 03:28 AM, Johannes Berg wrote:
> Ben, sorry for the delay, I was too busy thinking about other stuff.
>
> On Thu, 2011-11-10 at 11:25 -0800, Ben Greear wrote:
>
>> But, I don't think it is going to work..or at least if it can, I
>> don't see a good way to do it.
>>
>> I'm stuck in the ieee80211_ht_cap_ie_to_sta_ht_cap method. With
>> my original patch, I apply overrides here, at the bottom of the
>> method. If we're associated (or started associating)
>> and user asked for over-rides, we'll apply requested overrides, else
>> nothing will change because the over-rides mask is not set.
>>
>> But, if I have to use pre-computed values here then I need to
>> be certain they are set properly. If association has been
>> requested, then that is fine. But, what about the
>> sta_apply_parameters() method? Can we guarantee that association has
>> been requested when this method is called? I think we cannot,
>> and if not, then I cannot use pre-computed sdata->used_ht_caps.
>> I could attempt to set a flag when used_ht_caps
>> has been calculated, and add a check for that, but that is yet another piece
>> of computed state that could be stale if we make a mistake somewhere.
>
> We can't, but can't we like assign sdata->ht_caps = sband->ht_caps? Or
> maybe even calculate restricted HT caps for both 2.4 and 5 GHz?
> Basically what I was thinking is this:
> struct sub_if_data {
> ...
> struct ieee80211_sta_ht_cap ht_cap[num_bands];
> ...
> };
So we'd have to copy this data from sbands[] upon creation
of the interface to make sure it is always initialized?
This would allow us to easily support the overrides for
non-station interfaces, so I do like that benefit.
Can the sbands[] data ever change for any reason once
an interface is created? If not, then probably this is
doable. If it can change, then we are screwed.
> We'd use *that* everywhere, and when associating we calculate
> sdata->ht_cap[band] = apply_overrides(sbands[band]->ht_cap);
>
> and when disassociating we simply
> memcpy(sdata->ht_cap[band], sbands[band]->ht_cap, ...);
>
> or so? Then we can always use sdata->ht_cap[bands] instead of
> sband->ht_caps everywhere, and overrides are implicit.
>
> Was this what you attempted?
I was trying to use a single calculated-ht-cap struct instead
of one for each band, and I was trying to put it into sdata->u.sta,
which made initialization issues much more scary for me.
It seems you are basically wanting to copy the sband[] data
local to each interface (sdata), and then we would remove sband from most
(or all?) of the method calls that deal with sband->ht_caps?
Looks like quite a bit of code churn, and probably requiring at least two
patches:
* Get rid of sband usage by copying the sband data into sdata
* Add the over-ride logic
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2011-11-17 17:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 19:36 [PATCH v8 1/2] wireless: Support ht-capabilities over-rides greearb
2011-11-08 19:36 ` [PATCH v8 2/2] mac80211: Support ht-cap over-rides greearb
2011-11-08 20:09 ` Johannes Berg
2011-11-08 20:44 ` Ben Greear
2011-11-08 20:58 ` Johannes Berg
2011-11-08 21:00 ` Johannes Berg
2011-11-08 21:06 ` Ben Greear
2011-11-08 21:08 ` Johannes Berg
2011-11-08 20:12 ` Johannes Berg
2011-11-08 20:17 ` Johannes Berg
2011-11-08 20:58 ` Ben Greear
2011-11-08 21:02 ` Johannes Berg
2011-11-08 23:11 ` Ben Greear
2011-11-09 8:37 ` Johannes Berg
2011-11-10 19:25 ` Ben Greear
2011-11-17 11:28 ` Johannes Berg
2011-11-17 17:22 ` Ben Greear [this message]
2011-11-17 17:25 ` Johannes Berg
2011-11-17 17:42 ` Ben Greear
2011-11-08 20:07 ` [PATCH v8 1/2] wireless: Support ht-capabilities over-rides Johannes Berg
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=4EC542C4.1040402@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.