From 643f7eca34849958329ce7974786e863526b2f32 Mon Sep 17 00:00:00 2001 From: Christopher Chopp Date: Mon, 14 Oct 2019 11:37:00 -0700 Subject: [PATCH] qcacmn: Add Debug Print for 160MHz TX/RX MCS NSS Check This print is a debug measure that addresses an issue where the HE MCS NSS Map is set to an invalid value. Although rate checks exist already which take corrective action, this proactive print adds information useful for addressing corner cases should they appear. CRs-Fixed: 2554277 Change-Id: I8e770639472409d96654dc8652ea8c9d210c4965 --- wmi/inc/wmi_unified_param.h | 6 ++++++ wmi/src/wmi_unified_tlv.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 004af3bff095..3d95beddf7b3 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -948,6 +948,12 @@ typedef struct { #define WMI_HOST_HECAP_MAC_WORD1 0 #define WMI_HOST_HECAP_MAC_WORD2 1 #define WMI_HOST_MAX_HE_RATE_SET 3 + +#define WMI_HOST_HE_INVALID_MCSNSSMAP (0xFFFF) +#define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80 0 +#define WMI_HOST_HE_TXRX_MCS_NSS_IDX_160 1 +#define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80_80 2 + /** * struct wmi_host_ppe_threshold -PPE threshold * @numss_m1: NSS - 1 diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 70b3fe1de9af..3cb6bc395a3b 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -2600,6 +2600,20 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, buf_ptr += sizeof(wmi_he_rate_set); } + if ((param->he_flag) && (param->peer_he_mcs_count > 1) && + (param->peer_he_rx_mcs_set[WMI_HOST_HE_TXRX_MCS_NSS_IDX_160] + == WMI_HOST_HE_INVALID_MCSNSSMAP || + param->peer_he_tx_mcs_set[WMI_HOST_HE_TXRX_MCS_NSS_IDX_160] + == WMI_HOST_HE_INVALID_MCSNSSMAP)) { + WMI_LOGD("param->peer_he_tx_mcs_set[160MHz]=%x", + param->peer_he_tx_mcs_set[WMI_HOST_HE_TXRX_MCS_NSS_IDX_160]); + WMI_LOGD("param->peer_he_rx_mcs_set[160MHz]=%x", + param->peer_he_rx_mcs_set[WMI_HOST_HE_TXRX_MCS_NSS_IDX_160]); + WMI_LOGD("peer_mac=%02x:%02x:%02x:%02x:%02x:%02x", + param->peer_mac[0], param->peer_mac[1], + param->peer_mac[2], param->peer_mac[3], + param->peer_mac[4], param->peer_mac[5]); + } WMI_LOGD("%s: vdev_id %d associd %d peer_flags %x rate_caps %x " "peer_caps %x listen_intval %d ht_caps %x max_mpdu %d "