Remove mesh_ht_mode network block parameter

There should not be a mesh-specific mechanism for setting up channel
parameters since that will just result in duplicated code. IBSS, mesh,
and AP mode can use the same data structures and parameters for setting
up such parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-10 12:43:33 +02:00
parent 54fe48b9dc
commit 6dfc55723d
4 changed files with 0 additions and 76 deletions

View File

@ -308,17 +308,6 @@ enum wpa_ctrl_req_type {
/* Maximum number of EAP methods to store for EAP server user information */
#define EAP_MAX_METHODS 8
/**
* enum ht_mode - channel width and offset
*/
enum ht_mode {
CHAN_UNDEFINED = 0,
CHAN_NO_HT,
CHAN_HT20,
CHAN_HT40PLUS,
CHAN_HT40MINUS,
};
enum mesh_plink_state {
PLINK_LISTEN = 1,
PLINK_OPEN_SENT,

View File

@ -1597,32 +1597,6 @@ static char * wpa_config_write_psk_list(const struct parse_data *data,
#ifdef CONFIG_MESH
static int wpa_config_parse_mesh_ht_mode(const struct parse_data *data,
struct wpa_ssid *ssid, int line,
const char *value)
{
int htval = 0;
if (os_strcmp(value, "NOHT") == 0)
htval = CHAN_NO_HT;
else if (os_strcmp(value, "HT20") == 0)
htval = CHAN_HT20;
else if (os_strcmp(value, "HT40-") == 0)
htval = CHAN_HT40MINUS;
else if (os_strcmp(value, "HT40+") == 0)
htval = CHAN_HT40PLUS;
else {
wpa_printf(MSG_ERROR,
"Line %d: no ht_mode configured.", line);
return -1;
}
wpa_printf(MSG_MSGDUMP, "mesh_ht_mode: 0x%x", htval);
ssid->mesh_ht_mode = htval;
return 0;
}
static int wpa_config_parse_mesh_basic_rates(const struct parse_data *data,
struct wpa_ssid *ssid, int line,
const char *value)
@ -1648,32 +1622,6 @@ static int wpa_config_parse_mesh_basic_rates(const struct parse_data *data,
#ifndef NO_CONFIG_WRITE
static char * wpa_config_write_mesh_ht_mode(const struct parse_data *data,
struct wpa_ssid *ssid)
{
char *val;
switch (ssid->mesh_ht_mode) {
default:
val = NULL;
break;
case CHAN_NO_HT:
val = "NOHT";
break;
case CHAN_HT20:
val = "HT20";
break;
case CHAN_HT40MINUS:
val = "HT40-";
break;
case CHAN_HT40PLUS:
val = "HT40+";
break;
}
return val ? os_strdup(val) : NULL;
}
static char * wpa_config_write_mesh_basic_rates(const struct parse_data *data,
struct wpa_ssid *ssid)
{
@ -1856,7 +1804,6 @@ static const struct parse_data ssid_fields[] = {
{ INT_RANGE(mixed_cell, 0, 1) },
{ INT_RANGE(frequency, 0, 65000) },
#ifdef CONFIG_MESH
{ FUNC(mesh_ht_mode) },
{ FUNC(mesh_basic_rates) },
{ INT(dot11MeshMaxRetries) },
{ INT(dot11MeshRetryTimeout) },
@ -2347,7 +2294,6 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
ssid->eap.sim_num = DEFAULT_USER_SELECTED_SIM;
#endif /* IEEE8021X_EAPOL */
#ifdef CONFIG_MESH
ssid->mesh_ht_mode = DEFAULT_MESH_HT_MODE;
ssid->dot11MeshMaxRetries = DEFAULT_MESH_MAX_RETRIES;
ssid->dot11MeshRetryTimeout = DEFAULT_MESH_RETRY_TIMEOUT;
ssid->dot11MeshConfirmTimeout = DEFAULT_MESH_CONFIRM_TIMEOUT;

View File

@ -754,7 +754,6 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
#endif /* CONFIG_HS20 */
write_int(f, "mac_addr", ssid->mac_addr, -1);
#ifdef CONFIG_MESH
STR(mesh_ht_mode);
STR(mesh_basic_rates);
INT_DEF(dot11MeshMaxRetries, DEFAULT_MESH_MAX_RETRIES);
INT_DEF(dot11MeshRetryTimeout, DEFAULT_MESH_RETRY_TIMEOUT);

View File

@ -27,7 +27,6 @@
#define DEFAULT_FRAGMENT_SIZE 1398
#define DEFAULT_BG_SCAN_PERIOD -1
#define DEFAULT_MESH_HT_MODE CHAN_UNDEFINED /* undefined */
#define DEFAULT_MESH_MAX_RETRIES 2
#define DEFAULT_MESH_RETRY_TIMEOUT 40
#define DEFAULT_MESH_CONFIRM_TIMEOUT 40
@ -408,15 +407,6 @@ struct wpa_ssid {
*/
int frequency;
/**
* mesh_ht_mode - definition of HT mode in mesh mode
*
* Use the given HT mode for mesh networks. The driver will
* adapt to other stations if neccesary, but advertise the
* configured HT mode (HT20/HT40-/HT40+/NOHT).
*/
int mesh_ht_mode;
/**
* mesh_basic_rates - BSS Basic rate set for mesh network
*