diff options
author | 2017-01-09 13:01:37 +0000 | |
---|---|---|
committer | 2017-01-09 13:01:37 +0000 | |
commit | 5fb37217d9105954393a1640abe4df538d8f4b3c (patch) | |
tree | cf0b6740ddfa55024824f2ecf5fe81eee8d473ce | |
parent | The .No macro is not supposed to produce fixed-width font, it is not (diff) | |
download | wireguard-openbsd-5fb37217d9105954393a1640abe4df538d8f4b3c.tar.xz wireguard-openbsd-5fb37217d9105954393a1640abe4df538d8f4b3c.zip |
When acting as 11n hostap, send Microsoft WME parameters to clients so
that Linux clients will decide to use 11n mode.
ok phessler@
-rw-r--r-- | sys/net80211/ieee80211_output.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index e105b08a907..0c1ac3964f9 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.112 2017/01/09 09:30:02 stsp Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.113 2017/01/09 13:01:37 stsp Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -1207,7 +1207,7 @@ ieee80211_get_probe_resp(struct ieee80211com *ic, struct ieee80211_node *ni) (((ic->ic_flags & IEEE80211_F_RSNON) && (ic->ic_bss->ni_rsnprotos & IEEE80211_PROTO_WPA)) ? 2 + IEEE80211_WPAIE_MAXLEN : 0) + - ((ic->ic_flags & IEEE80211_F_HTON) ? 28 + 24 : 0)); + ((ic->ic_flags & IEEE80211_F_HTON) ? 28 + 24 + 26 : 0)); if (m == NULL) return NULL; @@ -1236,6 +1236,7 @@ ieee80211_get_probe_resp(struct ieee80211com *ic, struct ieee80211_node *ni) if (ic->ic_flags & IEEE80211_F_HTON) { frm = ieee80211_add_htcaps(frm, ic); frm = ieee80211_add_htop(frm, ic); + frm = ieee80211_add_wme_param(frm, ic); } m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *); @@ -1397,7 +1398,7 @@ ieee80211_get_assoc_resp(struct ieee80211com *ic, struct ieee80211_node *ni, 2 + rs->rs_nrates - IEEE80211_RATE_SIZE : 0) + ((ni->ni_flags & IEEE80211_NODE_QOS) ? 2 + 18 : 0) + ((status == IEEE80211_STATUS_TRY_AGAIN_LATER) ? 2 + 7 : 0) + - ((ic->ic_flags & IEEE80211_F_HTON) ? 28 + 24 : 0)); + ((ic->ic_flags & IEEE80211_F_HTON) ? 28 + 24 + 26 : 0)); if (m == NULL) return NULL; @@ -1422,6 +1423,7 @@ ieee80211_get_assoc_resp(struct ieee80211com *ic, struct ieee80211_node *ni, if (ic->ic_flags & IEEE80211_F_HTON) { frm = ieee80211_add_htcaps(frm, ic); frm = ieee80211_add_htop(frm, ic); + frm = ieee80211_add_wme_param(frm, ic); } m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *); @@ -1825,7 +1827,7 @@ ieee80211_beacon_alloc(struct ieee80211com *ic, struct ieee80211_node *ni) (((ic->ic_flags & IEEE80211_F_RSNON) && (ni->ni_rsnprotos & IEEE80211_PROTO_WPA)) ? 2 + IEEE80211_WPAIE_MAXLEN : 0) + - ((ic->ic_flags & IEEE80211_F_HTON) ? 28 + 24 : 0)); + ((ic->ic_flags & IEEE80211_F_HTON) ? 28 + 24 + 26 : 0)); if (m == NULL) return NULL; @@ -1871,6 +1873,7 @@ ieee80211_beacon_alloc(struct ieee80211com *ic, struct ieee80211_node *ni) if (ic->ic_flags & IEEE80211_F_HTON) { frm = ieee80211_add_htcaps(frm, ic); frm = ieee80211_add_htop(frm, ic); + frm = ieee80211_add_wme_param(frm, ic); } m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *); |