bna: ENET and Tx Rx Redesign Enablement
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / brocade / bna / cna.h
index a679e038747b7dc9a60450c59202ebcd593e72c6..50fce15feaccc17338be418033b41f463a70d626 100644 (file)
@@ -40,7 +40,7 @@
 
 extern char bfa_version[];
 
-#define        CNA_FW_FILE_CT  "ctfw_cna.bin"
+#define        CNA_FW_FILE_CT  "ctfw.bin"
 #define FC_SYMNAME_MAX 256     /*!< max name server symbolic name size */
 
 #pragma pack(1)
@@ -77,4 +77,33 @@ typedef struct mac { u8 mac[MAC_ADDRLEN]; } mac_t;
        }                                                               \
 }
 
+/*
+ * bfa_q_deq_tail - dequeue an element from tail of the queue
+ */
+#define bfa_q_deq_tail(_q, _qe) {                                      \
+       if (!list_empty(_q)) {                                          \
+               *((struct list_head **) (_qe)) = bfa_q_prev(_q);        \
+               bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) =  \
+                                               (struct list_head *) (_q); \
+               bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe);\
+               bfa_q_qe_init(*((struct list_head **) _qe));            \
+       } else {                                                        \
+               *((struct list_head **) (_qe)) = (struct list_head *) NULL; \
+       }                                                               \
+}
+
+/*
+ * bfa_add_tail_head - enqueue an element at the head of queue
+ */
+#define bfa_q_enq_head(_q, _qe) {                                      \
+       if (!(bfa_q_next(_qe) == NULL) && (bfa_q_prev(_qe) == NULL))    \
+               pr_err("Assertion failure: %s:%d: %d",                  \
+                       __FILE__, __LINE__,                             \
+               (bfa_q_next(_qe) == NULL) && (bfa_q_prev(_qe) == NULL));\
+       bfa_q_next(_qe) = bfa_q_next(_q);                               \
+       bfa_q_prev(_qe) = (struct list_head *) (_q);                    \
+       bfa_q_prev(bfa_q_next(_q)) = (struct list_head *) (_qe);        \
+       bfa_q_next(_q) = (struct list_head *) (_qe);                    \
+}
+
 #endif /* __CNA_H__ */