From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [wireless-next PATCH 3/5] wifi: Allow overriding some HT information.
Date: Wed, 02 Nov 2011 09:13:50 +0100 [thread overview]
Message-ID: <1320221630.3950.22.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4EAAD95E.1030001@candelatech.com> (sfid-20111028_183341_942256_664FE0B1)
On Fri, 2011-10-28 at 09:33 -0700, Ben Greear wrote:
> >> * Allow configuring the mcs (/n) rates available.
> >> * Allow configuration of MAX-A-MSDU
> >> * Allow configuration of A-MPDU factor& density.
> >>
> >> Users can only remove existing rates. The MSDU and MPDU
> >> values can be set to any value allowed by the 802.11n
> >> specification.
> >
> > That can't work -- the device might not support it.
>
> The device would always support removing rates, right?
No. As I pointed out in another email, you need to think beyond
mac80211.
> As for the MSDU and MPDU stuff, I would need to add capabilities
> flags and then enable each driver as they are tested?
No. Neither of these can ever be increased so it's not that simple. And
making it smaller is always possible since it's just advertising.
Presumably you do understand the reasons for this advertising/these
restrictions?
> > I also don't really like the way you pass in some binary "mask" when
> > it's not really a binary masking operation.
>
> I found the mask to work very well. It's easy enough to
> deal with in user-space, and easily allows us to add override features
> (the additional bits to support the MPDU stuff once the
> HT rates logic was in is a very small bit of code).
>
> Otherwise, I'll need to add new netlink commands for each new
> feature. That is going to bloat hostapd as well as the
> kernel.
I'm not sure it'll bloat it, but I can live with the binary struct. It
seems a bit ugly to me but I think it's acceptable. However, you should
document more clearly what struct it is and how it is defined to work.
You're also relying on userspace to not do stupid things (otherwise your
code reads memory out of bounds), this would help:
> /* add attributes here, update the policy in nl80211.c */
Anyway, I'm out of breath. I think this is simply bad implementation &
execution of your ideas. These are somewhat interesting features and I'm
willing to accommodate even some of the more esoteric features that most
people will never use, but I'm quite annoyed by how much of your patches
I end up doing myself through review.
Please focus more on the quality of your patches in "details" like
security, API issues, non-mac80211 drivers and even simply logic like
the A-MSDU thing I just pointed out. I'm spending a disproportionate
amount of time reviewing your patches over and over again with every
patchset and am no longer willing to do that.
Obviously we'll still have to discuss things like whether it should be a
connection or interface parameter -- but I shouldn't have to point out
trivial security issues -- you should be focusing more on these things
while writing the code, not after the fact where it's much harder. E.g.
never ever use nla_data() without validating nla_len() in some way, it
seems to me that should be completely obvious.
> >> @@ -114,6 +115,19 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
> >> if (ht_info_ie[1]< sizeof(struct ieee80211_ht_info))
> >> return;
> >>
> >> + memcpy(&ht_cap,&sband->ht_cap, sizeof(ht_cap));
> >> + /*
> >> + * This is for an association attempt, and we must
> >> + * advert at least the first 8 rates, even if we
> >> + * will later force the rate control to a lower rate.
> >> + */
> >> + ieee80211_apply_htcap_overrides(sdata,&ht_cap, 8);
> >
> > Yuck, why, why hard-code 8, etc.
>
> I can make a define that involves MCS7.
I don't think I understand then why MCSs 0-7 must be supported?
johannes
next prev parent reply other threads:[~2011-11-02 8:13 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 5:11 [wireless-next PATCH 1/5] mac80211: Support forcing station to disable 11n greearb
2011-10-28 5:11 ` [wireless-next PATCH 2/5] wifi: Support disabling ht40 greearb
2011-10-28 8:09 ` Johannes Berg
2011-10-28 16:25 ` Ben Greear
2011-10-28 5:11 ` [wireless-next PATCH 3/5] wifi: Allow overriding some HT information greearb
2011-10-28 8:12 ` Johannes Berg
2011-10-28 16:33 ` Ben Greear
2011-11-02 8:13 ` Johannes Berg [this message]
2011-11-02 16:59 ` Ben Greear
2011-11-02 17:49 ` Johannes Berg
2011-11-02 18:03 ` Ben Greear
2011-11-03 8:32 ` Johannes Berg
2011-10-28 5:11 ` [wireless-next PATCH 4/5] wifi: Warn if cannot add station debugfs entries greearb
2011-10-28 8:13 ` Johannes Berg
2011-10-28 16:13 ` Ben Greear
2011-10-28 5:11 ` [wireless-next PATCH 5/5] wifi-debugfs: Fix AMSDU rate printout greearb
2011-10-28 8:13 ` Johannes Berg
2011-11-17 17:49 ` Ben Greear
2011-11-17 18:03 ` John W. Linville
2011-10-28 5:15 ` [wireless-next PATCH 1/5] mac80211: Support forcing station to disable 11n Ben Greear
2011-10-28 8:08 ` Johannes Berg
2011-10-28 16:24 ` Ben Greear
2011-11-02 7:56 ` Johannes Berg
2011-11-02 16:37 ` Ben Greear
2011-10-28 18:55 ` Ben Greear
2011-11-02 7:53 ` Johannes Berg
2011-11-02 16:34 ` Ben Greear
2011-11-02 17:51 ` Johannes Berg
2011-11-03 6:04 ` Ben Greear
2011-11-03 8:30 ` Johannes Berg
2011-11-03 18:17 ` Ben Greear
2011-11-04 14:42 ` Johannes Berg
2011-11-04 16:11 ` Ben Greear
2011-11-04 16:17 ` 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=1320221630.3950.22.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--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;
as well as URLs for NNTP newsgroup(s).