]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: hns3: modify an incorrect type in struct hclgevf_cfg_gro_status_cmd
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 28 May 2020 13:48:13 +0000 (21:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 May 2020 23:39:03 +0000 (16:39 -0700)
Modify field .gro_en in struct hclgevf_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: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

index f830eef02e5c0902fc285ab41a89aa81670726cf..40d6e602ab51e2b5e893e7bade84c8d864767f0a 100644 (file)
@@ -161,8 +161,8 @@ struct hclgevf_query_res_cmd {
 
 #define HCLGEVF_GRO_EN_B               0
 struct hclgevf_cfg_gro_status_cmd {
-       __le16 gro_en;
-       u8 rsv[22];
+       u8 gro_en;
+       u8 rsv[23];
 };
 
 #define HCLGEVF_RSS_DEFAULT_OUTPORT_B  4
index 59fcb80671c88f95df982d52041176e07614015a..be5789bb5ddd39d39013f238e0d3eb213c77f745 100644 (file)
@@ -2403,7 +2403,7 @@ static int hclgevf_config_gro(struct hclgevf_dev *hdev, bool en)
                                     false);
        req = (struct hclgevf_cfg_gro_status_cmd *)desc.data;
 
-       req->gro_en = cpu_to_le16(en ? 1 : 0);
+       req->gro_en = en ? 1 : 0;
 
        ret = hclgevf_cmd_send(&hdev->hw, &desc, 1);
        if (ret)