summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2020-05-26 11:56:25 +0000
committerstsp <stsp@openbsd.org>2020-05-26 11:56:25 +0000
commitf2fb9b1d8b3fc18d0641d401fa979b0f8e28dbd9 (patch)
tree5be82d0a6e10b678d1ffab6a857dd84826acf5e8
parentSupport iwx(4) firmware's BEACON_FILTER_CONFIG_API_S_VER_4 command. (diff)
downloadwireguard-openbsd-f2fb9b1d8b3fc18d0641d401fa979b0f8e28dbd9.tar.xz
wireguard-openbsd-f2fb9b1d8b3fc18d0641d401fa979b0f8e28dbd9.zip
Make iwx(4) binding command work on -48 firmware.
Some firmware versions don't expect LMAC_5G_INDEX in the binding command. Set that value under the same conditions as the Linux driver does, which makes this command work on -48 firmware. ok mpi@
-rw-r--r--sys/dev/pci/if_iwx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index 9b5802fb38a..9b08c05d523 100644
--- a/sys/dev/pci/if_iwx.c
+++ b/sys/dev/pci/if_iwx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwx.c,v 1.13 2020/05/26 11:55:54 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.14 2020/05/26 11:56:25 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -3757,7 +3757,8 @@ iwx_binding_cmd(struct iwx_softc *sc, struct iwx_node *in, uint32_t action)
for (i = 1; i < IWX_MAX_MACS_IN_BINDING; i++)
cmd.macs[i] = htole32(IWX_FW_CTXT_INVALID);
- if (IEEE80211_IS_CHAN_2GHZ(phyctxt->channel))
+ if (IEEE80211_IS_CHAN_2GHZ(phyctxt->channel) ||
+ !isset(sc->sc_enabled_capa, IWX_UCODE_TLV_CAPA_CDB_SUPPORT))
cmd.lmac_id = htole32(IWX_LMAC_24G_INDEX);
else
cmd.lmac_id = htole32(IWX_LMAC_5G_INDEX);