aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iwn
diff options
context:
space:
mode:
authorBernhard Schmidt <bschmidt@FreeBSD.org>2011-06-04 11:43:09 +0000
committerBernhard Schmidt <bschmidt@FreeBSD.org>2011-06-04 11:43:09 +0000
commitbf6998c5682719e9f813d781313064bc869f7b42 (patch)
tree98bc0b95b90a513ea8b000b255eaf362aaf5ec97 /sys/dev/iwn
parent9338c85c31d5a2f3d9de8d5571f82b7e849a374c (diff)
downloadsrc-bf6998c5682719e9f813d781313064bc869f7b42.tar.gz
src-bf6998c5682719e9f813d781313064bc869f7b42.zip
The firmware of 4965 series adapters seems to die while trying to send
probe requests at 1Mbps while being associated on a 5GHz channel. Sending those at 6Mbps does work, so use that instead during a background scan. This workaround allows us to re-enable background scan support for the 4965 adapters. Also, just enabling one antenna on 5GHz results in better reception of beacons: test 00:26:5a:c6:14:1a 40 54M -71:-95 200 E WME HTCAP ATH vs test 00:26:5a:c6:14:1a 40 54M -92:-95 200 E WME HTCAP ATH Due to roam:rssi thresholds set to 7 by default it might have been impossible to associate to that network. While here use IEEE80211_IS_CHAN_5GHZ() to determine the band.
Notes
Notes: svn path=/head/; revision=222679
Diffstat (limited to 'sys/dev/iwn')
-rw-r--r--sys/dev/iwn/if_iwn.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 67e1a449a14b..bf8512c9a276 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -567,6 +567,7 @@ iwn_attach(device_t dev)
ic->ic_caps =
IEEE80211_C_STA /* station mode supported */
| IEEE80211_C_MONITOR /* monitor mode supported */
+ | IEEE80211_C_BGSCAN /* background scanning */
| IEEE80211_C_TXPMGT /* tx power management */
| IEEE80211_C_SHSLOT /* short slot time supported */
| IEEE80211_C_WPA
@@ -576,8 +577,6 @@ iwn_attach(device_t dev)
#endif
| IEEE80211_C_WME /* WME */
;
- if (sc->hw_type != IWN_HW_REV_TYPE_4965)
- ic->ic_caps |= IEEE80211_C_BGSCAN; /* background scanning */
/* Read MAC address, channels, etc from EEPROM. */
if ((error = iwn_read_eeprom(sc, macaddr)) != 0) {
@@ -5161,7 +5160,7 @@ iwn_scan(struct iwn_softc *sc)
if (IEEE80211_IS_CHAN_A(ic->ic_curchan) &&
sc->hw_type == IWN_HW_REV_TYPE_4965) {
/* Ant A must be avoided in 5GHz because of an HW bug. */
- rxchain |= IWN_RXCHAIN_FORCE_SEL(IWN_ANT_BC);
+ rxchain |= IWN_RXCHAIN_FORCE_SEL(IWN_ANT_B);
} else /* Use all available RX antennas. */
rxchain |= IWN_RXCHAIN_FORCE_SEL(sc->rxchainmask);
hdr->rxchain = htole16(rxchain);
@@ -5172,14 +5171,19 @@ iwn_scan(struct iwn_softc *sc)
tx->id = sc->broadcast_id;
tx->lifetime = htole32(IWN_LIFETIME_INFINITE);
- if (IEEE80211_IS_CHAN_A(ic->ic_curchan)) {
+ if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) {
/* Send probe requests at 6Mbps. */
tx->rate = htole32(0xd);
rs = &ic->ic_sup_rates[IEEE80211_MODE_11A];
} else {
hdr->flags = htole32(IWN_RXON_24GHZ | IWN_RXON_AUTO);
- /* Send probe requests at 1Mbps. */
- tx->rate = htole32(10 | IWN_RFLAG_CCK);
+ if (sc->hw_type == IWN_HW_REV_TYPE_4965 &&
+ sc->rxon.associd && sc->rxon.chan > 14)
+ tx->rate = htole32(0xd);
+ else {
+ /* Send probe requests at 1Mbps. */
+ tx->rate = htole32(10 | IWN_RFLAG_CCK);
+ }
rs = &ic->ic_sup_rates[IEEE80211_MODE_11G];
}
/* Use the first valid TX antenna. */