diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-11-30 10:27:51 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-11-30 10:27:51 -0700 |
commit | d005e860158a21b62e7a81b2ce41c720069a5c73 (patch) | |
tree | f02677ac6b9f24f6132f7d28a56c7e1306355819 | |
parent | 6d1aa565b893b707a59f5c91d0d4438b69fdbf62 (diff) | |
parent | 21dc098bfca2d8af2c60fccdbd13e216c1d0fb1d (diff) | |
download | android_hardware_qcom_wlan-d005e860158a21b62e7a81b2ce41c720069a5c73.tar.gz android_hardware_qcom_wlan-d005e860158a21b62e7a81b2ce41c720069a5c73.tar.bz2 android_hardware_qcom_wlan-d005e860158a21b62e7a81b2ce41c720069a5c73.zip |
Promotion of wlan-aosp.lnx.2.0.c1-00002.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1091301 I402ecb607dc3f1ef9ddbb28406feac1782f34f51 wcnss_service: refine dynamic nv feature
Change-Id: I47316958ad618e503fc76d63271194a5205ff1f4
CRs-Fixed: 1091301
-rw-r--r-- | wcnss-service/Android.mk | 1 | ||||
-rw-r--r-- | wcnss-service/wcnss_service.c | 19 |
2 files changed, 8 insertions, 12 deletions
diff --git a/wcnss-service/Android.mk b/wcnss-service/Android.mk index 16cc10e..1e54dc9 100644 --- a/wcnss-service/Android.mk +++ b/wcnss-service/Android.mk @@ -19,6 +19,7 @@ LOCAL_SHARED_LIBRARIES += libqmiservices libqmi libqcci_legacy libqmi_client_qmu LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libmdmdetect/inc LOCAL_SHARED_LIBRARIES += libmdmdetect endif #TARGET_USES_QCOM_WCNSS_QMI +LOCAL_CFLAGS += -DDYNAMIC_NV LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -Wall -Werror include $(BUILD_EXECUTABLE) diff --git a/wcnss-service/wcnss_service.c b/wcnss-service/wcnss_service.c index 94c474d..34aa72b 100644 --- a/wcnss-service/wcnss_service.c +++ b/wcnss-service/wcnss_service.c @@ -92,13 +92,14 @@ unsigned char wlan_nv_mac_addr[WLAN_ADDR_SIZE]; #define WLAN_MAC_ADDR_STRING 18 #endif +#ifdef DYNAMIC_NV #define MAX_SOC_INFO_NAME_LEN (15) #define MAX_DATA_NVBIN_PATH_LEN (64) #define QRD_DYNAMIC_NV_PROP "persist.sys.dynamic.nv" #define QRD_HW_PLATFORM "QRD" #define QRD_PLATFORM_SUBTYPE_ID 0 #define PERSIST_NVFILE "/persist/WCNSS_qcom_wlan_nv.bin" -#define DATA_NVFILE_DIR "/data/misc/wifi/nvbin/" +#define DATA_NVFILE_DIR "/system/etc/wifi/nvbin/" #define SYSFS_SOCID_PATH1 "/sys/devices/soc0/soc_id" #define SYSFS_SOCID_PATH2 "/sys/devices/system/soc/soc0/id" #define SYSFS_HW_PLATFORM_PATH1 "/sys/devices/soc0/hw_platform" @@ -117,6 +118,7 @@ unsigned char wlan_nv_mac_addr[WLAN_ADDR_SIZE]; } \ info_got = atoi(buf); \ } +#endif int wcnss_write_cal_data(int fd_dev) { @@ -528,6 +530,7 @@ int check_modem_compatability(struct dev_info *mdm_detect_info) } #endif +#ifdef DYNAMIC_NV static int read_line_from_file(const char *path, char *buf, size_t count) { char * fgets_ret; @@ -618,7 +621,6 @@ static int get_data_nvfile_path(char *data_nvfile_path, static int nvbin_sendfile(const char *dst, const char *src, struct stat *src_stat) { - struct utimbuf new_time; int fp_src, fp_dst; int rc; if ((fp_src = open(src, O_RDONLY)) < 0) @@ -644,16 +646,6 @@ static int nvbin_sendfile(const char *dst, const char *src, goto exit; } - new_time.actime = src_stat->st_atime; - new_time.modtime = src_stat->st_mtime; - if (utime(dst, &new_time) != 0) - { - ALOGE("could not preserve the timestamp %s", - strerror(errno)); - rc = FAILED; - goto exit; - } - rc = SUCCESS; exit: close(fp_dst); @@ -719,6 +711,7 @@ void dynamic_nv_replace() ALOGI("dynamic nv replace sucessfully!\n"); } +#endif int main(int argc, char *argv[]) { @@ -777,7 +770,9 @@ int main(int argc, char *argv[]) nomodem: #endif +#ifdef DYNAMIC_NV dynamic_nv_replace(); +#endif #ifdef WCNSS_QMI setup_wcnss_parameters(&ret_cal, nv_mac_addr); |