1 // SPDX-License-Identifier: GPL-2.0-only
6 #define DEFINE(s)[s] = #s
8 static const char * const wcn36xx_firmware_caps_names
[] = {
12 DEFINE(SLM_SESSIONIZATION
),
13 DEFINE(DOT11AC_OPMODE
),
16 DEFINE(P2P_GO_NOA_DECOUPLE_INIT_SCAN
),
17 DEFINE(WLANACTIVE_OFFLOAD
),
18 DEFINE(BEACON_OFFLOAD
),
21 DEFINE(BCN_MISS_OFFLOAD
),
22 DEFINE(STA_POWERSAVE
),
23 DEFINE(STA_ADVANCED_PWRSAVE
),
32 DEFINE(WLAN_ROAM_SCAN_OFFLOAD
),
33 DEFINE(SPECULATIVE_PS_POLL
),
35 DEFINE(IBSS_HEARTBEAT_OFFLOAD
),
36 DEFINE(WLAN_SCAN_OFFLOAD
),
37 DEFINE(WLAN_PERIODIC_TX_PTRN
),
40 DEFINE(FW_IN_TX_PATH
),
41 DEFINE(EXTENDED_NSOFFLOAD_SLOT
),
43 DEFINE(HT40_OBSS_SCAN
),
44 DEFINE(UPDATE_CHANNEL_LIST
),
45 DEFINE(WLAN_MCADDR_FLT
),
48 DEFINE(TDLS_SCAN_COEXISTENCE
),
49 DEFINE(LINK_LAYER_STATS_MEAS
),
51 DEFINE(EXTENDED_SCAN
),
52 DEFINE(DYNAMIC_WMM_PS
),
53 DEFINE(MAC_SPOOFED_SCAN
),
54 DEFINE(BMU_ERROR_GENERIC_RECOVERY
),
57 DEFINE(WPS_PRBRSP_TMPL
),
58 DEFINE(BCN_IE_FLT_DELTA
),
59 DEFINE(TDLS_OFF_CHANNEL
),
61 DEFINE(MGMT_FRAME_LOGGING
),
62 DEFINE(ENHANCED_TXBD_COMPLETION
),
63 DEFINE(LOGGING_ENHANCEMENT
),
64 DEFINE(EXT_SCAN_ENHANCED
),
65 DEFINE(MEMORY_DUMP_SUPPORTED
),
66 DEFINE(PER_PKT_STATS_SUPPORTED
),
69 DEFINE(ANTENNA_DIVERSITY_SELECTION
),
74 const char *wcn36xx_firmware_get_cap_name(enum wcn36xx_firmware_feat_caps x
)
76 if (x
>= ARRAY_SIZE(wcn36xx_firmware_caps_names
))
78 return wcn36xx_firmware_caps_names
[x
];
81 void wcn36xx_firmware_set_feat_caps(u32
*bitmap
,
82 enum wcn36xx_firmware_feat_caps cap
)
86 if (cap
< 0 || cap
> 127) {
87 wcn36xx_warn("error cap idx %d\n", cap
);
93 bitmap
[arr_idx
] |= (1 << bit_idx
);
96 int wcn36xx_firmware_get_feat_caps(u32
*bitmap
,
97 enum wcn36xx_firmware_feat_caps cap
)
101 if (cap
< 0 || cap
> 127) {
102 wcn36xx_warn("error cap idx %d\n", cap
);
109 return (bitmap
[arr_idx
] & (1 << bit_idx
)) ? 1 : 0;
112 void wcn36xx_firmware_clear_feat_caps(u32
*bitmap
,
113 enum wcn36xx_firmware_feat_caps cap
)
115 int arr_idx
, bit_idx
;
117 if (cap
< 0 || cap
> 127) {
118 wcn36xx_warn("error cap idx %d\n", cap
);
124 bitmap
[arr_idx
] &= ~(1 << bit_idx
);