@@ -4200,4 +4200,7 @@ const char * channel_width_to_string(enum chan_width width);
/* NULL terminated array of linked in driver wrappers */
extern struct wpa_driver_ops *wpa_drivers[];
+int ht_supported(const struct hostapd_hw_modes *mode);
+int vht_supported(const struct hostapd_hw_modes *mode);
+
#endif /* DRIVER_H */
@@ -582,7 +582,7 @@ static int freq_allowed(int *freqs, int freq)
}
-static int ht_supported(const struct hostapd_hw_modes *mode)
+int ht_supported(const struct hostapd_hw_modes *mode)
{
if (!(mode->flags & HOSTAPD_MODE_FLAG_HT_INFO_KNOWN)) {
/*
@@ -600,7 +600,7 @@ static int ht_supported(const struct hostapd_hw_modes *mode)
}
-static int vht_supported(const struct hostapd_hw_modes *mode)
+int vht_supported(const struct hostapd_hw_modes *mode)
{
if (!(mode->flags & HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN)) {
/*
@@ -1838,8 +1838,19 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
}
if (ssid->mode == WPAS_MODE_IBSS && ssid->frequency > 0 &&
- params.freq.freq == 0)
+ params.freq.freq == 0) {
+ struct hostapd_hw_modes *mode;
+ enum hostapd_hw_mode hw_mode;
+ u8 channel;
+ int ht_enabled;
+
+ hw_mode = ieee80211_freq_to_chan(ssid->frequency, &channel);
+ mode = &wpa_s->hw.modes[hw_mode];
+ ht_enabled = ht_supported(mode);
+
params.freq.freq = ssid->frequency;
+ params.freq.ht_enabled = ht_enabled;
+ }
if (ssid->mode == WPAS_MODE_IBSS) {
if (ssid->beacon_int)
Enable HT20 for IBSS when HT supported by driver. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> --- src/drivers/driver.h | 3 +++ wpa_supplicant/events.c | 4 ++-- wpa_supplicant/wpa_supplicant.c | 13 ++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-)