summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <quic_jjohnson@quicinc.com>2023-10-13 07:24:09 -0700
committerKalle Valo <quic_kvalo@quicinc.com>2023-10-18 11:30:38 +0300
commit2180f7ac0abeee63cc608b1c084764b67832596c (patch)
tree7801135929c76e302fa96f46d75f38623af63b3a
parentb4f70ac0fa88363d2f2494c6079f5c38ff58caed (diff)
downloadlinux-2180f7ac0abeee63cc608b1c084764b67832596c.tar.gz
linux-2180f7ac0abeee63cc608b1c084764b67832596c.tar.bz2
linux-2180f7ac0abeee63cc608b1c084764b67832596c.zip
wifi: ath12k: Remove ath12k_base::bd_api
Currently struct ath12k_base defines the member bd_api. However, this member is only accessed within ath12k_core_fetch_bdf(). Since the scope is local just to that one function, remove it from ath12k_base and instead just use a local stack variable. No functional changes, compile tested only. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20231013-ath11k_bd_api-v1-2-3fefe4629706@quicinc.com
-rw-r--r--drivers/net/wireless/ath/ath12k/core.c7
-rw-r--r--drivers/net/wireless/ath/ath12k/core.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index 94857100414d..b936760b5140 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -360,6 +360,7 @@ int ath12k_core_fetch_board_data_api_1(struct ath12k_base *ab,
int ath12k_core_fetch_bdf(struct ath12k_base *ab, struct ath12k_board_data *bd)
{
char boardname[BOARD_NAME_SIZE];
+ int bd_api;
int ret;
ret = ath12k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE);
@@ -368,12 +369,12 @@ int ath12k_core_fetch_bdf(struct ath12k_base *ab, struct ath12k_board_data *bd)
return ret;
}
- ab->bd_api = 2;
+ bd_api = 2;
ret = ath12k_core_fetch_board_data_api_n(ab, bd, boardname);
if (!ret)
goto success;
- ab->bd_api = 1;
+ bd_api = 1;
ret = ath12k_core_fetch_board_data_api_1(ab, bd, ATH12K_DEFAULT_BOARD_FILE);
if (ret) {
ath12k_err(ab, "failed to fetch board-2.bin or board.bin from %s\n",
@@ -382,7 +383,7 @@ int ath12k_core_fetch_bdf(struct ath12k_base *ab, struct ath12k_board_data *bd)
}
success:
- ath12k_dbg(ab, ATH12K_DBG_BOOT, "using board api %d\n", ab->bd_api);
+ ath12k_dbg(ab, ATH12K_DBG_BOOT, "using board api %d\n", bd_api);
return 0;
}
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 254eb42a85c5..fafb2a5b9350 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -737,7 +737,6 @@ struct ath12k_base {
struct ath12k_wmi_target_cap_arg target_caps;
u32 ext_service_bitmap[WMI_SERVICE_EXT_BM_SIZE];
bool pdevs_macaddr_valid;
- int bd_api;
const struct ath12k_hw_params *hw_params;