Correct short preamble support.
commitda9c2b36956c33fc5bbc09b1f2432dea7a2ee832
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 25 Nov 2006 13:11:30 +0000 (25 13:11 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 25 Nov 2006 13:11:30 +0000 (25 13:11 +0000)
tree48043398326a414682120c00bad546e7b3898f47
parent5d0048975b2aef34c973c823e05e1356ea0bf5a4
Correct short preamble support.

Problems:
- The assumption that "Short Preamble" field in "Capability information"
  will not be changed, is not correct at least for a *BSD based HostAP
- "Barker Preamble mode" in "EPR information" is ignored

Fixes:
- Add a new function ieee80211_set_shortpreamble() (named after its relative
  ieee80211_set_shortslot()):
  1) For 11a mode, always turn on short preamble, though it is not used under
     11a mode
  2) For 11g mode (ERP), turn on short preamble iff all of the following
     conditions are met:
     o  "Short Preamble" field in "Capability information" is 1
     o  "Barker Preamble mode" in "ERP information" is 0 [*]
     o  ieee80211.ic_caps has IEEE80211_C_PREAMBLE set
  3) For the reset of the mode (11b?), turn on short preamble iff all of the
     following conditions are met:
     o  "Short Preamble" field in "Capability information" is 1
     o  ieee80211.ic_caps has IEEE80211_C_PREAMBLE set
- Add ieee80211com.ic_upadate_preamble.  This field could be set by drivers
  which want to be informed about the preamble changes

#
# [*]
# IEEE Std 802.11g-2003 subclause 7.3.2.13 page 10:
# ...
# ...
# ERP APs and ERP STAs shall use long preambles when transmitting Clause 15,
# Clause 18, and Clause 19 frames after transmission or reception of an ERP
# Information Element with a Barker_Preamble_Mode value of 1 in an MMPDU to
# or from the BSS that the ERP AP or ERP STA has joined or started, regardless
# of the value of the short preamble capability bit from the same received or
# transmitted MMPDU that contained the ERP Information Element ...
# ...
# ...
#
sys/netproto/802_11/ieee80211_proto.h
sys/netproto/802_11/ieee80211_var.h
sys/netproto/802_11/wlan/ieee80211_input.c
sys/netproto/802_11/wlan/ieee80211_proto.c