FreeBSD committed two workarounds for firmware problems during
background scans on iwn(4) 4965 devices in this revision:
------------------------------------------------------------------------
r222679 | bschmidt | 2011-06-04 13:43:09 +0200 (Sat, 04 Jun 2011) | 15 lines
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.
------------------------------------------------------------------------
The diff below ports these fixes to our tree.
Unfortunately I do not have 4965 hardware so I cannot test this myself.
Can someone confirm the SYSASSSERT and/or RSSI problem and verify that
this diff helps?
Index: if_iwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.196
diff -u -p -r1.196 if_iwn.c
--- if_iwn.c 14 Dec 2017 20:12:32 -0000 1.196
+++ if_iwn.c 15 Dec 2017 20:00:02 -0000
@@ -4742,7 +4742,7 @@ iwn_scan(struct iwn_softc *sc, uint16_t
if ((flags & IEEE80211_CHAN_5GHZ) &&
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);
@@ -4759,9 +4759,18 @@ iwn_scan(struct iwn_softc *sc, uint16_t
rs = &ic->ic_sup_rates[IEEE80211_MODE_11A];
} else {
hdr->flags = htole32(IWN_RXON_24GHZ | IWN_RXON_AUTO);
- /* Send probe requests at 1Mbps. */
- tx->plcp = iwn_rates[IWN_RIDX_CCK1].plcp;
- tx->rflags = IWN_RFLAG_CCK;
+ if (bgscan && sc->hw_type == IWN_HW_REV_TYPE_4965 &&
+ sc->rxon.chan > 14) {
+ /*
+ * Send probe requests at 6Mbps to work
+ * around a firmware SYSASSERT.
+ */
+ tx->plcp = iwn_rates[IWN_RIDX_OFDM6].plcp;
+ } else {
+ /* Send probe requests at 1Mbps. */
+ tx->plcp = iwn_rates[IWN_RIDX_CCK1].plcp;
+ tx->rflags = IWN_RFLAG_CCK;
+ }
rs = &ic->ic_sup_rates[IEEE80211_MODE_11G];
}
/* Use the first valid TX antenna. */