bsd: Add support for setting HT values in IFM_MMASK

This commit is contained in:
Yi Zhu 2011-04-14 22:22:24 +03:00 committed by Jouni Malinen
parent fe655a8402
commit ca79385ab5

View file

@ -536,12 +536,21 @@ bsd_set_freq(void *priv, struct hostapd_freq_params *freq)
u32 mode; u32 mode;
int channel = freq->channel; int channel = freq->channel;
if (channel < 14) if (channel < 14) {
mode = IFM_IEEE80211_11G; mode =
else if (channel == 14) #ifdef CONFIG_IEEE80211N
freq->ht_enabled ? IFM_IEEE80211_11NG :
#endif /* CONFIG_IEEE80211N */
IFM_IEEE80211_11G;
} else if (channel == 14) {
mode = IFM_IEEE80211_11B; mode = IFM_IEEE80211_11B;
else } else {
mode = IFM_IEEE80211_11A; mode =
#ifdef CONFIG_IEEE80211N
freq->ht_enabled ? IFM_IEEE80211_11NA :
#endif /* CONFIG_IEEE80211N */
IFM_IEEE80211_11A;
}
if (bsd_set_mediaopt(drv, IFM_MMASK, mode) < 0) { if (bsd_set_mediaopt(drv, IFM_MMASK, mode) < 0) {
wpa_printf(MSG_ERROR, "%s: failed to set modulation mode", wpa_printf(MSG_ERROR, "%s: failed to set modulation mode",
__func__); __func__);