ref: 5fe4c7a43794481dbc1429304edf80839d0ba1f9
parent: 4595e2f5ce843ce9400d7cc1cc71ccd09c0e02bf
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Apr 21 12:44:38 EDT 2014
wifi: set ether->mbps to highest supported rate of the associated ap
--- a/sys/src/9/pc/wifi.c
+++ b/sys/src/9/pc/wifi.c
@@ -654,6 +654,7 @@
Wnode wnscan;
Wnode *wn;
ulong now, tmout;
+ uchar *rate;
wifi = arg;
ether = wifi->ether;
@@ -677,6 +678,8 @@
tmout = 0;
while((wn = wifi->bss) != nil){ether->link = (wn->status == Sassoc) || (wn->status == Sblocked);
+ if(ether->link && (rate = wn->maxrate) != nil)
+ ether->mbps = ((*rate & 0x7f)+1)/2;
now = MACHP(0)->ticks;
if(wn->status != Sneedauth && TK2SEC(now - wn->lastseen) > 60 || goodbss(wifi, wn) == 0){wifideauth(wifi, wn);
--
⑨