net/i40e/base: add FC threshold parameter for set MAC

This patch adds the default value for Flow Control Refresh Threshold
to set_mac_config AdminQ command. Previously, calling this AdminQ
command would overwrite the default value with 0.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This commit is contained in:
Qi Zhang 2018-09-25 10:34:37 +08:00 committed by Ferruh Yigit
parent 131b086c5b
commit 1360f4862f

View File

@ -1876,6 +1876,10 @@ enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,
if (crc_en)
cmd->params |= I40E_AQ_SET_MAC_CONFIG_CRC_EN;
#define I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD 0x7FFF
cmd->fc_refresh_threshold =
CPU_TO_LE16(I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD);
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;