Search Linux Wireless

Re: [RFC v5 4/5] mac80211: use Kconfig counters to elide unnecessary code

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

 



On Mon, 2015-11-23 at 16:06 +0100, Michal Marek wrote:
> 
> > Indeed, the runtime check will catch both of these.
> 
> Will it catch the former case? The driver built out of has not way to
> select or increment any of the CONFIG_MAC80211_* options.

Correct, but ieee80211_hwflags_check() will verify that the flags are
compatible with the compilation settings, regardless of the respective
source. Note that our preferred way of working out-of-tree is backports
anyway and that ships with mac80211 and cfg80211 due to the relatively
tight coupling between all the pieces.

In any case - consider first compiling mac80211 with a driver that does
"count CONFIG_HWFLAG_XYZ", and no other drivers. This means
that hwflags_state[XYZ] will end up as 1. So once the other (out-of-
tree) driver is registered, it'll pass hw->flags with the bit of XYZ
not set. This would cause a warning and refusal to register
in ieee80211_hwflags_check().

johannes
--
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