From f50fa62a3e184bf29b60e574180ba7ef491911e5 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Wed, 30 Jun 2021 09:47:58 +0000 Subject: 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@ --- sys/dev/pci/if_iwx.c | 11 +++-------- 1 file 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 @@ -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: -- cgit v1.2.3