From 5a8aca84d84297bd03a4a0aabe587936e387a6be Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 9 Jan 2017 09:30:03 +0000 Subject: 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. --- sys/net80211/ieee80211_output.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys') 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; } -- cgit v1.2.3