summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-12-10 13:56:39 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-12-10 13:56:39 +0000
commitc0ef4d7b93ebc2bd0379915e17feb0b262d14921 (patch)
treef6404e3e5658d8e752f2a1530b48b5f5e7fd0191 /sys/dev/pci/if_iwm.c
parent7481331dd4d6613b4ecbfad2542c0be9f36c796b (diff)
In iwm(4), do not enable HT protection (RTS) unconditionally if the AP requires
protection from 20MHz-only STAs on a 40MHz channel. We do not support 40MHz channels yet so there is nothing to protect ourselves from. It is the 40MHz users who need to start using RTS when a 20MHz-only user shows up.
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index a3bc72ac3ee..b4835cc015c 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.152 2016/12/10 13:22:07 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.153 2016/12/10 13:56:38 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -5053,10 +5053,14 @@ 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);
+ break;
case IEEE80211_HTPROT_20MHZ:
- cmd->protection_flags |=
- htole32(IWM_MAC_PROT_FLG_HT_PROT |
- IWM_MAC_PROT_FLG_FAT_PROT);
+ if (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) {
+ /* XXX ... and if our channel is 40 MHz ... */
+ cmd->protection_flags |=
+ htole32(IWM_MAC_PROT_FLG_HT_PROT |
+ IWM_MAC_PROT_FLG_FAT_PROT);
+ }
break;
default:
break;