diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan.bbappend b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan.bbappend index e1a0c245a..df541be20 100644 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan.bbappend +++ b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan.bbappend @@ -3,6 +3,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" SRC_URI:append = " \ + file://0001-Fix-for-the-HE-Rate-Index.patch \ file://81-iw612-wifi.rules \ file://load_iw612.sh \ " diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-Fix-for-the-HE-Rate-Index.patch b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-Fix-for-the-HE-Rate-Index.patch new file mode 100644 index 000000000..c2f0c04ba --- /dev/null +++ b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-nxp-wlan/0001-Fix-for-the-HE-Rate-Index.patch @@ -0,0 +1,70 @@ +From: Achyut Hegde +Date: Thu, 28 Apr 2022 17:51:45 +0000 +Subject: [PATCH] Fix for the HE Rate Index + +--- + .../mlinux/moal_sta_cfg80211.c | 37 ++++++++++++++++++- + 1 file changed, 35 insertions(+), 2 deletions(-) + +diff --git a/mxm_wifiex/mlinux/moal_sta_cfg80211.c b/mxm_wifiex/mlinux/moal_sta_cfg80211.c +index bf39f0e9b003..5f300288a6c8 100644 +--- a/mlinux/moal_sta_cfg80211.c ++++ b/mlinux/moal_sta_cfg80211.c +@@ -3393,6 +3393,37 @@ done: + return ret; + } + ++#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 1, 18) ++/** ++ * @brief This function convert he_gi to nl80211_he_gi ++ * ++ * @param he_gi 0/1/2/3 ++ * ++ * ++ * @return 0: NL80211_RATE_INFO_HE_GI_0_8 ++ * 1: NL80211_RATE_INFO_HE_GI_1_6 ++ * 2: NL80211_RATE_INFO_HE_GI_3_2 ++ */ ++static t_u8 woal_he_gi_to_nl80211_he_gi(t_u8 he_gi) ++{ ++ t_u8 cfg_he_gi = 0; ++ switch(he_gi){ ++ case 3: ++ cfg_he_gi = NL80211_RATE_INFO_HE_GI_3_2; ++ break; ++ case 2: ++ cfg_he_gi = NL80211_RATE_INFO_HE_GI_1_6; ++ break; ++ case 0: ++ case 1: ++ default: ++ cfg_he_gi = NL80211_RATE_INFO_HE_GI_0_8; ++ break; ++ } ++ return cfg_he_gi; ++} ++#endif ++ + /** + * @brief Request the driver to fill the tx/rx rate info + * +@@ -3469,7 +3500,8 @@ static void woal_cfg80211_fill_rate_info(moal_private *priv, + sinfo->txrate.flags = RATE_INFO_FLAGS_HE_MCS; + sinfo->txrate.nss = rate->param.data_rate.tx_nss + 1; + sinfo->txrate.mcs = rate->param.data_rate.tx_mcs_index; +- sinfo->txrate.he_gi = rate->param.data_rate.tx_ht_gi; ++ sinfo->txrate.he_gi = woal_he_gi_to_nl80211_he_gi( ++ rate->param.data_rate.tx_ht_gi); + if (rate->param.data_rate.tx_ht_bw == MLAN_VHT_BW80) + sinfo->txrate.bw = RATE_INFO_BW_80; + else if (rate->param.data_rate.tx_ht_bw == MLAN_HT_BW40) +@@ -3516,7 +3548,8 @@ static void woal_cfg80211_fill_rate_info(moal_private *priv, + sinfo->rxrate.flags = RATE_INFO_FLAGS_HE_MCS; + sinfo->rxrate.nss = rate->param.data_rate.rx_nss + 1; + sinfo->rxrate.mcs = rate->param.data_rate.rx_mcs_index; +- sinfo->rxrate.he_gi = rate->param.data_rate.rx_ht_gi; ++ sinfo->rxrate.he_gi = woal_he_gi_to_nl80211_he_gi( ++ rate->param.data_rate.rx_ht_gi); + if (rate->param.data_rate.rx_ht_bw == MLAN_VHT_BW80) + sinfo->rxrate.bw = RATE_INFO_BW_80; + else if (rate->param.data_rate.rx_ht_bw == MLAN_HT_BW40)