cxgb4: Fix work request size calculation for loopback test

Work request used for sending loopback packet needs to add
the firmware work request only once. So, fix by using
correct structure size.

Fixes: 7235ffae3d ("cxgb4: add loopback ethtool self-test")
Signed-off-by: Ganji Aravind <ganji.aravind@chelsio.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ganji Aravind 2020-08-18 21:10:57 +05:30 коммит произвёл David S. Miller
Родитель ab97a28908
Коммит 335956421c
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -2553,8 +2553,8 @@ int cxgb4_selftest_lb_pkt(struct net_device *netdev)
pkt_len = ETH_HLEN + sizeof(CXGB4_SELFTEST_LB_STR);
flits = DIV_ROUND_UP(pkt_len + sizeof(struct cpl_tx_pkt) +
sizeof(*wr), sizeof(__be64));
flits = DIV_ROUND_UP(pkt_len + sizeof(*cpl) + sizeof(*wr),
sizeof(__be64));
ndesc = flits_to_desc(flits);
lb = &pi->ethtool_lb;