Commit b4f70ac0 authored by Jeff Johnson's avatar Jeff Johnson Committed by Kalle Valo

wifi: ath11k: Remove ath11k_base::bd_api

Currently struct ath11k_base defines the member bd_api. However, this
member is only accessed within ath11k_core_fetch_bdf(). Since the
scope is local just to that one function, remove it from ath11k_base
and instead just use a local stack variable.

No functional changes, compile tested only.
Signed-off-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231013-ath11k_bd_api-v1-1-3fefe4629706@quicinc.com
parent 3e9942fb
...@@ -1317,6 +1317,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd) ...@@ -1317,6 +1317,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
{ {
char *boardname = NULL, *fallback_boardname = NULL, *chip_id_boardname = NULL; char *boardname = NULL, *fallback_boardname = NULL, *chip_id_boardname = NULL;
char *filename, filepath[100]; char *filename, filepath[100];
int bd_api;
int ret = 0; int ret = 0;
filename = ATH11K_BOARD_API2_FILE; filename = ATH11K_BOARD_API2_FILE;
...@@ -1332,7 +1333,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd) ...@@ -1332,7 +1333,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
goto exit; goto exit;
} }
ab->bd_api = 2; bd_api = 2;
ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname, ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname,
ATH11K_BD_IE_BOARD, ATH11K_BD_IE_BOARD,
ATH11K_BD_IE_BOARD_NAME, ATH11K_BD_IE_BOARD_NAME,
...@@ -1381,7 +1382,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd) ...@@ -1381,7 +1382,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
if (!ret) if (!ret)
goto exit; goto exit;
ab->bd_api = 1; bd_api = 1;
ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE); ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE);
if (ret) { if (ret) {
ath11k_core_create_firmware_path(ab, filename, ath11k_core_create_firmware_path(ab, filename,
...@@ -1405,7 +1406,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd) ...@@ -1405,7 +1406,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
kfree(chip_id_boardname); kfree(chip_id_boardname);
if (!ret) if (!ret)
ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", ab->bd_api); ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", bd_api);
return ret; return ret;
} }
......
...@@ -906,7 +906,6 @@ struct ath11k_base { ...@@ -906,7 +906,6 @@ struct ath11k_base {
struct ath11k_targ_cap target_caps; struct ath11k_targ_cap target_caps;
u32 ext_service_bitmap[WMI_SERVICE_EXT_BM_SIZE]; u32 ext_service_bitmap[WMI_SERVICE_EXT_BM_SIZE];
bool pdevs_macaddr_valid; bool pdevs_macaddr_valid;
int bd_api;
struct ath11k_hw_params hw_params; struct ath11k_hw_params hw_params;
......
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