Commit ebfefb8a authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: hns3: Remove redundant hclge_get_port_type()

This patch removes hclge_get_port_type which is redundant.
Signed-off-by: default avatarFuyun Liang <liangfuyun1@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 5f373b15
...@@ -411,7 +411,6 @@ struct hnae3_ae_ops { ...@@ -411,7 +411,6 @@ struct hnae3_ae_ops {
void (*get_link_mode)(struct hnae3_handle *handle, void (*get_link_mode)(struct hnae3_handle *handle,
unsigned long *supported, unsigned long *supported,
unsigned long *advertising); unsigned long *advertising);
void (*get_port_type)(struct hnae3_handle *handle, u8 *port_type);
}; };
struct hnae3_dcb_ops { struct hnae3_dcb_ops {
......
...@@ -5970,27 +5970,6 @@ static void hclge_get_link_mode(struct hnae3_handle *handle, ...@@ -5970,27 +5970,6 @@ static void hclge_get_link_mode(struct hnae3_handle *handle,
} }
} }
static void hclge_get_port_type(struct hnae3_handle *handle,
u8 *port_type)
{
struct hclge_vport *vport = hclge_get_vport(handle);
struct hclge_dev *hdev = vport->back;
u8 media_type = hdev->hw.mac.media_type;
switch (media_type) {
case HNAE3_MEDIA_TYPE_FIBER:
*port_type = PORT_FIBRE;
break;
case HNAE3_MEDIA_TYPE_COPPER:
*port_type = PORT_TP;
break;
case HNAE3_MEDIA_TYPE_UNKNOWN:
default:
*port_type = PORT_OTHER;
break;
}
}
static const struct hnae3_ae_ops hclge_ops = { static const struct hnae3_ae_ops hclge_ops = {
.init_ae_dev = hclge_init_ae_dev, .init_ae_dev = hclge_init_ae_dev,
.uninit_ae_dev = hclge_uninit_ae_dev, .uninit_ae_dev = hclge_uninit_ae_dev,
...@@ -6048,7 +6027,6 @@ static const struct hnae3_ae_ops hclge_ops = { ...@@ -6048,7 +6027,6 @@ static const struct hnae3_ae_ops hclge_ops = {
.get_regs = hclge_get_regs, .get_regs = hclge_get_regs,
.set_led_id = hclge_set_led_id, .set_led_id = hclge_set_led_id,
.get_link_mode = hclge_get_link_mode, .get_link_mode = hclge_get_link_mode,
.get_port_type = hclge_get_port_type,
}; };
static struct hnae3_ae_algo ae_algo = { static struct hnae3_ae_algo ae_algo = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment