qcacmn: Fix kernel module check patch warnings

Fix kernel module check patch warnings in Host Target Communication
module files

Change-Id: I151f597142d93a26e5e037cf7fce944f86fba72a
CRs-fixed: 2033001
This commit is contained in:
Manikandan Mohan
2017-04-13 20:19:26 -07:00
zatwierdzone przez snandini
rodzic e03493ddfb
commit e3e209e1fd
9 zmienionych plików z 1095 dodań i 1013 usunięć

Wyświetl plik

@@ -69,7 +69,8 @@ extern "C" {
#define HTC_PACKET_CONTAINER_ALLOCATION 32
#define NUM_CONTROL_TX_BUFFERS 2
#define HTC_CONTROL_BUFFER_SIZE (HTC_MAX_CONTROL_MESSAGE_LENGTH + HTC_HDR_LENGTH)
#define HTC_CONTROL_BUFFER_SIZE (HTC_MAX_CONTROL_MESSAGE_LENGTH + \
HTC_HDR_LENGTH)
#define HTC_CONTROL_BUFFER_ALIGN 32
#define HTC_TARGET_RESPONSE_POLL_MS 10
#if !defined(A_SIMOS_DEVHOST)
@@ -84,16 +85,16 @@ extern "C" {
#define HTC_IS_EPPING_ENABLED(_x) ((_x) == QDF_GLOBAL_EPPING_MODE)
typedef enum {
enum htc_credit_exchange_type {
HTC_REQUEST_CREDIT,
HTC_PROCESS_CREDIT_REPORT,
HTC_SUSPEND_ACK,
HTC_SUSPEND_NACK,
HTC_INITIAL_WAKE_UP,
} htc_credit_exchange_type;
};
static inline const char*
htc_credit_exchange_type_str(htc_credit_exchange_type type)
htc_credit_exchange_type_str(enum htc_credit_exchange_type type)
{
switch (type) {
case HTC_REQUEST_CREDIT:
@@ -111,12 +112,12 @@ htc_credit_exchange_type_str(htc_credit_exchange_type type)
}
}
typedef struct {
htc_credit_exchange_type type;
struct HTC_CREDIT_HISTORY {
enum htc_credit_exchange_type type;
uint64_t time;
uint32_t tx_credit;
uint32_t htc_tx_queue_depth;
} HTC_CREDIT_HISTORY;
};
typedef struct _HTC_ENDPOINT {
HTC_ENDPOINT_ID Id;
@@ -126,32 +127,44 @@ typedef struct _HTC_ENDPOINT {
*/
HTC_SERVICE_ID service_id;
HTC_EP_CALLBACKS EpCallBacks; /* callbacks associated with this endpoint */
HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */
int MaxTxQueueDepth; /* max depth of the TX queue before we need to
call driver's full handler */
int MaxMsgLength; /* max length of endpoint message */
/* callbacks associated with this endpoint */
struct htc_ep_callbacks EpCallBacks;
/* HTC frame buffer TX queue */
HTC_PACKET_QUEUE TxQueue;
/* max depth of the TX queue before calling driver's full handler */
int MaxTxQueueDepth;
/* max length of endpoint message */
int MaxMsgLength;
uint8_t UL_PipeID;
uint8_t DL_PipeID;
int ul_is_polled; /* Need to call HIF to get tx completion callbacks? */
/* Need to call HIF to get tx completion callbacks? */
int ul_is_polled;
qdf_timer_t ul_poll_timer;
int ul_poll_timer_active;
int ul_outstanding_cnt;
int dl_is_polled; /* Need to call HIF to fetch rx? (Not currently supported.) */
#if 0 /* not currently supported */
qdf_timer_t dl_poll_timer;
#endif
/* Need to call HIF to fetch rx? (Not currently supported.) */
int dl_is_polled;
/* not currently supported */
/* qdf_timer_t dl_poll_timer; */
HTC_PACKET_QUEUE TxLookupQueue; /* lookup queue to match netbufs to htc packets */
HTC_PACKET_QUEUE RxBufferHoldQueue; /* temporary hold queue for back compatibility */
uint8_t SeqNo; /* TX seq no (helpful) for debugging */
qdf_atomic_t TxProcessCount; /* serialization */
/* lookup queue to match netbufs to htc packets */
HTC_PACKET_QUEUE TxLookupQueue;
/* temporary hold queue for back compatibility */
HTC_PACKET_QUEUE RxBufferHoldQueue;
/* TX seq no (helpful) for debugging */
uint8_t SeqNo;
/* serialization */
qdf_atomic_t TxProcessCount;
struct _HTC_TARGET *target;
int TxCredits; /* TX credits available on this endpoint */
int TxCreditSize; /* size in bytes of each credit (set by HTC) */
int TxCreditsPerMaxMsg; /* credits required per max message (precalculated) */
/* TX credits available on this endpoint */
int TxCredits;
/* size in bytes of each credit (set by HTC) */
int TxCreditSize;
/* credits required per max message (precalculated) */
int TxCreditsPerMaxMsg;
#ifdef HTC_EP_STAT_PROFILING
HTC_ENDPOINT_STATS endpoint_stats; /* endpoint statistics */
/* endpoint statistics */
struct htc_endpoint_stats endpoint_stats;
#endif
bool TxCreditFlowEnabled;
bool async_update; /* packets can be queued asynchronously */
@@ -163,16 +176,17 @@ typedef struct _HTC_ENDPOINT {
#define INC_HTC_EP_STAT(p, stat, count)
#endif
typedef struct {
struct htc_service_tx_credit_allocation {
uint16_t service_id;
uint8_t CreditAllocation;
} HTC_SERVICE_TX_CREDIT_ALLOCATION;
};
#define HTC_MAX_SERVICE_ALLOC_ENTRIES 8
/* Error codes for HTC layer packet stats*/
enum ol_ath_htc_pkt_ecodes {
GET_HTC_PKT_Q_FAIL = 0, /* error- get packet at head of HTC_PACKET_Q */
/* error- get packet at head of HTC_PACKET_Q */
GET_HTC_PKT_Q_FAIL = 0,
HTC_PKT_Q_EMPTY,
HTC_SEND_Q_EMPTY
};
@@ -186,15 +200,15 @@ typedef struct _HTC_TARGET {
qdf_spinlock_t HTCCreditLock;
uint32_t HTCStateFlags;
void *host_handle;
HTC_INIT_INFO HTCInitInfo;
HTC_PACKET *pHTCPacketStructPool; /* pool of HTC packets */
struct htc_init_info HTCInitInfo;
HTC_PACKET *pHTCPacketStructPool; /* pool of HTC packets */
HTC_PACKET_QUEUE ControlBufferTXFreeList;
uint8_t CtrlResponseBuffer[HTC_MAX_CONTROL_MESSAGE_LENGTH];
int CtrlResponseLength;
qdf_event_t ctrl_response_valid;
bool CtrlResponseProcessing;
int TotalTransmitCredits;
HTC_SERVICE_TX_CREDIT_ALLOCATION
struct htc_service_tx_credit_allocation
ServiceTxAllocTable[HTC_MAX_SERVICE_ALLOC_ENTRIES];
int TargetCreditSize;
#ifdef RX_SG_SUPPORT
@@ -252,21 +266,23 @@ typedef struct _HTC_TARGET {
#ifdef RX_SG_SUPPORT
#define RESET_RX_SG_CONFIG(_target) \
do { \
_target->ExpRxSgTotalLen = 0; \
_target->CurRxSgTotalLen = 0; \
_target->IsRxSgInprogress = false;
_target->IsRxSgInprogress = false; \
} while (0)
#endif
#define HTC_STATE_STOPPING (1 << 0)
#define HTC_STOPPING(t) ((t)->HTCStateFlags & HTC_STATE_STOPPING)
#define LOCK_HTC(t) qdf_spin_lock_bh(&(t)->HTCLock);
#define UNLOCK_HTC(t) qdf_spin_unlock_bh(&(t)->HTCLock);
#define LOCK_HTC_RX(t) qdf_spin_lock_bh(&(t)->HTCRxLock);
#define UNLOCK_HTC_RX(t) qdf_spin_unlock_bh(&(t)->HTCRxLock);
#define LOCK_HTC_TX(t) qdf_spin_lock_bh(&(t)->HTCTxLock);
#define UNLOCK_HTC_TX(t) qdf_spin_unlock_bh(&(t)->HTCTxLock);
#define LOCK_HTC_CREDIT(t) qdf_spin_lock_bh(&(t)->HTCCreditLock);
#define UNLOCK_HTC_CREDIT(t) qdf_spin_unlock_bh(&(t)->HTCCreditLock);
#define LOCK_HTC(t) qdf_spin_lock_bh(&(t)->HTCLock)
#define UNLOCK_HTC(t) qdf_spin_unlock_bh(&(t)->HTCLock)
#define LOCK_HTC_RX(t) qdf_spin_lock_bh(&(t)->HTCRxLock)
#define UNLOCK_HTC_RX(t) qdf_spin_unlock_bh(&(t)->HTCRxLock)
#define LOCK_HTC_TX(t) qdf_spin_lock_bh(&(t)->HTCTxLock)
#define UNLOCK_HTC_TX(t) qdf_spin_unlock_bh(&(t)->HTCTxLock)
#define LOCK_HTC_CREDIT(t) qdf_spin_lock_bh(&(t)->HTCCreditLock)
#define UNLOCK_HTC_CREDIT(t) qdf_spin_unlock_bh(&(t)->HTCCreditLock)
#define GET_HTC_TARGET_FROM_HANDLE(hnd) ((HTC_TARGET *)(hnd))
@@ -278,21 +294,19 @@ typedef struct _HTC_TARGET {
#define OL_ATH_HTC_PKT_ERROR_COUNT_INCR(_target, _ecode) \
do { \
if (_ecode == GET_HTC_PKT_Q_FAIL) \
(_target->htc_pkt_stats.htc_get_pkt_q_fail_count) += 1 \
; \
(_target->htc_pkt_stats.htc_get_pkt_q_fail_count) += 1; \
if (_ecode == HTC_PKT_Q_EMPTY) \
(_target->htc_pkt_stats.htc_pkt_q_empty_count) += 1 \
; \
(_target->htc_pkt_stats.htc_pkt_q_empty_count) += 1; \
if (_ecode == HTC_SEND_Q_EMPTY) \
(_target->htc_pkt_stats.htc_send_q_empty_count) += 1 \
; \
} while (0);
(_target->htc_pkt_stats.htc_send_q_empty_count) += 1; \
} while (0)
/* internal HTC functions */
QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
uint8_t pipeID);
QDF_STATUS htc_tx_completion_handler(void *Context, qdf_nbuf_t netbuf,
unsigned int transferID, uint32_t toeplitz_hash_result);
unsigned int transferID,
uint32_t toeplitz_hash_result);
HTC_PACKET *allocate_htc_bundle_packet(HTC_TARGET *target);
void free_htc_bundle_packet(HTC_TARGET *target, HTC_PACKET *pPacket);
@@ -318,7 +332,7 @@ void htc_send_complete_check_cleanup(void *context);
void htc_kick_queues(void *context);
#endif
void htc_credit_record(htc_credit_exchange_type type, uint32_t tx_credit,
void htc_credit_record(enum htc_credit_exchange_type type, uint32_t tx_credit,
uint32_t htc_tx_queue_depth);
static inline void htc_send_complete_poll_timer_stop(HTC_ENDPOINT *
@@ -336,9 +350,8 @@ static inline void htc_send_complete_poll_timer_start(HTC_ENDPOINT *
LOCK_HTC_TX(pEndpoint->target);
if (pEndpoint->ul_outstanding_cnt
&& !pEndpoint->ul_poll_timer_active) {
/*
qdf_timer_start(
&pEndpoint->ul_poll_timer, HTC_POLL_CLEANUP_PERIOD_MS);
/* qdf_timer_start(
* &pEndpoint->ul_poll_timer, HTC_POLL_CLEANUP_PERIOD_MS);
*/
pEndpoint->ul_poll_timer_active = 1;
}