Commit 9149a94a authored by Benjamin Stürz's avatar Benjamin Stürz Committed by Kalle Valo

wcn36xx: Improve readability of wcn36xx_caps_name

Use macros to force strict ordering of the elements.
Signed-off-by: default avatarBenjamin Stürz <benni@stuerz.xyz>
Reviewed-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220328212912.283393-1-benni@stuerz.xyz
parent 7c458230
...@@ -192,70 +192,74 @@ static inline u8 get_sta_index(struct ieee80211_vif *vif, ...@@ -192,70 +192,74 @@ static inline u8 get_sta_index(struct ieee80211_vif *vif,
sta_priv->sta_index; sta_priv->sta_index;
} }
#define DEFINE(s) [s] = #s
static const char * const wcn36xx_caps_names[] = { static const char * const wcn36xx_caps_names[] = {
"MCC", /* 0 */ DEFINE(MCC),
"P2P", /* 1 */ DEFINE(P2P),
"DOT11AC", /* 2 */ DEFINE(DOT11AC),
"SLM_SESSIONIZATION", /* 3 */ DEFINE(SLM_SESSIONIZATION),
"DOT11AC_OPMODE", /* 4 */ DEFINE(DOT11AC_OPMODE),
"SAP32STA", /* 5 */ DEFINE(SAP32STA),
"TDLS", /* 6 */ DEFINE(TDLS),
"P2P_GO_NOA_DECOUPLE_INIT_SCAN",/* 7 */ DEFINE(P2P_GO_NOA_DECOUPLE_INIT_SCAN),
"WLANACTIVE_OFFLOAD", /* 8 */ DEFINE(WLANACTIVE_OFFLOAD),
"BEACON_OFFLOAD", /* 9 */ DEFINE(BEACON_OFFLOAD),
"SCAN_OFFLOAD", /* 10 */ DEFINE(SCAN_OFFLOAD),
"ROAM_OFFLOAD", /* 11 */ DEFINE(ROAM_OFFLOAD),
"BCN_MISS_OFFLOAD", /* 12 */ DEFINE(BCN_MISS_OFFLOAD),
"STA_POWERSAVE", /* 13 */ DEFINE(STA_POWERSAVE),
"STA_ADVANCED_PWRSAVE", /* 14 */ DEFINE(STA_ADVANCED_PWRSAVE),
"AP_UAPSD", /* 15 */ DEFINE(AP_UAPSD),
"AP_DFS", /* 16 */ DEFINE(AP_DFS),
"BLOCKACK", /* 17 */ DEFINE(BLOCKACK),
"PHY_ERR", /* 18 */ DEFINE(PHY_ERR),
"BCN_FILTER", /* 19 */ DEFINE(BCN_FILTER),
"RTT", /* 20 */ DEFINE(RTT),
"RATECTRL", /* 21 */ DEFINE(RATECTRL),
"WOW", /* 22 */ DEFINE(WOW),
"WLAN_ROAM_SCAN_OFFLOAD", /* 23 */ DEFINE(WLAN_ROAM_SCAN_OFFLOAD),
"SPECULATIVE_PS_POLL", /* 24 */ DEFINE(SPECULATIVE_PS_POLL),
"SCAN_SCH", /* 25 */ DEFINE(SCAN_SCH),
"IBSS_HEARTBEAT_OFFLOAD", /* 26 */ DEFINE(IBSS_HEARTBEAT_OFFLOAD),
"WLAN_SCAN_OFFLOAD", /* 27 */ DEFINE(WLAN_SCAN_OFFLOAD),
"WLAN_PERIODIC_TX_PTRN", /* 28 */ DEFINE(WLAN_PERIODIC_TX_PTRN),
"ADVANCE_TDLS", /* 29 */ DEFINE(ADVANCE_TDLS),
"BATCH_SCAN", /* 30 */ DEFINE(BATCH_SCAN),
"FW_IN_TX_PATH", /* 31 */ DEFINE(FW_IN_TX_PATH),
"EXTENDED_NSOFFLOAD_SLOT", /* 32 */ DEFINE(EXTENDED_NSOFFLOAD_SLOT),
"CH_SWITCH_V1", /* 33 */ DEFINE(CH_SWITCH_V1),
"HT40_OBSS_SCAN", /* 34 */ DEFINE(HT40_OBSS_SCAN),
"UPDATE_CHANNEL_LIST", /* 35 */ DEFINE(UPDATE_CHANNEL_LIST),
"WLAN_MCADDR_FLT", /* 36 */ DEFINE(WLAN_MCADDR_FLT),
"WLAN_CH144", /* 37 */ DEFINE(WLAN_CH144),
"NAN", /* 38 */ DEFINE(NAN),
"TDLS_SCAN_COEXISTENCE", /* 39 */ DEFINE(TDLS_SCAN_COEXISTENCE),
"LINK_LAYER_STATS_MEAS", /* 40 */ DEFINE(LINK_LAYER_STATS_MEAS),
"MU_MIMO", /* 41 */ DEFINE(MU_MIMO),
"EXTENDED_SCAN", /* 42 */ DEFINE(EXTENDED_SCAN),
"DYNAMIC_WMM_PS", /* 43 */ DEFINE(DYNAMIC_WMM_PS),
"MAC_SPOOFED_SCAN", /* 44 */ DEFINE(MAC_SPOOFED_SCAN),
"BMU_ERROR_GENERIC_RECOVERY", /* 45 */ DEFINE(BMU_ERROR_GENERIC_RECOVERY),
"DISA", /* 46 */ DEFINE(DISA),
"FW_STATS", /* 47 */ DEFINE(FW_STATS),
"WPS_PRBRSP_TMPL", /* 48 */ DEFINE(WPS_PRBRSP_TMPL),
"BCN_IE_FLT_DELTA", /* 49 */ DEFINE(BCN_IE_FLT_DELTA),
"TDLS_OFF_CHANNEL", /* 51 */ DEFINE(TDLS_OFF_CHANNEL),
"RTT3", /* 52 */ DEFINE(RTT3),
"MGMT_FRAME_LOGGING", /* 53 */ DEFINE(MGMT_FRAME_LOGGING),
"ENHANCED_TXBD_COMPLETION", /* 54 */ DEFINE(ENHANCED_TXBD_COMPLETION),
"LOGGING_ENHANCEMENT", /* 55 */ DEFINE(LOGGING_ENHANCEMENT),
"EXT_SCAN_ENHANCED", /* 56 */ DEFINE(EXT_SCAN_ENHANCED),
"MEMORY_DUMP_SUPPORTED", /* 57 */ DEFINE(MEMORY_DUMP_SUPPORTED),
"PER_PKT_STATS_SUPPORTED", /* 58 */ DEFINE(PER_PKT_STATS_SUPPORTED),
"EXT_LL_STAT", /* 60 */ DEFINE(EXT_LL_STAT),
"WIFI_CONFIG", /* 61 */ DEFINE(WIFI_CONFIG),
"ANTENNA_DIVERSITY_SELECTION", /* 62 */ DEFINE(ANTENNA_DIVERSITY_SELECTION),
}; };
#undef DEFINE
static const char *wcn36xx_get_cap_name(enum place_holder_in_cap_bitmap x) static const char *wcn36xx_get_cap_name(enum place_holder_in_cap_bitmap x)
{ {
if (x >= ARRAY_SIZE(wcn36xx_caps_names)) if (x >= ARRAY_SIZE(wcn36xx_caps_names))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment