mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
wifi: iwlwifi: mld: stop supporting rate_n_flags version 2
Now as the oldest fw we support is core 101, and it supports only version 3, remove version 2. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20260512082114.39e460bc8235.I4cd02612a68a3f183d51f428569448670bd19d9b@changeid Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
parent
288c5106f3
commit
b4049b093a
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2024-2026 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "mld.h"
|
||||
|
|
@ -1035,7 +1035,6 @@ static ssize_t _iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
|
|||
|
||||
/* input is in FW format (v2 or v3) so convert to v3 */
|
||||
rate = iwl_v3_rate_from_v2_v3(cpu_to_le32(rate), v3);
|
||||
rate = le32_to_cpu(iwl_v3_rate_to_v2_v3(rate, mld->fw_rates_ver_3));
|
||||
|
||||
ret = iwl_mld_send_tlc_dhc(mld, fw_sta_id,
|
||||
partial ? IWL_TLC_DEBUG_PARTIAL_FIXED_RATE :
|
||||
|
|
|
|||
|
|
@ -455,22 +455,6 @@ static void iwl_mac_hw_set_misc(struct iwl_mld *mld)
|
|||
|
||||
static int iwl_mld_hw_verify_preconditions(struct iwl_mld *mld)
|
||||
{
|
||||
int ratecheck;
|
||||
|
||||
/* check for rates version 3 */
|
||||
ratecheck =
|
||||
(iwl_fw_lookup_cmd_ver(mld->fw, TX_CMD, 0) >= 11) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, DATA_PATH_GROUP,
|
||||
TLC_MNG_UPDATE_NOTIF, 0) >= 4) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, LEGACY_GROUP,
|
||||
REPLY_RX_MPDU_CMD, 0) >= 6) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, LONG_GROUP, TX_CMD, 0) >= 9);
|
||||
|
||||
if (ratecheck != 0 && ratecheck != 4) {
|
||||
IWL_ERR(mld, "Firmware has inconsistent rates\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* 11ax is expected to be enabled for all supported devices */
|
||||
if (WARN_ON(!mld->nvm_data->sku_cap_11ax_enable))
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -413,9 +413,6 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
|||
|
||||
iwl_construct_mld(mld, trans, cfg, fw, hw, dbgfs_dir);
|
||||
|
||||
/* we'll verify later it matches between commands */
|
||||
mld->fw_rates_ver_3 = iwl_fw_lookup_cmd_ver(mld->fw, TX_CMD, 0) >= 11;
|
||||
|
||||
iwl_mld_construct_fw_runtime(mld, trans, fw, dbgfs_dir);
|
||||
|
||||
iwl_mld_get_bios_tables(mld);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2024-2026 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_mld_h__
|
||||
#define __iwl_mld_h__
|
||||
|
|
@ -189,7 +189,6 @@
|
|||
* TX rate_n_flags for non-STA mgmt frames (toggles on every TX failure).
|
||||
* @set_tx_ant: stores the last TX antenna bitmask set by user space (if any)
|
||||
* @set_rx_ant: stores the last RX antenna bitmask set by user space (if any)
|
||||
* @fw_rates_ver_3: FW rates are in version 3
|
||||
* @low_latency: low-latency manager.
|
||||
* @tzone: thermal zone device's data
|
||||
* @cooling_dev: cooling device's related data
|
||||
|
|
@ -299,8 +298,6 @@ struct iwl_mld {
|
|||
u8 set_tx_ant;
|
||||
u8 set_rx_ant;
|
||||
|
||||
bool fw_rates_ver_3;
|
||||
|
||||
struct iwl_mld_low_latency low_latency;
|
||||
|
||||
bool ibss_manager;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ iwl_mld_fill_phy_data_from_mpdu(struct iwl_mld *mld,
|
|||
}
|
||||
|
||||
phy_data->phy_info = le16_to_cpu(desc->phy_info);
|
||||
phy_data->rate_n_flags = iwl_v3_rate_from_v2_v3(desc->v3.rate_n_flags,
|
||||
mld->fw_rates_ver_3);
|
||||
phy_data->rate_n_flags = le32_to_cpu(desc->v3.rate_n_flags);
|
||||
phy_data->gp2_on_air_rise = le32_to_cpu(desc->v3.gp2_on_air_rise);
|
||||
phy_data->energy_a = desc->v3.energy_a;
|
||||
phy_data->energy_b = desc->v3.energy_b;
|
||||
|
|
|
|||
|
|
@ -956,9 +956,7 @@ void iwl_mld_handle_tlc_notif(struct iwl_mld *mld,
|
|||
if (WARN_ON(!mld_link_sta))
|
||||
return;
|
||||
|
||||
mld_link_sta->last_rate_n_flags =
|
||||
iwl_v3_rate_from_v2_v3(notif->rate,
|
||||
mld->fw_rates_ver_3);
|
||||
mld_link_sta->last_rate_n_flags = le32_to_cpu(notif->rate);
|
||||
|
||||
rs_pretty_print_rate(pretty_rate, sizeof(pretty_rate),
|
||||
mld_link_sta->last_rate_n_flags);
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ static __le32 iwl_mld_get_tx_rate_n_flags(struct iwl_mld *mld,
|
|||
rate = iwl_mld_mac80211_rate_idx_to_fw(mld, info, -1) |
|
||||
iwl_mld_get_tx_ant(mld, info, sta, fc);
|
||||
|
||||
return iwl_v3_rate_to_v2_v3(rate, mld->fw_rates_ver_3);
|
||||
return cpu_to_le32(rate);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1012,14 +1012,11 @@ void iwl_mld_tx_from_txq(struct iwl_mld *mld, struct ieee80211_txq *txq)
|
|||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void iwl_mld_hwrate_to_tx_rate(struct iwl_mld *mld,
|
||||
__le32 rate_n_flags_fw,
|
||||
static void iwl_mld_hwrate_to_tx_rate(u32 rate_n_flags,
|
||||
struct ieee80211_tx_info *info)
|
||||
{
|
||||
enum nl80211_band band = info->band;
|
||||
struct ieee80211_tx_rate *tx_rate = &info->status.rates[0];
|
||||
u32 rate_n_flags = iwl_v3_rate_from_v2_v3(rate_n_flags_fw,
|
||||
mld->fw_rates_ver_3);
|
||||
u32 sgi = rate_n_flags & RATE_MCS_SGI_MSK;
|
||||
u32 chan_width = rate_n_flags & RATE_MCS_CHAN_WIDTH_MSK;
|
||||
u32 format = rate_n_flags & RATE_MCS_MOD_TYPE_MSK;
|
||||
|
|
@ -1150,7 +1147,8 @@ void iwl_mld_handle_tx_resp_notif(struct iwl_mld *mld,
|
|||
iwl_dbg_tlv_time_point(&mld->fwrt, tp, NULL);
|
||||
}
|
||||
|
||||
iwl_mld_hwrate_to_tx_rate(mld, tx_resp->initial_rate, info);
|
||||
iwl_mld_hwrate_to_tx_rate(le32_to_cpu(tx_resp->initial_rate),
|
||||
info);
|
||||
|
||||
if (likely(!iwl_mld_time_sync_frame(mld, skb, hdr->addr1)))
|
||||
ieee80211_tx_status_skb(mld->hw, skb);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user