mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Honor the short preamble capability/state flag when calculating the
capabilities for outbound management frames. But beware of sending this when operating on 5GHz channels; some 11a AP's reject association requests if this bit is set in the capabilities listed. Obtained from: MADWIFI (with modifications)
This commit is contained in:
parent
a0efa60dc9
commit
4f2e09c4b2
1 changed files with 12 additions and 1 deletions
|
|
@ -376,6 +376,9 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
capinfo = IEEE80211_CAPINFO_ESS;
|
||||
if (ic->ic_flags & IEEE80211_F_WEPON)
|
||||
capinfo |= IEEE80211_CAPINFO_PRIVACY;
|
||||
if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
|
||||
IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))
|
||||
capinfo |= IEEE80211_CAPINFO_SHORT_PREAMBLE;
|
||||
*(u_int16_t *)frm = htole16(capinfo);
|
||||
frm += 2;
|
||||
|
||||
|
|
@ -457,7 +460,12 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
capinfo |= IEEE80211_CAPINFO_ESS;
|
||||
if (ic->ic_flags & IEEE80211_F_WEPON)
|
||||
capinfo |= IEEE80211_CAPINFO_PRIVACY;
|
||||
if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)
|
||||
/*
|
||||
* NB: Some 11a AP's reject the request when
|
||||
* short premable is set.
|
||||
*/
|
||||
if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
|
||||
IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))
|
||||
capinfo |= IEEE80211_CAPINFO_SHORT_PREAMBLE;
|
||||
if (ic->ic_flags & IEEE80211_F_SHSLOT)
|
||||
capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME;
|
||||
|
|
@ -504,6 +512,9 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni,
|
|||
capinfo = IEEE80211_CAPINFO_ESS;
|
||||
if (ic->ic_flags & IEEE80211_F_WEPON)
|
||||
capinfo |= IEEE80211_CAPINFO_PRIVACY;
|
||||
if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
|
||||
IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))
|
||||
capinfo |= IEEE80211_CAPINFO_SHORT_PREAMBLE;
|
||||
*(u_int16_t *)frm = htole16(capinfo);
|
||||
frm += 2;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue