Message ID | 20210721201927.100369-2-jouni@codeaurora.org |
---|---|
State | New |
Headers | show |
Series | [1/4] ath11k: use hw_params to access board_size and cal_offset | expand |
Jouni Malinen <jouni@codeaurora.org> writes: > From: Anilkumar Kolli <akolli@codeaurora.org> > > Reuse board_size from hw_params, add cal_offset to hw params. > This patch is clean up only, there is no change in functionality. > > Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org> > Signed-off-by: Jouni Malinen <jouni@codeaurora.org> > --- > drivers/net/wireless/ath/ath11k/core.c | 10 +++++----- > drivers/net/wireless/ath/ath11k/hw.h | 2 +- > drivers/net/wireless/ath/ath11k/qmi.c | 4 ++-- > drivers/net/wireless/ath/ath11k/qmi.h | 2 -- > 4 files changed, 8 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c > index c97830633f1f..d2ab3b134632 100644 > --- a/drivers/net/wireless/ath/ath11k/core.c > +++ b/drivers/net/wireless/ath/ath11k/core.c > @@ -37,7 +37,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { > .fw = { > .dir = "IPQ8074/hw2.0", > .board_size = 256 * 1024, > - .cal_size = 256 * 1024, > + .cal_offset = 128 * 1024, > }, > .max_radios = 3, > .bdf_addr = 0x4B0C0000, > @@ -87,7 +87,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { > .fw = { > .dir = "IPQ6018/hw1.0", > .board_size = 256 * 1024, > - .cal_size = 256 * 1024, > + .cal_offset = 128 * 1024, > }, > .max_radios = 2, > .bdf_addr = 0x4ABC0000, > @@ -134,7 +134,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { > .fw = { > .dir = "QCA6390/hw2.0", > .board_size = 256 * 1024, > - .cal_size = 256 * 1024, > + .cal_offset = 128 * 1024, > }, > .max_radios = 3, > .bdf_addr = 0x4B0C0000, > @@ -180,7 +180,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { > .fw = { > .dir = "QCN9074/hw1.0", > .board_size = 256 * 1024, > - .cal_size = 256 * 1024, > + .cal_offset = 128 * 1024, > }, > .max_radios = 1, > .single_pdev_only = false, > @@ -226,7 +226,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { > .fw = { > .dir = "WCN6855/hw2.0", > .board_size = 256 * 1024, > - .cal_size = 256 * 1024, > + .cal_offset = 128 * 1024, > }, > .max_radios = 3, > .bdf_addr = 0x4B0C0000, > diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h > index 5d150cd793b2..3a03e09563e7 100644 > --- a/drivers/net/wireless/ath/ath11k/hw.h > +++ b/drivers/net/wireless/ath/ath11k/hw.h > @@ -128,7 +128,7 @@ struct ath11k_hw_params { > struct { > const char *dir; > size_t board_size; > - size_t cal_size; > + size_t cal_offset; You don't mention anything about cal_size. I'll add this to the commit log: cal_size was unused, so remove that. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
On 2021-09-24 20:19, Kalle Valo wrote: > Jouni Malinen <jouni@codeaurora.org> writes: > >> From: Anilkumar Kolli <akolli@codeaurora.org> >> >> Reuse board_size from hw_params, add cal_offset to hw params. >> This patch is clean up only, there is no change in functionality. >> >> Tested-on: IPQ8074 hw2.0 AHB >> WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 >> Tested-on: QCN9074 hw1.0 PCI >> WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 >> >> Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org> >> Signed-off-by: Jouni Malinen <jouni@codeaurora.org> >> --- >> drivers/net/wireless/ath/ath11k/core.c | 10 +++++----- >> drivers/net/wireless/ath/ath11k/hw.h | 2 +- >> drivers/net/wireless/ath/ath11k/qmi.c | 4 ++-- >> drivers/net/wireless/ath/ath11k/qmi.h | 2 -- >> 4 files changed, 8 insertions(+), 10 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath11k/core.c >> b/drivers/net/wireless/ath/ath11k/core.c >> index c97830633f1f..d2ab3b134632 100644 >> --- a/drivers/net/wireless/ath/ath11k/core.c >> +++ b/drivers/net/wireless/ath/ath11k/core.c >> @@ -37,7 +37,7 @@ static const struct ath11k_hw_params >> ath11k_hw_params[] = { >> .fw = { >> .dir = "IPQ8074/hw2.0", >> .board_size = 256 * 1024, >> - .cal_size = 256 * 1024, >> + .cal_offset = 128 * 1024, >> }, >> .max_radios = 3, >> .bdf_addr = 0x4B0C0000, >> @@ -87,7 +87,7 @@ static const struct ath11k_hw_params >> ath11k_hw_params[] = { >> .fw = { >> .dir = "IPQ6018/hw1.0", >> .board_size = 256 * 1024, >> - .cal_size = 256 * 1024, >> + .cal_offset = 128 * 1024, >> }, >> .max_radios = 2, >> .bdf_addr = 0x4ABC0000, >> @@ -134,7 +134,7 @@ static const struct ath11k_hw_params >> ath11k_hw_params[] = { >> .fw = { >> .dir = "QCA6390/hw2.0", >> .board_size = 256 * 1024, >> - .cal_size = 256 * 1024, >> + .cal_offset = 128 * 1024, >> }, >> .max_radios = 3, >> .bdf_addr = 0x4B0C0000, >> @@ -180,7 +180,7 @@ static const struct ath11k_hw_params >> ath11k_hw_params[] = { >> .fw = { >> .dir = "QCN9074/hw1.0", >> .board_size = 256 * 1024, >> - .cal_size = 256 * 1024, >> + .cal_offset = 128 * 1024, >> }, >> .max_radios = 1, >> .single_pdev_only = false, >> @@ -226,7 +226,7 @@ static const struct ath11k_hw_params >> ath11k_hw_params[] = { >> .fw = { >> .dir = "WCN6855/hw2.0", >> .board_size = 256 * 1024, >> - .cal_size = 256 * 1024, >> + .cal_offset = 128 * 1024, >> }, >> .max_radios = 3, >> .bdf_addr = 0x4B0C0000, >> diff --git a/drivers/net/wireless/ath/ath11k/hw.h >> b/drivers/net/wireless/ath/ath11k/hw.h >> index 5d150cd793b2..3a03e09563e7 100644 >> --- a/drivers/net/wireless/ath/ath11k/hw.h >> +++ b/drivers/net/wireless/ath/ath11k/hw.h >> @@ -128,7 +128,7 @@ struct ath11k_hw_params { >> struct { >> const char *dir; >> size_t board_size; >> - size_t cal_size; >> + size_t cal_offset; > > You don't mention anything about cal_size. I'll add this to the commit > log: > > cal_size was unused, so remove that. Yes. Thanks for adding. - Anil.
Jouni Malinen <jouni@codeaurora.org> wrote: > Reuse board_size from hw_params, add cal_offset to hw params. > This patch is clean up only, there is no change in functionality. > > cal_size was unused, so remove that. > > Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org> > Signed-off-by: Jouni Malinen <jouni@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> 4 patches applied to ath-next branch of ath.git, thanks. c72aa32d6d1c ath11k: use hw_params to access board_size and cal_offset 336e7b53c82f ath11k: clean up BDF download functions e82dfe7b5608 ath11k: add caldata file for multiple radios 4ba3b05ebd0c ath11k: add caldata download support from EEPROM -- https://patchwork.kernel.org/project/linux-wireless/patch/20210721201927.100369-2-jouni@codeaurora.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index c97830633f1f..d2ab3b134632 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -37,7 +37,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .fw = { .dir = "IPQ8074/hw2.0", .board_size = 256 * 1024, - .cal_size = 256 * 1024, + .cal_offset = 128 * 1024, }, .max_radios = 3, .bdf_addr = 0x4B0C0000, @@ -87,7 +87,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .fw = { .dir = "IPQ6018/hw1.0", .board_size = 256 * 1024, - .cal_size = 256 * 1024, + .cal_offset = 128 * 1024, }, .max_radios = 2, .bdf_addr = 0x4ABC0000, @@ -134,7 +134,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .fw = { .dir = "QCA6390/hw2.0", .board_size = 256 * 1024, - .cal_size = 256 * 1024, + .cal_offset = 128 * 1024, }, .max_radios = 3, .bdf_addr = 0x4B0C0000, @@ -180,7 +180,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .fw = { .dir = "QCN9074/hw1.0", .board_size = 256 * 1024, - .cal_size = 256 * 1024, + .cal_offset = 128 * 1024, }, .max_radios = 1, .single_pdev_only = false, @@ -226,7 +226,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .fw = { .dir = "WCN6855/hw2.0", .board_size = 256 * 1024, - .cal_size = 256 * 1024, + .cal_offset = 128 * 1024, }, .max_radios = 3, .bdf_addr = 0x4B0C0000, diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h index 5d150cd793b2..3a03e09563e7 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -128,7 +128,7 @@ struct ath11k_hw_params { struct { const char *dir; size_t board_size; - size_t cal_size; + size_t cal_offset; } fw; const struct ath11k_hw_ops *hw_ops; diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index b5e34d670715..cc82a431c8b7 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -1953,7 +1953,7 @@ ath11k_qmi_prepare_bdf_download(struct ath11k_base *ab, int type, fw_size = min_t(u32, ab->hw_params.fw.board_size, fw_entry->size); - memcpy_toio(bdf_addr + ATH11K_QMI_CALDATA_OFFSET, + memcpy_toio(bdf_addr + ab->hw_params.fw.cal_offset, fw_entry->data, fw_size); release_firmware(fw_entry); @@ -1979,7 +1979,7 @@ static int ath11k_qmi_load_bdf_fixed_addr(struct ath11k_base *ab) return -ENOMEM; memset(&resp, 0, sizeof(resp)); - bdf_addr = ioremap(ab->hw_params.bdf_addr, ATH11K_QMI_BDF_MAX_SIZE); + bdf_addr = ioremap(ab->hw_params.bdf_addr, ab->hw_params.fw.board_size); if (!bdf_addr) { ath11k_warn(ab, "failed ioremap for board file\n"); ret = -EIO; diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/ath/ath11k/qmi.h index 3d5930330703..30236c5d26e2 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.h +++ b/drivers/net/wireless/ath/ath11k/qmi.h @@ -13,8 +13,6 @@ #define ATH11K_QMI_WLANFW_TIMEOUT_MS 5000 #define ATH11K_QMI_MAX_BDF_FILE_NAME_SIZE 64 #define ATH11K_QMI_CALDB_ADDRESS 0x4BA00000 -#define ATH11K_QMI_BDF_MAX_SIZE (256 * 1024) -#define ATH11K_QMI_CALDATA_OFFSET (128 * 1024) #define ATH11K_QMI_WLANFW_MAX_BUILD_ID_LEN_V01 128 #define ATH11K_QMI_WLFW_SERVICE_ID_V01 0x45 #define ATH11K_QMI_WLFW_SERVICE_VERS_V01 0x01