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 ...
# ...
# ...
#