summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-01-10 17:01:09 -0600
committerJohn Klug <john.klug@multitech.com>2020-01-10 17:01:09 -0600
commit818ca0fc0798a1357f83fd42dedbba1ff51e1054 (patch)
tree2766a0147c748662c5c3d5a49eb3890632eacdca
parent66b9c65b64e08b477ff598aa9cae19c06507899d (diff)
downloadmts-io-4.2.4.tar.gz
mts-io-4.2.4.tar.bz2
mts-io-4.2.4.zip
Fix up mts-io to display wifi and bluetooth MAC adresses4.2.4
-rw-r--r--io-module/machine/mtcdt.c8
-rw-r--r--io-module/machine/mtcpm.c7
-rw-r--r--io-module/machine/mths.c4
-rw-r--r--io-module/machine/mtr.c7
-rw-r--r--io-module/mts-io.c10
-rw-r--r--io-module/mts_io_module.h2
6 files changed, 33 insertions, 5 deletions
diff --git a/io-module/machine/mtcdt.c b/io-module/machine/mtcdt.c
index 095a120..575dd1e 100644
--- a/io-module/machine/mtcdt.c
+++ b/io-module/machine/mtcdt.c
@@ -370,8 +370,10 @@ static DEVICE_ATTR_MTS(dev_attr_eth_reset, "eth-reset",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
static DEVICE_ATTR_MTS(dev_attr_gnss_int, "gnss-int",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
-
-
+static DEVICE_ATTR_RO_MTS(dev_attr_wifi_mac, "mac-wifi",
+ mts_attr_show_product_info);
+static DEVICE_ATTR_RO_MTS(dev_attr_bluetooth_mac, "mac-bluetooth",
+ mts_attr_show_product_info);
static struct attribute *mtcdt_platform_attributes[] = {
&dev_attr_vendor_id.attr,
@@ -454,6 +456,8 @@ static struct attribute *mtcdt_0_1_wifi_bt_attributes[] = {
&dev_attr_wifi_bt_reset.attr,
&dev_attr_wifi_bt_lpmode.attr,
&dev_attr_wifi_bt_int.attr,
+ &dev_attr_bluetooth_mac.attr,
+ &dev_attr_wifi_mac.attr,
};
static struct attribute *mtcdt_0_1_gnss_attributes[] = {
diff --git a/io-module/machine/mtcpm.c b/io-module/machine/mtcpm.c
index d80d1e5..8167218 100644
--- a/io-module/machine/mtcpm.c
+++ b/io-module/machine/mtcpm.c
@@ -182,6 +182,10 @@ static DEVICE_ATTR_RO_MTS(dev_attr_lora_product_id_mtcpm, "product-id",
mts_attr_show_lora_product_info);
static DEVICE_ATTR_RO_MTS(dev_attr_lora_hw_version_mtcpm, "hw-version",
mts_attr_show_lora_product_info);
+static DEVICE_ATTR_RO_MTS(dev_attr_wifi_mac_mtcpm, "mac-wifi",
+ mts_attr_show_product_info);
+static DEVICE_ATTR_RO_MTS(dev_attr_bluetooth_mac_mtcpm, "mac-bluetooth",
+ mts_attr_show_product_info);
static struct attribute *mtcpm_platform_attributes[] = {
&dev_attr_imei.attr,
@@ -216,7 +220,8 @@ static struct attribute *mtcpm_platform_attributes[] = {
&dev_attr_gnss_reset_mtcpm.attr,
&dev_attr_gnss_int_mtcpm.attr,
-
+ &dev_attr_wifi_mac_mtcpm.attr,
+ &dev_attr_bluetooth_mac_mtcpm.attr,
NULL,
};
diff --git a/io-module/machine/mths.c b/io-module/machine/mths.c
index 16d43d7..c19598d 100644
--- a/io-module/machine/mths.c
+++ b/io-module/machine/mths.c
@@ -795,6 +795,9 @@ static DEVICE_ATTR_MTS(dev_attr_led_f_gpio_mths, "led-f",
static DEVICE_ATTR_RO_MTS(dev_attr_wifi_mac_mths, "mac-wifi",
mts_attr_show_product_info);
+static DEVICE_ATTR_RO_MTS(dev_attr_bluetooth_mac_mths, "mac-bluetooth",
+ mts_attr_show_product_info);
+
static DEVICE_ATTR_MTS(dev_attr_wifi_bt_lpwkup_mths, "wifi-bt-lpwkup",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
@@ -829,6 +832,7 @@ static struct attribute *mths_0_0_platform_attributes[] = {
&dev_attr_hw_version.attr,
&dev_attr_imei.attr,
&dev_attr_wifi_mac_mths.attr,
+ &dev_attr_bluetooth_mac_mths.attr,
&dev_attr_has_radio.attr,
&dev_attr_reset.attr,
diff --git a/io-module/machine/mtr.c b/io-module/machine/mtr.c
index c12eacf..8664984 100644
--- a/io-module/machine/mtr.c
+++ b/io-module/machine/mtr.c
@@ -1740,6 +1740,9 @@ static DEVICE_ATTR_MTS(dev_attr_extserial_dcd_gpio_mtr, "extserial-dcd",
static DEVICE_ATTR_RO_MTS(dev_attr_wifi_mac_mtr, "mac-wifi",
mts_attr_show_product_info);
+static DEVICE_ATTR_RO_MTS(dev_attr_bluetooth_mac_mtr, "mac-bluetooth",
+ mts_attr_show_product_info);
+
static DEVICE_ATTR_MTS(dev_attr_wifi_bt_lpwkup_mtr, "wifi-bt-lpwkup",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
@@ -1778,6 +1781,7 @@ static struct attribute *mtr_platform_attributes[] = {
&dev_attr_eth_mac.attr,
&dev_attr_has_radio.attr,
&dev_attr_wifi_mac_mtr.attr,
+ &dev_attr_bluetooth_mac_mtr.attr,
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
&dev_attr_reset_monitor_intervals.attr,
@@ -1831,6 +1835,7 @@ static struct attribute *mtrv1_0_1_platform_attributes[] = {
&dev_attr_eth_mac.attr,
&dev_attr_has_radio.attr,
&dev_attr_wifi_mac_mtr.attr,
+ &dev_attr_bluetooth_mac_mtr.attr,
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
@@ -1887,6 +1892,7 @@ static struct attribute *mtrv1_0_2_platform_attributes[] = {
&dev_attr_eth_mac.attr,
&dev_attr_has_radio.attr,
&dev_attr_wifi_mac_mtr.attr,
+ &dev_attr_bluetooth_mac_mtr.attr,
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
@@ -1946,6 +1952,7 @@ static struct attribute *mtrv1_0_3_platform_attributes[] = {
&dev_attr_eth_mac.attr,
&dev_attr_has_radio.attr,
&dev_attr_wifi_mac_mtr.attr,
+ &dev_attr_bluetooth_mac_mtr.attr,
&dev_attr_reset.attr,
&dev_attr_reset_monitor.attr,
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 6f928b5..125f97a 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -550,7 +550,15 @@ static ssize_t mts_attr_show_product_info(struct device *dev,
id_eeprom.mac_wifi[3],
id_eeprom.mac_wifi[4],
id_eeprom.mac_wifi[5]);
- } else if (strcmp(attr->attr.name, "mac-eth") == 0) {
+ } else if (strcmp(attr->attr.name, "mac-bluetooth") == 0) {
+ value = sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X\n",
+ id_eeprom.mac_bluetooth[0],
+ id_eeprom.mac_bluetooth[1],
+ id_eeprom.mac_bluetooth[2],
+ id_eeprom.mac_bluetooth[3],
+ id_eeprom.mac_bluetooth[4],
+ id_eeprom.mac_bluetooth[5]);
+ } else if (strcmp(attr->attr.name, "mac-eth") == 0) {
value = sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X\n",
id_eeprom.mac_addr[0],
id_eeprom.mac_addr[1],
diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h
index 9b37dad..4144bff 100644
--- a/io-module/mts_io_module.h
+++ b/io-module/mts_io_module.h
@@ -5,7 +5,7 @@
* MTAC cards.
*/
-#define DRIVER_VERSION "v4.2.3"
+#define DRIVER_VERSION "v4.2.4"
#define DRIVER_AUTHOR "Multitech Systems"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"