2023-10-18 15:30:50

by Karthikeyan Periyasamy

[permalink] [raw]
Subject: [PATCH 0/2] wifi: ath12k: rename the variable naming convention

Currently, the identifier sc is used to represent an instance of SoC
structure. But in ath12k ab is refer to the SoC data structure.
So rename the variable name.

Karthikeyan Periyasamy (2):
wifi: ath12k: rename the wmi_sc naming convention to wmi_ab
wifi: ath12k: rename the sc naming convention to ab

drivers/net/wireless/ath/ath12k/hif.h | 18 +++++++++---------
drivers/net/wireless/ath/ath12k/pci.c | 4 ++--
drivers/net/wireless/ath/ath12k/wmi.c | 22 +++++++++++-----------
3 files changed, 22 insertions(+), 22 deletions(-)


base-commit: 91bc2f15a1b8c38ddbc1ea400dcd4bbd3639d22b
--
2.17.1


2023-10-18 15:30:50

by Karthikeyan Periyasamy

[permalink] [raw]
Subject: [PATCH 2/2] wifi: ath12k: rename the sc naming convention to ab

In PCI and HAL interface layer module, the identifier sc is used
to represent an instance of ath12k_base structure. However,
within ath12k, the convention is to use "ab" to represent an SoC
"base" struct. So change the all instances of sc to ab.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <[email protected]>
---
drivers/net/wireless/ath/ath12k/hif.h | 18 +++++++++---------
drivers/net/wireless/ath/ath12k/pci.c | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/hif.h b/drivers/net/wireless/ath/ath12k/hif.h
index 54490cdb63a1..4095fd82b1b3 100644
--- a/drivers/net/wireless/ath/ath12k/hif.h
+++ b/drivers/net/wireless/ath/ath12k/hif.h
@@ -10,17 +10,17 @@
#include "core.h"

struct ath12k_hif_ops {
- u32 (*read32)(struct ath12k_base *sc, u32 address);
- void (*write32)(struct ath12k_base *sc, u32 address, u32 data);
- void (*irq_enable)(struct ath12k_base *sc);
- void (*irq_disable)(struct ath12k_base *sc);
- int (*start)(struct ath12k_base *sc);
- void (*stop)(struct ath12k_base *sc);
- int (*power_up)(struct ath12k_base *sc);
- void (*power_down)(struct ath12k_base *sc);
+ u32 (*read32)(struct ath12k_base *ab, u32 address);
+ void (*write32)(struct ath12k_base *ab, u32 address, u32 data);
+ void (*irq_enable)(struct ath12k_base *ab);
+ void (*irq_disable)(struct ath12k_base *ab);
+ int (*start)(struct ath12k_base *ab);
+ void (*stop)(struct ath12k_base *ab);
+ int (*power_up)(struct ath12k_base *ab);
+ void (*power_down)(struct ath12k_base *ab);
int (*suspend)(struct ath12k_base *ab);
int (*resume)(struct ath12k_base *ab);
- int (*map_service_to_pipe)(struct ath12k_base *sc, u16 service_id,
+ int (*map_service_to_pipe)(struct ath12k_base *ab, u16 service_id,
u8 *ul_pipe, u8 *dl_pipe);
int (*get_user_msi_vector)(struct ath12k_base *ab, char *user_name,
int *num_vectors, u32 *user_base_data,
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index fae5dfd6e9d7..3006cd3fbe11 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -424,12 +424,12 @@ static void ath12k_pci_ext_grp_disable(struct ath12k_ext_irq_grp *irq_grp)
disable_irq_nosync(irq_grp->ab->irq_num[irq_grp->irqs[i]]);
}

-static void __ath12k_pci_ext_irq_disable(struct ath12k_base *sc)
+static void __ath12k_pci_ext_irq_disable(struct ath12k_base *ab)
{
int i;

for (i = 0; i < ATH12K_EXT_IRQ_GRP_NUM_MAX; i++) {
- struct ath12k_ext_irq_grp *irq_grp = &sc->ext_irq_grp[i];
+ struct ath12k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];

ath12k_pci_ext_grp_disable(irq_grp);

--
2.17.1

2023-10-18 15:30:59

by Karthikeyan Periyasamy

[permalink] [raw]
Subject: [PATCH 1/2] wifi: ath12k: rename the wmi_sc naming convention to wmi_ab

In WMI layer module, the identifier wmi_sc is used to represent
an instance of ath12k_wmi_base structure. However, within ath12k,
the convention is to use "ab" to represent an SoC "base" struct.
So change the all instances of wmi_sc to wmi_ab.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <[email protected]>
---
drivers/net/wireless/ath/ath12k/wmi.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 1cac0135a1bc..0d46e97ffe56 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -408,22 +408,22 @@ static int ath12k_wmi_cmd_send_nowait(struct ath12k_wmi_pdev *wmi, struct sk_buf
int ath12k_wmi_cmd_send(struct ath12k_wmi_pdev *wmi, struct sk_buff *skb,
u32 cmd_id)
{
- struct ath12k_wmi_base *wmi_sc = wmi->wmi_ab;
+ struct ath12k_wmi_base *wmi_ab = wmi->wmi_ab;
int ret = -EOPNOTSUPP;

might_sleep();

- wait_event_timeout(wmi_sc->tx_credits_wq, ({
+ wait_event_timeout(wmi_ab->tx_credits_wq, ({
ret = ath12k_wmi_cmd_send_nowait(wmi, skb, cmd_id);

- if (ret && test_bit(ATH12K_FLAG_CRASH_FLUSH, &wmi_sc->ab->dev_flags))
+ if (ret && test_bit(ATH12K_FLAG_CRASH_FLUSH, &wmi_ab->ab->dev_flags))
ret = -ESHUTDOWN;

(ret != -EAGAIN);
}), WMI_SEND_TIMEOUT_HZ);

if (ret == -EAGAIN)
- ath12k_warn(wmi_sc->ab, "wmi command %d timeout\n", cmd_id);
+ ath12k_warn(wmi_ab->ab, "wmi command %d timeout\n", cmd_id);

return ret;
}
@@ -727,10 +727,10 @@ static int ath12k_service_ready_event(struct ath12k_base *ab, struct sk_buff *sk
return 0;
}

-struct sk_buff *ath12k_wmi_alloc_skb(struct ath12k_wmi_base *wmi_sc, u32 len)
+struct sk_buff *ath12k_wmi_alloc_skb(struct ath12k_wmi_base *wmi_ab, u32 len)
{
struct sk_buff *skb;
- struct ath12k_base *ab = wmi_sc->ab;
+ struct ath12k_base *ab = wmi_ab->ab;
u32 round_len = roundup(len, 4);

skb = ath12k_htc_alloc_skb(ab, WMI_SKB_HEADROOM + round_len);
@@ -3471,7 +3471,7 @@ int ath12k_wmi_set_hw_mode(struct ath12k_base *ab,

int ath12k_wmi_cmd_init(struct ath12k_base *ab)
{
- struct ath12k_wmi_base *wmi_sc = &ab->wmi_ab;
+ struct ath12k_wmi_base *wmi_ab = &ab->wmi_ab;
struct ath12k_wmi_init_cmd_arg arg = {};

if (test_bit(WMI_TLV_SERVICE_REG_CC_EXT_EVENT_SUPPORT,
@@ -3480,9 +3480,9 @@ int ath12k_wmi_cmd_init(struct ath12k_base *ab)

ab->hw_params->wmi_init(ab, &arg.res_cfg);

- arg.num_mem_chunks = wmi_sc->num_mem_chunks;
- arg.hw_mode_id = wmi_sc->preferred_hw_mode;
- arg.mem_chunks = wmi_sc->mem_chunks;
+ arg.num_mem_chunks = wmi_ab->num_mem_chunks;
+ arg.hw_mode_id = wmi_ab->preferred_hw_mode;
+ arg.mem_chunks = wmi_ab->mem_chunks;

if (ab->hw_params->single_pdev_only)
arg.hw_mode_id = WMI_HOST_HW_MODE_MAX;
@@ -3490,7 +3490,7 @@ int ath12k_wmi_cmd_init(struct ath12k_base *ab)
arg.num_band_to_mac = ab->num_radios;
ath12k_fill_band_to_mac_param(ab, arg.band_to_mac);

- return ath12k_init_cmd_send(&wmi_sc->wmi[0], &arg);
+ return ath12k_init_cmd_send(&wmi_ab->wmi[0], &arg);
}

int ath12k_wmi_vdev_spectral_conf(struct ath12k *ar,
--
2.17.1

2023-10-18 18:35:57

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: ath12k: rename the wmi_sc naming convention to wmi_ab

On 10/18/2023 8:30 AM, Karthikeyan Periyasamy wrote:
> In WMI layer module, the identifier wmi_sc is used to represent
> an instance of ath12k_wmi_base structure. However, within ath12k,
> the convention is to use "ab" to represent an SoC "base" struct.
> So change the all instances of wmi_sc to wmi_ab.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Karthikeyan Periyasamy <[email protected]>
Acked-by: Jeff Johnson <[email protected]>

2023-10-18 18:36:31

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: ath12k: rename the sc naming convention to ab

On 10/18/2023 8:30 AM, Karthikeyan Periyasamy wrote:
> In PCI and HAL interface layer module, the identifier sc is used
> to represent an instance of ath12k_base structure. However,
> within ath12k, the convention is to use "ab" to represent an SoC
> "base" struct. So change the all instances of sc to ab.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Karthikeyan Periyasamy <[email protected]>
Acked-by: Jeff Johnson <[email protected]>

2023-10-25 09:57:26

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: ath12k: rename the wmi_sc naming convention to wmi_ab

Karthikeyan Periyasamy <[email protected]> wrote:

> In WMI layer module, the identifier wmi_sc is used to represent
> an instance of ath12k_wmi_base structure. However, within ath12k,
> the convention is to use "ab" to represent an SoC "base" struct.
> So change the all instances of wmi_sc to wmi_ab.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Karthikeyan Periyasamy <[email protected]>
> Acked-by: Jeff Johnson <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

2 patches applied to ath-next branch of ath.git, thanks.

25ebf4c3c141 wifi: ath12k: rename the wmi_sc naming convention to wmi_ab
cda8607e824b wifi: ath12k: rename the sc naming convention to ab

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches