net: hns3: fix for the wrong shift problem in hns3_set_txbd_baseinfo
authorFuyun Liang <liangfuyun1@huawei.com>
Sat, 24 Mar 2018 03:32:45 +0000 (11:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Mar 2018 16:12:26 +0000 (12:12 -0400)
Third parameter of hnae_set_field is shift, But a mask is given. This
patch fixes it by replacing HNS3_TXD_BDTYPE_M with HNS3_TXD_BDTYPE_S.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

index 40a3eb70629e14eaaa9d41b064a7c229c530ca0e..a31b4adf6e6ac86eaa96cde09d0549e67e4a6b15 100644 (file)
@@ -764,7 +764,7 @@ static void hns3_set_txbd_baseinfo(u16 *bdtp_fe_sc_vld_ra_ri, int frag_end)
 {
        /* Config bd buffer end */
        hnae_set_field(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_BDTYPE_M,
-                      HNS3_TXD_BDTYPE_M, 0);
+                      HNS3_TXD_BDTYPE_S, 0);
        hnae_set_bit(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_FE_B, !!frag_end);
        hnae_set_bit(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_VLD_B, 1);
        hnae_set_field(*bdtp_fe_sc_vld_ra_ri, HNS3_TXD_SC_M, HNS3_TXD_SC_S, 0);