summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2021-06-30 09:44:57 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2021-06-30 09:44:57 +0000
commitd66434457fe665a0118a81dcf6b0af50a0c4bdce (patch)
treef9337b557a0f09b775f27f59dc721a8ceca8affc /sys/dev/pci/if_iwm.c
parent284c810b7b5b36b7f18c7096aec299acbe8d2308 (diff)
Align HT protection flags we send to iwm(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@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index f396e5d64a0..9f46f25723a 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.331 2021/06/30 09:43:59 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.332 2021/06/30 09:44:56 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -7677,10 +7677,8 @@ iwm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
case IEEE80211_HTPROT_NONMEMBER:
case IEEE80211_HTPROT_NONHT_MIXED:
cmd->protection_flags |=
- htole32(IWM_MAC_PROT_FLG_HT_PROT);
- if (ic->ic_protmode == IEEE80211_PROT_CTSONLY)
- cmd->protection_flags |=
- htole32(IWM_MAC_PROT_FLG_SELF_CTS_EN);
+ htole32(IWM_MAC_PROT_FLG_HT_PROT |
+ IWM_MAC_PROT_FLG_FAT_PROT);
break;
case IEEE80211_HTPROT_20MHZ:
if (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) {
@@ -7688,9 +7686,6 @@ iwm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
cmd->protection_flags |=
htole32(IWM_MAC_PROT_FLG_HT_PROT |
IWM_MAC_PROT_FLG_FAT_PROT);
- if (ic->ic_protmode == IEEE80211_PROT_CTSONLY)
- cmd->protection_flags |= htole32(
- IWM_MAC_PROT_FLG_SELF_CTS_EN);
}
break;
default: