wifi: set ether->mbps to highest supported rate of the associated ap
This commit is contained in:
parent
49825fa795
commit
0f98415f99
|
@ -654,6 +654,7 @@ wifsproc(void *arg)
|
||||||
Wnode wnscan;
|
Wnode wnscan;
|
||||||
Wnode *wn;
|
Wnode *wn;
|
||||||
ulong now, tmout;
|
ulong now, tmout;
|
||||||
|
uchar *rate;
|
||||||
|
|
||||||
wifi = arg;
|
wifi = arg;
|
||||||
ether = wifi->ether;
|
ether = wifi->ether;
|
||||||
|
@ -677,6 +678,8 @@ Scan:
|
||||||
tmout = 0;
|
tmout = 0;
|
||||||
while((wn = wifi->bss) != nil){
|
while((wn = wifi->bss) != nil){
|
||||||
ether->link = (wn->status == Sassoc) || (wn->status == Sblocked);
|
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;
|
now = MACHP(0)->ticks;
|
||||||
if(wn->status != Sneedauth && TK2SEC(now - wn->lastseen) > 60 || goodbss(wifi, wn) == 0){
|
if(wn->status != Sneedauth && TK2SEC(now - wn->lastseen) > 60 || goodbss(wifi, wn) == 0){
|
||||||
wifideauth(wifi, wn);
|
wifideauth(wifi, wn);
|
||||||
|
|
Loading…
Reference in a new issue