From: Mark Lord <kernel@teksavvy•com>
To: Ben Hutchings <bhutchings@solarflare•com>
Cc: David Miller <davem@davemloft•net>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH] drivers/net/usb/asix: resync from vendor's copy
Date: Wed, 07 Dec 2011 11:59:11 -0500 [thread overview]
Message-ID: <4EDF9B5F.6050500@teksavvy.com> (raw)
In-Reply-To: <1323275233.2728.3.camel@bwh-desktop>
On 11-12-07 11:27 AM, Ben Hutchings wrote:
> On Wed, 2011-12-07 at 11:21 -0500, Mark Lord wrote:
..
>> Heh.. my thinking side says to use the exact same protocol-specific flags
>> in both "hw_features" and "features", and therefore check for those flags
>> inside the "set_features()" function.
>
> Right.
Thanks.
Now now we have:
static int ax88772b_set_features(struct net_device *netdev, u32 features)
{
struct usbnet *dev = netdev_priv(netdev);
u16 tx_csum = 0, rx_csum = 0;
if (features & NETIF_F_IP_CSUM)
tx_csum |= AX_TXCOE_TCP | AX_TXCOE_UDP;
if (features & NETIF_F_IPV6_CSUM)
tx_csum |= AX_TXCOE_TCPV6 | AX_TXCOE_UDPV6;
if (features & NETIF_F_RXCSUM)
rx_csum = AX_RXCOE_DEF_CSUM;
ax8817x_write_cmd(dev, AX_CMD_WRITE_TXCOE_CTL, tx_csum, 0, 0, NULL);
ax8817x_write_cmd(dev, AX_CMD_WRITE_RXCOE_CTL, rx_csum, 0, 0, NULL);
return 0;
}
static int ax88772b_bind(struct usbnet *dev, struct usb_interface *intf)
{
...
/* enable hardware checksums */
dev->net->hw_features |=
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM;
dev->net->features |=
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM;
ax88772b_set_features(dev->net, dev->net->features);
...
}
next prev parent reply other threads:[~2011-12-07 16:59 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 23:36 asix usb network driver: nfg Mark Lord
2011-10-26 23:40 ` David Miller
2011-10-27 1:23 ` Mark Lord
2011-10-27 2:17 ` David Miller
2011-10-27 18:48 ` Mark Lord
2011-11-02 19:36 ` [PATCH] drivers/net/usb/asix: resync from vendor's copy Mark Lord
2011-11-02 19:48 ` Mark Lord
2011-11-02 20:42 ` Ben Hutchings
2011-11-02 22:44 ` Mark Lord
2011-11-09 16:25 ` Mark Lord
2011-11-09 16:34 ` Ben Hutchings
2011-11-09 16:47 ` Mark Lord
2011-11-09 16:57 ` Mark Lord
2011-11-09 17:20 ` Mark Lord
2011-11-09 17:31 ` Ben Hutchings
2011-11-09 17:40 ` Mark Lord
2011-11-09 17:48 ` Ben Hutchings
2011-11-09 18:22 ` Mark Lord
2011-12-05 14:41 ` Mark Lord
2011-12-05 15:18 ` Ben Hutchings
2011-12-06 12:44 ` Mark Lord
2011-12-06 17:45 ` Ben Hutchings
2011-12-07 16:21 ` Mark Lord
2011-12-07 16:27 ` Ben Hutchings
2011-12-07 16:59 ` Mark Lord [this message]
2011-12-07 17:03 ` Ben Hutchings
2011-11-07 16:09 ` Michal Marek
2011-11-09 17:31 ` [PATCH v2] " Mark Lord
2011-11-09 17:41 ` Mark Lord
2011-11-09 17:43 ` Mark Lord
2011-11-09 17:47 ` Ben Hutchings
2011-11-09 18:27 ` Mark Lord
2011-11-09 17:49 ` [PATCH v3] " Mark Lord
2011-11-10 14:01 ` [PATCH v2] " Mark Lord
2011-11-10 16:54 ` Grant Grundler
2011-11-10 20:17 ` Mark Lord
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=4EDF9B5F.6050500@teksavvy.com \
--to=kernel@teksavvy$(echo .)com \
--cc=bhutchings@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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