Skip to content

Commit 46d16f7

Browse files
Aditya Kumar SinghJeff Johnson
authored andcommitted
wifi: ath12k: rename mlo_capable_flags to single_chip_mlo_supp
At present, the mlo_capable_flags in ath12k_base is used to indicate whether the chip supports inter (QCN9274) or intra (WCN7850) chip MLO. However, it’s possible that the chip supports neither, especially with older firmware versions. Additionally, if intra chip MLO is not supported, inter chip MLO will also be non-functional. Therefore, having two separate flags for this is unnecessary. Therefore, rename this flag to single_chip_mlo_supp. At the same time convert it into a bool data type. Also, get rid of the enums defined earlier. For the QCN9274 family of chipsets, this will be set only when firmware advertises the support during the QMI exchange. For the WCN7850 family of chipsets, since the event is not supported, assumption is made that single chip MLO is supported. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Aditya Kumar Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent a5686ae commit 46d16f7

File tree

3 files changed

+8
-30
lines changed

3 files changed

+8
-30
lines changed

drivers/net/wireless/ath/ath12k/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
13251325
ab->dev = dev;
13261326
ab->hif.bus = bus;
13271327
ab->qmi.num_radios = U8_MAX;
1328-
ab->mlo_capable_flags = ATH12K_INTRA_DEVICE_MLO_SUPPORT;
1328+
ab->single_chip_mlo_supp = false;
13291329

13301330
/* Device index used to identify the devices in a group.
13311331
*

drivers/net/wireless/ath/ath12k/core.h

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -816,21 +816,6 @@ struct ath12k_soc_dp_stats {
816816
struct ath12k_soc_dp_tx_err_stats tx_err;
817817
};
818818

819-
/**
820-
* enum ath12k_link_capable_flags - link capable flags
821-
*
822-
* Single/Multi link capability information
823-
*
824-
* @ATH12K_INTRA_DEVICE_MLO_SUPPORT: SLO/MLO form between the radio, where all
825-
* the links (radios) present within a device.
826-
* @ATH12K_INTER_DEVICE_MLO_SUPPORT: SLO/MLO form between the radio, where all
827-
* the links (radios) present across the devices.
828-
*/
829-
enum ath12k_link_capable_flags {
830-
ATH12K_INTRA_DEVICE_MLO_SUPPORT = BIT(0),
831-
ATH12K_INTER_DEVICE_MLO_SUPPORT = BIT(1),
832-
};
833-
834819
/* Master structure to hold the hw data which may be used in core module */
835820
struct ath12k_base {
836821
enum ath12k_hw_rev hw_rev;
@@ -996,12 +981,8 @@ struct ath12k_base {
996981

997982
const struct hal_rx_ops *hal_rx_ops;
998983

999-
/* mlo_capable_flags denotes the single/multi link operation
1000-
* capabilities of the Device.
1001-
*
1002-
* See enum ath12k_link_capable_flags
1003-
*/
1004-
u8 mlo_capable_flags;
984+
/* Denotes the whether MLO is possible within the chip */
985+
bool single_chip_mlo_supp;
1005986

1006987
struct completion restart_completed;
1007988

drivers/net/wireless/ath/ath12k/qmi.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,14 +2023,14 @@ static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab,
20232023
u8 hw_link_id = 0;
20242024
int i;
20252025

2026-
if (!(ab->mlo_capable_flags & ATH12K_INTRA_DEVICE_MLO_SUPPORT)) {
2026+
if (!ab->single_chip_mlo_supp) {
20272027
ath12k_dbg(ab, ATH12K_DBG_QMI,
20282028
"intra device MLO is disabled hence skip QMI MLO cap");
20292029
return;
20302030
}
20312031

20322032
if (!ab->qmi.num_radios || ab->qmi.num_radios == U8_MAX) {
2033-
ab->mlo_capable_flags = 0;
2033+
ab->single_chip_mlo_supp = false;
20342034

20352035
ath12k_dbg(ab, ATH12K_DBG_QMI,
20362036
"skip QMI MLO cap due to invalid num_radio %d\n",
@@ -2176,12 +2176,9 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
21762176
goto out;
21772177
}
21782178

2179-
if (resp.single_chip_mlo_support_valid) {
2180-
if (resp.single_chip_mlo_support)
2181-
ab->mlo_capable_flags |= ATH12K_INTRA_DEVICE_MLO_SUPPORT;
2182-
else
2183-
ab->mlo_capable_flags &= ~ATH12K_INTRA_DEVICE_MLO_SUPPORT;
2184-
}
2179+
if (resp.single_chip_mlo_support_valid &&
2180+
resp.single_chip_mlo_support)
2181+
ab->single_chip_mlo_supp = true;
21852182

21862183
if (!resp.num_phy_valid) {
21872184
ret = -ENODATA;

0 commit comments

Comments
 (0)