struct hostapd_freq_params {
int mode;
int freq;
+ int ht_enabled;
int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled,
* secondary channel below primary, 1 = HT40
* enabled, secondary channel above primary */
}
static inline int
-hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq,
+hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int ht_enabled,
int sec_channel_offset)
{
if (hapd->driver == NULL)
os_memset(&data, 0, sizeof(data));
data.mode = mode;
data.freq = freq;
+ data.ht_enabled = ht_enabled;
data.sec_channel_offset = sec_channel_offset;
return hapd->driver->set_freq2(hapd->drv_priv, &data);
}
NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
NL80211_SEC_CHAN_ABOVE);
break;
+ default:
+ NLA_PUT_U8(msg, NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
+ NL80211_SEC_CHAN_DISABLED);
+ break;
}
if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0)
hapd->iconf->channel, freq);
if (hostapd_set_freq(hapd, hapd->iconf->hw_mode, freq,
+ hapd->iconf->ieee80211n,
hapd->iconf->secondary_channel)) {
printf("Could not set channel for kernel driver\n");
return -1;