summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-05-10 17:17:24 +0000
committerwpaul <wpaul@FreeBSD.org>2001-05-10 17:17:24 +0000
commit71ef933819a4daf812347822db9f3183ee7449e3 (patch)
treeab1d92ced54d61fa66c588f9aed5f0acf50ea911 /sys/dev
parentcf69042ef6996059c841c45d2ee7df99f5b37768 (diff)
downloadFreeBSD-src-71ef933819a4daf812347822db9f3183ee7449e3.zip
FreeBSD-src-71ef933819a4daf812347822db9f3183ee7449e3.tar.gz
Try to read the station address twice during the probe. I've seen
a LinkSys card here in the office where reading the station address fails the first time, but works find afterwards. Without this, the probe fails. I don't think this will negatively impact any existing cards, but I want to confirm this before MFC'ing.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/wi/if_wi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index db2b951..ea33e57 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -426,9 +426,15 @@ wi_generic_attach(device_t dev)
/* Reset the NIC. */
wi_reset(sc);
- /* Read the station address. */
+ /*
+ * Read the station address.
+ * And do it twice. I've seen PRISM-based cards that return
+ * an error when trying to read it the first time, which causes
+ * the probe to fail.
+ */
mac.wi_type = WI_RID_MAC_NODE;
mac.wi_len = 4;
+ wi_read_record(sc, (struct wi_ltv_gen *)&mac));
if ((error = wi_read_record(sc, (struct wi_ltv_gen *)&mac)) != 0) {
device_printf(dev, "mac read failed %d\n", error);
wi_free(dev);
OpenPOWER on IntegriCloud