net: hns: remove unused config_half_duplex()
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 23 Mar 2021 07:41:05 +0000 (15:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Mar 2021 19:07:21 +0000 (12:07 -0700)
Since config_half_duplex() in struct mac_driver is unused,
so remove it.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h
drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c

index 8907c08..f387a85 100644 (file)
@@ -171,14 +171,6 @@ static void hns_gmac_tx_loop_pkt_dis(void *mac_drv)
        dsaf_write_dev(drv, GMAC_TX_LOOP_PKT_PRI_REG, tx_loop_pkt_pri);
 }
 
-static void hns_gmac_set_duplex_type(void *mac_drv, u8 newval)
-{
-       struct mac_driver *drv = (struct mac_driver *)mac_drv;
-
-       dsaf_set_dev_bit(drv, GMAC_DUPLEX_TYPE_REG,
-                        GMAC_DUPLEX_TYPE_B, !!newval);
-}
-
 static void hns_gmac_get_duplex_type(void *mac_drv,
                                     enum hns_gmac_duplex_mdoe *duplex_mode)
 {
@@ -730,7 +722,6 @@ void *hns_gmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param)
        mac_drv->set_an_mode = hns_gmac_config_an_mode;
        mac_drv->config_loopback = hns_gmac_config_loopback;
        mac_drv->config_pad_and_crc = hns_gmac_config_pad_and_crc;
-       mac_drv->config_half_duplex = hns_gmac_set_duplex_type;
        mac_drv->get_info = hns_gmac_get_info;
        mac_drv->autoneg_stat = hns_gmac_autoneg_stat;
        mac_drv->get_pause_enable = hns_gmac_get_pausefrm_cfg;
index 9771ba8..8943ffa 100644 (file)
@@ -364,8 +364,6 @@ struct mac_driver {
        void (*config_max_frame_length)(void *mac_drv, u16 newval);
        /*config PAD and CRC enable */
        void (*config_pad_and_crc)(void *mac_drv, u8 newval);
-       /* config duplex mode*/
-       void (*config_half_duplex)(void *mac_drv, u8 newval);
        /*config tx pause time,if pause_time is zero,disable tx pause enable*/
        void (*set_tx_auto_pause_frames)(void *mac_drv, u16 pause_time);
        /* config rx mode for promiscuous*/
index 8efc966..1c9159a 100644 (file)
@@ -799,7 +799,6 @@ void *hns_xgmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param)
        mac_drv->set_an_mode = NULL;
        mac_drv->config_loopback = NULL;
        mac_drv->config_pad_and_crc = hns_xgmac_config_pad_and_crc;
-       mac_drv->config_half_duplex = NULL;
        mac_drv->mac_free = hns_xgmac_free;
        mac_drv->adjust_link = NULL;
        mac_drv->set_tx_auto_pause_frames = hns_xgmac_set_tx_auto_pause_frames;