net: hns3: Add configure for mac minimal frame size
When change the mtu, the minimal frame size of mac will be set to zero, it is incorrect. This patch fixes it by set it to the default value. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ead5bd4d35
commit
8fc7346c84
|
@ -571,7 +571,8 @@ struct hclge_config_auto_neg_cmd {
|
|||
|
||||
struct hclge_config_max_frm_size_cmd {
|
||||
__le16 max_frm_size;
|
||||
u8 rsv[22];
|
||||
u8 min_frm_size;
|
||||
u8 rsv[21];
|
||||
};
|
||||
|
||||
enum hclge_mac_vlan_tbl_opcode {
|
||||
|
|
|
@ -4987,6 +4987,7 @@ static int hclge_set_mac_mtu(struct hclge_dev *hdev, int new_mtu)
|
|||
|
||||
req = (struct hclge_config_max_frm_size_cmd *)desc.data;
|
||||
req->max_frm_size = cpu_to_le16(max_frm_size);
|
||||
req->min_frm_size = HCLGE_MAC_MIN_FRAME;
|
||||
|
||||
ret = hclge_cmd_send(&hdev->hw, &desc, 1);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in New Issue