summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Voloshynov <serhii.voloshynov@globallogic.com>2022-09-23 16:11:44 +0300
committerJohn Klug <john.klug@multitech.com>2022-09-23 12:36:09 -0500
commit9202cc83c31579f56736de15ebc74a4faa9ae8b3 (patch)
treee034bf0b25bbbf8acd57e342099c3d952c202f92
parentd0d65409929f80dfefebd61d2286d489a3ad9422 (diff)
downloadmts-io-9202cc83c31579f56736de15ebc74a4faa9ae8b3.tar.gz
mts-io-9202cc83c31579f56736de15ebc74a4faa9ae8b3.tar.bz2
mts-io-9202cc83c31579f56736de15ebc74a4faa9ae8b3.zip
add missing has-radio4.9.10
-rw-r--r--io-module/machine/mtcpm.c1
-rw-r--r--io-module/mts-io.c18
2 files changed, 8 insertions, 11 deletions
diff --git a/io-module/machine/mtcpm.c b/io-module/machine/mtcpm.c
index 8e025c4..b8246a1 100644
--- a/io-module/machine/mtcpm.c
+++ b/io-module/machine/mtcpm.c
@@ -184,6 +184,7 @@ static struct attribute *mtcpm_platform_attributes[] = {
&dev_attr_led_sig1_mtcpm.attr,
&dev_attr_led_sig2_mtcpm.attr,
&dev_attr_led_sig3_mtcpm.attr,
+ &dev_attr_has_radio.attr,
&dev_attr_usbhub_reset.attr,
&dev_attr_eth_reset.attr,
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 59106a4..b8b9c94 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -822,17 +822,13 @@ mts_id_eeprom_load(void)
return -ENODEV;
}
- /* If we are an MTCPM-0.0, the base board sets the radio existance, and we always
- * add the radio-reset, etc */
- if (strncmp(id_eeprom.hw_version,HW_VERSION_MTCPM_0_0,sizeof HW_VERSION_MTCPM_0_0) != 0) {
- if (id_eeprom.eeprom_layout_version == 0) {
- noradio = ! mts_has_radio(id_eeprom.product_id,sizeof id_eeprom.product_id);
- } else {
- has_cellular_capaflag = 1;
- noradio = ! DEVICE_CAPA(id_eeprom.capa, CAPA_CELLULAR);
- }
- log_debug("mts_id_eeprom_load: noradio=%d",noradio);
- }
+ if (id_eeprom.eeprom_layout_version == 0) {
+ noradio = ! mts_has_radio(id_eeprom.product_id,sizeof id_eeprom.product_id);
+ } else {
+ has_cellular_capaflag = 1;
+ noradio = ! DEVICE_CAPA(id_eeprom.capa, CAPA_CELLULAR);
+ }
+ log_debug("mts_id_eeprom_load: noradio=%d",noradio);
if (found_board(HW_VERSION_MTCAP_0_0,MTCAP_0_0,&hw_version_str,&mts_hw_version) ||
found_board(HW_VERSION_MTCAP_0_1,MTCAP_0_1,&hw_version_str,&mts_hw_version) ||