Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fc7346c authored by Jian Shen's avatar Jian Shen Committed by David S. Miller
Browse files

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: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ead5bd4d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -571,7 +571,8 @@ struct hclge_config_auto_neg_cmd {


struct hclge_config_max_frm_size_cmd {
struct hclge_config_max_frm_size_cmd {
	__le16  max_frm_size;
	__le16  max_frm_size;
	u8      rsv[22];
	u8      min_frm_size;
	u8      rsv[21];
};
};


enum hclge_mac_vlan_tbl_opcode {
enum hclge_mac_vlan_tbl_opcode {
+1 −0
Original line number Original line Diff line number Diff line
@@ -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 = (struct hclge_config_max_frm_size_cmd *)desc.data;
	req->max_frm_size = cpu_to_le16(max_frm_size);
	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);
	ret = hclge_cmd_send(&hdev->hw, &desc, 1);
	if (ret) {
	if (ret) {