diff --git a/softap/sdk/qsap.c b/softap/sdk/qsap.c index 9a885bd..6d569a9 100644 --- a/softap/sdk/qsap.c +++ b/softap/sdk/qsap.c @@ -423,7 +423,7 @@ s32 wifi_qsap_stop_bss(void) close(sock); if (ret) { - ALOGE("IOCTL stopbss failed: %ld", ret); + ALOGE("IOCTL stopbss failed: %d", ret); ret = eERR_STOP_BSS; } else { ALOGD("STOP BSS ISSUED"); diff --git a/softap/sdk/qsap_api.c b/softap/sdk/qsap_api.c index 6212d9d..b539b3e 100644 --- a/softap/sdk/qsap_api.c +++ b/softap/sdk/qsap_api.c @@ -348,7 +348,7 @@ static s32 qsap_write_cfg(s8 *pfile, struct Command * pcmd, s8 *pVal, s8 *presp, s8 buf[MAX_CONF_LINE_LEN+1]; s16 len, result = FALSE; - ALOGD("cmd=%s, Val:%s, INI:%ld \n", pcmd->name, pVal, inifile); + ALOGD("cmd=%s, Val:%s, INI:%d \n", pcmd->name, pVal, inifile); /** Open the configuration file */ fcfg = fopen(pfile, "r"); @@ -1191,7 +1191,7 @@ static void qsap_read_wps_state(s8 *presp, u32 *plen) status = (atoi(pstate) == WPS_STATE_ENABLE) ? ENABLE : DISABLE; } - *plen = qsap_scnprintf(presp, *plen, "success %s=%ld", cmd_list[eCMD_WPS_STATE].name, status); + *plen = qsap_scnprintf(presp, *plen, "success %s=%d", cmd_list[eCMD_WPS_STATE].name, status); return; } @@ -1241,7 +1241,7 @@ int qsap_get_operating_channel(s32 *pchan) ALOGE("Recv len :%d \n", wrq.u.data.length); *pchan = *(int *)(&wrq.u.name[0]); - ALOGE("Operating channel :%ld \n", *pchan); + ALOGE("Operating channel :%d \n", *pchan); close(sock); return eSUCCESS; @@ -1305,7 +1305,7 @@ int qsap_get_sap_auto_channel_selection(s32 *pautochan) ALOGD("Recv len :%d \n", wrq.u.data.length); *pautochan = *(int *)(&wrq.u.name[0]); - ALOGD("Sap auto channel selection pautochan=%ld \n", *pautochan); + ALOGD("Sap auto channel selection pautochan=%d \n", *pautochan); close(sock); return eSUCCESS; @@ -1745,7 +1745,7 @@ void qsap_read_autoshutoff(s8 *presp, u32 *plen) time = time / 60; /** Convert seconds to minutes */ } - *plen = qsap_scnprintf(presp, *plen, "success %s=%ld", cmd_list[eCMD_AP_AUTOSHUTOFF].name, time); + *plen = qsap_scnprintf(presp, *plen, "success %s=%d", cmd_list[eCMD_AP_AUTOSHUTOFF].name, time); return; } @@ -2478,7 +2478,7 @@ static int qsap_set_channel(s32 channel, s8 *tbuf, u32 *tlen) } end: - qsap_scnprintf(schan, sizeof(schan), "%ld", channel); + qsap_scnprintf(schan, sizeof(schan), "%d", channel); return qsap_write_cfg(pcfg, &cmd_list[eCMD_CHAN], schan, tbuf, tlen, HOSTAPD_CONF_QCOM_FILE); } @@ -2557,7 +2557,7 @@ static int qsap_set_data_rate(s32 drate_idx, s8 *presp, u32 *plen) goto end; } - qsap_scnprintf(sconf, sizeof(sconf), "%ld", drate_idx); + qsap_scnprintf(sconf, sizeof(sconf), "%d", drate_idx); /** Update the rate index in the configuration */ return qsap_write_cfg(fIni, &qsap_str[STR_DATA_RATE_IN_INI], sconf, presp, plen, INI_CONF_FILE); @@ -2662,7 +2662,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration. */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); qsap_set_security_mode(pconffile, value, presp, plen); return; @@ -2674,7 +2674,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); if(ACL_ALLOW_LIST == value) { value = ENABLE; @@ -2765,7 +2765,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_PASSPHRASE: value = strlen(pVal); @@ -2789,7 +2789,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_DTIM_PERIOD: @@ -2799,7 +2799,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_HW_MODE: @@ -2828,7 +2828,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_DEFAULT_KEY: @@ -2838,7 +2838,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); qsap_write_cfg(pcfg, &cmd_list[cNum], pVal, presp, plen, ini); @@ -2893,7 +2893,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) case eCMD_RESET_AP: value = atoi(pVal); - ALOGE("Reset :%ld \n", value); + ALOGE("Reset :%d \n", value); if(SAP_RESET_BSS == value) { status = wifi_qsap_stop_softap(); if(status == eSUCCESS) { @@ -3019,7 +3019,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) if(TRUE != IS_VALID_WMM_STATE(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_WPS_STATE: value = atoi(pVal); @@ -3028,7 +3028,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) /** Write back the integer value. This is to avoid values like 01, 001, 0001 * being written to the configuration */ - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); qsap_update_wps_config(pVal, presp, plen); return; @@ -3040,7 +3040,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) value = atoi(pVal); if(TRUE != IS_VALID_PROTECTION(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); cNum = STR_PROT_FLAG_IN_INI; ini = INI_CONF_FILE; break; @@ -3049,7 +3049,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) value = atoi(pVal); if(TRUE != IS_VALID_FRAG_THRESHOLD(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_REGULATORY_DOMAIN: @@ -3058,14 +3058,14 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) if(TRUE != IS_VALID_802DOT11D_STATE(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_RTS_THRESHOLD: value = atoi(pVal); if(TRUE != IS_VALID_RTS_THRESHOLD(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_GTK_TIMEOUT: @@ -3079,7 +3079,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) value = atoi(pVal); if(TRUE != IS_VALID_TX_POWER(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); cNum = STR_TX_POWER_IN_INI; ini = INI_CONF_FILE; break; @@ -3113,7 +3113,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) goto error; /* copy a larger value back to pVal. Please pay special care * in caller to make sure that the buffer has sufficient size. */ - qsap_scnprintf(pVal, MAX_INT_STR, "%ld", value*60); + qsap_scnprintf(pVal, MAX_INT_STR, "%d", value*60); cNum = STR_AP_AUTOSHUTOFF; ini = INI_CONF_FILE; break; @@ -3123,7 +3123,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) if(TRUE != IS_VALID_ENERGY_DETECT_TH(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); cNum = STR_AP_ENERGY_DETECT_TH; ini = INI_CONF_FILE; break; @@ -3133,7 +3133,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen) if(TRUE != IS_VALID_DFS_STATE(value)) goto error; - qsap_scnprintf(pVal, strlen(pVal)+1, "%ld", value); + qsap_scnprintf(pVal, strlen(pVal)+1, "%d", value); break; case eCMD_SET_CHANNEL_RANGE: