summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykola Salomatin <mykola.salomatin@globallogic.com>2022-05-13 18:47:29 +0300
committerJohn Klug <john.klug@multitech.com>2022-09-23 12:36:04 -0500
commite1329a3976a8884e2c568f2434df82e6eadb2775 (patch)
treeea6169d457a4316354a885191c5e11d395a5b6f4
parent771c9199b66d0eadc7587cf61f00256df49188d2 (diff)
downloadmts-io-e1329a3976a8884e2c568f2434df82e6eadb2775.tar.gz
mts-io-e1329a3976a8884e2c568f2434df82e6eadb2775.tar.bz2
mts-io-e1329a3976a8884e2c568f2434df82e6eadb2775.zip
[MTX-4480] mPower R.6.0.X: MTCAP3 - Filesystem Encryption capability GP-1586
Added user data encryption capability for encryption purposes in MTCAP3 devices.
-rw-r--r--io-module/mts-io.c1
-rw-r--r--io-module/mts_capab.c3
-rw-r--r--io-module/mts_eeprom.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 970e6b3..1d244af 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -1335,6 +1335,7 @@ mts_id_eeprom_load(void)
log_info("capa-supercap: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_SUPERCAP) ? "yes" : "no");
if(has_cellular_capaflag)
log_info("capa-cellular: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_CELLULAR) ? "yes" : "no");
+ log_info("capa-user-data-encryption: %s", DEVICE_CAPA(id_eeprom.capa, CAPA_USER_DATA_ENCRYPTION) ? "yes" : "no");
if (DEVICE_CAPA(id_eeprom.capa, CAPA_BLUETOOTH)) {
log_info("mac-bluetooth: %02X:%02X:%02X:%02X:%02X:%02X",
diff --git a/io-module/mts_capab.c b/io-module/mts_capab.c
index 08bcff1..3a92349 100644
--- a/io-module/mts_capab.c
+++ b/io-module/mts_capab.c
@@ -28,6 +28,7 @@ static struct capab_map_s capabilities_map[] = {
{ CAPA_BATTERY, "battery"},
{ CAPA_SUPERCAP, "supercap"},
{ CAPA_LORA_LBT, "lora-lbt"},
+ { CAPA_USER_DATA_ENCRYPTION, "user-data-encryption"},
};
static ssize_t capab_show_value(struct device *dev, struct device_attribute *at, char *buf) {
@@ -54,6 +55,7 @@ static DEVICE_ATTR_RO_MTS(capa_attr_lora, "lora", capab_show_value);
static DEVICE_ATTR_RO_MTS(capa_attr_battery, "battery", capab_show_value);
static DEVICE_ATTR_RO_MTS(capa_attr_supercap, "supercap", capab_show_value);
static DEVICE_ATTR_RO_MTS(capa_attr_lora_lbt, "lora-lbt", capab_show_value);
+static DEVICE_ATTR_RO_MTS(capa_attr_user_data_encryption, "user-data-encryption", capab_show_value);
static struct attribute *mts_capa_attributes[] = {
&capa_attr_gps.attr,
@@ -66,6 +68,7 @@ static struct attribute *mts_capa_attributes[] = {
&capa_attr_battery.attr,
&capa_attr_supercap.attr,
&capa_attr_lora_lbt.attr,
+ &capa_attr_user_data_encryption.attr,
NULL,
};
diff --git a/io-module/mts_eeprom.h b/io-module/mts_eeprom.h
index 4da1f44..0bddfb4 100644
--- a/io-module/mts_eeprom.h
+++ b/io-module/mts_eeprom.h
@@ -79,4 +79,5 @@ do { \
#define CAPA_SUPERCAP DEVICE_CAPA_VALUE(1, 5)
#define CAPA_CELLULAR DEVICE_CAPA_VALUE(1,2) // Only valid if eeprom_layout_version > 0
#define CAPA_LORA_LBT DEVICE_CAPA_VALUE(1, 1) // on-board lora lbt
+#define CAPA_USER_DATA_ENCRYPTION DEVICE_CAPA_VALUE(1, 0)
#endif /* __MTS_EEPROM_H */