Show correct 5ghz channel options for ea6350v3
@@ -24,8 +24,8 @@ pub const ALLOWED_FIVE_20: [u16; 22] = [
pub const ALLOWED_FIVE_40: [u16; 12] = [36, 44, 52, 60, 100, 108, 116, 124, 132, 140, 149, 157];
/// list of nonoverlapping 80mhz channels generally legal in NA, SA, EU, AU
pub const ALLOWED_FIVE_80: [u16; 6] = [36, 52, 100, 116, 132, 149];
-/// list of nonoverlapping 80mhz channels for the GLB1300
-pub const ALLOWED_FIVE_80_B1300: [u16; 2] = [36, 149];
+/// list of nonoverlapping 80mhz channels for the GLB1300/EA6350v3
+pub const ALLOWED_FIVE_80_IPQ40XX: [u16; 2] = [36, 149];
/// list of nonoverlapping 160mhz channels generally legal in NA, SA, EU, AU
pub const ALLOWED_FIVE_160: [u16; 2] = [36, 100];
@@ -280,14 +280,15 @@ fn validate_channel(
))
// model specific restrictions below this point
} else if model.is_some()
- && model.unwrap().contains("gl-b1300")
+ && (model.clone().unwrap().contains("gl-b1300")
+ || model.unwrap().contains("linksys_ea6350v3"))
&& new_is_five
&& channel_width_is_80
- && !ALLOWED_FIVE_80_B1300.contains(&new_val)
+ && !ALLOWED_FIVE_80_IPQ40XX.contains(&new_val)
{
Err(ValidationError::BadChannel(
"80".to_string(),
- format!("{:?}", ALLOWED_FIVE_80_B1300),
+ format!("{:?}", ALLOWED_FIVE_80_IPQ40XX),
))
} else {
Ok(())
@@ -310,10 +311,11 @@ pub fn get_allowed_wifi_channels(radio: Path<String>) -> Result<HttpResponse, Er
// model specific values start here
} else if model.is_some()
- && model.unwrap().contains("gl-b1300")
+ && (model.clone().unwrap().contains("gl-b1300")
+ || model.unwrap().contains("linksys_ea6350v3"))
&& five_channel_width.contains("80")
{
- Ok(HttpResponse::Ok().json(ALLOWED_FIVE_80_B1300))
+ Ok(HttpResponse::Ok().json(ALLOWED_FIVE_80_IPQ40XX))
// model specific values end here
} else if five_channel_width.contains("20") {
Ok(HttpResponse::Ok().json(ALLOWED_FIVE_20))
