wifi: iwlwifi: s/IWL_MVM_STATION_COUNT_MAX/IWL_STATION_COUNT_MAX
This isn't mvm specific. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20240901071542.5d71a0a2b56c.I7e0fe636d914852963e7a2f5e6037d0c3e367145@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
07fb53783b
commit
b61ed2b809
@ -16,7 +16,7 @@
|
|||||||
#define NUM_MAC_INDEX (NUM_MAC_INDEX_DRIVER + 1)
|
#define NUM_MAC_INDEX (NUM_MAC_INDEX_DRIVER + 1)
|
||||||
#define NUM_MAC_INDEX_CDB (NUM_MAC_INDEX_DRIVER + 2)
|
#define NUM_MAC_INDEX_CDB (NUM_MAC_INDEX_DRIVER + 2)
|
||||||
|
|
||||||
#define IWL_MVM_STATION_COUNT_MAX 16
|
#define IWL_STATION_COUNT_MAX 16
|
||||||
#define IWL_MVM_INVALID_STA 0xFF
|
#define IWL_MVM_INVALID_STA 0xFF
|
||||||
|
|
||||||
enum iwl_ac {
|
enum iwl_ac {
|
||||||
|
@ -327,14 +327,14 @@ struct mvm_statistics_load {
|
|||||||
__le32 air_time[MAC_INDEX_AUX];
|
__le32 air_time[MAC_INDEX_AUX];
|
||||||
__le32 byte_count[MAC_INDEX_AUX];
|
__le32 byte_count[MAC_INDEX_AUX];
|
||||||
__le32 pkt_count[MAC_INDEX_AUX];
|
__le32 pkt_count[MAC_INDEX_AUX];
|
||||||
u8 avg_energy[IWL_MVM_STATION_COUNT_MAX];
|
u8 avg_energy[IWL_STATION_COUNT_MAX];
|
||||||
} __packed; /* STATISTICS_RX_MAC_STATION_S_VER_3 */
|
} __packed; /* STATISTICS_RX_MAC_STATION_S_VER_3 */
|
||||||
|
|
||||||
struct mvm_statistics_load_v1 {
|
struct mvm_statistics_load_v1 {
|
||||||
__le32 air_time[NUM_MAC_INDEX];
|
__le32 air_time[NUM_MAC_INDEX];
|
||||||
__le32 byte_count[NUM_MAC_INDEX];
|
__le32 byte_count[NUM_MAC_INDEX];
|
||||||
__le32 pkt_count[NUM_MAC_INDEX];
|
__le32 pkt_count[NUM_MAC_INDEX];
|
||||||
u8 avg_energy[IWL_MVM_STATION_COUNT_MAX];
|
u8 avg_energy[IWL_STATION_COUNT_MAX];
|
||||||
} __packed; /* STATISTICS_RX_MAC_STATION_S_VER_1 */
|
} __packed; /* STATISTICS_RX_MAC_STATION_S_VER_1 */
|
||||||
|
|
||||||
struct mvm_statistics_rx {
|
struct mvm_statistics_rx {
|
||||||
@ -608,7 +608,7 @@ struct iwl_system_statistics_notif_oper {
|
|||||||
__le32 time_stamp;
|
__le32 time_stamp;
|
||||||
struct iwl_stats_ntfy_per_link per_link[IWL_STATS_MAX_FW_LINKS];
|
struct iwl_stats_ntfy_per_link per_link[IWL_STATS_MAX_FW_LINKS];
|
||||||
struct iwl_stats_ntfy_per_phy per_phy[IWL_STATS_MAX_PHY_OPERATIONAL];
|
struct iwl_stats_ntfy_per_phy per_phy[IWL_STATS_MAX_PHY_OPERATIONAL];
|
||||||
struct iwl_stats_ntfy_per_sta per_sta[IWL_MVM_STATION_COUNT_MAX];
|
struct iwl_stats_ntfy_per_sta per_sta[IWL_STATION_COUNT_MAX];
|
||||||
} __packed; /* STATISTICS_FW_NTFY_OPERATIONAL_API_S_VER_3 */
|
} __packed; /* STATISTICS_FW_NTFY_OPERATIONAL_API_S_VER_3 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -651,7 +651,7 @@ struct iwl_statistics_operational_ntfy {
|
|||||||
__le32 flags;
|
__le32 flags;
|
||||||
struct iwl_stats_ntfy_per_mac per_mac[MAC_INDEX_AUX];
|
struct iwl_stats_ntfy_per_mac per_mac[MAC_INDEX_AUX];
|
||||||
struct iwl_stats_ntfy_per_phy per_phy[IWL_STATS_MAX_PHY_OPERATIONAL];
|
struct iwl_stats_ntfy_per_phy per_phy[IWL_STATS_MAX_PHY_OPERATIONAL];
|
||||||
struct iwl_stats_ntfy_per_sta per_sta[IWL_MVM_STATION_COUNT_MAX];
|
struct iwl_stats_ntfy_per_sta per_sta[IWL_STATION_COUNT_MAX];
|
||||||
__le64 rx_time;
|
__le64 rx_time;
|
||||||
__le64 tx_time;
|
__le64 tx_time;
|
||||||
__le64 on_time_rf;
|
__le64 on_time_rf;
|
||||||
@ -699,7 +699,7 @@ struct iwl_statistics_operational_ntfy_ver_14 {
|
|||||||
__le64 tx_time;
|
__le64 tx_time;
|
||||||
__le64 on_time_rf;
|
__le64 on_time_rf;
|
||||||
__le64 on_time_scan;
|
__le64 on_time_scan;
|
||||||
__le32 average_energy[IWL_MVM_STATION_COUNT_MAX];
|
__le32 average_energy[IWL_STATION_COUNT_MAX];
|
||||||
__le32 reserved;
|
__le32 reserved;
|
||||||
} __packed; /* STATISTICS_OPERATIONAL_NTFY_API_S_VER_14 */
|
} __packed; /* STATISTICS_OPERATIONAL_NTFY_API_S_VER_14 */
|
||||||
|
|
||||||
|
@ -1205,7 +1205,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
|||||||
if (tlv_len != sizeof(u32))
|
if (tlv_len != sizeof(u32))
|
||||||
goto invalid_tlv_len;
|
goto invalid_tlv_len;
|
||||||
if (le32_to_cpup((const __le32 *)tlv_data) >
|
if (le32_to_cpup((const __le32 *)tlv_data) >
|
||||||
IWL_MVM_STATION_COUNT_MAX) {
|
IWL_STATION_COUNT_MAX) {
|
||||||
IWL_ERR(drv,
|
IWL_ERR(drv,
|
||||||
"%d is an invalid number of station\n",
|
"%d is an invalid number of station\n",
|
||||||
le32_to_cpup((const __le32 *)tlv_data));
|
le32_to_cpup((const __le32 *)tlv_data));
|
||||||
@ -1479,7 +1479,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
|||||||
fw->ucode_capa.standard_phy_calibration_size =
|
fw->ucode_capa.standard_phy_calibration_size =
|
||||||
IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE;
|
IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE;
|
||||||
fw->ucode_capa.n_scan_channels = IWL_DEFAULT_SCAN_CHANNELS;
|
fw->ucode_capa.n_scan_channels = IWL_DEFAULT_SCAN_CHANNELS;
|
||||||
fw->ucode_capa.num_stations = IWL_MVM_STATION_COUNT_MAX;
|
fw->ucode_capa.num_stations = IWL_STATION_COUNT_MAX;
|
||||||
fw->ucode_capa.num_beacons = 1;
|
fw->ucode_capa.num_beacons = 1;
|
||||||
/* dump all fw memory areas by default */
|
/* dump all fw memory areas by default */
|
||||||
fw->dbg.dump_mask = 0xffffffff;
|
fw->dbg.dump_mask = 0xffffffff;
|
||||||
|
@ -1078,8 +1078,8 @@ struct iwl_mvm {
|
|||||||
|
|
||||||
/* data related to data path */
|
/* data related to data path */
|
||||||
struct iwl_rx_phy_info last_phy_info;
|
struct iwl_rx_phy_info last_phy_info;
|
||||||
struct ieee80211_sta __rcu *fw_id_to_mac_id[IWL_MVM_STATION_COUNT_MAX];
|
struct ieee80211_sta __rcu *fw_id_to_mac_id[IWL_STATION_COUNT_MAX];
|
||||||
struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_MVM_STATION_COUNT_MAX];
|
struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_STATION_COUNT_MAX];
|
||||||
u8 rx_ba_sessions;
|
u8 rx_ba_sessions;
|
||||||
|
|
||||||
/* configured by mac80211 */
|
/* configured by mac80211 */
|
||||||
|
@ -1285,12 +1285,12 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
|||||||
struct iwl_mvm_csme_conn_info *csme_conn_info __maybe_unused;
|
struct iwl_mvm_csme_conn_info *csme_conn_info __maybe_unused;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We use IWL_MVM_STATION_COUNT_MAX to check the validity of the station
|
* We use IWL_STATION_COUNT_MAX to check the validity of the station
|
||||||
* index all over the driver - check that its value corresponds to the
|
* index all over the driver - check that its value corresponds to the
|
||||||
* array size.
|
* array size.
|
||||||
*/
|
*/
|
||||||
BUILD_BUG_ON(ARRAY_SIZE(mvm->fw_id_to_mac_id) !=
|
BUILD_BUG_ON(ARRAY_SIZE(mvm->fw_id_to_mac_id) !=
|
||||||
IWL_MVM_STATION_COUNT_MAX);
|
IWL_STATION_COUNT_MAX);
|
||||||
|
|
||||||
/********************************
|
/********************************
|
||||||
* 1. Allocating and configuring HW data
|
* 1. Allocating and configuring HW data
|
||||||
|
@ -738,8 +738,8 @@ static void iwl_mvm_stats_energy_iter(void *_data,
|
|||||||
u8 *energy = _data;
|
u8 *energy = _data;
|
||||||
u32 sta_id = mvmsta->deflink.sta_id;
|
u32 sta_id = mvmsta->deflink.sta_id;
|
||||||
|
|
||||||
if (WARN_ONCE(sta_id >= IWL_MVM_STATION_COUNT_MAX, "sta_id %d >= %d",
|
if (WARN_ONCE(sta_id >= IWL_STATION_COUNT_MAX, "sta_id %d >= %d",
|
||||||
sta_id, IWL_MVM_STATION_COUNT_MAX))
|
sta_id, IWL_STATION_COUNT_MAX))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (energy[sta_id])
|
if (energy[sta_id])
|
||||||
@ -1042,7 +1042,7 @@ static void iwl_mvm_update_esr_mode_tpt(struct iwl_mvm *mvm)
|
|||||||
void iwl_mvm_handle_rx_system_oper_stats(struct iwl_mvm *mvm,
|
void iwl_mvm_handle_rx_system_oper_stats(struct iwl_mvm *mvm,
|
||||||
struct iwl_rx_cmd_buffer *rxb)
|
struct iwl_rx_cmd_buffer *rxb)
|
||||||
{
|
{
|
||||||
u8 average_energy[IWL_MVM_STATION_COUNT_MAX];
|
u8 average_energy[IWL_STATION_COUNT_MAX];
|
||||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||||
struct iwl_system_statistics_notif_oper *stats;
|
struct iwl_system_statistics_notif_oper *stats;
|
||||||
int i;
|
int i;
|
||||||
@ -1101,7 +1101,7 @@ static void
|
|||||||
iwl_mvm_handle_rx_statistics_tlv(struct iwl_mvm *mvm,
|
iwl_mvm_handle_rx_statistics_tlv(struct iwl_mvm *mvm,
|
||||||
struct iwl_rx_packet *pkt)
|
struct iwl_rx_packet *pkt)
|
||||||
{
|
{
|
||||||
u8 average_energy[IWL_MVM_STATION_COUNT_MAX];
|
u8 average_energy[IWL_STATION_COUNT_MAX];
|
||||||
__le32 air_time[MAC_INDEX_AUX];
|
__le32 air_time[MAC_INDEX_AUX];
|
||||||
__le32 rx_bytes[MAC_INDEX_AUX];
|
__le32 rx_bytes[MAC_INDEX_AUX];
|
||||||
__le32 flags = 0;
|
__le32 flags = 0;
|
||||||
|
@ -2542,7 +2542,7 @@ void iwl_mvm_rx_bar_frame_release(struct iwl_mvm *mvm, struct napi_struct *napi,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WARN(tid != baid_data->tid || sta_id > IWL_MVM_STATION_COUNT_MAX ||
|
if (WARN(tid != baid_data->tid || sta_id > IWL_STATION_COUNT_MAX ||
|
||||||
!(baid_data->sta_mask & BIT(sta_id)),
|
!(baid_data->sta_mask & BIT(sta_id)),
|
||||||
"baid 0x%x is mapped to sta_mask:0x%x tid:%d, but BAR release received for sta:%d tid:%d\n",
|
"baid 0x%x is mapped to sta_mask:0x%x tid:%d, but BAR release received for sta:%d tid:%d\n",
|
||||||
baid, baid_data->sta_mask, baid_data->tid, sta_id,
|
baid, baid_data->sta_mask, baid_data->tid, sta_id,
|
||||||
|
@ -29,7 +29,7 @@ int iwl_mvm_find_free_sta_id(struct iwl_mvm *mvm, enum nl80211_iftype iftype)
|
|||||||
int sta_id;
|
int sta_id;
|
||||||
u32 reserved_ids = 0;
|
u32 reserved_ids = 0;
|
||||||
|
|
||||||
BUILD_BUG_ON(IWL_MVM_STATION_COUNT_MAX > 32);
|
BUILD_BUG_ON(IWL_STATION_COUNT_MAX > 32);
|
||||||
WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status));
|
WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status));
|
||||||
|
|
||||||
lockdep_assert_held(&mvm->mutex);
|
lockdep_assert_held(&mvm->mutex);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <linux/wait.h>
|
#include <linux/wait.h>
|
||||||
|
|
||||||
#include "iwl-trans.h" /* for IWL_MAX_TID_COUNT */
|
#include "iwl-trans.h" /* for IWL_MAX_TID_COUNT */
|
||||||
#include "fw-api.h" /* IWL_MVM_STATION_COUNT_MAX */
|
#include "fw-api.h" /* IWL_STATION_COUNT_MAX */
|
||||||
#include "rs.h"
|
#include "rs.h"
|
||||||
|
|
||||||
struct iwl_mvm;
|
struct iwl_mvm;
|
||||||
|
Loading…
Reference in New Issue
Block a user