An
ieee80211_rssdesc describes a transmission attempt.
struct ieee80211_rssdesc {
u_int id_len;
u_int id_rateidx;
struct ieee80211_node *id_node;
u_int8_t id_rssi;
};
id_len is the length, in bytes, of the transmitted packet.
id_node points to the neighbor's
ieee8021_node, and
id_rssi is the exponential-average RSS at the time the packet was transmitted.
id_rateidx is an index into the destination-neighbor's rate-set,
id_node->ni_rates, indicating the transmit data rate for the packet.
An
ieee80211_rssadapt contains the rate-adaptation state for a neighboring 802.11 node. Ordinarily a driver will “subclass”
ieee80211_node. The
ieee80211_rssadapt structure will be a subclass member. In this way, every node's
rssadapt condition is independently tracked and stored in its node object.
struct ieee80211_rssadapt {
u_int16_t ra_avg_rssi;
u_int32_t ra_nfail;
u_int32_t ra_nok;
u_int32_t ra_pktrate;
u_int16_t ra_rate_thresh[IEEE80211_RSSADAPT_BKTS]
[IEEE80211_RATE_SIZE];
struct timeval ra_last_raise;
struct timeval ra_raise_interval;
};
ra_avg_rssi is the exponential-average RSS, shifted left 8 bits.
ra_nfail tells the number of transmit failures in the current update interval.
ra_nok tells the number of transmit successes in the current update interval.
ra_pktrate tells the exponential average number of transmit failure/success indications over past update intervals. This approximates the rate of packet-transmission.
ra_rate_thresh contains RSS thresholds that are indexed by <packet length, data rate> tuples. When this node's exponential-average RSS exceeds
ra_rate_thresh[i][j], then packets at most 128 x 8^i bytes long are eligible to be transmitted at the rate indexed by j.
ra_last_raise and
ra_raise_interval are used to control the rate that RSS thresholds “decay”.
ra_last_raise indicates when
ieee80211_rssadapt_raise_rate() was last called.
ra_raise_interval tells the minimum period between consecutive calls to
ieee80211_rssadapt_raise_rate(). If
ieee80211_rssadapt_raise_rate() is called more than once in any period, the second and subsequent calls are ignored.