[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTiknCV1HknVpEdK97yU8eJwaJ5Y5Ag@mail.gmail.com>
Date: Wed, 29 Jun 2011 13:37:09 +0200
From: Michał Mirosław <mirqus@...il.com>
To: greearb@...delatech.com
Cc: netdev@...r.kernel.org
Subject: Re: [RFC v2 2/2] e100: Support RXFCS feature flag.
2011/6/24 <greearb@...delatech.com>:
> From: Ben Greear <greearb@...delatech.com>
>
> This allows e100 to be configured to append the
> Ethernet FCS to the skb.
>
> Useful for sniffing networks.
>
> Signed-off-by: Ben Greear <greearb@...delatech.com>
> ---
> :100644 100644 c1352c6... 761f6f5... M drivers/net/e100.c
> drivers/net/e100.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> index c1352c6..761f6f5 100644
> --- a/drivers/net/e100.c
> +++ b/drivers/net/e100.c
> @@ -1089,6 +1089,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
> {
> struct config *config = &cb->u.config;
> u8 *c = (u8 *)config;
> + struct net_device *netdev = nic->netdev;
>
> cb->command = cpu_to_le16(cb_config);
>
> @@ -1132,6 +1133,9 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
> config->promiscuous_mode = 0x1; /* 1=on, 0=off */
> }
>
> + if (netdev->wanted_features & NETIF_F_RXFCS)
> + config->rx_crc_transfer = 0x1; /* 1=save, 0=discard */
> +
You should check netdev->features here.
> if (nic->flags & multicast_all)
> config->multicast_all = 0x1; /* 1=accept, 0=no */
>
> @@ -1919,6 +1923,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
> struct sk_buff *skb = rx->skb;
> struct rfd *rfd = (struct rfd *)skb->data;
> u16 rfd_status, actual_size;
> + u16 fcs_pad = 0;
>
> if (unlikely(work_done && *work_done >= work_to_do))
> return -EAGAIN;
> @@ -1951,9 +1956,11 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
> }
>
> /* Get actual data size */
> + if (dev->wanted_features & NETIF_F_RXFCS)
> + fcs_pad = 4;
Same here.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists