diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-09 09:30:03 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-09 09:30:03 +0000 |
commit | 5a8aca84d84297bd03a4a0aabe587936e387a6be (patch) | |
tree | 19293258bbd9c204d67960138ff33f8d01005661 /sys | |
parent | a362f9b170fc9f997b9d6e85bb9a3d6e83458428 (diff) |
Fix ieee80211_add_htop(), which is not yet called in active code paths.
It was creating a corrupt beacon element by ommitting one byte.
Fix this and fill the element with actual data from the ic_bss node instead
of filling it with zeroes, allowing future 11n hostap to announce the current
HT protection mode correctly.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 1107e221f16..e105b08a907 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.111 2016/04/12 14:33:27 mpi Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.112 2017/01/09 09:30:02 stsp Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -1084,8 +1084,9 @@ ieee80211_add_htop(u_int8_t *frm, struct ieee80211com *ic) *frm++ = IEEE80211_ELEMID_HTOP; *frm++ = 22; *frm++ = ieee80211_chan2ieee(ic, ic->ic_bss->ni_chan); - LE_WRITE_2(frm, 0); frm += 2; - LE_WRITE_2(frm, 0); frm += 2; + *frm++ = ic->ic_bss->ni_htop0; + LE_WRITE_2(frm, ic->ic_bss->ni_htop1); frm += 2; + LE_WRITE_2(frm, ic->ic_bss->ni_htop2); frm += 2; memset(frm, 0, 16); frm += 16; return frm; } |