etherwpi: dont enable transmit power for invalid channels, add multicast stub
This commit is contained in:
parent
266057f0da
commit
b4f9ca6c97
1 changed files with 22 additions and 14 deletions
|
@ -273,7 +273,7 @@ struct Ctlr {
|
|||
Powergrp pwrgrps[5];
|
||||
} eeprom;
|
||||
|
||||
char maxpwr[255];
|
||||
char maxpwr[256];
|
||||
|
||||
Shared *shared;
|
||||
|
||||
|
@ -535,6 +535,7 @@ wpiinit(Ether *edev)
|
|||
goto Err;
|
||||
memmove(edev->ea, b, Eaddrlen);
|
||||
|
||||
memset(ctlr->maxpwr, 0, sizeof(ctlr->maxpwr));
|
||||
for(i = 0; i < nelem(bands); i++){
|
||||
if((err = eepromread(ctlr, b, 2*bands[i].nchan, bands[i].addr)) != nil)
|
||||
goto Err;
|
||||
|
@ -1348,6 +1349,7 @@ rxon(Ether *edev, Wnode *bss)
|
|||
return;
|
||||
}
|
||||
|
||||
if(ctlr->maxpwr[ctlr->channel] != 0){
|
||||
/* tx power */
|
||||
memset(p = c, 0, sizeof(c));
|
||||
*p++ = 1; /* band (0 = 5ghz) */
|
||||
|
@ -1361,6 +1363,7 @@ rxon(Ether *edev, Wnode *bss)
|
|||
p++; /* reservd */
|
||||
}
|
||||
cmd(ctlr, 151, c, p - c);
|
||||
}
|
||||
|
||||
if(ctlr->bcastnodeid == -1){
|
||||
ctlr->bcastnodeid = 24;
|
||||
|
@ -1525,6 +1528,11 @@ wpipromiscuous(void *arg, int on)
|
|||
qunlock(ctlr);
|
||||
}
|
||||
|
||||
static void
|
||||
wpimulticast(void *, uchar*, int)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
wpirecover(void *arg)
|
||||
{
|
||||
|
@ -1846,7 +1854,7 @@ again:
|
|||
edev->ctl = wpictl;
|
||||
edev->shutdown = wpishutdown;
|
||||
edev->promiscuous = wpipromiscuous;
|
||||
edev->multicast = nil;
|
||||
edev->multicast = wpimulticast;
|
||||
edev->mbps = 54;
|
||||
|
||||
if(wpiinit(edev) < 0){
|
||||
|
|
Loading…
Reference in a new issue