|
@@ -64,6 +64,9 @@ qca_wlan_vendor_ndp_policy[QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX + 1] = {
|
|
.len = NDP_PMK_LEN },
|
|
.len = NDP_PMK_LEN },
|
|
[QCA_WLAN_VENDOR_ATTR_NDP_SCID] = { .type = NLA_BINARY,
|
|
[QCA_WLAN_VENDOR_ATTR_NDP_SCID] = { .type = NLA_BINARY,
|
|
.len = NDP_SCID_BUF_LEN },
|
|
.len = NDP_SCID_BUF_LEN },
|
|
|
|
+ [QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE] = { .type =
|
|
|
|
+ NLA_U32 },
|
|
|
|
+ [QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE] = { .type = NLA_U32 },
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -809,7 +812,7 @@ static int hdd_ndp_end_req_handler(hdd_context_t *hdd_ctx, struct nlattr **tb)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INTERFACE_CREATE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INTERFACE_CREATE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
- * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE (4 bytes)
|
|
|
|
|
|
+ * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE
|
|
*
|
|
*
|
|
* Return: none
|
|
* Return: none
|
|
@@ -886,7 +889,8 @@ static void hdd_ndp_iface_create_rsp_handler(hdd_adapter_t *adapter,
|
|
}
|
|
}
|
|
|
|
|
|
/* Status code */
|
|
/* Status code */
|
|
- if (nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE,
|
|
|
|
|
|
+ if (nla_put_u32(vendor_event,
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
create_status)) {
|
|
create_status)) {
|
|
hdd_err("VENDOR_ATTR_NDP_DRV_RETURN_TYPE put fail");
|
|
hdd_err("VENDOR_ATTR_NDP_DRV_RETURN_TYPE put fail");
|
|
goto nla_put_failure;
|
|
goto nla_put_failure;
|
|
@@ -906,7 +910,8 @@ static void hdd_ndp_iface_create_rsp_handler(hdd_adapter_t *adapter,
|
|
hdd_info("create transaction id: %d, value: %d",
|
|
hdd_info("create transaction id: %d, value: %d",
|
|
QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID, create_transaction_id);
|
|
QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID, create_transaction_id);
|
|
hdd_info("status code: %d, value: %d",
|
|
hdd_info("status code: %d, value: %d",
|
|
- QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE, create_status);
|
|
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
|
|
+ create_status);
|
|
hdd_info("Return value: %d, value: %d",
|
|
hdd_info("Return value: %d, value: %d",
|
|
QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE, create_reason);
|
|
QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE, create_reason);
|
|
|
|
|
|
@@ -992,7 +997,7 @@ static void hdd_ndp_iface_delete_rsp_handler(hdd_adapter_t *adapter,
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INTERFACE_DELETE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INTERFACE_DELETE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
- * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE (4 bytes)
|
|
|
|
|
|
+ * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
*
|
|
*
|
|
* Return: none
|
|
* Return: none
|
|
@@ -1054,7 +1059,7 @@ void hdd_ndp_session_end_handler(hdd_adapter_t *adapter)
|
|
|
|
|
|
/* Status code */
|
|
/* Status code */
|
|
if (nla_put_u32(vendor_event,
|
|
if (nla_put_u32(vendor_event,
|
|
- QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE,
|
|
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
ndp_ctx->ndi_delete_rsp_status)) {
|
|
ndp_ctx->ndi_delete_rsp_status)) {
|
|
hdd_err("VENDOR_ATTR_NDP_DRV_RETURN_TYPE put fail");
|
|
hdd_err("VENDOR_ATTR_NDP_DRV_RETURN_TYPE put fail");
|
|
goto failure;
|
|
goto failure;
|
|
@@ -1074,7 +1079,7 @@ void hdd_ndp_session_end_handler(hdd_adapter_t *adapter)
|
|
QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID,
|
|
QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID,
|
|
ndp_ctx->ndp_delete_transaction_id);
|
|
ndp_ctx->ndp_delete_transaction_id);
|
|
hdd_info("status code: %d, value: %d",
|
|
hdd_info("status code: %d, value: %d",
|
|
- QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE,
|
|
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
ndp_ctx->ndi_delete_rsp_status);
|
|
ndp_ctx->ndi_delete_rsp_status);
|
|
hdd_info("Return value: %d, value: %d",
|
|
hdd_info("Return value: %d, value: %d",
|
|
QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE,
|
|
QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE,
|
|
@@ -1103,7 +1108,7 @@ failure:
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INITIATOR_RESPONSE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INITIATOR_RESPONSE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INSTANCE_ID (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_INSTANCE_ID (4 bytes)
|
|
- * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE (4 bytes)
|
|
|
|
|
|
+ * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
*
|
|
*
|
|
* Return: none
|
|
* Return: none
|
|
@@ -1148,7 +1153,8 @@ static void hdd_ndp_initiator_rsp_handler(hdd_adapter_t *adapter,
|
|
rsp->ndp_instance_id))
|
|
rsp->ndp_instance_id))
|
|
goto ndp_initiator_rsp_nla_failed;
|
|
goto ndp_initiator_rsp_nla_failed;
|
|
|
|
|
|
- if (nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE,
|
|
|
|
|
|
+ if (nla_put_u32(vendor_event,
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
rsp->status))
|
|
rsp->status))
|
|
goto ndp_initiator_rsp_nla_failed;
|
|
goto ndp_initiator_rsp_nla_failed;
|
|
|
|
|
|
@@ -1525,8 +1531,8 @@ ndp_indication_nla_failed:
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_RESPONDER_RESPONSE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_RESPONDER_RESPONSE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
- * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE (4 bytes)
|
|
|
|
- * QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE (4 bytes)
|
|
|
|
|
|
+ * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE (4 bytes)
|
|
|
|
+ * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
*
|
|
*
|
|
* Return: none
|
|
* Return: none
|
|
*/
|
|
*/
|
|
@@ -1571,12 +1577,13 @@ static void hdd_ndp_responder_rsp_handler(hdd_adapter_t *adapter,
|
|
rsp->transaction_id))
|
|
rsp->transaction_id))
|
|
goto ndp_responder_rsp_nla_failed;
|
|
goto ndp_responder_rsp_nla_failed;
|
|
|
|
|
|
- if (nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE,
|
|
|
|
|
|
+ if (nla_put_u32(vendor_event,
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
rsp->status))
|
|
rsp->status))
|
|
goto ndp_responder_rsp_nla_failed;
|
|
goto ndp_responder_rsp_nla_failed;
|
|
|
|
|
|
if (nla_put_u32(vendor_event,
|
|
if (nla_put_u32(vendor_event,
|
|
- QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE,
|
|
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE,
|
|
rsp->reason))
|
|
rsp->reason))
|
|
goto ndp_responder_rsp_nla_failed;
|
|
goto ndp_responder_rsp_nla_failed;
|
|
|
|
|
|
@@ -1597,7 +1604,7 @@ ndp_responder_rsp_nla_failed:
|
|
* Following vendor event is sent to cfg80211:
|
|
* Following vendor event is sent to cfg80211:
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_SUBCMD =
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_END_RESPONSE(4 bytest)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_END_RESPONSE(4 bytest)
|
|
- * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE (4 bytes)
|
|
|
|
|
|
+ * QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_VALUE (4 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
* QCA_WLAN_VENDOR_ATTR_NDP_TRANSACTION_ID (2 bytes)
|
|
*
|
|
*
|
|
@@ -1635,7 +1642,8 @@ static void hdd_ndp_end_rsp_handler(hdd_adapter_t *adapter, void *rsp_params)
|
|
QCA_WLAN_VENDOR_ATTR_NDP_END_RESPONSE))
|
|
QCA_WLAN_VENDOR_ATTR_NDP_END_RESPONSE))
|
|
goto ndp_end_rsp_nla_failed;
|
|
goto ndp_end_rsp_nla_failed;
|
|
|
|
|
|
- if (nla_put_u32(vendor_event, QCA_WLAN_VENDOR_ATTR_NDP_DRV_RETURN_TYPE,
|
|
|
|
|
|
+ if (nla_put_u32(vendor_event,
|
|
|
|
+ QCA_WLAN_VENDOR_ATTR_NDP_DRV_RESPONSE_STATUS_TYPE,
|
|
rsp->status))
|
|
rsp->status))
|
|
goto ndp_end_rsp_nla_failed;
|
|
goto ndp_end_rsp_nla_failed;
|
|
|
|
|