linux/net/mac80211/airtime.c

// SPDX-License-Identifier: ISC
/*
 * Copyright (C) 2019 Felix Fietkau <[email protected]>
 * Copyright (C) 2021-2022 Intel Corporation
 */

#include <net/mac80211.h>
#include "ieee80211_i.h"
#include "sta_info.h"

#define AVG_PKT_SIZE

/* Number of bits for an average sized packet */
#define MCS_NBITS

/* Number of kilo-symbols (symbols * 1024) for a packet with (bps) bits per
 * symbol. We use k-symbols to avoid rounding in the _TIME macros below.
 */
#define MCS_N_KSYMS(bps)

/* Transmission time (in 1024 * usec) for a packet containing (ksyms) * 1024
 * symbols.
 */
#define MCS_SYMBOL_TIME(sgi, ksyms)

/* Transmit duration for the raw data part of an average sized packet */
#define MCS_DURATION(streams, sgi, bps)

#define MCS_DURATION_S(shift, streams, sgi, bps)

/* These should match the values in enum nl80211_he_gi */
#define HE_GI_08
#define HE_GI_16
#define HE_GI_32

/* Transmission time (1024 usec) for a packet containing (ksyms) * k-symbols */
#define HE_SYMBOL_TIME(gi, ksyms)

/* Transmit duration for the raw data part of an average sized packet */
#define HE_DURATION(streams, gi, bps)

#define HE_DURATION_S(shift, streams, gi, bps)

#define BW_20
#define BW_40
#define BW_80
#define BW_160

/*
 * Define group sort order: HT40 -> SGI -> #streams
 */
#define IEEE80211_MAX_STREAMS
#define IEEE80211_HT_STREAM_GROUPS
#define IEEE80211_VHT_STREAM_GROUPS

#define IEEE80211_HE_MAX_STREAMS

#define IEEE80211_HT_GROUPS_NB
#define IEEE80211_VHT_GROUPS_NB

#define IEEE80211_HT_GROUP_0
#define IEEE80211_VHT_GROUP_0
#define IEEE80211_HE_GROUP_0

#define MCS_GROUP_RATES

#define HT_GROUP_IDX(_streams, _sgi, _ht40)

#define _MAX(a, b)

#define GROUP_SHIFT(duration)

/* MCS rate information for an MCS group */
#define __MCS_GROUP(_streams, _sgi, _ht40, _s)

#define MCS_GROUP_SHIFT(_streams, _sgi, _ht40)

#define MCS_GROUP(_streams, _sgi, _ht40)

#define VHT_GROUP_IDX(_streams, _sgi, _bw)

#define BW2VBPS(_bw, r4, r3, r2, r1)

#define __VHT_GROUP(_streams, _sgi, _bw, _s)

#define VHT_GROUP_SHIFT(_streams, _sgi, _bw)

#define VHT_GROUP(_streams, _sgi, _bw)


#define HE_GROUP_IDX(_streams, _gi, _bw)

#define __HE_GROUP(_streams, _gi, _bw, _s)

#define HE_GROUP_SHIFT(_streams, _gi, _bw)

#define HE_GROUP(_streams, _gi, _bw)
struct mcs_group {};

static const struct mcs_group airtime_mcs_groups[] =;

static u32
ieee80211_calc_legacy_rate_duration(u16 bitrate, bool short_pre,
				    bool cck, int len)
{}

static u32 ieee80211_get_rate_duration(struct ieee80211_hw *hw,
				       struct ieee80211_rx_status *status,
				       u32 *overhead)
{}


u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw,
			      struct ieee80211_rx_status *status,
			      int len)
{}
EXPORT_SYMBOL_GPL();

static bool ieee80211_fill_rate_info(struct ieee80211_hw *hw,
				     struct ieee80211_rx_status *stat, u8 band,
				     struct rate_info *ri)
{}

static int ieee80211_fill_rx_status(struct ieee80211_rx_status *stat,
				    struct ieee80211_hw *hw,
				    struct ieee80211_tx_rate *rate,
				    struct rate_info *ri, u8 band, int len)
{}

static u32 ieee80211_calc_tx_airtime_rate(struct ieee80211_hw *hw,
					  struct ieee80211_tx_rate *rate,
					  struct rate_info *ri,
					  u8 band, int len)
{}

u32 ieee80211_calc_tx_airtime(struct ieee80211_hw *hw,
			      struct ieee80211_tx_info *info,
			      int len)
{}
EXPORT_SYMBOL_GPL();

u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
				       struct ieee80211_vif *vif,
				       struct ieee80211_sta *pubsta,
				       int len, bool ampdu)
{}