Merge "qcacld-3.0: Replace typedef tSirLedFlashingReq" into wlan-cld3.driver.lnx.2.0-dev

This commit is contained in:
CNSS_WLAN Service 2017-10-12 20:01:56 -07:00 • committed by Gerrit - the friendly Code Review server
commit 15132a90b2
5 changed files with 13 additions and 29 deletions

View file

@ -5861,15 +5861,6 @@ typedef struct {
uint32_t dhcpSrvIP;
} tSirDhcpSrvOffloadInfo, *tpSirDhcpSrvOffloadInfo;
#endif /* DHCP_SERVER_OFFLOAD */
#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
typedef struct {
uint32_t reqId;
/* pattern identifier. 0: disconnected 1: connected */
uint32_t pattern_id;
uint32_t led_x0; /* led flashing parameter0 */
uint32_t led_x1; /* led flashing parameter1 */
} tSirLedFlashingReq, *tpSirLedFlashingReq;
#endif
/**
* struct sir_lost_link_info - lost link information structure.

View file

@ -12936,11 +12936,10 @@ QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id,
QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
uint32_t x0, uint32_t x1)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
QDF_STATUS status;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
struct scheduler_msg message = {0};
tSirLedFlashingReq *ledflashing;
struct flashing_req_params *ledflashing;
ledflashing = qdf_mem_malloc(sizeof(*ledflashing));
if (!ledflashing) {
@ -12949,6 +12948,7 @@ QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
return QDF_STATUS_E_NOMEM;
}
ledflashing->req_id = 0;
ledflashing->pattern_id = type;
ledflashing->led_x0 = x0;
ledflashing->led_x1 = x1;
@ -12958,12 +12958,12 @@ QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
/* Serialize the req through MC thread */
message.bodyptr = ledflashing;
message.type = WMA_LED_FLASHING_REQ;
qdf_status = scheduler_post_msg(QDF_MODULE_ID_WMA,
&message);
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
status = QDF_STATUS_E_FAILURE;
status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
sme_release_global_lock(&pMac->sme);
}
if (!QDF_IS_STATUS_SUCCESS(status))
qdf_mem_free(ledflashing);
return status;
}
#endif

View file

@ -1128,7 +1128,7 @@ int wma_process_dhcpserver_offload(tp_wma_handle wma_handle,
#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
tSirLedFlashingReq *flashing);
struct flashing_req_params *flashing);
#endif

View file

@ -3811,9 +3811,9 @@ QDF_STATUS wma_process_dhcpserver_offload(tp_wma_handle wma_handle,
* Return: QDF status
*/
QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
tSirLedFlashingReq *flashing)
struct flashing_req_params *flashing)
{
struct flashing_req_params cmd = {0};
QDF_STATUS status;
if (!wma_handle || !wma_handle->wmi_handle) {
WMA_LOGE(FL("WMA is closed, can not issue cmd"));
@ -3823,15 +3823,9 @@ QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
WMA_LOGE(FL("invalid parameter: flashing"));
return QDF_STATUS_E_INVAL;
}
cmd.req_id = flashing->reqId;
cmd.pattern_id = flashing->pattern_id;
cmd.led_x0 = flashing->led_x0;
cmd.led_x1 = flashing->led_x1;
status = wmi_unified_set_led_flashing_cmd(wma_handle->wmi_handle,
&cmd);
if (status != EOK)
return QDF_STATUS_E_FAILURE;
return QDF_STATUS_SUCCESS;
flashing);
return status;
}
#endif /* WLAN_FEATURE_GPIO_LED_FLASHING */

View file

@ -7568,8 +7568,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
#endif /* DHCP_SERVER_OFFLOAD */
#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
case WMA_LED_FLASHING_REQ:
wma_set_led_flashing(wma_handle,
(tSirLedFlashingReq *) msg->bodyptr);
wma_set_led_flashing(wma_handle, msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
#endif /* WLAN_FEATURE_GPIO_LED_FLASHING */