mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
devether: print mbps only on link-up
To avoid frequent prints of the current link speed, which in case of wifi is adjusted based link quality, print the link speed only on link up events.
This commit is contained in:
parent
5dde462f96
commit
00c25292d7
1 changed files with 6 additions and 2 deletions
|
@ -475,7 +475,6 @@ ethersetspeed(Ether *ether, int mbps)
|
||||||
return;
|
return;
|
||||||
netifsetlimit(ether, etherqueuesize(ether));
|
netifsetlimit(ether, etherqueuesize(ether));
|
||||||
qsetlimit(ether->oq, ether->limit);
|
qsetlimit(ether->oq, ether->limit);
|
||||||
print("#l%d: %s: speed %dMbps\n", ether->ctlrno, ether->type, mbps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -485,7 +484,12 @@ ethersetlink(Ether *ether, int link)
|
||||||
if(!!ether->link == link)
|
if(!!ether->link == link)
|
||||||
return;
|
return;
|
||||||
ether->link = link;
|
ether->link = link;
|
||||||
print("#l%d: %s: link %s\n", ether->ctlrno, ether->type, link? "up": "down");
|
if(link)
|
||||||
|
print("#l%d: %s: link up: %dMbps\n",
|
||||||
|
ether->ctlrno, ether->type, ether->mbps);
|
||||||
|
else
|
||||||
|
print("#l%d: %s: link down\n",
|
||||||
|
ether->ctlrno, ether->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void netconsole(int);
|
static void netconsole(int);
|
||||||
|
|
Loading…
Reference in a new issue