linux/net/mac80211/rc80211_minstrel_ht.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2010 Felix Fietkau <[email protected]>
 */

#ifndef __RC_MINSTREL_HT_H
#define __RC_MINSTREL_HT_H

#include <linux/bitfield.h>

/* number of highest throughput rates to consider*/
#define MAX_THR_RATES
#define SAMPLE_COLUMNS

/* scaled fraction values */
#define MINSTREL_SCALE
#define MINSTREL_FRAC(val, div)
#define MINSTREL_TRUNC(val)

#define EWMA_LEVEL
#define EWMA_DIV

/*
 * Coefficients for moving average with noise filter (period=16),
 * scaled by 10 bits
 *
 * a1 = exp(-pi * sqrt(2) / period)
 * coeff2 = 2 * a1 * cos(sqrt(2) * 2 * pi / period)
 * coeff3 = -sqr(a1)
 * coeff1 = 1 - coeff2 - coeff3
 */
#define MINSTREL_AVG_COEFF1
#define MINSTREL_AVG_COEFF2
#define MINSTREL_AVG_COEFF3

/*
 * The number of streams can be changed to 2 to reduce code
 * size and memory footprint.
 */
#define MINSTREL_MAX_STREAMS
#define MINSTREL_HT_STREAM_GROUPS
#define MINSTREL_VHT_STREAM_GROUPS

#define MINSTREL_HT_GROUPS_NB
#define MINSTREL_VHT_GROUPS_NB
#define MINSTREL_LEGACY_GROUPS_NB
#define MINSTREL_GROUPS_NB

#define MINSTREL_HT_GROUP_0
#define MINSTREL_CCK_GROUP
#define MINSTREL_OFDM_GROUP
#define MINSTREL_VHT_GROUP_0

#define MCS_GROUP_RATES

#define MI_RATE_IDX_MASK
#define MI_RATE_GROUP_MASK

#define MI_RATE(_group, _idx)

#define MI_RATE_IDX(_rate)
#define MI_RATE_GROUP(_rate)

#define MINSTREL_SAMPLE_RATES
#define MINSTREL_SAMPLE_INTERVAL

struct minstrel_priv {};


struct mcs_group {};

extern const s16 minstrel_cck_bitrates[4];
extern const s16 minstrel_ofdm_bitrates[8];
extern const struct mcs_group minstrel_mcs_groups[];

struct minstrel_rate_stats {};

enum minstrel_sample_type {};

struct minstrel_mcs_group_data {};

struct minstrel_sample_category {};

struct minstrel_ht_sta {};

void minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
int minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate,
			   int prob_avg);

#endif