diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-09 13:01:38 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-09 13:01:38 +0000 |
commit | 1421d3234791e8c1dedc9527273c2d230b7477b9 (patch) | |
tree | 0844464fdd3858c9d036ee893dcb10b428232ef1 /sys/net80211 | |
parent | 5411dc17a3115b026a82e16c34668d45f6f1e7c6 (diff) |
When acting as 11n hostap, send Microsoft WME parameters to clients so
that Linux clients will decide to use 11n mode.
ok phessler@
Diffstat (limited to 'sys/net80211')
-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 *); |