wifi: iwlwifi: mvm: remove HT greenfield support
authorJohannes Berg <johannes.berg@intel.com>
Sun, 4 May 2025 10:26:25 +0000 (13:26 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 7 May 2025 03:08:01 +0000 (06:08 +0300)
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
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/rs.c
drivers/net/wireless/intel/iwlwifi/mvm/rx.c
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index d9163dc9c129738253beaec7eb87735150b8a025..e56a967962dd6ceebcf28b48518de7e92d583417 100644 (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);
index c2729dab8e79e533c1e836381b6b7b2a2e3760e3..50496edf41f84e9ade770e1c8a20161074583542 100644 (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);
index a5cd0fd7a11a4047a3b98c9cd2eb46a3ce806358..8eb0aa448c853dfcb3dbf3960d90410c4cc70fc0 100644 (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) {
index a9b2b846ab37fdad536675ef90344064df59fa9e..1da0a829f5292addf03e1e74b3e133fff05a557a 100644 (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
  */