@@ -46,6 +46,10 @@ enum wme_ac {
WME_NUM_AC
};
+#define ATH11K_HT_MCS_MAX 7
+#define ATH11K_VHT_MCS_MAX 9
+#define ATH11K_HE_MCS_MAX 11
+
static inline enum wme_ac ath11k_tid_to_ac(u32 tid)
{
return (((tid == 0) || (tid == 3)) ? WME_AC_BE :
@@ -1705,7 +1705,7 @@ static void ath11k_dp_rx_h_rate(struct ath11k *ar, void *rx_desc,
break;
case RX_MSDU_START_PKT_TYPE_11N:
rx_status->encoding = RX_ENC_HT;
- if (rate_mcs > 7) {
+ if (rate_mcs > ATH11K_HT_MCS_MAX) {
ath11k_warn(ar->ab, "Received with invalid mcs in HT mode %d\n", rate_mcs);
break;
}
@@ -1717,7 +1717,7 @@ static void ath11k_dp_rx_h_rate(struct ath11k *ar, void *rx_desc,
case RX_MSDU_START_PKT_TYPE_11AC:
rx_status->encoding = RX_ENC_VHT;
rx_status->rate_idx = rate_mcs;
- if (rate_mcs > 9) {
+ if (rate_mcs > ATH11K_VHT_MCS_MAX) {
ath11k_warn(ar->ab, "Received with invalid mcs in VHT mode %d\n", rate_mcs);
break;
}
Signed-off-by: John Crispin <john@phrozen.org> --- drivers/net/wireless/ath/ath11k/core.h | 4 ++++ drivers/net/wireless/ath/ath11k/dp_rx.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)