提交 9fa0a8e1 编写于 作者: H Heiner Kallweit 提交者: David S. Miller

r8169: remove member coalesce_info from struct rtl_cfg_info

To prepare removal of struct rtl_cfg_info, set the coalesce
config based on the chip version number.
Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6c19156e
...@@ -6461,18 +6461,14 @@ static const struct net_device_ops rtl_netdev_ops = { ...@@ -6461,18 +6461,14 @@ static const struct net_device_ops rtl_netdev_ops = {
static const struct rtl_cfg_info { static const struct rtl_cfg_info {
unsigned int has_gmii:1; unsigned int has_gmii:1;
const struct rtl_coalesce_info *coalesce_info;
} rtl_cfg_infos [] = { } rtl_cfg_infos [] = {
[RTL_CFG_0] = { [RTL_CFG_0] = {
.has_gmii = 1, .has_gmii = 1,
.coalesce_info = rtl_coalesce_info_8169,
}, },
[RTL_CFG_1] = { [RTL_CFG_1] = {
.has_gmii = 1, .has_gmii = 1,
.coalesce_info = rtl_coalesce_info_8168_8136,
}, },
[RTL_CFG_2] = { [RTL_CFG_2] = {
.coalesce_info = rtl_coalesce_info_8168_8136,
} }
}; };
...@@ -6850,7 +6846,11 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -6850,7 +6846,11 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->max_mtu = jumbo_max; dev->max_mtu = jumbo_max;
rtl_set_irq_mask(tp); rtl_set_irq_mask(tp);
tp->coalesce_info = cfg->coalesce_info;
if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
tp->coalesce_info = rtl_coalesce_info_8169;
else
tp->coalesce_info = rtl_coalesce_info_8168_8136;
tp->fw_name = rtl_chip_infos[chipset].fw_name; tp->fw_name = rtl_chip_infos[chipset].fw_name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册