summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2021-06-30 09:47:58 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2021-06-30 09:47:58 +0000
commitf50fa62a3e184bf29b60e574180ba7ef491911e5 (patch)
tree507cfda6f1ef8a411c499002796e806a7e046e32
parent59a63bd0d8b8bae6abd421313d63109cab7a4962 (diff)
Align HT protection flags we send to iwx(4) firmware with flags used by
Linux iwlwifi. Setting the FAT protection flag while we're using 20 MHz channels doesn't really make a lot of sense to me but apparently firmware expects it to be set regardless. Linux does not use the SELF_CTS_EN flag so it might be better to avoid using SELF_CTS_EN. According to zxystd from OpenIntelWireless, the same change fixed fatal firmware errors seen during HT protection updates for them: https://github.com/OpenIntelWireless/itlwm/commit/032a14185a434b7181c0e78a953dc2e1c21a0853 test and ok gnezdo@
-rw-r--r--sys/dev/pci/if_iwx.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index 6d8c82c6129..bdf8ce3e1af 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.61 2021/06/30 09:47:20 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.62 2021/06/30 09:47:57 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -5899,10 +5899,8 @@ iwx_mac_ctxt_cmd_common(struct iwx_softc *sc, struct iwx_node *in,
case IEEE80211_HTPROT_NONMEMBER:
case IEEE80211_HTPROT_NONHT_MIXED:
cmd->protection_flags |=
- htole32(IWX_MAC_PROT_FLG_HT_PROT);
- if (ic->ic_protmode == IEEE80211_PROT_CTSONLY)
- cmd->protection_flags |=
- htole32(IWX_MAC_PROT_FLG_SELF_CTS_EN);
+ htole32(IWX_MAC_PROT_FLG_HT_PROT |
+ IWX_MAC_PROT_FLG_FAT_PROT);
break;
case IEEE80211_HTPROT_20MHZ:
if (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) {
@@ -5910,9 +5908,6 @@ iwx_mac_ctxt_cmd_common(struct iwx_softc *sc, struct iwx_node *in,
cmd->protection_flags |=
htole32(IWX_MAC_PROT_FLG_HT_PROT |
IWX_MAC_PROT_FLG_FAT_PROT);
- if (ic->ic_protmode == IEEE80211_PROT_CTSONLY)
- cmd->protection_flags |= htole32(
- IWX_MAC_PROT_FLG_SELF_CTS_EN);
}
break;
default: