wifi: Use 20MHz as deafult bandwidth

This commit is contained in:
Vivek Kumar Dutta 2023-11-14 12:31:59 +05:30
parent 47a4a5e805
commit ea08860a34
No known key found for this signature in database
GPG key ID: 65C818099F37097D

View file

@ -166,11 +166,21 @@ static char *get_data_model_standard(char *standard)
return standard;
}
// Use 20MHz as default value, in case of null or 0
static char *get_data_model_band(const char *bandwidth)
{
char *band = NULL;
const char *tmp = "20";
dmasprintf(&band, "%sMHz", (DM_STRLEN(bandwidth) == 0) ? "20" : bandwidth);
if (DM_STRLEN(bandwidth) == 0) {
tmp = "20";
} else if (bandwidth[0] == '0') {
tmp = "20";
} else {
tmp = bandwidth;
}
dmasprintf(&band, "%sMHz", tmp);
return band;
}