diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-10 09:04:05 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-10 09:04:05 +0200 |
commit | b5655b7247a657bd4b590218a68ed99bbab318f6 (patch) | |
tree | c1abbf0fb9b06ca100f857581d1254be5493d237 /sys/src/9/pc/wifi.h | |
parent | 4ec93f94c92eec46433a962eb0f86b6f27909e6c (diff) |
wifi: adjust transmit rate on error (for etheriwl), small mkfile changes
Wnode gets two new counters: txcount and txerror
and actrate pointer that will be between minrate
and maxrate.
driver should use actrate instead of maxrate for
transmission when it can provide error feedback.
when a driver detects a transmission failed, it calls
wifitxfail() with the original packet. wifitxfail() then
reduces wn->actrate.
every 256th packet, we optimistically increase wn->actrate
before transmitting.
Diffstat (limited to 'sys/src/9/pc/wifi.h')
-rw-r--r-- | sys/src/9/pc/wifi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/9/pc/wifi.h b/sys/src/9/pc/wifi.h index f1311c05a..d9a8514a6 100644 --- a/sys/src/9/pc/wifi.h +++ b/sys/src/9/pc/wifi.h @@ -39,6 +39,10 @@ struct Wnode uchar *minrate; /* pointers into wifi->rates */ uchar *maxrate; + uchar *actrate; + + ulong txcount; /* statistics for rate adaption */ + ulong txerror; /* stuff from beacon */ int ival; @@ -87,6 +91,7 @@ struct Wifipkt Wifi *wifiattach(Ether *ether, void (*transmit)(Wifi*, Wnode*, Block*)); void wifiiq(Wifi*, Block*); int wifihdrlen(Wifipkt*); +void wifitxfail(Wifi*, Block*); long wifistat(Wifi*, void*, long, ulong); long wifictl(Wifi*, void*, long); |