mesh: Use the shared function with IBSS to determine channel parameters
Automatically enable HT20, HT40+, HT40-, or VHT, based on driver capabilities. This obsoletes the mesh_ht_mode network block parameter that was previously used to configure HT parameters. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f7e889fa2d
commit
54fe48b9dc
3 changed files with 9 additions and 20 deletions
|
@ -318,23 +318,8 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
|
||||||
os_memset(¶ms, 0, sizeof(params));
|
os_memset(¶ms, 0, sizeof(params));
|
||||||
params.meshid = ssid->ssid;
|
params.meshid = ssid->ssid;
|
||||||
params.meshid_len = ssid->ssid_len;
|
params.meshid_len = ssid->ssid_len;
|
||||||
params.freq = ssid->frequency;
|
ibss_mesh_setup_freq(wpa_s, ssid, ¶ms.freq);
|
||||||
wpa_s->mesh_ht_enabled = ssid->mesh_ht_mode > CHAN_NO_HT;
|
wpa_s->mesh_ht_enabled = !!params.freq.ht_enabled;
|
||||||
switch (ssid->mesh_ht_mode) {
|
|
||||||
case CHAN_HT20:
|
|
||||||
params.freq.ht_enabled = 1;
|
|
||||||
break;
|
|
||||||
case CHAN_HT40PLUS:
|
|
||||||
params.freq.ht_enabled = 1;
|
|
||||||
params.freq.sec_channel_offset = 1;
|
|
||||||
break;
|
|
||||||
case CHAN_HT40MINUS:
|
|
||||||
params.freq.ht_enabled = 1;
|
|
||||||
params.freq.sec_channel_offset = -1;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (ssid->beacon_int > 0)
|
if (ssid->beacon_int > 0)
|
||||||
params.beacon_int = ssid->beacon_int;
|
params.beacon_int = ssid->beacon_int;
|
||||||
else if (wpa_s->conf->beacon_int > 0)
|
else if (wpa_s->conf->beacon_int > 0)
|
||||||
|
|
|
@ -1650,9 +1650,9 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||||
const struct wpa_ssid *ssid,
|
const struct wpa_ssid *ssid,
|
||||||
struct hostapd_freq_params *freq)
|
struct hostapd_freq_params *freq)
|
||||||
{
|
{
|
||||||
enum hostapd_hw_mode hw_mode;
|
enum hostapd_hw_mode hw_mode;
|
||||||
struct hostapd_hw_modes *mode = NULL;
|
struct hostapd_hw_modes *mode = NULL;
|
||||||
|
|
|
@ -1075,6 +1075,10 @@ int wpa_supplicant_ctrl_iface_ctrl_rsp_handle(struct wpa_supplicant *wpa_s,
|
||||||
const char *field,
|
const char *field,
|
||||||
const char *value);
|
const char *value);
|
||||||
|
|
||||||
|
void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
||||||
|
const struct wpa_ssid *ssid,
|
||||||
|
struct hostapd_freq_params *freq);
|
||||||
|
|
||||||
/* events.c */
|
/* events.c */
|
||||||
void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
|
void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
|
||||||
int wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
|
int wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
|
||||||
|
|
Loading…
Reference in a new issue