remove all trailing whitespaces in one run
[open-ath9k-htc-firmware.git] / target_firmware / magpie_fw_dev / target / htc / htc_internal.h
index b1dcaa91615b33c7be2c2cade80367c0e83aa650..e2951d5f6b75365e121bb44685c623b73208708e 100755 (executable)
@@ -1,14 +1,43 @@
 /*
- * @File: 
- * 
- * @Abstract: internal data and structure definitions for HTC
- * 
- * @Notes: 
- * 
- * 
- * Copyright (c) 2007 Atheros Communications Inc.
+ * Copyright (c) 2013 Qualcomm Atheros, Inc.
  * All rights reserved.
  *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the
+ *    distribution.
+ *
+ *  * Neither the name of Qualcomm Atheros nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ * @File:
+ *
+ * @Abstract: internal data and structure definitions for HTC
+ *
+ * @Notes:
  */
 
 #ifndef HTC_INTERNAL_H_
@@ -20,7 +49,7 @@
                                           (sizeof(HTC_RECORD_HDR)) * 2  ) +            \
                                           HTC_HDR_LENGTH,                              \
                                           sizeof(A_UINT32)))
-/* minimum allocation for a credit message */                                   
+/* minimum allocation for a credit message */
 #define MIN_CREDIT_BUFFER_ALLOC_SIZE     (MIN_BUF_SIZE_FOR_RPTS)
 
 /* max ctrl buffers size for a setup message */
 
 #define HTC_DEFAULT_MAX_EP_PENDING_CREDIT_REPORTS 3  /* an EP should not have more than this many outstanding reports */
 
-#define HTC_FLAGS_CRPT_EP_MASK      0x1F     /* if the message is a credit report this is the endpoint 
+#define HTC_FLAGS_CRPT_EP_MASK      0x1F     /* if the message is a credit report this is the endpoint
                                                 that issued it */
 
 #define HTC_FLAGS_CREDIT_RPT       (1 << 5)  /* the buffer was a credit report */
 #define HTC_FLAGS_BUF_HDR          (1 << 6)  /* the buffer was manipulated and a header added */
 #define HTC_FLAGS_RECV_END_MSG     (1 << 7)  /* this buffer is the last buffer for the recev
-                                                message (used for recv pause logic) */     
-                                                                                                                              
+                                                message (used for recv pause logic) */
+
 #define HTC_MAILBOX                 0        /* we use mailbox 0 for all communications */
 #define HTC_ANY_ENDPOINT_MASK       0xFFFFFFFF
 #define HTC_LOOKAHEAD_POST_VALID    0x55
 typedef struct _HTC_ENDPOINT {
        A_INT16       CreditsToReturn;       /* credits that are ready to be returned to the host */
        HTC_SERVICE   *pService;             /* service that is bound to this endpoint */
-#ifdef HTC_PAUSE_RESUME_REF_COUNTING 
+#ifdef HTC_PAUSE_RESUME_REF_COUNTING
        int           PauseRefCount;         /* reference count */
 #endif
        A_INT16       CreditReturnThreshhold;   /* threshold before credits are returned via NULL pkts,
-                                                  this reduces dribbling effect */    
-       A_INT16       CreditsConsumed;          /* number of credits consumed (outstanding) on the endpoint */  
-       A_UINT16      ConnectionFlags;          /* HTC connection flags */          
-       int           PendingCreditReports;     /* no. of pending credit reports issued by this endpoint */    
+                                                  this reduces dribbling effect */
+       A_INT16       CreditsConsumed;          /* number of credits consumed (outstanding) on the endpoint */
+       A_UINT16      ConnectionFlags;          /* HTC connection flags */
+       int           PendingCreditReports;     /* no. of pending credit reports issued by this endpoint */
        A_UINT8       DownLinkPipeID;           /* The pipe ID to be use for the direction: target -> host */
        A_UINT8       UpLinkPipeID;             /* The pipe ID to be use for the direction: host   -> target */
 } HTC_ENDPOINT;
@@ -84,7 +113,7 @@ typedef struct _HTC_CONTEXT {
        pool_handle_t   PoolHandle;
 
        // Left a door for extension the structure
-       void *pReserved;      
+       void *pReserved;
 } HTC_CONTEXT;
 
 #define HTC_STATE_SETUP_COMPLETE    (1 << 0)  /* HTC host-target setup is complete */