Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ca0f664 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman
Browse files

ath6kl: remove-typedef HTC_PACKET_QUEUE



remove-typedef -s HTC_PACKET_QUEUE \
	"struct htc_packet_queue" drivers/staging/ath6kl/

Tested-by: default avatarNaveen Singh <nsingh@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c6528e2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ struct ar6k_device {
    struct hif_device_mbox_info        MailBoxInfo;
    HIF_PENDING_EVENTS_FUNC     GetPendingEventsFunc;
    void                        *HTCContext;
    HTC_PACKET_QUEUE            RegisterIOList;
    struct htc_packet_queue            RegisterIOList;
    struct ar6k_async_reg_io_buffer    RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS];
    void                        (*TargetFailureCallback)(void *Context);
    int                    (*MessagePendingCallback)(void *Context,
+9 −9
Original line number Diff line number Diff line
@@ -63,9 +63,9 @@ struct gmbox_proto_hci_uart {
    u32 RecvStateFlags;
    u32 SendStateFlags;
    HCI_TRANSPORT_PACKET_TYPE   WaitBufferType;
    HTC_PACKET_QUEUE            SendQueue;         /* write queue holding HCI Command and ACL packets */
    HTC_PACKET_QUEUE            HCIACLRecvBuffers;  /* recv queue holding buffers for incomming ACL packets */
    HTC_PACKET_QUEUE            HCIEventBuffers;    /* recv queue holding buffers for incomming event packets */
    struct htc_packet_queue            SendQueue;         /* write queue holding HCI Command and ACL packets */
    struct htc_packet_queue            HCIACLRecvBuffers;  /* recv queue holding buffers for incomming ACL packets */
    struct htc_packet_queue            HCIEventBuffers;    /* recv queue holding buffers for incomming event packets */
    struct ar6k_device                 *pDev;
    A_MUTEX_T                   HCIRxLock;
    A_MUTEX_T                   HCITxLock;
@@ -366,7 +366,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
            LOCK_HCI_RX(pProt);
    
        } else {
            HTC_PACKET_QUEUE *pQueue;
            struct htc_packet_queue *pQueue;
                /* user is using a refill handler that can refill multiple HTC buffers */
            
                /* select buffer queue */
@@ -483,7 +483,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
        
            /* check if we need to refill recv buffers */        
        if ((pProt->HCIConfig.pHCIPktRecvRefill != NULL) && !recvRefillCalled) {           
            HTC_PACKET_QUEUE *pQueue;
            struct htc_packet_queue *pQueue;
            int              watermark;

            if (pktType == HCI_ACL_TYPE) {
@@ -514,7 +514,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
    
        /* see if we need to recycle the recv buffer */    
    if (status && (pPacket != NULL)) {
        HTC_PACKET_QUEUE queue;
        struct htc_packet_queue queue;
        
        if (A_EPROTO == status) {
            DebugDumpBytes(pPacket->pBuffer, totalRecvLength, "Bad HCI-UART Recv packet");    
@@ -797,7 +797,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPa
static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
{
    struct htc_packet          *pPacket;
    HTC_PACKET_QUEUE    discardQueue;
    struct htc_packet_queue    discardQueue;
    
    INIT_HTC_PACKET_QUEUE(&discardQueue);
    
@@ -820,7 +820,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)

static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt)
{
    HTC_PACKET_QUEUE discardQueue;
    struct htc_packet_queue discardQueue;
    struct htc_packet *pPacket;
    
    INIT_HTC_PACKET_QUEUE(&discardQueue);
@@ -1001,7 +1001,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
    AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportAttach \n"));
}

int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue)
int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue)
{
    struct gmbox_proto_hci_uart  *pProt = (struct gmbox_proto_hci_uart *)HciTrans; 
    int              status = 0;
+2 −2
Original line number Diff line number Diff line
@@ -43,14 +43,14 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc,
static void HTCReportFailure(void *Context);
static void ResetEndpointStates(HTC_TARGET *target);

void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList)
void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList)
{
    LOCK_HTC(target);
    HTC_PACKET_ENQUEUE(pList,pPacket);
    UNLOCK_HTC(target);
}

struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target,  HTC_PACKET_QUEUE *pList)
struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target,  struct htc_packet_queue *pList)
{
    struct htc_packet *pPacket;

+7 −7
Original line number Diff line number Diff line
@@ -69,15 +69,15 @@ struct htc_endpoint {
    HTC_ENDPOINT_ID             Id;
    HTC_SERVICE_ID              ServiceID;      /* service ID this endpoint is bound to
                                                   non-zero value means this endpoint is in use */
    HTC_PACKET_QUEUE            TxQueue;        /* HTC frame buffer TX queue */
    HTC_PACKET_QUEUE            RxBuffers;      /* HTC frame buffer RX list */
    struct htc_packet_queue            TxQueue;        /* HTC frame buffer TX queue */
    struct htc_packet_queue            RxBuffers;      /* HTC frame buffer RX list */
    struct htc_endpoint_credit_dist    CreditDist;     /* credit distribution structure (exposed to driver layer) */
    struct htc_ep_callbacks            EpCallBacks;    /* callbacks associated with this endpoint */
    int                         MaxTxQueueDepth;   /* max depth of the TX queue before we need to
                                                      call driver's full handler */
    int                         MaxMsgLength;        /* max length of endpoint message */
    int                         TxProcessCount;  /* reference count to continue tx processing */
    HTC_PACKET_QUEUE            RecvIndicationQueue;    /* recv packets ready to be indicated */
    struct htc_packet_queue            RecvIndicationQueue;    /* recv packets ready to be indicated */
    int                         RxProcessCount;         /* reference count to allow single processing context */
    struct  _HTC_TARGET         *target;                /* back pointer to target */
    u8 SeqNo;                  /* TX seq no (helpful) for debugging */
@@ -112,8 +112,8 @@ typedef struct _HTC_TARGET {
    struct htc_endpoint                EndPoint[ENDPOINT_MAX];
    struct htc_control_buffer          HTCControlBuffers[NUM_CONTROL_BUFFERS];
    struct htc_endpoint_credit_dist   *EpCreditDistributionListHead;
    HTC_PACKET_QUEUE            ControlBufferTXFreeList;
    HTC_PACKET_QUEUE            ControlBufferRXFreeList;
    struct htc_packet_queue            ControlBufferTXFreeList;
    struct htc_packet_queue            ControlBufferRXFreeList;
    HTC_CREDIT_DIST_CALLBACK    DistributeCredits;
    HTC_CREDIT_INIT_CALLBACK    InitCredits;
    void                       *pCredDistContext;
@@ -165,8 +165,8 @@ typedef struct _HTC_TARGET {
void        HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
void        HTCControlRecv(void *Context, struct htc_packet *pPacket);
int    HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket);
struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
void        HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList);
struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList);
void        HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList);
int    HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket);
void        HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket);
int    HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched);
+12 −12
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
#endif

static void DoRecvCompletion(struct htc_endpoint     *pEndpoint,
                             HTC_PACKET_QUEUE *pQueueToIndicate)
                             struct htc_packet_queue *pQueueToIndicate)
{           
    
    do {
@@ -434,7 +434,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
    /* unload the recv completion queue */
static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
{
    HTC_PACKET_QUEUE     recvCompletions;
    struct htc_packet_queue     recvCompletions;
    
    AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+DrainRecvIndicationQueue \n"));
                
@@ -690,7 +690,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
                                         u32 LookAheads[],
                                         int              Messages,                                        
                                         struct htc_endpoint     *pEndpoint, 
                                         HTC_PACKET_QUEUE *pQueue)
                                         struct htc_packet_queue *pQueue)
{
    int         status = 0;
    struct htc_packet      *pPacket;
@@ -889,7 +889,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
    HTC_TARGET          *target = (HTC_TARGET *)pScatterReq->Context;
    int            status;
    bool              partialBundle = false;
    HTC_PACKET_QUEUE    localRecvQueue;
    struct htc_packet_queue    localRecvQueue;
    bool              procError = false;
           
    AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCAsyncRecvScatterCompletion  TotLen: %d  Entries: %d\n",
@@ -985,8 +985,8 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
}

static int HTCIssueRecvPacketBundle(HTC_TARGET        *target,
                                         HTC_PACKET_QUEUE  *pRecvPktQueue, 
                                         HTC_PACKET_QUEUE  *pSyncCompletionQueue,
                                         struct htc_packet_queue  *pRecvPktQueue, 
                                         struct htc_packet_queue  *pSyncCompletionQueue,
                                         int               *pNumPacketsFetched,
                                         bool             PartialBundle)
{
@@ -1126,7 +1126,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
    bool          asyncProc = false;
    u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
    int             pktsFetched;
    HTC_PACKET_QUEUE recvPktQueue, syncCompletedPktsQueue;
    struct htc_packet_queue recvPktQueue, syncCompletedPktsQueue;
    bool          partialBundle;
    HTC_ENDPOINT_ID id;
    int             totalFetched = 0;
@@ -1283,7 +1283,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
             
             /* unload sync completion queue */      
        while (!HTC_QUEUE_EMPTY(&syncCompletedPktsQueue)) {
            HTC_PACKET_QUEUE    container;
            struct htc_packet_queue    container;
           
            pPacket = HTC_PACKET_DEQUEUE(&syncCompletedPktsQueue);
            A_ASSERT(pPacket != NULL);
@@ -1385,7 +1385,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
    return status;
}

int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
{
    HTC_TARGET      *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
    struct htc_endpoint    *pEndpoint;
@@ -1457,7 +1457,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
/* Makes a buffer available to the HTC module */
int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
{
    HTC_PACKET_QUEUE queue;
    struct htc_packet_queue queue;
    INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket); 
    return HTCAddReceivePktMultiple(HTCHandle, &queue);       
}
@@ -1486,10 +1486,10 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle)
    }
}

static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue)
static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue)
{
    struct htc_packet  *pPacket;
    HTC_PACKET_QUEUE container;
    struct htc_packet_queue container;
    
    LOCK_HTC_RX(target);

Loading