Message ID | 20230824025432.19406-1-quic_wgong@quicinc.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | [v2] wifi: ath12k: enable 320 MHz bandwidth for 6 GHz band in EHT PHY capbility for WCN7850 | expand |
> wifi: ath12k: enable 320 MHz bandwidth for 6 GHz band in EHT PHY
capbility for WCN7850
s/capbility/capability/
Kalle can make that change when he submits to -pending
Wen Gong <quic_wgong@quicinc.com> wrote: > 320 MHz bandwidth is reported only for single PHY mode for WCN7850, get it > from WMI_HOST_HW_MODE_SINGLE ath12k_wmi_caps_ext_params and report it for > 6 GHz band. > > After this patch, "iw list" show 320MHz support for WCN7850: > EHT Iftypes: managed > EHT PHY Capabilities: (0xe26f090010768800): > 320MHz in 6GHz Supported > EHT bw=320 MHz, max NSS for MCS 8-9: Rx=0, Tx=0 > EHT bw=320 MHz, max NSS for MCS 10-11: Rx=0, Tx=0 > EHT bw=320 MHz, max NSS for MCS 12-13: Rx=0, Tx=0 > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > > Signed-off-by: Wen Gong <quic_wgong@quicinc.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> New warning: drivers/net/wireless/ath/ath12k/wmi.c:4199:69: warning: restricted __le32 degrades to integer Remember to ALWAYS run ath12k-check. Patch set to Changes Requested.
On 8/25/2023 3:53 PM, Kalle Valo wrote: > Wen Gong <quic_wgong@quicinc.com> wrote: > >> 320 MHz bandwidth is reported only for single PHY mode for WCN7850, get it >> from WMI_HOST_HW_MODE_SINGLE ath12k_wmi_caps_ext_params and report it for >> 6 GHz band. >> >> After this patch, "iw list" show 320MHz support for WCN7850: >> EHT Iftypes: managed >> EHT PHY Capabilities: (0xe26f090010768800): >> 320MHz in 6GHz Supported >> EHT bw=320 MHz, max NSS for MCS 8-9: Rx=0, Tx=0 >> EHT bw=320 MHz, max NSS for MCS 10-11: Rx=0, Tx=0 >> EHT bw=320 MHz, max NSS for MCS 12-13: Rx=0, Tx=0 >> >> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 >> >> Signed-off-by: Wen Gong <quic_wgong@quicinc.com> >> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> > New warning: > > drivers/net/wireless/ath/ath12k/wmi.c:4199:69: warning: restricted __le32 degrades to integer > > Remember to ALWAYS run ath12k-check. > > Patch set to Changes Requested. I found ath12k-check output many logs, about 5000 lines. And ath12k-check only has one item in CHECKPATCH_IGNORE, it does not have the other items which existed in ath10k-check/ath11k-check, so ath12k-check output many info "struct should normally be const"/"networking block comments don't use an empty /* line, use /* Comment..."/. Also it print many "note: in included file ..." by sparse. May I change ath12k-check with diff below and use "ath12k-check | grep -v "note: in included file"" for the patch check? wgong@wgong-Latitude-E6430:~/opensource/kernel/ath$ ./ath12k-check --version /home/wgong/opensource/kernel/ath/./ath12k-check:32: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives import distutils.spawn ath12k-check (md5sum 194c6d6c4bad47f9780fe22541f2f68c) gcc: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 sparse: 0.6.4 (Ubuntu: 0.6.4-2) checkpatch.pl: Version: 0.32 (md5sum b169dcb45a7f32bd19b128e08288e9cc) gtags: gtags (Global) 6.6.7 wgong@wgong-Latitude-E6430:~/opensource/kernel/ath$ ./ath12k-check | grep -v "note: in included file" /home/wgong/opensource/kernel/ath/./ath12k-check:32: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives import distutils.spawn drivers/net/wireless/ath/ath12k/wmi.c: In function 'ath12k_wmi_tlv_mac_phy_caps_ext_parse': drivers/net/wireless/ath/ath12k/wmi.c:4197:69: warning: restricted __le32 degrades to integer drivers/net/wireless/ath/ath12k/dp_rx.c:2110: space required after that close brace '}' diff --git a/tools/scripts/ath12k/ath12k-check b/tools/scripts/ath12k/ath12k-check index 7112fd9..3035b34 100755 --- a/tools/scripts/ath12k/ath12k-check +++ b/tools/scripts/ath12k/ath12k-check @@ -41,10 +41,48 @@ FILTER_REGEXP = r'/ath' IGNORE_FILES = [] -CHECKPATCH_IGNORE = [ - # some find extra parentheses helpful so ignore the warnings - 'UNNECESSARY_PARENTHESES', -] +CHECKPATCH_IGNORE = ['MSLEEP', + 'USLEEP_RANGE', + 'PRINTK_WITHOUT_KERN_LEVEL', + + # ath10k does not follow networking comment style + 'NETWORKING_BLOCK_COMMENT_STYLE', + + 'LINUX_VERSION_CODE', + 'COMPLEX_MACRO', + 'PREFER_DEV_LEVEL', + 'PREFER_PR_LEVEL', + 'COMPARISON_TO_NULL', + 'BIT_MACRO', + 'CONSTANT_COMPARISON', + 'MACRO_WITH_FLOW_CONTROL', + + # Spams hundreds of lines useless 'struct should + # normally be const' warnings, maybe a bug in + # checkpatch? + 'CONST_STRUCT', + + # TODO: look like valid warnings, investigate + 'MACRO_ARG_REUSE', + 'OPEN_ENDED_LINE', + 'FUNCTION_ARGUMENTS', + 'CONFIG_DESCRIPTION', + 'ASSIGNMENT_CONTINUATIONS', + 'UNNECESSARY_PARENTHESES', + + # Not sure if these really useful warnings, + # disable for now. + 'MACRO_ARG_PRECEDENCE', + + 'BOOL_MEMBER', + + # TODO: ath11k uses volatile for now, fix it + 'VOLATILE', + + # TODO: document all DT usage in ath11k + 'UNDOCUMENTED_DT_STRING', + ] + CHECKPATCH_OPTS = ['--strict', '-q', '--terse', '--no-summary', '--max-line-length=90', '--show-types'] >
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 9ed33e2d6da0..824c5d777ee6 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -4148,7 +4148,11 @@ static void ath12k_wmi_eht_caps_parse(struct ath12k_pdev *pdev, u32 band, __le32 cap_info_internal) { struct ath12k_band_cap *cap_band = &pdev->cap.band[band]; - u8 i; + u8 i, support_320mhz; + + if (band == NL80211_BAND_6GHZ) + support_320mhz = cap_band->eht_cap_phy_info[0] & + IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ; for (i = 0; i < WMI_MAX_EHTCAP_MAC_SIZE; i++) cap_band->eht_cap_mac_info[i] = le32_to_cpu(cap_mac_info[i]); @@ -4156,6 +4160,9 @@ static void ath12k_wmi_eht_caps_parse(struct ath12k_pdev *pdev, u32 band, for (i = 0; i < WMI_MAX_EHTCAP_PHY_SIZE; i++) cap_band->eht_cap_phy_info[i] = le32_to_cpu(cap_phy_info[i]); + if (band == NL80211_BAND_6GHZ) + cap_band->eht_cap_phy_info[0] |= support_320mhz; + cap_band->eht_mcs_20_only = le32_to_cpu(supp_mcs[0]); cap_band->eht_mcs_80 = le32_to_cpu(supp_mcs[1]); if (band != NL80211_BAND_2GHZ) { @@ -4177,10 +4184,20 @@ ath12k_wmi_tlv_mac_phy_caps_ext_parse(struct ath12k_base *ab, const struct ath12k_wmi_caps_ext_params *caps, struct ath12k_pdev *pdev) { + struct ath12k_band_cap *cap_band; u32 bands; int i; + u8 support_320mhz; if (ab->hw_params->single_pdev_only) { + if (caps->hw_mode_id == WMI_HOST_HW_MODE_SINGLE) { + support_320mhz = caps->eht_cap_phy_info_5ghz[0] & + IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ; + cap_band = &pdev->cap.band[NL80211_BAND_6GHZ]; + cap_band->eht_cap_phy_info[0] |= support_320mhz; + return 0; + } + for (i = 0; i < ab->fw_pdev_count; i++) { struct ath12k_fw_pdev *fw_pdev = &ab->fw_pdev[i]; @@ -4236,7 +4253,8 @@ static int ath12k_wmi_tlv_mac_phy_caps_ext(struct ath12k_base *ab, u16 tag, return -EPROTO; if (ab->hw_params->single_pdev_only) { - if (ab->wmi_ab.preferred_hw_mode != le32_to_cpu(caps->hw_mode_id)) + if (ab->wmi_ab.preferred_hw_mode != le32_to_cpu(caps->hw_mode_id) && + caps->hw_mode_id != WMI_HOST_HW_MODE_SINGLE) return 0; } else { for (i = 0; i < ab->num_radios; i++) {
320 MHz bandwidth is reported only for single PHY mode for WCN7850, get it from WMI_HOST_HW_MODE_SINGLE ath12k_wmi_caps_ext_params and report it for 6 GHz band. After this patch, "iw list" show 320MHz support for WCN7850: EHT Iftypes: managed EHT PHY Capabilities: (0xe26f090010768800): 320MHz in 6GHz Supported EHT bw=320 MHz, max NSS for MCS 8-9: Rx=0, Tx=0 EHT bw=320 MHz, max NSS for MCS 10-11: Rx=0, Tx=0 EHT bw=320 MHz, max NSS for MCS 12-13: Rx=0, Tx=0 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Wen Gong <quic_wgong@quicinc.com> --- v2: change eht_cap_phy_info_5G to eht_cap_phy_info_5ghz. drivers/net/wireless/ath/ath12k/wmi.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) base-commit: 3f257461ab0ab19806bae2bfde4c3cd88dbf050e