diff --git a/dp/wifi3.0/dp_tx_desc.h b/dp/wifi3.0/dp_tx_desc.h index ced9d08bfb..39ddfd9727 100644 --- a/dp/wifi3.0/dp_tx_desc.h +++ b/dp/wifi3.0/dp_tx_desc.h @@ -37,6 +37,21 @@ #define DP_TX_DESC_ID_OFFSET_MASK 0x00001F #define DP_TX_DESC_ID_OFFSET_OS 0 +/** + * Compilation assert on tx desc size + * + * if assert is hit please update POOL_MASK, + * PAGE_MASK according to updated size + * + * for current PAGE mask allowed size range of tx_desc + * is between 128 and 256 + */ +QDF_COMPILE_TIME_ASSERT(dp_tx_desc_size, + ((sizeof(struct dp_tx_desc_s)) <= + (PAGE_SIZE >> DP_TX_DESC_ID_PAGE_OS)) && + ((sizeof(struct dp_tx_desc_s)) > + (PAGE_SIZE >> (DP_TX_DESC_ID_PAGE_OS + 1)))); + #ifdef QCA_LL_TX_FLOW_CONTROL_V2 #define TX_DESC_LOCK_CREATE(lock) #define TX_DESC_LOCK_DESTROY(lock) diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 6a3316053e..559daa484d 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -386,8 +386,8 @@ struct dp_tx_desc_s { qdf_nbuf_t nbuf; uint16_t length; uint16_t flags; - qdf_dma_addr_t dma_addr; uint32_t id; + qdf_dma_addr_t dma_addr; struct dp_vdev *vdev; struct dp_pdev *pdev; uint8_t tx_encap_type;