public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Calvin Owens <jcalvinowens@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ieee80211: Print human-readable disassoc/deauth reason codes
Date: Mon, 10 Feb 2014 08:39:19 -0800	[thread overview]
Message-ID: <1392050359.2507.10.camel@joe-AO722> (raw)
In-Reply-To: <1392030546.4128.11.camel@jlt4.sipsolutions.net>

On Mon, 2014-02-10 at 12:09 +0100, Johannes Berg wrote:
> On Wed, 2014-02-05 at 20:44 -0800, Joe Perches wrote:
> 
> > Perhaps use a more common kernel style
> > 
> > struct ieee80211_reason_descriptions {
> > 	u16		code;
> > 	const char *	desc;
> > }
> > 
> > and enumerate the reason codes with #defines and use a
> > macro to populate the descriptions
> > 
> > #define IEEE80211_REASON_RESERVED		0
> > #define IEEE80211_REASON_UNSPECIFIED		1
[]
> Isn't it more efficient to just let the compiler generate it with a big
> switch() statement?

That'd be fine too.

The benefit of the #defines is that you typically
get an external .h file for the entries.

Calvin's suggested code looked pretty fragile.



  reply	other threads:[~2014-02-10 16:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06  1:44 [PATCH] ieee80211: Print human-readable disassoc/deauth reason codes Calvin Owens
2014-02-06  4:44 ` Joe Perches
2014-02-10 11:09   ` Johannes Berg
2014-02-10 16:39     ` Joe Perches [this message]
2014-02-11  1:25       ` [PATCH v2] " Calvin Owens
2014-02-11  1:39         ` Joe Perches
2014-02-11 16:37           ` [PATCH v3] " Calvin Owens
2014-02-11 16:48             ` Antonio Quartulli
2014-02-11 17:59               ` Calvin Owens
2014-02-11 18:19               ` Johannes Berg
2014-02-11 17:13             ` Joe Perches
2014-02-11 17:52               ` Calvin Owens
2014-02-11 18:36                 ` [PATCH v4] " Calvin Owens
2014-02-12 10:46                   ` Johannes Berg
2014-02-06  8:37 ` [PATCH] " Johannes Berg
2014-02-07 12:53   ` Kalle Valo
2014-02-07 15:46     ` Larry Finger
2014-02-07 22:25       ` Luca Coelho
2014-02-08  6:38         ` Kalle Valo
2014-02-07 20:50   ` Calvin Owens
2014-02-10  8:50 ` Jouni Malinen

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=1392050359.2507.10.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=jcalvinowens@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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