Commit b1cc29e9 authored by Anilkumar Kolli's avatar Anilkumar Kolli Committed by Kalle Valo

ath11k: define max_radios in hw_params

IPQ6018 needs different value for max_radios so make it configurable via hw_params.

No functional changes. Compile tested only.
Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1592316055-24958-4-git-send-email-kvalo@codeaurora.org
parent d3318abf
......@@ -26,6 +26,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.board_size = IPQ8074_MAX_BOARD_DATA_SZ,
.cal_size = IPQ8074_MAX_CAL_DATA_SZ,
},
.max_radios = 3,
},
};
......
......@@ -3820,7 +3820,7 @@ int ath11k_dp_rx_process_wbm_err(struct ath11k_base *ab,
int total_num_buffs_reaped = 0;
int ret, i;
for (i = 0; i < MAX_RADIOS; i++)
for (i = 0; i < ab->num_radios; i++)
__skb_queue_head_init(&msdu_list[i]);
srng = &ab->hal.srng_list[dp->rx_rel_ring.ring_id];
......
......@@ -748,7 +748,7 @@ int ath11k_htc_init(struct ath11k_base *ab)
htc->wmi_ep_count = 3;
break;
default:
htc->wmi_ep_count = 3;
htc->wmi_ep_count = ab->hw_params.max_radios;
break;
}
......
......@@ -107,6 +107,7 @@ enum ath11k_bus {
struct ath11k_hw_params {
const char *name;
u16 hw_rev;
u8 max_radios;
struct {
const char *dir;
size_t board_size;
......
......@@ -699,7 +699,7 @@ void ath11k_reg_free(struct ath11k_base *ab)
{
int i;
for (i = 0; i < MAX_RADIOS; i++) {
for (i = 0; i < ab->hw_params.max_radios; i++) {
kfree(ab->default_regd[i]);
kfree(ab->new_regd[i]);
}
......
......@@ -6682,7 +6682,7 @@ int ath11k_wmi_connect(struct ath11k_base *ab)
u8 wmi_ep_count;
wmi_ep_count = ab->htc.wmi_ep_count;
if (wmi_ep_count > MAX_RADIOS)
if (wmi_ep_count > ab->hw_params.max_radios)
return -1;
for (i = 0; i < wmi_ep_count; i++)
......@@ -6704,7 +6704,7 @@ int ath11k_wmi_pdev_attach(struct ath11k_base *ab,
{
struct ath11k_pdev_wmi *wmi_handle;
if (pdev_id >= MAX_RADIOS)
if (pdev_id >= ab->hw_params.max_radios)
return -EINVAL;
wmi_handle = &ab->wmi_ab.wmi[pdev_id];
......
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