aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Jerpelea <alin.jerpelea@sony.com>2018-01-23 11:13:25 +0100
committerAlin Jerpelea <alin.jerpelea@sony.com>2018-01-23 11:13:25 +0100
commitf8e1ced21df32887397f5e382262ea0781138ceb (patch)
tree8fd26d1a2a6d02c98f4754b830890592c1164657
parent5801971ed89b9d836a2b23738a3e717f3553ba04 (diff)
add QCA_CLD3_WIFI mac address format
the QCA_CLD3_WIFI driver requires different mac address format and since the driver should not be modified we should just provide the needed format Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
-rw-r--r--Android.mk4
-rw-r--r--macaddrsetup.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index c65a20f..3467af2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -7,6 +7,10 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
macaddrsetup.c
+ifeq ($(WIFI_DRIVER_BUILT),qca_cld3)
+LOCAL_CFLAGS += -DQCA_CLD3_WIFI
+endif
+
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils
diff --git a/macaddrsetup.c b/macaddrsetup.c
index 7070af2..ca48c40 100644
--- a/macaddrsetup.c
+++ b/macaddrsetup.c
@@ -114,8 +114,13 @@ int main(int argc, char **argv)
exit(1);
}
+#ifdef QCA_CLD3_WIFI
ret = fprintf(fpw, "Intf0MacAddress=%02X%02X%02X%02X%02X%02X\nEND\n", buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]);
if (ret != 33) {
+#else
+ ret = fprintf(fpw, "%02x:%02x:%02x:%02x:%02x:%02x\n", buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]);
+ if (ret != 18) {
+#endif
SLOGE("failed to write WLAN mac address\n");
ta_close();
fclose(fpw);