From: Johannes Berg <johannes@sipsolutions.net>
To: Ivan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 1/7] mac80211: mesh power mode indication in QoS frames
Date: Wed, 26 Oct 2011 11:57:34 +0200 [thread overview]
Message-ID: <4EA7D98E.2000408@sipsolutions.net> (raw)
In-Reply-To: <CAG5dHkQtVC-cgEWcZOC_woLGeQ75Pkg-JmETWxVKJGdHs8qoOA@mail.gmail.com> (sfid-20111023_151105_679810_72556443)
On 10/23/2011 3:10 PM, Ivan Bezyazychnyy wrote:
> On 21 October 2011 13:52, Johannes Berg<johannes@sipsolutions.net> wrote:
>> On Fri, 2011-10-21 at 12:36 +0400, Ivan Bezyazychnyy wrote:
>>
>>> +/* mesh power save level subfield mask */
>>> +#define IEEE80211_QOS_CTL_PS_LEVEL 0x0200
>>
>> That looks like it could use a better name?
>
> Do you mean something like IEEE80211_QOS_CTL_MESH_POWER_SAVE_LEVEL?
> The first half is similar to previous constants.
Not really .. I mean, it's like you have two levels, 0 and 1, but you
say this is the level. Why not say this is the 1 level, and the 0 level
is implied otherwise?
For example, typically, if we have something like a bit in a field that
indicates the device is getting too hot, we'll call it
FOOBAR_DEVICE_TOO_HOT
and not
FOOBAR_DEVICE_TEMPERATURE_LEVEL
Basically I think that the constant name you have now tells me nothing
about what it means when the bit is set and I think it'd be better if it
did. That might not even be possible, but I think in that case you
really should add a comment, e.g.:
/*
* mesh power save level:
* set - the device is doing ...
* unset - the device is doing ...
*/
#define ...
johannes
prev parent reply other threads:[~2011-10-26 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 8:36 [RFC 1/7] mac80211: mesh power mode indication in QoS frames Ivan Bezyazychnyy
2011-10-21 9:52 ` Johannes Berg
2011-10-23 13:10 ` Ivan Bezyazychnyy
2011-10-26 9:57 ` Johannes Berg [this message]
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=4EA7D98E.2000408@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=ivan.bezyazychnyy@gmail.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 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.