Restrict e5600 to 5ghz channel 36
@@ -24,8 +24,8 @@ pub const ALLOWED_FIVE_40: [u16; 12] = [36, 44, 52, 60, 100, 108, 116, 124, 132,
pub const ALLOWED_FIVE_80: [u16; 6] = [36, 52, 100, 116, 132, 149];
/// list of nonoverlapping 80mhz channels for the GLB1300/EA6350v3
pub const ALLOWED_FIVE_80_IPQ40XX: [u16; 2] = [36, 149];
-/// list of nonoverlapping 80mhz channels for the TPLink-a6v3/wr-2100
-pub const ALLOWED_FIVE_80_TPLINK_A6V3: [u16; 1] = [36];
+/// list of nonoverlapping 80mhz channels for the TPLink-a6v3/wr-2100/e5600
+pub const ALLOWED_FIVE_80_MT7621: [u16; 1] = [36];
/// list of nonoverlapping 160mhz channels generally legal in NA, SA, EU, AU
pub const ALLOWED_FIVE_160: [u16; 2] = [36, 100];
@@ -361,14 +361,16 @@ fn validate_channel(
"80".to_string(),
format!("{:?}", ALLOWED_FIVE_80_IPQ40XX),
))
- } else if (mdl.contains("tplink_archer-a6-v3") || mdl.contains("cudy_wr2100"))
+ } else if (mdl.contains("tplink_archer-a6-v3")
+ || mdl.contains("cudy_wr2100")
+ || mdl.contains("linksys_e5600"))
&& new_is_five
&& channel_width_is_80
- && !ALLOWED_FIVE_80_TPLINK_A6V3.contains(&new_val)
+ && !ALLOWED_FIVE_80_MT7621.contains(&new_val)
{
Err(ValidationError::BadChannel(
"80".to_string(),
- format!("{:?}", ALLOWED_FIVE_80_TPLINK_A6V3),
+ format!("{:?}", ALLOWED_FIVE_80_MT7621),
))
} else {
Ok(())
@@ -401,10 +403,11 @@ pub fn get_allowed_wifi_channels(radio: Path<String>) -> Result<HttpResponse, Er
Ok(HttpResponse::Ok().json(ALLOWED_FIVE_80_IPQ40XX))
} else if model.is_some()
&& (model.clone().unwrap().contains("tplink_archer-a6-v3")
- || model.unwrap().contains("cudy_wr2100"))
+ || model.clone().unwrap().contains("cudy_wr2100")
+ || model.unwrap().contains("linksys_e5600"))
&& five_channel_width.contains("80")
{
- Ok(HttpResponse::Ok().json(ALLOWED_FIVE_80_TPLINK_A6V3))
+ Ok(HttpResponse::Ok().json(ALLOWED_FIVE_80_MT7621))
// model specific values end here
} else if five_channel_width.contains("20") {
Ok(HttpResponse::Ok().json(ALLOWED_FIVE_20))
