diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-01-23 10:08:50 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-01-23 10:08:50 +0000 |
commit | 0fea76f694a0d4e7dd6057447f349f7164282c9c (patch) | |
tree | 5dc447973c264418a0ce4820b1b61229a9fcfc95 /sys/dev | |
parent | e258400c92cf47652d3077bf63aad892c5f98de3 (diff) |
Move 802.11n rateset definitions out of MiRA and make them available to
net80211 and drivers in general. Add ratesets for 'short guard interval'
(SGI) rates, and add SGI support to MiRA. SGI is currently only used by
iwm(4), and of course internally by bwfm(4) firmware.
Ratesets for 11n 40 MHz channels and 11ac will come later.
ok mpi@ phessler@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 6a9670cec42..45e4446d79d 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.233 2018/09/22 13:55:55 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.234 2019/01/23 10:08:48 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5948,7 +5948,7 @@ iwm_setrates(struct iwm_node *in) struct iwm_softc *sc = IC2IFP(ic)->if_softc; struct iwm_lq_cmd *lq = &in->in_lq; struct ieee80211_rateset *rs = &ni->ni_rates; - int i, ridx, ridx_min, ridx_max, j, sgi_ok, mimo, tab = 0; + int i, ridx, ridx_min, ridx_max, j, sgi_ok = 0, mimo, tab = 0; struct iwm_host_cmd cmd = { .id = IWM_LQ_CMD, .len = { sizeof(in->in_lq), }, @@ -5960,8 +5960,11 @@ iwm_setrates(struct iwm_node *in) if (ic->ic_flags & IEEE80211_F_USEPROT) lq->flags |= IWM_LQ_FLAG_USE_RTS_MSK; - sgi_ok = ((ni->ni_flags & IEEE80211_NODE_HT) && - (ni->ni_htcaps & IEEE80211_HTCAP_SGI20)); + if ((ni->ni_flags & IEEE80211_NODE_HT) && + ieee80211_node_supports_ht_sgi20(ni)) { + ni->ni_flags |= IEEE80211_NODE_HT_SGI20; + sgi_ok = 1; + } /* * Fill the LQ rate selection table with legacy and/or HT rates |