Driver reports current flow control mode based on internal flow control
settings. Currently this logic works incorrectly.
Fixes:
921eb6b8ce31 ("net/atlantic: fix flow control by sync settings on Rx")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
if (fc == AQ_NIC_FC_OFF)
fc_conf->mode = RTE_FC_NONE;
- else if (fc & (AQ_NIC_FC_RX | AQ_NIC_FC_TX))
+ else if ((fc & AQ_NIC_FC_RX) && (fc & AQ_NIC_FC_TX))
fc_conf->mode = RTE_FC_FULL;
else if (fc & AQ_NIC_FC_RX)
fc_conf->mode = RTE_FC_RX_PAUSE;
- else if (fc & AQ_NIC_FC_RX)
+ else if (fc & AQ_NIC_FC_TX)
fc_conf->mode = RTE_FC_TX_PAUSE;
return 0;