Skip to content

Commit

Permalink
wifi: ath12k: rename the wmi_sc naming convention to wmi_ab
Browse files Browse the repository at this point in the history
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 <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231018153008.29820-2-quic_periyasa@quicinc.com
  • Loading branch information
Karthikeyan Periyasamy authored and Kalle Valo committed Oct 25, 2023
1 parent 7db88b9 commit 25ebf4c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions drivers/net/wireless/ath/ath12k/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand All @@ -3480,17 +3480,17 @@ 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;

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,
Expand Down

0 comments on commit 25ebf4c

Please sign in to comment.