FreeBSD kernel ATH device code
sample.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sample_softc
 
struct  rate_stats
 
struct  txschedule
 
struct  sample_node
 

Macros

#define ATH_SOFTC_SAMPLE(sc)   ((struct sample_softc *)sc->sc_rc)
 
#define NUM_PACKET_SIZE_BINS   7
 
#define SAMPLE_MAXRATES   64 /* NB: corresponds to hal info[32] */
 
#define ATH_NODE_SAMPLE(an)   ((struct sample_node *)&(an)[1])
 
#define IS_RATE_DEFINED(sn, rix)   (((uint64_t) (sn)->ratemask & (1ULL<<((uint64_t) rix))) != 0)
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define WIFI_CW_MIN   31
 
#define WIFI_CW_MAX   1023
 

Functions

static int bin_to_size (int index)
 
static unsigned calc_usecs_unicast_packet (struct ath_softc *sc, int length, int rix, int short_retries, int long_retries, int is_ht40)
 

Variables

static const int packet_size_bins [NUM_PACKET_SIZE_BINS] = { 250, 1600, 4096, 8192, 16384, 32768, 65536 }
 

Macro Definition Documentation

◆ ATH_NODE_SAMPLE

#define ATH_NODE_SAMPLE (   an)    ((struct sample_node *)&(an)[1])

Definition at line 116 of file sample.h.

◆ ATH_SOFTC_SAMPLE

#define ATH_SOFTC_SAMPLE (   sc)    ((struct sample_softc *)sc->sc_rc)

Definition at line 58 of file sample.h.

◆ IS_RATE_DEFINED

#define IS_RATE_DEFINED (   sn,
  rix 
)    (((uint64_t) (sn)->ratemask & (1ULL<<((uint64_t) rix))) != 0)

Definition at line 117 of file sample.h.

◆ MAX

#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 123 of file sample.h.

◆ MIN

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 120 of file sample.h.

◆ NUM_PACKET_SIZE_BINS

#define NUM_PACKET_SIZE_BINS   7

Definition at line 81 of file sample.h.

◆ SAMPLE_MAXRATES

#define SAMPLE_MAXRATES   64 /* NB: corresponds to hal info[32] */

Definition at line 94 of file sample.h.

◆ WIFI_CW_MAX

#define WIFI_CW_MAX   1023

Definition at line 127 of file sample.h.

◆ WIFI_CW_MIN

#define WIFI_CW_MIN   31

Definition at line 126 of file sample.h.

Function Documentation

◆ bin_to_size()

static int bin_to_size ( int  index)
inlinestatic

Definition at line 86 of file sample.h.

References packet_size_bins.

Referenced by ath_rate_ctl_reset(), ath_rate_findrate(), ath_rate_tx_complete(), pick_best_rate(), sample_stats(), and update_stats().

Here is the caller graph for this function:

◆ calc_usecs_unicast_packet()

static unsigned calc_usecs_unicast_packet ( struct ath_softc sc,
int  length,
int  rix,
int  short_retries,
int  long_retries,
int  is_ht40 
)
static

Variable Documentation

◆ packet_size_bins

const int packet_size_bins[NUM_PACKET_SIZE_BINS] = { 250, 1600, 4096, 8192, 16384, 32768, 65536 }
static

Definition at line 83 of file sample.h.

Referenced by bin_to_size(), and size_to_bin().