aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorYi Zhu <Yi.Zhu@Atheros.com>2011-04-14 19:22:24 (GMT)
committerJouni Malinen <j@w1.fi>2011-04-14 19:22:24 (GMT)
commitca79385ab582dfe716d2fb9520b945bd5fa6bbec (patch)
tree58e1200735750dc42c5efeed08ab07b4e41209c3 /src/drivers/driver_bsd.c
parentfe655a8402a51d03da2fe39da15c9bb3f845be34 (diff)
downloadhostap-ca79385ab582dfe716d2fb9520b945bd5fa6bbec.zip
hostap-ca79385ab582dfe716d2fb9520b945bd5fa6bbec.tar.gz
hostap-ca79385ab582dfe716d2fb9520b945bd5fa6bbec.tar.bz2
bsd: Add support for setting HT values in IFM_MMASK
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index dc3e264..1b52865 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -536,12 +536,21 @@ bsd_set_freq(void *priv, struct hostapd_freq_params *freq)
u32 mode;
int channel = freq->channel;
- if (channel < 14)
- mode = IFM_IEEE80211_11G;
- else if (channel == 14)
+ if (channel < 14) {
+ mode =
+#ifdef CONFIG_IEEE80211N
+ freq->ht_enabled ? IFM_IEEE80211_11NG :
+#endif /* CONFIG_IEEE80211N */
+ IFM_IEEE80211_11G;
+ } else if (channel == 14) {
mode = IFM_IEEE80211_11B;
- else
- mode = IFM_IEEE80211_11A;
+ } else {
+ 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) {
wpa_printf(MSG_ERROR, "%s: failed to set modulation mode",
__func__);