summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_output.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-14 22:34:24 +0000
committersam <sam@FreeBSD.org>2003-09-14 22:34:24 +0000
commit73b49f3a66b4a164b5521cb91a2e07e715f6a2ad (patch)
tree4990558f5b61559fa7b2160622ba9d0ac48abeca /sys/net80211/ieee80211_output.c
parentd08173b50b7f6e569fd0acff8896f3d68f289f7c (diff)
downloadFreeBSD-src-73b49f3a66b4a164b5521cb91a2e07e715f6a2ad.zip
FreeBSD-src-73b49f3a66b4a164b5521cb91a2e07e715f6a2ad.tar.gz
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)
Diffstat (limited to 'sys/net80211/ieee80211_output.c')
-rw-r--r--sys/net80211/ieee80211_output.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index ccf09b3..0b0735f 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -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;
OpenPOWER on IntegriCloud