提交 425481d9 编写于 作者: L liaoguojia 提交者: Xie XiuQi

net: hns3: optimized the mac addr in management table.

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Now we using two parameters, mac_addr_hi32 and mac_addr_lo16, to store
the MAC address for management table. But using array of mac_addr[ETH_ALEN]
would be more General and need'nt to care about the Big-endian mode in cpu.

Feature or Bugfix:Bugfix
Signed-off-by: Nliaoguojia <liaoguojia@huawei.com>
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 84e5a7c5
...@@ -724,8 +724,7 @@ struct hclge_mac_mgr_tbl_entry_cmd { ...@@ -724,8 +724,7 @@ struct hclge_mac_mgr_tbl_entry_cmd {
u8 flags; u8 flags;
u8 resp_code; u8 resp_code;
__le16 vlan_tag; __le16 vlan_tag;
__le32 mac_addr_hi32; u8 mac_addr[ETH_ALEN];
__le16 mac_addr_lo16;
__le16 rsv1; __le16 rsv1;
__le16 ethter_type; __le16 ethter_type;
__le16 egress_port; __le16 egress_port;
......
...@@ -326,8 +326,7 @@ static const struct hclge_mac_mgr_tbl_entry_cmd hclge_mgr_table[] = { ...@@ -326,8 +326,7 @@ static const struct hclge_mac_mgr_tbl_entry_cmd hclge_mgr_table[] = {
{ {
.flags = HCLGE_MAC_MGR_MASK_VLAN_B, .flags = HCLGE_MAC_MGR_MASK_VLAN_B,
.ethter_type = cpu_to_le16(HCLGE_MAC_ETHERTYPE_LLDP), .ethter_type = cpu_to_le16(HCLGE_MAC_ETHERTYPE_LLDP),
.mac_addr_hi32 = cpu_to_le32(ntohl(0x0180C200)), .mac_addr = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e},
.mac_addr_lo16 = cpu_to_le16(ntohs(0x000E)),
.i_port_bitmap = 0x1, .i_port_bitmap = 0x1,
}, },
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册