summaryrefslogtreecommitdiffstats
path: root/sys/dev/wi
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2003-11-04 00:24:13 +0000
committergreen <green@FreeBSD.org>2003-11-04 00:24:13 +0000
commit6f7aa7fb6c3d294fc1263891bcf3cb61c2ae70ba (patch)
treeadce5fa2c2cc25e55a0dca950a1f931d7e7a8da7 /sys/dev/wi
parent8792262eee4455c710d6cb7401cee1cf414e9746 (diff)
downloadFreeBSD-src-6f7aa7fb6c3d294fc1263891bcf3cb61c2ae70ba.zip
FreeBSD-src-6f7aa7fb6c3d294fc1263891bcf3cb61c2ae70ba.tar.gz
On my ZoomAir-branded Intersil PRISM2 cards, if you try to set the
operating mode to HostAP, the card will lock up indefinitely (but the wi(4) driver can recover if you eject the card). The problem is that the card needs to be "reset" in a way before you even change the media to hostap. In practice this isn't as noticeable because you probably do some operation beforehand which prevents the lock-up before you enable hostap mode. e.g.: "ifconfig wi0 up media autoselect mediaopt hostap" will lock up (if you just inserted the card). "ifconfig wi0 up ssid foo media autoselect mediaopt hostap" won't lock up.
Diffstat (limited to 'sys/dev/wi')
-rw-r--r--sys/dev/wi/if_wi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 770353b..9703010 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -655,6 +655,9 @@ wi_init(void *arg)
wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_ADHOC);
break;
case IEEE80211_M_HOSTAP:
+ /* The card can lock up if we don't toggle it first. */
+ wi_cmd(sc, WI_CMD_DISABLE | WI_PORT0, 0, 0, 0);
+ wi_cmd(sc, WI_CMD_ENABLE | WI_PORT0, 0, 0, 0);
wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_HOSTAP);
break;
case IEEE80211_M_MONITOR:
OpenPOWER on IntegriCloud