change supportedrates config setting to the actual MBit value
supportedrates is now a list instead on an array and float values (e.g. 5.5) are permited.
This commit is contained in:
parent
8dc30ae3c4
commit
d68bc01d00
@ -106,9 +106,9 @@ application: {
|
||||
numberchannels = 11;
|
||||
maxtxpower = 100;
|
||||
};
|
||||
supportedrates = [
|
||||
12, 18, 24, 36, 48, 72, 96, 108
|
||||
];
|
||||
supportedrates = (
|
||||
6, 9, 12, 18, 24, 36, 48, 54
|
||||
);
|
||||
txpower = {
|
||||
current = 100;
|
||||
supported = [ 100 ];
|
||||
|
@ -364,7 +364,20 @@ static int wtp_parsing_radio_configuration(config_setting_t* configElement, stru
|
||||
if ((count >= CAPWAP_SUPPORTEDRATES_MINLENGTH) && (count <= CAPWAP_SUPPORTEDRATES_MAXLENGTH)) {
|
||||
radio->supportedrates.supportedratescount = (uint8_t)count;
|
||||
for (i = 0; i < count; i++) {
|
||||
int value = (config_setting_get_float_elem(configItems, i) * 10) / 5;
|
||||
config_setting_t *elem;
|
||||
int value;
|
||||
|
||||
elem = config_setting_get_elem(configItems, i);
|
||||
switch (config_setting_type(elem)) {
|
||||
case CONFIG_TYPE_INT:
|
||||
value = config_setting_get_int(elem) * 2;
|
||||
break;
|
||||
case CONFIG_TYPE_FLOAT:
|
||||
value = config_setting_get_float(elem) * 2;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
if ((value >= 2) && (value <= 127)) {
|
||||
radio->supportedrates.supportedrates[i] = (uint8_t)value;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user