wifi: iwlwifi: mvm: remove HT greenfield support

No hardware that uses iwlmvm actually supports HT greenfield.
Remove the support and then clean up the v1 rate API by doing
a conversion to v2 rate API, the only thing v1 covered that
couldn't be done in v2 was HT greenfield.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.805ec090c61f.Iafd87f62ceb463b72f861a5348078999dcaace92@changeid
This commit is contained in:
Johannes Berg
2025-05-04 13:26:25 +03:00
committed by Miri Korenblit
parent 69524b2bd6
commit ed34e90554
4 changed files with 5 additions and 36 deletions

View File

@@ -1801,9 +1801,6 @@ int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
enum nl80211_band band,
struct ieee80211_tx_rate *r);
void iwl_mvm_hwrate_to_tx_rate_v1(u32 rate_n_flags,
enum nl80211_band band,
struct ieee80211_tx_rate *r);
u8 iwl_mvm_mac80211_idx_to_hwrate(const struct iwl_fw *fw, int rate_idx);
u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac);
bool iwl_mvm_is_nic_ack_enabled(struct iwl_mvm *mvm, struct ieee80211_vif *vif);

View File

@@ -2697,8 +2697,8 @@ static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta,
lq_sta = mvm_sta;
spin_lock_bh(&lq_sta->pers.lock);
iwl_mvm_hwrate_to_tx_rate_v1(lq_sta->last_rate_n_flags,
info->band, &info->control.rates[0]);
iwl_mvm_hwrate_to_tx_rate(iwl_new_rate_from_v1(lq_sta->last_rate_n_flags),
info->band, &info->control.rates[0]);
info->control.rates[0].count = 1;
/* Report the optimal rate based on rssi and STA caps if we haven't
@@ -2708,8 +2708,9 @@ static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta,
optimal_rate = rs_get_optimal_rate(mvm, lq_sta);
last_ucode_rate = ucode_rate_from_rs_rate(mvm,
optimal_rate);
iwl_mvm_hwrate_to_tx_rate_v1(last_ucode_rate, info->band,
&txrc->reported_rate);
last_ucode_rate = iwl_new_rate_from_v1(last_ucode_rate);
iwl_mvm_hwrate_to_tx_rate(last_ucode_rate, info->band,
&txrc->reported_rate);
txrc->reported_rate.count = 1;
}
spin_unlock_bh(&lq_sta->pers.lock);

View File

@@ -490,8 +490,6 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
if (!(rate_n_flags & RATE_MCS_CCK_MSK_V1) &&
rate_n_flags & RATE_MCS_SGI_MSK_V1)
rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
if (rate_n_flags & RATE_HT_MCS_GF_MSK)
rx_status->enc_flags |= RX_ENC_FLAG_HT_GF;
if (rate_n_flags & RATE_MCS_LDPC_MSK_V1)
rx_status->enc_flags |= RX_ENC_FLAG_LDPC;
if (rate_n_flags & RATE_MCS_HT_MSK_V1) {

View File

@@ -1500,33 +1500,6 @@ void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
}
}
void iwl_mvm_hwrate_to_tx_rate_v1(u32 rate_n_flags,
enum nl80211_band band,
struct ieee80211_tx_rate *r)
{
if (rate_n_flags & RATE_HT_MCS_GF_MSK)
r->flags |= IEEE80211_TX_RC_GREEN_FIELD;
r->flags |=
iwl_mvm_get_hwrate_chan_width(rate_n_flags &
RATE_MCS_CHAN_WIDTH_MSK_V1);
if (rate_n_flags & RATE_MCS_SGI_MSK_V1)
r->flags |= IEEE80211_TX_RC_SHORT_GI;
if (rate_n_flags & RATE_MCS_HT_MSK_V1) {
r->flags |= IEEE80211_TX_RC_MCS;
r->idx = rate_n_flags & RATE_HT_MCS_INDEX_MSK_V1;
} else if (rate_n_flags & RATE_MCS_VHT_MSK_V1) {
ieee80211_rate_set_vht(
r, rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK,
FIELD_GET(RATE_MCS_NSS_MSK, rate_n_flags) + 1);
r->flags |= IEEE80211_TX_RC_VHT_MCS;
} else {
r->idx = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags,
band);
}
}
/*
* translate ucode response to mac80211 tx status control values
*/