mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Rearrange fields in dp_tx_desc to avoid padding
Current dp_tx_desc structure size is 136 bytes, re-arranged the fields to fit in exactly 128 bytes to align with number of descriptor per page and page offset bit maps Also add a compilation assert on tx desc size Change-Id: Ifcb18a9da637cb71c0427b56ad4054d2206ddfbb
This commit is contained in:
parent
e7e012dc4d
commit
bd70ec6350
2 changed files with 16 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue