summaryrefslogtreecommitdiff
path: root/os/pc/etherwavelan.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/pc/etherwavelan.c')
-rw-r--r--os/pc/etherwavelan.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/os/pc/etherwavelan.c b/os/pc/etherwavelan.c
index 6fa9f250..e76905b5 100644
--- a/os/pc/etherwavelan.c
+++ b/os/pc/etherwavelan.c
@@ -87,6 +87,7 @@ static struct {
int did;
} wavelanpci[] = {
0x1260, 0x3873, /* Intersil Prism2.5 */
+ 0x1737, 0x0019, /* Linksys WPC-11 untested */
};
static Ctlr *ctlrhead, *ctlrtail;
@@ -95,7 +96,7 @@ static void
wavelanpciscan(void)
{
int i;
- ulong pa;
+ void *mem;
Pcidev *p;
Ctlr *ctlr;
@@ -117,13 +118,13 @@ wavelanpciscan(void)
ctlr = malloc(sizeof(Ctlr));
ctlr->pcidev = p;
- pa = upamalloc(p->mem[0].bar&~0xF, p->mem[0].size, 0);
- if(pa == 0){
- print("wavelanpci: %.4ux %.4ux: upamalloc 0x%.8lux %d failed\n", p->vid, p->did, p->mem[0].bar&~0xF, p->mem[0].size);
+ mem = vmap(p->mem[0].bar&~0xF, p->mem[0].size);
+ if(mem == nil){
+ print("wavelanpci: %.4ux %.4ux: vmap 0x%.8lux %d failed\n", p->vid, p->did, p->mem[0].bar&~0xF, p->mem[0].size);
free(ctlr);
continue;
}
- ctlr->mmb = (ushort*)KADDR(pa);
+ ctlr->mmb = mem;
if(ctlrhead != nil)
ctlrtail->next = ctlr;
else