summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2016-12-10 13:56:38 +0000
committerstsp <stsp@openbsd.org>2016-12-10 13:56:38 +0000
commit38f76d0b2710705f369499c27670728ac9a5cda5 (patch)
tree0f247709616b1f9612fc27f82c2ae9b996ea66c5
parentNew manual pages SSL_get_certificate(3), SSL_get_state(3), and (diff)
downloadwireguard-openbsd-38f76d0b2710705f369499c27670728ac9a5cda5.tar.xz
wireguard-openbsd-38f76d0b2710705f369499c27670728ac9a5cda5.zip
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.
-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;