Commit 2f0c0e3b authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Kalle Valo

wcn36xx: Add ability to download wcn3680 specific firmware parameters

This commit modifies wcn36xx_smd_start() so that it can download wcn3680
specific firmware parameters if we are talking to the wcn3680. If not the
original generic firmware parameter table should continue to be used for
wcn3620 and wcn3660.
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200910150747.2179122-4-bryan.odonoghue@linaro.org
parent 3e977c5c
...@@ -625,6 +625,8 @@ int wcn36xx_smd_start(struct wcn36xx *wcn) ...@@ -625,6 +625,8 @@ int wcn36xx_smd_start(struct wcn36xx *wcn)
int ret; int ret;
int i; int i;
size_t len; size_t len;
int cfg_elements;
static struct wcn36xx_cfg_val *cfg_vals;
mutex_lock(&wcn->hal_mutex); mutex_lock(&wcn->hal_mutex);
INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_REQ); INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_REQ);
...@@ -637,9 +639,17 @@ int wcn36xx_smd_start(struct wcn36xx *wcn) ...@@ -637,9 +639,17 @@ int wcn36xx_smd_start(struct wcn36xx *wcn)
body = (struct wcn36xx_hal_mac_start_req_msg *)wcn->hal_buf; body = (struct wcn36xx_hal_mac_start_req_msg *)wcn->hal_buf;
len = body->header.len; len = body->header.len;
for (i = 0; i < ARRAY_SIZE(wcn36xx_cfg_vals); i++) { if (wcn->rf_id == RF_IRIS_WCN3680) {
ret = put_cfg_tlv_u32(wcn, &len, wcn36xx_cfg_vals[i].cfg_id, cfg_vals = wcn3680_cfg_vals;
wcn36xx_cfg_vals[i].value); cfg_elements = ARRAY_SIZE(wcn3680_cfg_vals);
} else {
cfg_vals = wcn36xx_cfg_vals;
cfg_elements = ARRAY_SIZE(wcn36xx_cfg_vals);
}
for (i = 0; i < cfg_elements; i++) {
ret = put_cfg_tlv_u32(wcn, &len, cfg_vals[i].cfg_id,
cfg_vals[i].value);
if (ret) if (ret)
goto out; goto out;
} }
......
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