net: hns3: Remove redundant hclge_get_port_type()
This patch removes hclge_get_port_type which is redundant. Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5f373b1585
commit
ebfefb8aa7
@ -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,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 = {
|
|||||||
.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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user