summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2015-01-10 10:38:13 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2015-01-10 10:38:13 +0000
commitea459c7e0d5e015d2d2e37692db90093dbcf725c (patch)
tree54f2021bcd635f159fd1bb961c116f0608954a65 /sys/dev
parent968d819711e950c5d540ba5abe880010aa3dbd5b (diff)
Merge two bwi(4) fixes from FreeBSD:
------------------------------------------------------------------------ r192306 | imp | 2009-05-18 17:31:26 +0200 (Mon, 18 May 2009) | 10 lines Fix a typo from the original driver. We need to write ctrl2 into RF register 0x52, not ctrl1. This appears to be a mistake in the bcm reverse engineering page, and has been corrected there. Tracing through the code, this is more in keeping with the "documented" register. Sephe thinks it looks interesting and may be worth fixing. :) Submitted by: ddkprog at yahoo com Reviewed by: Sepherosa Ziehau ------------------------------------------------------------------------ r192042 | nwhitehorn | 2009-05-13 16:25:55 +0200 (Wed, 13 May 2009) | 4 lines Add a short delay after programming PHY registers to give some time for the engine to catch up. This prevents a machine check exception from illegal memory requests with a BCM4318. ------------------------------------------------------------------------ No regressions observed by myself, miod@, and Vesa Norrman (vesbula at gmail).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/bwi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c
index 2423858fe48..cdccf7bfbba 100644
--- a/sys/dev/ic/bwi.c
+++ b/sys/dev/ic/bwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwi.c,v 1.113 2014/12/22 02:28:51 tedu Exp $ */
+/* $OpenBSD: bwi.c,v 1.114 2015/01/10 10:38:12 stsp Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -3061,7 +3061,7 @@ bwi_phy_init_11g(struct bwi_mac *mac)
RF_WRITE(mac, 0x52,
(tpctl->tp_ctrl1 << 4) | tpctl->tp_ctrl2);
} else {
- RF_FILT_SETBITS(mac, 0x52, 0xfff0, tpctl->tp_ctrl1);
+ RF_FILT_SETBITS(mac, 0x52, 0xfff0, tpctl->tp_ctrl2);
}
if (phy->phy_rev >= 6) {
@@ -3351,6 +3351,9 @@ bwi_phy_init_11b_rev6(struct bwi_mac *mac)
for (ofs = 0xa8; ofs < 0xc8; ++ofs) {
PHY_WRITE(mac, ofs, (val & 0x3f3f));
val += 0x202;
+
+ /* XXX: delay 10 us to avoid PCI parity errors with BCM4318 */
+ DELAY(10);
}
if (phy->phy_mode == IEEE80211_MODE_11G) {