From: Mugunthan V N <mugunthanvnm@ti.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [net-next PATCH 1/1] drivers: net: cpsw: enable promiscuous mode support
Date: Wed, 22 Jan 2014 23:27:06 +0530 [thread overview]
Message-ID: <52E00672.6070004@ti.com> (raw)
In-Reply-To: <20140121.181137.840971123475894969.davem@davemloft.net>
On Wednesday 22 January 2014 07:41 AM, David Miller wrote:
> From: Mugunthan V N <mugunthanvnm@ti.com>
> Date: Mon, 20 Jan 2014 17:38:38 +0530
>
>> + if (!enable && ((priv->slaves[0].ndev->flags & IFF_PROMISC) ||
>> + (priv->slaves[1].ndev->flags & IFF_PROMISC))) {
> This assumption that there are exactly 2 slaves is not valid.
>
> Use the appropriate for_each_slave() et al. abstractions to access
> the slaves.
for_each_slave cannot be used here as in dual EMAC, callback will be
called only once for that particular slave. So I will use a for loop
with the slave count so that it can be utilized for any no of slaves.
Regards
Mugunthan V N
WARNING: multiple messages have this Message-ID (diff)
From: Mugunthan V N <mugunthanvnm@ti.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-omap@vger.kernel.org>
Subject: Re: [net-next PATCH 1/1] drivers: net: cpsw: enable promiscuous mode support
Date: Wed, 22 Jan 2014 23:27:06 +0530 [thread overview]
Message-ID: <52E00672.6070004@ti.com> (raw)
In-Reply-To: <20140121.181137.840971123475894969.davem@davemloft.net>
On Wednesday 22 January 2014 07:41 AM, David Miller wrote:
> From: Mugunthan V N <mugunthanvnm@ti.com>
> Date: Mon, 20 Jan 2014 17:38:38 +0530
>
>> + if (!enable && ((priv->slaves[0].ndev->flags & IFF_PROMISC) ||
>> + (priv->slaves[1].ndev->flags & IFF_PROMISC))) {
> This assumption that there are exactly 2 slaves is not valid.
>
> Use the appropriate for_each_slave() et al. abstractions to access
> the slaves.
for_each_slave cannot be used here as in dual EMAC, callback will be
called only once for that particular slave. So I will use a for loop
with the slave count so that it can be utilized for any no of slaves.
Regards
Mugunthan V N
next prev parent reply other threads:[~2014-01-22 17:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 12:08 [net-next PATCH 1/1] drivers: net: cpsw: enable promiscuous mode support Mugunthan V N
2014-01-20 12:08 ` Mugunthan V N
2014-01-22 2:11 ` David Miller
2014-01-22 17:23 ` Mugunthan V N
2014-01-22 17:23 ` Mugunthan V N
2014-01-22 17:57 ` Mugunthan V N [this message]
2014-01-22 17:57 ` Mugunthan V N
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=52E00672.6070004@ti.com \
--to=mugunthanvnm@ti.com \
--cc=davem@davemloft.net \
--cc=linux-omap@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.