From: Kalle Valo <kvalo@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 03/12] ath11k: define max_radios in hw_params
Date: Tue, 16 Jun 2020 17:00:46 +0300 [thread overview]
Message-ID: <1592316055-24958-4-git-send-email-kvalo@codeaurora.org> (raw)
In-Reply-To: <1592316055-24958-1-git-send-email-kvalo@codeaurora.org>
From: Anilkumar Kolli <akolli@codeaurora.org>
IPQ6018 needs different value for max_radios so make it configurable via hw_params.
No functional changes. Compile tested only.
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/core.c | 1 +
drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
drivers/net/wireless/ath/ath11k/htc.c | 2 +-
drivers/net/wireless/ath/ath11k/hw.h | 1 +
drivers/net/wireless/ath/ath11k/reg.c | 2 +-
drivers/net/wireless/ath/ath11k/wmi.c | 4 ++--
6 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 92d7925ad0f4..67822508327c 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -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,
},
};
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 791d971784ce..5680b99a4f5c 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -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];
diff --git a/drivers/net/wireless/ath/ath11k/htc.c b/drivers/net/wireless/ath/ath11k/htc.c
index ad13c648b679..bc0026c1e4a6 100644
--- a/drivers/net/wireless/ath/ath11k/htc.c
+++ b/drivers/net/wireless/ath/ath11k/htc.c
@@ -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;
}
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index f95ad31d3d6c..ba897d186cf5 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -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;
diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c
index 7c9dc91cc48a..0ba80e6f3979 100644
--- a/drivers/net/wireless/ath/ath11k/reg.c
+++ b/drivers/net/wireless/ath/ath11k/reg.c
@@ -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]);
}
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 8e3437a65673..cd1bdb2a75c9 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -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];
--
2.7.4
next prev parent reply other threads:[~2020-06-16 14:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 14:00 [PATCH 00/12] preparation for IPQ6018 support Kalle Valo
2020-06-16 14:00 ` [PATCH 01/12] ath11k: ahb: call ath11k_core_init() before irq configuration Kalle Valo
2020-06-23 7:53 ` Kalle Valo
2020-06-16 14:00 ` [PATCH 02/12] ath11k: convert ath11k_hw_params to an array Kalle Valo
2020-06-16 14:00 ` Kalle Valo [this message]
2020-06-16 14:00 ` [PATCH 04/12] ath11k: add hw_ops for pdev id to hw_mac mapping Kalle Valo
2020-06-16 14:00 ` [PATCH 05/12] ath11k: Add bdf-addr in hw_params Kalle Valo
2020-06-16 14:00 ` [PATCH 06/12] ath11k: create a common function to request all firmware files Kalle Valo
2020-06-16 14:00 ` [PATCH 07/12] ath11k: don't use defines for hw specific firmware directories Kalle Valo
2020-06-16 14:00 ` [PATCH 08/12] ath11k: change ath11k_core_fetch_board_data_api_n() to use ath11k_core_create_firmware_path() Kalle Valo
2020-06-16 14:00 ` [PATCH 09/12] ath11k: remove useless info messages Kalle Valo
2020-06-16 14:00 ` [PATCH 10/12] ath11k: qmi: cleanup " Kalle Valo
2020-06-16 14:00 ` [PATCH 11/12] ath11k: don't use defines in hw_params Kalle Valo
2020-06-16 14:00 ` [PATCH 12/12] ath11k: remove define ATH11K_QMI_DEFAULT_CAL_FILE_NAME Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1592316055-24958-4-git-send-email-kvalo@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).