diff options
author | 2017-01-09 09:30:02 +0000 | |
---|---|---|
committer | 2017-01-09 09:30:02 +0000 | |
commit | bf61fa4a74cd1389752a65d9cb9efa8c7db55ca5 (patch) | |
tree | ad31faec2cada4d5fabec95e220352b05cb84fbb | |
parent | Sync with NetBSD/luna68k changes. (diff) | |
download | wireguard-openbsd-bf61fa4a74cd1389752a65d9cb9efa8c7db55ca5.tar.xz wireguard-openbsd-bf61fa4a74cd1389752a65d9cb9efa8c7db55ca5.zip |
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.
-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; } |