mac80211: use Kconfig counters to determine feature optimisation

Drivers that would like to have feature flag optimisations are
currently required to select _ON and _OFF symbols for each one,
indicating whether they'd like to be optimised for being on or
off respectively. This handles badly, if a new feature flag is
added then all such drivers need to be updated.

Instead, use the new Kconfig counters to determine
 (a) the number of times each feature flag was selected ON
 (b) the number of mac80211 drivers built

if (a) > 0 then it was requested on by at least one driver
if (a) < (b) then it was not requested by at least one driver

This allows determining whether or not optimisations should be
made more easily, and importantly, adding new flags no longer
requires editing the Kconfig for all drivers since they won't
want the new flag - only the driver it's added for does.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 files changed