diff options
author | Iyappan Subramanian <isubramanian@apm.com> | 2016-12-01 16:41:37 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-03 15:46:50 -0500 |
commit | 2c839337520b22225dfccf6546814c18d9108b4d (patch) | |
tree | 92bcbc56b356f33dd903de203161376e123a8c66 /drivers/net/ethernet/apm/xgene/xgene_enet_cle.c | |
parent | 397c5ad153f0ea62023accb67b3d2b07e5039948 (diff) | |
download | linux-2c839337520b22225dfccf6546814c18d9108b4d.tar.gz linux-2c839337520b22225dfccf6546814c18d9108b4d.tar.bz2 linux-2c839337520b22225dfccf6546814c18d9108b4d.zip |
drivers: net: xgene: Add helper function
This is a prepartion patch and adds xgene_enet_get_fpsel() helper
function to get buffer pool number.
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/apm/xgene/xgene_enet_cle.c')
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_cle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c index 23d72af83d82..7aac0fbafd47 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c @@ -346,7 +346,7 @@ static int xgene_cle_set_rss_idt(struct xgene_enet_pdata *pdata) for (i = 0; i < XGENE_CLE_IDT_ENTRIES; i++) { idx = i % pdata->rxq_cnt; pool_id = pdata->rx_ring[idx]->buf_pool->id; - fpsel = xgene_enet_ring_bufnum(pool_id) - 0x20; + fpsel = xgene_enet_get_fpsel(pool_id); dstqid = xgene_enet_dst_ring_num(pdata->rx_ring[idx]); nfpsel = 0; idt_reg = 0; @@ -706,7 +706,7 @@ static int xgene_enet_cle_init(struct xgene_enet_pdata *pdata) def_qid = xgene_enet_dst_ring_num(pdata->rx_ring[0]); pool_id = pdata->rx_ring[0]->buf_pool->id; - def_fpsel = xgene_enet_ring_bufnum(pool_id) - 0x20; + def_fpsel = xgene_enet_get_fpsel(pool_id); memset(dbptr, 0, sizeof(struct xgene_cle_dbptr) * DB_MAX_PTRS); dbptr[DB_RES_ACCEPT].fpsel = def_fpsel; |