wifi: iwlegacy: avoid size increase

My previous patch caused a slight code size increase when DEBUG_FS is disabled,
as Stanislaw Gruszka pointed out.

Fix this with an added IS_ENABLED() check.

Fixes: cf6b9ba172 ("wifi: iwlegacy: don't warn for unused variables with DEBUG_FS=n")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Link: https://patch.msgid.link/20250304144210.997531-1-arnd@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Arnd Bergmann 2025-03-04 15:42:07 +01:00 committed by Johannes Berg
parent 0e28ee106c
commit 72a6caf5ec

View File

@ -2495,6 +2495,9 @@ il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
u8 valid_tx_ant;
u8 ant_sel_tx;
if (!IS_ENABLED(CONFIG_MAC80211_DEBUGFS))
return;
il = lq_sta->drv;
valid_tx_ant = il->hw_params.valid_tx_ant;
if (lq_sta->dbg_fixed_rate) {