From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
linux-wireless@vger.kernel.org, linville@tuxdriver.com,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Subject: Re: [PATCHv2 2/2] mac80211: add support for mcs masks
Date: Tue, 10 Jan 2012 19:42:29 +0100 [thread overview]
Message-ID: <20120110184229.GE19790@pandem0nium> (raw)
In-Reply-To: <1326216911.3438.11.camel@jlt3.sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]
On Tue, Jan 10, 2012 at 06:35:11PM +0100, Johannes Berg wrote:
> On Tue, 2012-01-10 at 18:28 +0100, Simon Wunderlich wrote:
> > Hello Johannes,
>
> > > All this logic is pretty complex, maybe we could translate the bitmap to
> > > an array of unsigned longs and use test_bit() instead of open-coding it
> > > for 8-bit words?
> >
> > Mhm, I would rather not add further copies into this fast path function, and
> > simply casting will result in bad behaviour (alignment, endianess).
>
> Well you don't want to copy it, you want to maintain the data that way,
> I think? Ok I think I see -- you're concerned about the masking etc.
> Dunno. Maybe at least there's a way to abstract out all the
> calculations?
>
I have looked into bitmap.h which offers a great set of functions for
unsigned long arrays, but unfortunately I couldn't find anything equivalent
for u8. Writing our own u8 bitmap function set would be overkill here (IMHO),
and abstracting/hiding these functions into defines or changing everything to
unsigned long to be consistent (including ht_caps.mcs.rx_mask) would be ugly
as well.
I also don't consider this piece of code to be beautiful, but would suggest
to keep it for now - or maybe someone else has a better idea.
> > Generally
> > changing the mcs_mask to u32 is possible,
>
> No, u64 might work today but maybe somebody will want to use higher
> MCSes in the future?
Yeah, u64 is possible on some architectures too - most of my routers are
32 bit however. :)
Cheers,
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-01-10 18:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 19:58 [PATCHv2 0/2] add support for mcs masks Simon Wunderlich
2012-01-05 19:58 ` [PATCHv2 1/2] nl80211: " Simon Wunderlich
2012-01-09 13:01 ` Johannes Berg
2012-01-05 19:58 ` [PATCHv2 2/2] mac80211: " Simon Wunderlich
2012-01-09 13:04 ` Johannes Berg
2012-01-10 17:28 ` Simon Wunderlich
2012-01-10 17:35 ` Johannes Berg
2012-01-10 18:42 ` Simon Wunderlich [this message]
2012-01-05 19:58 ` [PATCH 1/2] iw: add nl80211 bitrates Simon Wunderlich
2012-01-05 19:58 ` [PATCH 2/2] iw: remove ifdefs for mcs mask Simon Wunderlich
2012-01-09 13:05 ` Johannes Berg
2012-01-10 18:29 ` Simon Wunderlich
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=20120110184229.GE19790@pandem0nium \
--to=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=siwu@hrz.tu-chemnitz.de \
/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