提交 639d84d0 编写于 作者: H Huazhong Tan 提交者: David S. Miller

net: hns3: modify an incorrect type in struct hclge_cfg_gro_status_cmd

Modify field .gro_en in struct hclge_cfg_gro_status_cmd to u8
according to the UM, otherwise, it will overwrite the reserved
byte which may be used for other purpose.
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5caa039f
...@@ -884,8 +884,8 @@ struct hclge_cfg_tso_status_cmd { ...@@ -884,8 +884,8 @@ struct hclge_cfg_tso_status_cmd {
#define HCLGE_GRO_EN_B 0 #define HCLGE_GRO_EN_B 0
struct hclge_cfg_gro_status_cmd { struct hclge_cfg_gro_status_cmd {
__le16 gro_en; u8 gro_en;
u8 rsv[22]; u8 rsv[23];
}; };
#define HCLGE_TSO_MSS_MIN 256 #define HCLGE_TSO_MSS_MIN 256
......
...@@ -1456,7 +1456,7 @@ static int hclge_config_gro(struct hclge_dev *hdev, bool en) ...@@ -1456,7 +1456,7 @@ static int hclge_config_gro(struct hclge_dev *hdev, bool en)
hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_GRO_GENERIC_CONFIG, false); hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_GRO_GENERIC_CONFIG, false);
req = (struct hclge_cfg_gro_status_cmd *)desc.data; req = (struct hclge_cfg_gro_status_cmd *)desc.data;
req->gro_en = cpu_to_le16(en ? 1 : 0); req->gro_en = en ? 1 : 0;
ret = hclge_cmd_send(&hdev->hw, &desc, 1); ret = hclge_cmd_send(&hdev->hw, &desc, 1);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册