diff options
author | Kejian Yan <yankejian@huawei.com> | 2016-07-01 17:34:12 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-01 16:56:52 -0400 |
commit | 5d2525f7b8a7df810c3fbc548a91ba6e3cde578a (patch) | |
tree | 270e1b1a1ce2565cb700d2a7ad0030fb7f4a0696 /drivers/net/ethernet/hisilicon/hns/hnae.h | |
parent | 2e14b218f5f702520a99193fd7dea9888d734804 (diff) | |
download | op-kernel-dev-5d2525f7b8a7df810c3fbc548a91ba6e3cde578a.zip op-kernel-dev-5d2525f7b8a7df810c3fbc548a91ba6e3cde578a.tar.gz |
net: hns: add media-type property for hns
It is PORT_TP type if the service port is GE mode. It is wrong to
judge the port type by using if it is service port. Adding the media
type to know port type.
Reported-by: Jinchuan Tian <tianjinchuan1@huawei.com>
Signed-off-by: Kejian Yan <yankejian@huawei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hnae.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hnae.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h index 3869322..e093cbf 100644 --- a/drivers/net/ethernet/hisilicon/hns/hnae.h +++ b/drivers/net/ethernet/hisilicon/hns/hnae.h @@ -363,6 +363,14 @@ enum hnae_port_type { HNAE_PORT_DEBUG }; +/* mac media type */ +enum hnae_media_type { + HNAE_MEDIA_TYPE_UNKNOWN = 0, + HNAE_MEDIA_TYPE_FIBER, + HNAE_MEDIA_TYPE_COPPER, + HNAE_MEDIA_TYPE_BACKPLANE, +}; + /* This struct defines the operation on the handle. * * get_handle(): (mandatory) @@ -525,6 +533,7 @@ struct hnae_handle { u32 eport_id; u32 dport_id; /* v2 tx bd should fill the dport_id */ enum hnae_port_type port_type; + enum hnae_media_type media_type; struct list_head node; /* list to hnae_ae_dev->handle_list */ struct hnae_buf_ops *bops; /* operation for the buffer */ struct hnae_queue **qs; /* array base of all queues */ |