aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-01-10 11:02:08 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-10 15:35:53 (GMT)
commitf7e889fa2df488953156e03c92ffc6b1ad964271 (patch)
tree8b1e866adfddaaed9098c93472581d5debc4aa6c /wpa_supplicant/mesh.c
parent6334330ed682c3a462fbe0543ac238b5dd6aec4d (diff)
downloadhostap-f7e889fa2df488953156e03c92ffc6b1ad964271.zip
hostap-f7e889fa2df488953156e03c92ffc6b1ad964271.tar.gz
hostap-f7e889fa2df488953156e03c92ffc6b1ad964271.tar.bz2
mesh: Convert channel configuration to use common routines
Use struct hostapd_freq_params just like other modes do instead of mesh-specific freq and ht_mode. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/mesh.c')
-rw-r--r--wpa_supplicant/mesh.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 8c5713f..6d3c19a 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -320,14 +320,26 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
params.meshid_len = ssid->ssid_len;
params.freq = ssid->frequency;
wpa_s->mesh_ht_enabled = ssid->mesh_ht_mode > CHAN_NO_HT;
+ 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)
params.beacon_int = ssid->beacon_int;
else if (wpa_s->conf->beacon_int > 0)
params.beacon_int = wpa_s->conf->beacon_int;
params.max_peer_links = wpa_s->conf->max_peer_links;
-#ifdef CONFIG_IEEE80211N
- params.ht_mode = ssid->mesh_ht_mode;
-#endif /* CONFIG_IEEE80211N */
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
params.flags |= WPA_DRIVER_MESH_FLAG_SAE_AUTH;