summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-02-27 07:47:58 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-02-27 07:47:58 +0000
commitf34b78e03e776b4eb9aeb46c7571504374bd6515 (patch)
tree76b2da6f6c61eba8fa43248135c92652552812fb /sys/dev/pci/if_iwm.c
parent33e9a40b06d0668a7c8ce75aba6d6bff87e7cb52 (diff)
Make iwm(4) use CTS-to-self for HT protection if the AP requests this,
rather than always using RTS for HT protection.
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index bfa9a7bf47a..a11b6ca5230 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.236 2019/02/27 04:10:38 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.237 2019/02/27 07:47:57 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -5356,6 +5356,9 @@ iwm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
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);
break;
case IEEE80211_HTPROT_20MHZ:
if (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) {
@@ -5363,6 +5366,9 @@ 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: