diff --git a/softap/sdk/qsap_api.c b/softap/sdk/qsap_api.c index 7278c83..8e4b9f2 100755 --- a/softap/sdk/qsap_api.c +++ b/softap/sdk/qsap_api.c @@ -3115,7 +3115,7 @@ void check_for_configuration_files(void) /* Check if configuration files are present, if not create the default files */ mkdir("/data/hostapd", 0771); - /* If configuration file does not exhist copy the default file */ + /* If configuration file does not exist copy the default file */ if ( NULL == (fp = fopen(CONFIG_FILE, "r")) ) { wifi_qsap_reset_to_default(CONFIG_FILE, DEFAULT_CONFIG_FILE_PATH); } @@ -3123,19 +3123,17 @@ void check_for_configuration_files(void) fclose(fp); } - /* If Accept MAC list file does not exhist, create an empty file */ + /* If Accept MAC list file does not exist, copy the default file */ if ( NULL == (fp = fopen(ACCEPT_LIST_FILE, "r")) ) { - fp = fopen(ACCEPT_LIST_FILE, "w+"); - if ( fp ) fclose(fp); + wifi_qsap_reset_to_default(ACCEPT_LIST_FILE, DEFAULT_ACCEPT_LIST_FILE_PATH); } else { fclose(fp); } - /* If deny MAC list file does not exhist, create an empty file */ + /* If deny MAC list file does not exist, copy the default file */ if ( NULL == (fp = fopen(DENY_LIST_FILE, "r")) ) { - fp = fopen(DENY_LIST_FILE, "w+"); - if ( fp ) fclose(fp); + wifi_qsap_reset_to_default(DENY_LIST_FILE, DEFAULT_DENY_LIST_FILE_PATH); } else { fclose(fp); diff --git a/softap/sdk/qsap_api.h b/softap/sdk/qsap_api.h index b82416d..67c1951 100644 --- a/softap/sdk/qsap_api.h +++ b/softap/sdk/qsap_api.h @@ -92,11 +92,17 @@ enum error_val { #define CONFIG_FILE "/data/misc/wifi/hostapd.conf" /** Default configuration file path */ -#define DEFAULT_CONFIG_FILE_PATH "/persist/qcom/softap/hostapd_default.conf" +#define DEFAULT_CONFIG_FILE_PATH "/system/etc/hostapd/hostapd_default.conf" + +/** Default Accept list file name */ +#define DEFAULT_ACCEPT_LIST_FILE_PATH "/system/etc/hostapd/hostapd.accept" /** Accept list file name */ #define ACCEPT_LIST_FILE "/data/hostapd/hostapd.accept" +/** Default Deny list file name */ +#define DEFAULT_DENY_LIST_FILE_PATH "/system/etc/hostapd/hostapd.deny" + /** Deny list file name */ #define DENY_LIST_FILE "/data/hostapd/hostapd.deny"