In wpi_init, check for the status of radio switch and print a useful message
in this case.
This commit is contained in:
parent
297acee710
commit
db9d3119cf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_wpi.c,v 1.30 2007/11/23 22:27:02 plunky Exp $ */
|
||||
/* $NetBSD: if_wpi.c,v 1.31 2007/11/28 22:51:49 degroote Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007
|
||||
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.30 2007/11/23 22:27:02 plunky Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.31 2007/11/28 22:51:49 degroote Exp $");
|
||||
|
||||
/*
|
||||
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
|
||||
@ -3063,6 +3063,17 @@ wpi_init(struct ifnet *ifp)
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
/* Check the status of the radio switch */
|
||||
wpi_mem_lock(sc);
|
||||
tmp = wpi_mem_read(sc, WPI_MEM_RFKILL);
|
||||
wpi_mem_unlock(sc);
|
||||
|
||||
if (!(tmp & 0x01)) {
|
||||
aprint_error_dev(sc->sc_dev, "Radio is disabled by hardware switch\n");
|
||||
error = EPERM; // XXX
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
/* wait for thermal sensors to calibrate */
|
||||
for (ntries = 0; ntries < 1000; ntries++) {
|
||||
if ((sc->temp = (int)WPI_READ(sc, WPI_TEMPERATURE)) != 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_wpireg.h,v 1.7 2007/10/21 16:47:27 degroote Exp $ */
|
||||
/* $NetBSD: if_wpireg.h,v 1.8 2007/11/28 22:51:49 degroote Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006
|
||||
@ -87,6 +87,7 @@
|
||||
#define WPI_MEM_CLOCK2 0x3008
|
||||
#define WPI_MEM_POWER 0x300c
|
||||
#define WPI_MEM_PCIDEV 0x3010
|
||||
#define WPI_MEM_RFKILL 0x3014
|
||||
#define WPI_MEM_UCODE_CTL 0x3400
|
||||
#define WPI_MEM_UCODE_SRC 0x3404
|
||||
#define WPI_MEM_UCODE_DST 0x3408
|
||||
|
Loading…
Reference in New Issue
Block a user