Subject: Re: [net-next PATCH 1/1] drivers: net: cpsw: enable promiscuous mode support

From: Mugunthan V N <[email-masked]>
Date: Wed, 22 Jan 2014 23:27:06 +0530

On Wednesday 22 January 2014 07:41 AM, David Miller wrote:
> From: Mugunthan V N <[email-masked]>
> 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