diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2021-07-09 11:11:37 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2021-07-09 11:11:37 +0000 |
commit | 4aeffb553a951fc8594ceb1bcfef5b74f143aef4 (patch) | |
tree | bb9c06677ea4c1fa8d19dad30dc202f19f8b917e /sys/dev/pci | |
parent | af7dde12b1942011f7dee98979befe9f333381c1 (diff) |
Make iwm(4) use only antenna B for single-antenna Tx on 9k devices.
This matches what Linux and FreeBSD do.
According to Linux commit logs using antenna A for single-antenna Tx
on 9k devices is "wrong" (with no further explanation given).
I suspect it only matters if Bluetooth is active, since antenna A has
obviously been working for us. But who knows...
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 412e6ef8340..a04c7676dc7 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.347 2021/07/09 11:04:05 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.348 2021/07/09 11:11:36 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -6272,6 +6272,8 @@ iwm_tx_fill_cmd(struct iwm_softc *sc, struct iwm_node *in, rinfo = &iwm_rates[ridx]; if (iwm_is_mimo_ht_plcp(rinfo->ht_plcp)) rate_flags = IWM_RATE_MCS_ANT_AB_MSK; + else if (sc->sc_device_family == IWM_DEVICE_FAMILY_9000) + rate_flags = IWM_RATE_MCS_ANT_B_MSK; else rate_flags = IWM_RATE_MCS_ANT_A_MSK; if (IWM_RIDX_IS_CCK(ridx)) @@ -8717,6 +8719,8 @@ iwm_setrates(struct iwm_node *in, int async) if (iwm_is_mimo_ht_plcp(ht_plcp)) tab |= IWM_RATE_MCS_ANT_AB_MSK; + else if (sc->sc_device_family == IWM_DEVICE_FAMILY_9000) + tab |= IWM_RATE_MCS_ANT_B_MSK; else tab |= IWM_RATE_MCS_ANT_A_MSK; @@ -8732,11 +8736,17 @@ iwm_setrates(struct iwm_node *in, int async) tab = iwm_rates[ridx_min].plcp; if (IWM_RIDX_IS_CCK(ridx_min)) tab |= IWM_RATE_MCS_CCK_MSK; - tab |= IWM_RATE_MCS_ANT_A_MSK; + if (sc->sc_device_family == IWM_DEVICE_FAMILY_9000) + tab |= IWM_RATE_MCS_ANT_B_MSK; + else + tab |= IWM_RATE_MCS_ANT_A_MSK; lqcmd.rs_table[j++] = htole32(tab); } - lqcmd.single_stream_ant_msk = IWM_ANT_A; + if (sc->sc_device_family == IWM_DEVICE_FAMILY_9000) + lqcmd.single_stream_ant_msk = IWM_ANT_B; + else + lqcmd.single_stream_ant_msk = IWM_ANT_A; lqcmd.dual_stream_ant_msk = IWM_ANT_AB; lqcmd.agg_time_limit = htole16(4000); /* 4ms */ |