summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-08-20 07:37:00 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-08-20 07:37:00 +0000
commitac355d5e4fb907790f63c3a007bb1a666abef661 (patch)
tree0a3c0d966c2c31a52986340032ec88573cfb7c5e
parentd6445207dabc4517bd5deed741aef68a84f3906d (diff)
parenta9caaff78f4c0f849dcf4f56d287e18b937a1385 (diff)
downloadandroid_hardware_qcom_wlan-ac355d5e4fb907790f63c3a007bb1a666abef661.tar.gz
android_hardware_qcom_wlan-ac355d5e4fb907790f63c3a007bb1a666abef661.tar.bz2
android_hardware_qcom_wlan-ac355d5e4fb907790f63c3a007bb1a666abef661.zip
release-request-369362fc-cc6c-4cb1-95c0-90b5ac7c52cb-for-git_oc-mr1-release-4288633 snap-temp-L81700000095141745
Change-Id: Ieaf41353e828ae8da62a088b78284b81d9a81f2f
-rw-r--r--qcwcn/wcnss-service/wcnss_service.c19
-rw-r--r--qcwcn/wifi_hal/nan_i.h3
-rw-r--r--qcwcn/wifi_hal/nan_ind.cpp8
-rw-r--r--qcwcn/wifi_hal/nan_rsp.cpp33
-rw-r--r--qcwcn/wifi_hal/nancommand.h3
5 files changed, 25 insertions, 41 deletions
diff --git a/qcwcn/wcnss-service/wcnss_service.c b/qcwcn/wcnss-service/wcnss_service.c
index 9244ea0..4eb3403 100644
--- a/qcwcn/wcnss-service/wcnss_service.c
+++ b/qcwcn/wcnss-service/wcnss_service.c
@@ -374,25 +374,6 @@ void setup_wcnss_parameters(int *cal, int nv_mac_addr)
return;
}
- rc = property_get("ro.serialno", serial, "");
- if (rc) {
- serial_num = convert_string_to_hex(serial);
- ALOGE("Serial Number is %x", serial_num);
-
- msg[pos++] = WCNSS_USR_SERIAL_NUM >> BYTE_1;
- msg[pos++] = WCNSS_USR_SERIAL_NUM >> BYTE_0;
- msg[pos++] = serial_num >> BYTE_3;
- msg[pos++] = serial_num >> BYTE_2;
- msg[pos++] = serial_num >> BYTE_1;
- msg[pos++] = serial_num >> BYTE_0;
-
- if (write(fd, msg, pos) < 0) {
- ALOGE("Failed to write to %s : %s", WCNSS_CTRL,
- strerror(errno));
- goto fail;
- }
- }
-
#ifdef WCNSS_QMI
if (SUCCESS == nv_mac_addr)
{
diff --git a/qcwcn/wifi_hal/nan_i.h b/qcwcn/wifi_hal/nan_i.h
index 5938919..656fb7f 100644
--- a/qcwcn/wifi_hal/nan_i.h
+++ b/qcwcn/wifi_hal/nan_i.h
@@ -1259,7 +1259,8 @@ typedef struct PACKED
*/
void NanErrorTranslation(NanInternalStatusType firmwareErrorRecvd,
u32 valueRcvd,
- void *pRsp);
+ void *pRsp,
+ bool is_ndp_rsp);
#ifdef __cplusplus
}
diff --git a/qcwcn/wifi_hal/nan_ind.cpp b/qcwcn/wifi_hal/nan_ind.cpp
index 2f3d0e6..75663d3 100644
--- a/qcwcn/wifi_hal/nan_ind.cpp
+++ b/qcwcn/wifi_hal/nan_ind.cpp
@@ -264,7 +264,7 @@ int NanCommand::getNanPublishTerminated(NanPublishTerminatedInd *event)
pNanPublishTerminatedIndMsg pRsp = (pNanPublishTerminatedIndMsg)mNanVendorEvent;
event->publish_id = pRsp->fwHeader.handle;
NanErrorTranslation((NanInternalStatusType)pRsp->reason, 0,
- (void*)event);
+ (void*)event, false);
return WIFI_SUCCESS;
}
@@ -449,7 +449,7 @@ int NanCommand::getNanSubscribeTerminated(NanSubscribeTerminatedInd *event)
pNanSubscribeTerminatedIndMsg pRsp = (pNanSubscribeTerminatedIndMsg)mNanVendorEvent;
event->subscribe_id = pRsp->fwHeader.handle;
NanErrorTranslation((NanInternalStatusType)pRsp->reason, 0,
- (void*)event);
+ (void*)event, false);
return WIFI_SUCCESS;
}
@@ -599,7 +599,7 @@ int NanCommand::getNanDisabled(NanDisabledInd *event)
pNanDisableIndMsg pRsp = (pNanDisableIndMsg)mNanVendorEvent;
NanErrorTranslation((NanInternalStatusType)pRsp->reason, 0,
- (void*)event);
+ (void*)event, false);
return WIFI_SUCCESS;
}
@@ -956,7 +956,7 @@ int NanCommand::getNanTransmitFollowupInd(NanTransmitFollowupInd *event)
pNanSelfTransmitFollowupIndMsg pRsp = (pNanSelfTransmitFollowupIndMsg)mNanVendorEvent;
event->id = pRsp->fwHeader.transactionId;
NanErrorTranslation((NanInternalStatusType)pRsp->reason, 0,
- (void*)event);
+ (void*)event, false);
return WIFI_SUCCESS;
}
diff --git a/qcwcn/wifi_hal/nan_rsp.cpp b/qcwcn/wifi_hal/nan_rsp.cpp
index 360134e..1743293 100644
--- a/qcwcn/wifi_hal/nan_rsp.cpp
+++ b/qcwcn/wifi_hal/nan_rsp.cpp
@@ -339,7 +339,8 @@ struct errorCode errorCodeTranslation[] = {
void NanCommand::NanErrorTranslation(NanInternalStatusType firmwareErrorRecvd,
u32 valueRcvd,
- void* pResponse)
+ void* pResponse,
+ bool is_ndp_rsp)
{
int i = 0, j = 0;
u16 msg_id; /* Based on the message_id in the header determine the Indication type */
@@ -349,7 +350,7 @@ void NanCommand::NanErrorTranslation(NanInternalStatusType firmwareErrorRecvd,
char tlvInfo[NAN_ERROR_STR_LEN];
tlvInfo[0] = '\0';
- if (isNanResponse()) {
+ if (isNanResponse() || (is_ndp_rsp == true)){
pRsp = (NanResponseMsg*)pResponse;
for (i = 0; i < (int)(sizeof(errorCodeTranslation)/ sizeof(errorCode)); i++) {
if (errorCodeTranslation[i].firmwareError == firmwareErrorRecvd) {
@@ -427,7 +428,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanErrorRspMsg pFwRsp = \
(pNanErrorRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_ERROR;
break;
}
@@ -436,7 +437,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanConfigurationRspMsg pFwRsp = \
(pNanConfigurationRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_CONFIG;
}
break;
@@ -445,7 +446,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanPublishServiceCancelRspMsg pFwRsp = \
(pNanPublishServiceCancelRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_PUBLISH_CANCEL;
pRsp->body.publish_response.publish_id = \
pFwRsp->fwHeader.handle;
@@ -456,7 +457,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanPublishServiceRspMsg pFwRsp = \
(pNanPublishServiceRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_PUBLISH;
pRsp->body.publish_response.publish_id = \
pFwRsp->fwHeader.handle;
@@ -467,7 +468,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanSubscribeServiceRspMsg pFwRsp = \
(pNanSubscribeServiceRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_SUBSCRIBE;
pRsp->body.subscribe_response.subscribe_id = \
pFwRsp->fwHeader.handle;
@@ -478,7 +479,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanSubscribeServiceCancelRspMsg pFwRsp = \
(pNanSubscribeServiceCancelRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_SUBSCRIBE_CANCEL;
pRsp->body.subscribe_response.subscribe_id = \
pFwRsp->fwHeader.handle;
@@ -489,7 +490,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanTransmitFollowupRspMsg pFwRsp = \
(pNanTransmitFollowupRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_TRANSMIT_FOLLOWUP;
break;
}
@@ -499,7 +500,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
(pNanStatsRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
NanErrorTranslation((NanInternalStatusType)pFwRsp->statsRspParams.status,
- pFwRsp->statsRspParams.value, pRsp);
+ pFwRsp->statsRspParams.value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_STATS;
pRsp->body.stats_response.stats_type = \
(NanStatsType)pFwRsp->statsRspParams.statsType;
@@ -532,7 +533,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanEnableRspMsg pFwRsp = \
(pNanEnableRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_ENABLED;
break;
}
@@ -541,7 +542,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanDisableRspMsg pFwRsp = \
(pNanDisableRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, 0, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, 0, pRsp, false);
pRsp->response_type = NAN_RESPONSE_DISABLED;
break;
}
@@ -550,7 +551,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanTcaRspMsg pFwRsp = \
(pNanTcaRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_RESPONSE_TCA;
break;
}
@@ -559,7 +560,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanBeaconSdfPayloadRspMsg pFwRsp = \
(pNanBeaconSdfPayloadRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, 0, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, 0, pRsp, false);
pRsp->response_type = NAN_RESPONSE_BEACON_SDF_PAYLOAD;
break;
}
@@ -568,7 +569,7 @@ int NanCommand::getNanResponse(transaction_id *id, NanResponseMsg *pRsp)
pNanCapabilitiesRspMsg pFwRsp = \
(pNanCapabilitiesRspMsg)mNanVendorEvent;
*id = (transaction_id)pFwRsp->fwHeader.transactionId;
- NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp);
+ NanErrorTranslation((NanInternalStatusType)pFwRsp->status, pFwRsp->value, pRsp, false);
pRsp->response_type = NAN_GET_CAPABILITIES;
pRsp->body.nan_capabilities.max_concurrent_nan_clusters = \
pFwRsp->max_concurrent_nan_clusters;
@@ -938,7 +939,7 @@ int NanCommand::handleNdpResponse(NanResponseType ndpCmdType,
ALOGD("%s: Transaction id : val %d", __FUNCTION__, id);
NanErrorTranslation((NanInternalStatusType)nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE]),
- nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE]), &rsp_data);
+ nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE]), &rsp_data, true);
rsp_data.response_type = ndpCmdType;
if (ndpCmdType == NAN_DP_INITIATOR_RESPONSE)
diff --git a/qcwcn/wifi_hal/nancommand.h b/qcwcn/wifi_hal/nancommand.h
index 763544f..e009e0f 100644
--- a/qcwcn/wifi_hal/nancommand.h
+++ b/qcwcn/wifi_hal/nancommand.h
@@ -142,7 +142,8 @@ public:
*/
void NanErrorTranslation(NanInternalStatusType firmwareErrorRecvd,
u32 valueRcvd,
- void *pRsp);
+ void *pRsp,
+ bool is_ndp_rsp);
};
#endif /* __WIFI_HAL_NAN_COMMAND_H__ */