qcacmn: Add callback context for wake up / suspend ack callback's

Currently, Host initial wake up, suspend ack callback do not
register callback context with host-to-target communication layer.
As now PMO is handling now these callback, objmgr psoc is required
as callback context.

Hence as part of the fix, Add supports for callback context for
these API's.

Change-Id: I83d513764792b800a8540cdbe847aad552df0ab1
CRs-Fixed: 2015229
This commit is contained in:
Mukul Sharma
2017-03-06 14:28:56 +05:30
committed by qcabuildsw
parent 698612c58b
commit 514201712a
2 changed files with 10 additions and 6 deletions

View File

@@ -57,7 +57,8 @@ typedef struct _HTC_INIT_INFO {
void *pContext; /* context for target notifications */
void (*TargetFailure)(void *Instance, QDF_STATUS Status);
void (*TargetSendSuspendComplete)(void *ctx, bool is_nack);
void (*target_initial_wakeup_cb)(void);
void (*target_initial_wakeup_cb)(void *cb_ctx);
void *target_psoc;
} HTC_INIT_INFO;
/* Struct for HTC layer packet stats*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -275,6 +275,7 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
uint16_t payloadLen;
uint32_t trailerlen = 0;
uint8_t htc_ep_id;
HTC_INIT_INFO *info;
#ifdef RX_SG_SUPPORT
LOCK_HTC_RX(target);
@@ -450,8 +451,10 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
HTC_PACKET_QUEUE_DEPTH(
&pEndpoint->TxQueue));
UNLOCK_HTC_CREDIT(target);
if (target->HTCInitInfo.target_initial_wakeup_cb)
target->HTCInitInfo.target_initial_wakeup_cb();
info = &target->HTCInitInfo;
if (info && info->target_initial_wakeup_cb)
info->target_initial_wakeup_cb(
info->target_psoc);
else
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,
("No initial wake up cb"));
@@ -466,7 +469,7 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
&pEndpoint->TxQueue));
UNLOCK_HTC_CREDIT(target);
target->HTCInitInfo.TargetSendSuspendComplete(
target->HTCInitInfo.pContext,
target->HTCInitInfo.target_psoc,
wow_nack);
break;
@@ -480,7 +483,7 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
UNLOCK_HTC_CREDIT(target);
target->HTCInitInfo.TargetSendSuspendComplete(
target->HTCInitInfo.pContext,
target->HTCInitInfo.target_psoc,
wow_nack);
break;
}