mac80211: bad use of bss_conf.use_short_preamble
Hi,
does anyone know what values were intended to be used for bss_conf.use_short_preamble? The way it is handled now is not optimal for sure:
/* WLAN_ERP_BARKER_PREAMBLE values */
enum {
WLAN_ERP_PREAMBLE_SHORT = 0,
WLAN_ERP_PREAMBLE_LONG = 1,
};
ieee80211_reset_erp_info():
sdata->bss_conf.use_short_preamble = 0;
ieee80211_frame_duration():
dur += short_preamble ? (72 + 24) : (144 + 48);
ieee80211_handle_erp_ie():
printk(KERN_DEBUG "%s: switched to %s barker preamble" " (BSSID=%s)\n", sdata->dev->name, (preamble_mode == WLAN_ERP_PREAMBLE_SHORT) ? "short" : "long", print_mac(mac, ifsta->bssid));
In short, the value driver receives in bss_info_changed() callback uses WLAN_ERP_PREAMBLE_xxx constants, but ie. frame_duration() uses 0=long, 1=short semantics (reset_erp_info() probably wants to set long preambles as well). There are more places like this I suppose.
My reason for looking at this is that if you associate to 11b AP, the value of use_short_preamble is not set correctly - seems that it is set only based on ERP IE and not based on capability info. However I'm not sure yet if this is related to above inconsistency or not, I have to dig into it.
Regards,
Vlado
Quoted 4 lines
does anyone know what values were intended to be used for bss_conf.use_short_preamble? The way it is handled now is not optimal for sure:
Huh, I guess we screwed that up when converting it to bss_conf. The WLAN_ERP_... values shouldn't be used internally nor with the driver and be converted to the bool value.
johannes