Skip to content

Commit 469ece5

Browse files
Aaradhana Sahujfvogel
authored andcommitted
wifi: ath12k: Fetch regdb.bin file from board-2.bin
[ Upstream commit 24f5875 ] Currently, ath12k_core_fetch_regdb() finds regdb.bin file through board id's but in board-2.bin file regdb.bin file is present with default board id because of which regdb.bin is not fetched. Add support to fetch regdb.bin file from board-2.bin through default board id. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu <[email protected]> Reviewed-by: Aditya Kumar Singh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit bb2d55681ee70eaabd88fe1e04c35f681ec3586d) Signed-off-by: Jack Vogel <[email protected]>
1 parent 2ab7838 commit 469ece5

File tree

1 file changed

+7
-5
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+7
-5
lines changed

drivers/net/wireless/ath/ath12k/core.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(ath12k_core_resume);
161161

162162
static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name,
163163
size_t name_len, bool with_variant,
164-
bool bus_type_mode)
164+
bool bus_type_mode, bool with_default)
165165
{
166166
/* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
167167
char variant[9 + ATH12K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
@@ -192,7 +192,9 @@ static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name,
192192
"bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
193193
ath12k_bus_str(ab->hif.bus),
194194
ab->qmi.target.chip_id,
195-
ab->qmi.target.board_id, variant);
195+
with_default ?
196+
ATH12K_BOARD_ID_DEFAULT : ab->qmi.target.board_id,
197+
variant);
196198
break;
197199
}
198200

@@ -204,19 +206,19 @@ static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name,
204206
static int ath12k_core_create_board_name(struct ath12k_base *ab, char *name,
205207
size_t name_len)
206208
{
207-
return __ath12k_core_create_board_name(ab, name, name_len, true, false);
209+
return __ath12k_core_create_board_name(ab, name, name_len, true, false, false);
208210
}
209211

210212
static int ath12k_core_create_fallback_board_name(struct ath12k_base *ab, char *name,
211213
size_t name_len)
212214
{
213-
return __ath12k_core_create_board_name(ab, name, name_len, false, false);
215+
return __ath12k_core_create_board_name(ab, name, name_len, false, false, true);
214216
}
215217

216218
static int ath12k_core_create_bus_type_board_name(struct ath12k_base *ab, char *name,
217219
size_t name_len)
218220
{
219-
return __ath12k_core_create_board_name(ab, name, name_len, false, true);
221+
return __ath12k_core_create_board_name(ab, name, name_len, false, true, true);
220222
}
221223

222224
const struct firmware *ath12k_core_firmware_request(struct ath12k_base *ab,

0 commit comments

Comments
 (0)