linux/drivers/net/wireless/intel/iwlwifi/dvm/rs.h

/* SPDX-License-Identifier: GPL-2.0-only */
/******************************************************************************
 *
 * Copyright(c) 2003 - 2014, 2023 Intel Corporation. All rights reserved.
 *****************************************************************************/

#ifndef __iwl_agn_rs_h__
#define __iwl_agn_rs_h__

#include <net/mac80211.h>

#include "iwl-config.h"

#include "commands.h"

struct iwl_rate_info {};

/*
 * These serve as indexes into
 * struct iwl_rate_info iwl_rates[IWL_RATE_COUNT];
 */
enum {};

enum {};

enum {};

/* #define vs. enum to keep from defaulting to 'large integer' */
#define IWL_RATE_6M_MASK
#define IWL_RATE_9M_MASK
#define IWL_RATE_12M_MASK
#define IWL_RATE_18M_MASK
#define IWL_RATE_24M_MASK
#define IWL_RATE_36M_MASK
#define IWL_RATE_48M_MASK
#define IWL_RATE_54M_MASK
#define IWL_RATE_60M_MASK
#define IWL_RATE_1M_MASK
#define IWL_RATE_2M_MASK
#define IWL_RATE_5M_MASK
#define IWL_RATE_11M_MASK

/* uCode API values for legacy bit rates, both OFDM and CCK */
enum {};

/* uCode API values for OFDM high-throughput (HT) bit rates */
enum {};

/* MAC header values for bit rates */
enum {};

#define IWL_RATES_MASK

#define IWL_INVALID_VALUE

#define IWL_MIN_RSSI_VAL
#define IWL_MAX_RSSI_VAL

/* These values specify how many Tx frame attempts before
 * searching for a new modulation mode */
#define IWL_LEGACY_FAILURE_LIMIT
#define IWL_LEGACY_SUCCESS_LIMIT
#define IWL_LEGACY_TABLE_COUNT

#define IWL_NONE_LEGACY_FAILURE_LIMIT
#define IWL_NONE_LEGACY_SUCCESS_LIMIT
#define IWL_NONE_LEGACY_TABLE_COUNT

/* Success ratio (ACKed / attempted tx frames) values (perfect is 128 * 100) */
#define IWL_RS_GOOD_RATIO
#define IWL_RATE_SCALE_SWITCH
#define IWL_RATE_HIGH_TH
#define IWL_RATE_INCREASE_TH
#define IWL_RATE_DECREASE_TH

/* possible actions when in legacy mode */
#define IWL_LEGACY_SWITCH_ANTENNA1
#define IWL_LEGACY_SWITCH_ANTENNA2
#define IWL_LEGACY_SWITCH_SISO
#define IWL_LEGACY_SWITCH_MIMO2_AB
#define IWL_LEGACY_SWITCH_MIMO2_AC
#define IWL_LEGACY_SWITCH_MIMO2_BC
#define IWL_LEGACY_SWITCH_MIMO3_ABC

/* possible actions when in siso mode */
#define IWL_SISO_SWITCH_ANTENNA1
#define IWL_SISO_SWITCH_ANTENNA2
#define IWL_SISO_SWITCH_MIMO2_AB
#define IWL_SISO_SWITCH_MIMO2_AC
#define IWL_SISO_SWITCH_MIMO2_BC
#define IWL_SISO_SWITCH_GI
#define IWL_SISO_SWITCH_MIMO3_ABC


/* possible actions when in mimo mode */
#define IWL_MIMO2_SWITCH_ANTENNA1
#define IWL_MIMO2_SWITCH_ANTENNA2
#define IWL_MIMO2_SWITCH_SISO_A
#define IWL_MIMO2_SWITCH_SISO_B
#define IWL_MIMO2_SWITCH_SISO_C
#define IWL_MIMO2_SWITCH_GI
#define IWL_MIMO2_SWITCH_MIMO3_ABC


/* possible actions when in mimo3 mode */
#define IWL_MIMO3_SWITCH_ANTENNA1
#define IWL_MIMO3_SWITCH_ANTENNA2
#define IWL_MIMO3_SWITCH_SISO_A
#define IWL_MIMO3_SWITCH_SISO_B
#define IWL_MIMO3_SWITCH_SISO_C
#define IWL_MIMO3_SWITCH_MIMO2_AB
#define IWL_MIMO3_SWITCH_MIMO2_AC
#define IWL_MIMO3_SWITCH_MIMO2_BC
#define IWL_MIMO3_SWITCH_GI


#define IWL_MAX_11N_MIMO3_SEARCH
#define IWL_MAX_SEARCH

/*FIXME:RS:add possible actions for MIMO3*/

#define IWL_ACTION_LIMIT

#define LQ_SIZE

/* load per tid defines for A-MPDU activation */
#define IWL_AGG_TPT_THREHOLD
#define IWL_AGG_LOAD_THRESHOLD
#define IWL_AGG_ALL_TID
#define TID_QUEUE_CELL_SPACING
#define TID_QUEUE_MAX_SIZE
#define TID_ROUND_VALUE

#define TID_MAX_TIME_DIFF
#define TIME_WRAP_AROUND(x, y)

extern const struct iwl_rate_info iwl_rates[IWL_RATE_COUNT];

enum iwl_table_type {};

#define is_legacy(tbl)
#define is_siso(tbl)
#define is_mimo2(tbl)
#define is_mimo3(tbl)
#define is_mimo(tbl)
#define is_Ht(tbl)
#define is_a_band(tbl)
#define is_g_and(tbl)

#define IWL_MAX_MCS_DISPLAY_SIZE

struct iwl_rate_mcs_info {};

/*
 * struct iwl_rate_scale_data -- tx success history for one rate
 */
struct iwl_rate_scale_data {};

/*
 * struct iwl_scale_tbl_info -- tx params and success history for all rates
 *
 * There are two of these in struct iwl_lq_sta,
 * one for "active", and one for "search".
 */
struct iwl_scale_tbl_info {};

struct iwl_traffic_load {};

/*
 * struct iwl_lq_sta -- driver's rate scaling private structure
 *
 * Pointer to this gets passed back and forth between driver and mac80211.
 */
struct iwl_lq_sta {};

static inline u8 first_antenna(u8 mask)
{}


/* Initialize station's rate scaling information after adding station */
void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta,
		      u8 sta_id);

/*
 * iwl_rate_control_register - Register the rate control algorithm callbacks
 *
 * Since the rate control algorithm is hardware specific, there is no need
 * or reason to place it as a stand alone module.  The driver can call
 * iwl_rate_control_register in order to register the rate control callbacks
 * with the mac80211 subsystem.  This should be performed prior to calling
 * ieee80211_register_hw
 *
 */
int iwlagn_rate_control_register(void);

/*
 * iwl_rate_control_unregister - Unregister the rate control callbacks
 *
 * This should be called after calling ieee80211_unregister_hw, but before
 * the driver is unloaded.
 */
void iwlagn_rate_control_unregister(void);

#endif /* __iwl_agn__rs__ */