From: Johannes Berg <johannes.berg@xxxxxxxxx> Instead of having to list all the hw flags in many places, just list the macro to generate everything in a new include file and include it in the proper places. Unfortunately this breaks docbook processing since that doesn't pre-process the file. It also doesn't generate the necessary Kconfig items. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- include/net/mac80211-hwflags.h | 97 ++++++++++++++++++++++++++++++++++++++ include/net/mac80211.h | 37 ++------------- net/mac80211/hwflags.c | 68 ++------------------------- net/mac80211/hwflags.h | 103 ++--------------------------------------- 4 files changed, 108 insertions(+), 197 deletions(-) create mode 100644 include/net/mac80211-hwflags.h diff --git a/include/net/mac80211-hwflags.h b/include/net/mac80211-hwflags.h new file mode 100644 index 000000000000..22c5eb1fe3ec --- /dev/null +++ b/include/net/mac80211-hwflags.h @@ -0,0 +1,97 @@ +/* this file intentionally has no include guard */ +DEFINE_HWFLAG(HAS_RATE_CONTROL, + IS_ENABLED(CONFIG_MAC80211_HW_HAS_RATE_CONTROL_ON), + IS_ENABLED(CONFIG_MAC80211_HW_HAS_RATE_CONTROL_OFF)), +DEFINE_HWFLAG(RX_INCLUDES_FCS, + IS_ENABLED(CONFIG_MAC80211_HW_RX_INCLUDES_FCS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_RX_INCLUDES_FCS_OFF)), +DEFINE_HWFLAG(HOST_BROADCAST_PS_BUFFERING, + IS_ENABLED(CONFIG_MAC80211_HW_HOST_BROADCAST_PS_BUFFERING_ON), + IS_ENABLED(CONFIG_MAC80211_HW_HOST_BROADCAST_PS_BUFFERING_OFF)), +DEFINE_HWFLAG(SIGNAL_UNSPEC, + IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_UNSPEC_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_UNSPEC_OFF)), +DEFINE_HWFLAG(SIGNAL_DBM, + IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_DBM_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_DBM_OFF)), +DEFINE_HWFLAG(NEED_DTIM_BEFORE_ASSOC, + IS_ENABLED(CONFIG_MAC80211_HW_NEED_DTIM_BEFORE_ASSOC_ON), + IS_ENABLED(CONFIG_MAC80211_HW_NEED_DTIM_BEFORE_ASSOC_OFF)), +DEFINE_HWFLAG(SPECTRUM_MGMT, + IS_ENABLED(CONFIG_MAC80211_HW_SPECTRUM_MGMT_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SPECTRUM_MGMT_OFF)), +DEFINE_HWFLAG(AMPDU_AGGREGATION, + IS_ENABLED(CONFIG_MAC80211_HW_AMPDU_AGGREGATION_ON), + IS_ENABLED(CONFIG_MAC80211_HW_AMPDU_AGGREGATION_OFF)), +DEFINE_HWFLAG(SUPPORTS_PS, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PS_OFF)), +DEFINE_HWFLAG(PS_NULLFUNC_STACK, + IS_ENABLED(CONFIG_MAC80211_HW_PS_NULLFUNC_STACK_ON), + IS_ENABLED(CONFIG_MAC80211_HW_PS_NULLFUNC_STACK_OFF)), +DEFINE_HWFLAG(SUPPORTS_DYNAMIC_PS, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_DYNAMIC_PS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_DYNAMIC_PS_OFF)), +DEFINE_HWFLAG(MFP_CAPABLE, + IS_ENABLED(CONFIG_MAC80211_HW_MFP_CAPABLE_ON), + IS_ENABLED(CONFIG_MAC80211_HW_MFP_CAPABLE_OFF)), +DEFINE_HWFLAG(WANT_MONITOR_VIF, + IS_ENABLED(CONFIG_MAC80211_HW_WANT_MONITOR_VIF_ON), + IS_ENABLED(CONFIG_MAC80211_HW_WANT_MONITOR_VIF_OFF)), +DEFINE_HWFLAG(NO_AUTO_VIF, + IS_ENABLED(CONFIG_MAC80211_HW_NO_AUTO_VIF_ON), + IS_ENABLED(CONFIG_MAC80211_HW_NO_AUTO_VIF_OFF)), +DEFINE_HWFLAG(SW_CRYPTO_CONTROL, + IS_ENABLED(CONFIG_MAC80211_HW_SW_CRYPTO_CONTROL_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SW_CRYPTO_CONTROL_OFF)), +DEFINE_HWFLAG(SUPPORT_FAST_XMIT, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORT_FAST_XMIT_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORT_FAST_XMIT_OFF)), +DEFINE_HWFLAG(REPORTS_TX_ACK_STATUS, + IS_ENABLED(CONFIG_MAC80211_HW_REPORTS_TX_ACK_STATUS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_REPORTS_TX_ACK_STATUS_OFF)), +DEFINE_HWFLAG(CONNECTION_MONITOR, + IS_ENABLED(CONFIG_MAC80211_HW_CONNECTION_MONITOR_ON), + IS_ENABLED(CONFIG_MAC80211_HW_CONNECTION_MONITOR_OFF)), +DEFINE_HWFLAG(QUEUE_CONTROL, + IS_ENABLED(CONFIG_MAC80211_HW_QUEUE_CONTROL_ON), + IS_ENABLED(CONFIG_MAC80211_HW_QUEUE_CONTROL_OFF)), +DEFINE_HWFLAG(SUPPORTS_PER_STA_GTK, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PER_STA_GTK_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PER_STA_GTK_OFF)), +DEFINE_HWFLAG(AP_LINK_PS, + IS_ENABLED(CONFIG_MAC80211_HW_AP_LINK_PS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_AP_LINK_PS_OFF)), +DEFINE_HWFLAG(TX_AMPDU_SETUP_IN_HW, + IS_ENABLED(CONFIG_MAC80211_HW_TX_AMPDU_SETUP_IN_HW_ON), + IS_ENABLED(CONFIG_MAC80211_HW_TX_AMPDU_SETUP_IN_HW_OFF)), +DEFINE_HWFLAG(SUPPORTS_RC_TABLE, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_RC_TABLE_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_RC_TABLE_OFF)), +DEFINE_HWFLAG(P2P_DEV_ADDR_FOR_INTF, + IS_ENABLED(CONFIG_MAC80211_HW_P2P_DEV_ADDR_FOR_INTF_ON), + IS_ENABLED(CONFIG_MAC80211_HW_P2P_DEV_ADDR_FOR_INTF_OFF)), +DEFINE_HWFLAG(TIMING_BEACON_ONLY, + IS_ENABLED(CONFIG_MAC80211_HW_TIMING_BEACON_ONLY_ON), + IS_ENABLED(CONFIG_MAC80211_HW_TIMING_BEACON_ONLY_OFF)), +DEFINE_HWFLAG(SUPPORTS_HT_CCK_RATES, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_HT_CCK_RATES_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_HT_CCK_RATES_OFF)), +DEFINE_HWFLAG(CHANCTX_STA_CSA, + IS_ENABLED(CONFIG_MAC80211_HW_CHANCTX_STA_CSA_ON), + IS_ENABLED(CONFIG_MAC80211_HW_CHANCTX_STA_CSA_OFF)), +DEFINE_HWFLAG(SUPPORTS_CLONED_SKBS, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_CLONED_SKBS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_CLONED_SKBS_OFF)), +DEFINE_HWFLAG(SINGLE_SCAN_ON_ALL_BANDS, + IS_ENABLED(CONFIG_MAC80211_HW_SINGLE_SCAN_ON_ALL_BANDS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SINGLE_SCAN_ON_ALL_BANDS_OFF)), +DEFINE_HWFLAG(TDLS_WIDER_BW, + IS_ENABLED(CONFIG_MAC80211_HW_TDLS_WIDER_BW_ON), + IS_ENABLED(CONFIG_MAC80211_HW_TDLS_WIDER_BW_OFF)), +DEFINE_HWFLAG(SUPPORTS_AMSDU_IN_AMPDU, + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_AMSDU_IN_AMPDU_ON), + IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_AMSDU_IN_AMPDU_OFF)), +DEFINE_HWFLAG(BEACON_TX_STATUS, + IS_ENABLED(CONFIG_MAC80211_HW_BEACON_TX_STATUS_ON), + IS_ENABLED(CONFIG_MAC80211_HW_BEACON_TX_STATUS_OFF)), diff --git a/include/net/mac80211.h b/include/net/mac80211.h index db98eb5673c2..6d864a00df11 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1904,40 +1904,9 @@ struct ieee80211_txq { * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { - IEEE80211_HW_HAS_RATE_CONTROL, - IEEE80211_HW_RX_INCLUDES_FCS, - IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING, - IEEE80211_HW_SIGNAL_UNSPEC, - IEEE80211_HW_SIGNAL_DBM, - IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC, - IEEE80211_HW_SPECTRUM_MGMT, - IEEE80211_HW_AMPDU_AGGREGATION, - IEEE80211_HW_SUPPORTS_PS, - IEEE80211_HW_PS_NULLFUNC_STACK, - IEEE80211_HW_SUPPORTS_DYNAMIC_PS, - IEEE80211_HW_MFP_CAPABLE, - IEEE80211_HW_WANT_MONITOR_VIF, - IEEE80211_HW_NO_AUTO_VIF, - IEEE80211_HW_SW_CRYPTO_CONTROL, - IEEE80211_HW_SUPPORT_FAST_XMIT, - IEEE80211_HW_REPORTS_TX_ACK_STATUS, - IEEE80211_HW_CONNECTION_MONITOR, - IEEE80211_HW_QUEUE_CONTROL, - IEEE80211_HW_SUPPORTS_PER_STA_GTK, - IEEE80211_HW_AP_LINK_PS, - IEEE80211_HW_TX_AMPDU_SETUP_IN_HW, - IEEE80211_HW_SUPPORTS_RC_TABLE, - IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF, - IEEE80211_HW_TIMING_BEACON_ONLY, - IEEE80211_HW_SUPPORTS_HT_CCK_RATES, - IEEE80211_HW_CHANCTX_STA_CSA, - IEEE80211_HW_SUPPORTS_CLONED_SKBS, - IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS, - IEEE80211_HW_TDLS_WIDER_BW, - IEEE80211_HW_SUPPORTS_AMSDU_IN_AMPDU, - IEEE80211_HW_BEACON_TX_STATUS, - - /* keep last, obviously */ +#define DEFINE_HWFLAG(_flg, _on, _off) IEEE80211_HW_##_flg +#include <net/mac80211-hwflags.h> +#undef DEFINE_HWFLAG NUM_IEEE80211_HW_FLAGS }; diff --git a/net/mac80211/hwflags.c b/net/mac80211/hwflags.c index eca0e3ee6818..fc053c334e94 100644 --- a/net/mac80211/hwflags.c +++ b/net/mac80211/hwflags.c @@ -14,70 +14,10 @@ struct static_key_false hwflags_keys[NUM_IEEE80211_HW_FLAGS] = { }; static s8 hwflags_defstate[] = { - [IEEE80211_HW_HAS_RATE_CONTROL] = - HWFLAGS_DEFSTATE_HAS_RATE_CONTROL, - [IEEE80211_HW_RX_INCLUDES_FCS] = - HWFLAGS_DEFSTATE_RX_INCLUDES_FCS, - [IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING] = - HWFLAGS_DEFSTATE_HOST_BROADCAST_PS_BUFFERING, - [IEEE80211_HW_SIGNAL_UNSPEC] = - HWFLAGS_DEFSTATE_SIGNAL_UNSPEC, - [IEEE80211_HW_SIGNAL_DBM] = - HWFLAGS_DEFSTATE_SIGNAL_DBM, - [IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC] = - HWFLAGS_DEFSTATE_NEED_DTIM_BEFORE_ASSOC, - [IEEE80211_HW_SPECTRUM_MGMT] = - HWFLAGS_DEFSTATE_SPECTRUM_MGMT, - [IEEE80211_HW_AMPDU_AGGREGATION] = - HWFLAGS_DEFSTATE_AMPDU_AGGREGATION, - [IEEE80211_HW_SUPPORTS_PS] = - HWFLAGS_DEFSTATE_SUPPORTS_PS, - [IEEE80211_HW_PS_NULLFUNC_STACK] = - HWFLAGS_DEFSTATE_PS_NULLFUNC_STACK, - [IEEE80211_HW_SUPPORTS_DYNAMIC_PS] = - HWFLAGS_DEFSTATE_SUPPORTS_DYNAMIC_PS, - [IEEE80211_HW_MFP_CAPABLE] = - HWFLAGS_DEFSTATE_MFP_CAPABLE, - [IEEE80211_HW_WANT_MONITOR_VIF] = - HWFLAGS_DEFSTATE_WANT_MONITOR_VIF, - [IEEE80211_HW_NO_AUTO_VIF] = - HWFLAGS_DEFSTATE_NO_AUTO_VIF, - [IEEE80211_HW_SW_CRYPTO_CONTROL] = - HWFLAGS_DEFSTATE_SW_CRYPTO_CONTROL, - [IEEE80211_HW_SUPPORT_FAST_XMIT] = - HWFLAGS_DEFSTATE_SUPPORT_FAST_XMIT, - [IEEE80211_HW_REPORTS_TX_ACK_STATUS] = - HWFLAGS_DEFSTATE_REPORTS_TX_ACK_STATUS, - [IEEE80211_HW_CONNECTION_MONITOR] = - HWFLAGS_DEFSTATE_CONNECTION_MONITOR, - [IEEE80211_HW_QUEUE_CONTROL] = - HWFLAGS_DEFSTATE_QUEUE_CONTROL, - [IEEE80211_HW_SUPPORTS_PER_STA_GTK] = - HWFLAGS_DEFSTATE_SUPPORTS_PER_STA_GTK, - [IEEE80211_HW_AP_LINK_PS] = - HWFLAGS_DEFSTATE_AP_LINK_PS, - [IEEE80211_HW_TX_AMPDU_SETUP_IN_HW] = - HWFLAGS_DEFSTATE_TX_AMPDU_SETUP_IN_HW, - [IEEE80211_HW_SUPPORTS_RC_TABLE] = - HWFLAGS_DEFSTATE_SUPPORTS_RC_TABLE, - [IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF] = - HWFLAGS_DEFSTATE_P2P_DEV_ADDR_FOR_INTF, - [IEEE80211_HW_TIMING_BEACON_ONLY] = - HWFLAGS_DEFSTATE_TIMING_BEACON_ONLY, - [IEEE80211_HW_SUPPORTS_HT_CCK_RATES] = - HWFLAGS_DEFSTATE_SUPPORTS_HT_CCK_RATES, - [IEEE80211_HW_CHANCTX_STA_CSA] = - HWFLAGS_DEFSTATE_CHANCTX_STA_CSA, - [IEEE80211_HW_SUPPORTS_CLONED_SKBS] = - HWFLAGS_DEFSTATE_SUPPORTS_CLONED_SKBS, - [IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS] = - HWFLAGS_DEFSTATE_SINGLE_SCAN_ON_ALL_BANDS, - [IEEE80211_HW_TDLS_WIDER_BW] = - HWFLAGS_DEFSTATE_TDLS_WIDER_BW, - [IEEE80211_HW_SUPPORTS_AMSDU_IN_AMPDU] = - HWFLAGS_DEFSTATE_SUPPORTS_AMSDU_IN_AMPDU, - [IEEE80211_HW_BEACON_TX_STATUS] = - HWFLAGS_DEFSTATE_BEACON_TX_STATUS, +#define DEFINE_HWFLAG(_flg, _on, _off) \ + [IEEE80211_HW_##_flg] = HWFLAGS_DEFSTATE_##_flg +#include <net/mac80211-hwflags.h> +#undef DEFINE_HWFLAG }; void ieee80211_hw_mod_flag(struct ieee80211_hw *hw, diff --git a/net/mac80211/hwflags.h b/net/mac80211/hwflags.h index 86a3deeaaf47..299d86f867b9 100644 --- a/net/mac80211/hwflags.h +++ b/net/mac80211/hwflags.h @@ -13,106 +13,11 @@ extern struct static_key_false hwflags_keys[NUM_IEEE80211_HW_FLAGS]; #ifdef CONFIG_JUMP_LABEL -#define HWFLAGS_DEFSTATE(_name, _on, _off) \ - HWFLAGS_DEFSTATE_##_name = -1 + ((_on) ^ (_off)) * (1 + _on) - enum hwflags_defstates { -HWFLAGS_DEFSTATE(HAS_RATE_CONTROL, - IS_ENABLED(CONFIG_MAC80211_HW_HAS_RATE_CONTROL_ON), - IS_ENABLED(CONFIG_MAC80211_HW_HAS_RATE_CONTROL_OFF)), -HWFLAGS_DEFSTATE(RX_INCLUDES_FCS, - IS_ENABLED(CONFIG_MAC80211_HW_RX_INCLUDES_FCS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_RX_INCLUDES_FCS_OFF)), -HWFLAGS_DEFSTATE(HOST_BROADCAST_PS_BUFFERING, - IS_ENABLED(CONFIG_MAC80211_HW_HOST_BROADCAST_PS_BUFFERING_ON), - IS_ENABLED(CONFIG_MAC80211_HW_HOST_BROADCAST_PS_BUFFERING_OFF)), -HWFLAGS_DEFSTATE(SIGNAL_UNSPEC, - IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_UNSPEC_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_UNSPEC_OFF)), -HWFLAGS_DEFSTATE(SIGNAL_DBM, - IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_DBM_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SIGNAL_DBM_OFF)), -HWFLAGS_DEFSTATE(NEED_DTIM_BEFORE_ASSOC, - IS_ENABLED(CONFIG_MAC80211_HW_NEED_DTIM_BEFORE_ASSOC_ON), - IS_ENABLED(CONFIG_MAC80211_HW_NEED_DTIM_BEFORE_ASSOC_OFF)), -HWFLAGS_DEFSTATE(SPECTRUM_MGMT, - IS_ENABLED(CONFIG_MAC80211_HW_SPECTRUM_MGMT_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SPECTRUM_MGMT_OFF)), -HWFLAGS_DEFSTATE(AMPDU_AGGREGATION, - IS_ENABLED(CONFIG_MAC80211_HW_AMPDU_AGGREGATION_ON), - IS_ENABLED(CONFIG_MAC80211_HW_AMPDU_AGGREGATION_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_PS, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PS_OFF)), -HWFLAGS_DEFSTATE(PS_NULLFUNC_STACK, - IS_ENABLED(CONFIG_MAC80211_HW_PS_NULLFUNC_STACK_ON), - IS_ENABLED(CONFIG_MAC80211_HW_PS_NULLFUNC_STACK_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_DYNAMIC_PS, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_DYNAMIC_PS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_DYNAMIC_PS_OFF)), -HWFLAGS_DEFSTATE(MFP_CAPABLE, - IS_ENABLED(CONFIG_MAC80211_HW_MFP_CAPABLE_ON), - IS_ENABLED(CONFIG_MAC80211_HW_MFP_CAPABLE_OFF)), -HWFLAGS_DEFSTATE(WANT_MONITOR_VIF, - IS_ENABLED(CONFIG_MAC80211_HW_WANT_MONITOR_VIF_ON), - IS_ENABLED(CONFIG_MAC80211_HW_WANT_MONITOR_VIF_OFF)), -HWFLAGS_DEFSTATE(NO_AUTO_VIF, - IS_ENABLED(CONFIG_MAC80211_HW_NO_AUTO_VIF_ON), - IS_ENABLED(CONFIG_MAC80211_HW_NO_AUTO_VIF_OFF)), -HWFLAGS_DEFSTATE(SW_CRYPTO_CONTROL, - IS_ENABLED(CONFIG_MAC80211_HW_SW_CRYPTO_CONTROL_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SW_CRYPTO_CONTROL_OFF)), -HWFLAGS_DEFSTATE(SUPPORT_FAST_XMIT, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORT_FAST_XMIT_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORT_FAST_XMIT_OFF)), -HWFLAGS_DEFSTATE(REPORTS_TX_ACK_STATUS, - IS_ENABLED(CONFIG_MAC80211_HW_REPORTS_TX_ACK_STATUS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_REPORTS_TX_ACK_STATUS_OFF)), -HWFLAGS_DEFSTATE(CONNECTION_MONITOR, - IS_ENABLED(CONFIG_MAC80211_HW_CONNECTION_MONITOR_ON), - IS_ENABLED(CONFIG_MAC80211_HW_CONNECTION_MONITOR_OFF)), -HWFLAGS_DEFSTATE(QUEUE_CONTROL, - IS_ENABLED(CONFIG_MAC80211_HW_QUEUE_CONTROL_ON), - IS_ENABLED(CONFIG_MAC80211_HW_QUEUE_CONTROL_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_PER_STA_GTK, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PER_STA_GTK_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_PER_STA_GTK_OFF)), -HWFLAGS_DEFSTATE(AP_LINK_PS, - IS_ENABLED(CONFIG_MAC80211_HW_AP_LINK_PS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_AP_LINK_PS_OFF)), -HWFLAGS_DEFSTATE(TX_AMPDU_SETUP_IN_HW, - IS_ENABLED(CONFIG_MAC80211_HW_TX_AMPDU_SETUP_IN_HW_ON), - IS_ENABLED(CONFIG_MAC80211_HW_TX_AMPDU_SETUP_IN_HW_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_RC_TABLE, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_RC_TABLE_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_RC_TABLE_OFF)), -HWFLAGS_DEFSTATE(P2P_DEV_ADDR_FOR_INTF, - IS_ENABLED(CONFIG_MAC80211_HW_P2P_DEV_ADDR_FOR_INTF_ON), - IS_ENABLED(CONFIG_MAC80211_HW_P2P_DEV_ADDR_FOR_INTF_OFF)), -HWFLAGS_DEFSTATE(TIMING_BEACON_ONLY, - IS_ENABLED(CONFIG_MAC80211_HW_TIMING_BEACON_ONLY_ON), - IS_ENABLED(CONFIG_MAC80211_HW_TIMING_BEACON_ONLY_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_HT_CCK_RATES, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_HT_CCK_RATES_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_HT_CCK_RATES_OFF)), -HWFLAGS_DEFSTATE(CHANCTX_STA_CSA, - IS_ENABLED(CONFIG_MAC80211_HW_CHANCTX_STA_CSA_ON), - IS_ENABLED(CONFIG_MAC80211_HW_CHANCTX_STA_CSA_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_CLONED_SKBS, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_CLONED_SKBS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_CLONED_SKBS_OFF)), -HWFLAGS_DEFSTATE(SINGLE_SCAN_ON_ALL_BANDS, - IS_ENABLED(CONFIG_MAC80211_HW_SINGLE_SCAN_ON_ALL_BANDS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SINGLE_SCAN_ON_ALL_BANDS_OFF)), -HWFLAGS_DEFSTATE(TDLS_WIDER_BW, - IS_ENABLED(CONFIG_MAC80211_HW_TDLS_WIDER_BW_ON), - IS_ENABLED(CONFIG_MAC80211_HW_TDLS_WIDER_BW_OFF)), -HWFLAGS_DEFSTATE(SUPPORTS_AMSDU_IN_AMPDU, - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_AMSDU_IN_AMPDU_ON), - IS_ENABLED(CONFIG_MAC80211_HW_SUPPORTS_AMSDU_IN_AMPDU_OFF)), -HWFLAGS_DEFSTATE(BEACON_TX_STATUS, - IS_ENABLED(CONFIG_MAC80211_HW_BEACON_TX_STATUS_ON), - IS_ENABLED(CONFIG_MAC80211_HW_BEACON_TX_STATUS_OFF)), +#define DEFINE_HWFLAG(_flg, _on, _off) \ + HWFLAGS_DEFSTATE_##_flg = -1 + ((_on) ^ (_off)) * (1 + _on) +#include <net/mac80211-hwflags.h> +#undef DEFINE_HWFLAG }; bool _____optimisation_missing(void); -- 2.6.2 -- 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