Search Linux Wireless

Re: [PATCH] ieee80211: Print human-readable disassoc/deauth reason codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux