Commit 23dcee94 authored by Johannes Berg's avatar Johannes Berg Committed by Gregory Greenman

wifi: iwlwifi: mvm: add minimal EHT rate reporting

Now with all the prework, this is fairly simple, just report the
new bandwidth and RX_ENC_EHT type in RX, and for now just do a
minimal report of the EHT TLC rate in iwl_mvm_set_sta_rate().
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20230109130329.5f34d73d1f74.Ib27ae7bd23bc152d61021fd73aabdc76679b9fe4@changeidSigned-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
parent 4ca69027
......@@ -5116,6 +5116,9 @@ static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo)
case RATE_MCS_CHAN_WIDTH_160:
rinfo->bw = RATE_INFO_BW_160;
break;
case RATE_MCS_CHAN_WIDTH_320:
rinfo->bw = RATE_INFO_BW_320;
break;
}
if (format == RATE_MCS_CCK_MSK ||
......@@ -5176,6 +5179,10 @@ static void iwl_mvm_set_sta_rate(u32 rate_n_flags, struct rate_info *rinfo)
rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
switch (format) {
case RATE_MCS_EHT_MSK:
/* TODO: GI/LTF/RU. How does the firmware encode them? */
rinfo->flags |= RATE_INFO_FLAGS_EHT_MCS;
break;
case RATE_MCS_HE_MSK:
gi_ltf = u32_get_bits(rate_n_flags, RATE_MCS_HE_GI_LTF_MSK);
......
......@@ -1690,6 +1690,9 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,
case RATE_MCS_CHAN_WIDTH_160:
rx_status->bw = RATE_INFO_BW_160;
break;
case RATE_MCS_CHAN_WIDTH_320:
rx_status->bw = RATE_INFO_BW_320;
break;
}
/* must be before L-SIG data */
......@@ -1726,6 +1729,9 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,
rx_status->he_dcm =
!!(rate_n_flags & RATE_HE_DUAL_CARRIER_MODE_MSK);
break;
case RATE_MCS_EHT_MSK:
rx_status->encoding = RX_ENC_EHT;
break;
}
switch (format) {
......@@ -1736,6 +1742,7 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,
break;
case RATE_MCS_VHT_MSK:
case RATE_MCS_HE_MSK:
case RATE_MCS_EHT_MSK:
rx_status->nss =
u32_get_bits(rate_n_flags, RATE_MCS_NSS_MSK) + 1;
rx_status->rate_idx = rate_n_flags & RATE_MCS_CODE_MSK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment