From: Fugang Duan <b38611@freescale.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <b38611@freescale.com>,
<ezequiel.garcia@free-electrons.com>, <b20596@freescale.com>,
<David.Laight@ACULAB.COM>, <eric.dumazet@gmail.com>
Subject: [PATCH v4 3/6] net: fec: Factorize feature setting
Date: Tue, 10 Jun 2014 17:32:21 +0800 [thread overview]
Message-ID: <1402392744-24368-4-git-send-email-b38611@freescale.com> (raw)
In-Reply-To: <1402392744-24368-1-git-send-email-b38611@freescale.com>
In order to enhance the code readable, let's factorize the
feature list.
Signed-off-by: Fugang Duan <B38611@freescale.com>
---
drivers/net/ethernet/freescale/fec_main.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 55b55d2..f943cd1 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2087,21 +2087,19 @@ static int fec_enet_init(struct net_device *ndev)
writel(FEC_RX_DISABLED_IMASK, fep->hwp + FEC_IMASK);
netif_napi_add(ndev, &fep->napi, fec_enet_rx_napi, NAPI_POLL_WEIGHT);
- if (id_entry->driver_data & FEC_QUIRK_HAS_VLAN) {
+ if (id_entry->driver_data & FEC_QUIRK_HAS_VLAN)
/* enable hw VLAN support */
ndev->features |= NETIF_F_HW_VLAN_CTAG_RX;
- ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX;
- }
if (id_entry->driver_data & FEC_QUIRK_HAS_CSUM) {
/* enable hw accelerator */
ndev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM
| NETIF_F_RXCSUM);
- ndev->hw_features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM
- | NETIF_F_RXCSUM);
fep->csum_flags |= FLAG_RX_CSUM_ENABLED;
}
+ ndev->hw_features = ndev->features;
+
fec_restart(ndev, 0);
return 0;
--
1.7.8
next prev parent reply other threads:[~2014-06-10 10:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 9:32 [PATCH v4 0/6] net: fec: Enable Software TSO to improve the tx performance Fugang Duan
2014-06-10 9:32 ` [PATCH v4 1/6] net: fec: Factorize the .xmit transmit function Fugang Duan
2014-06-10 9:32 ` [PATCH v4 2/6] net: fec: Enable IP header hardware checksum Fugang Duan
2014-06-10 9:32 ` Fugang Duan [this message]
2014-06-10 9:32 ` [PATCH v4 4/6] net: fec: Increase buffer descriptor entry number Fugang Duan
2014-06-10 9:32 ` [PATCH v4 5/6] net: fec: Add Scatter/gather support Fugang Duan
2014-06-10 11:10 ` David Laight
2014-06-10 11:52 ` fugang.duan
2014-06-10 12:02 ` David Laight
2014-06-11 2:36 ` fugang.duan
2014-06-10 9:32 ` [PATCH v4 6/6] net: fec: Add software TSO support Fugang Duan
2014-06-11 22:21 ` [PATCH v4 0/6] net: fec: Enable Software TSO to improve the tx performance David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402392744-24368-4-git-send-email-b38611@freescale.com \
--to=b38611@freescale.com \
--cc=David.Laight@ACULAB.COM \
--cc=b20596@freescale.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).