Subject: Re: [PATCH net-next 4/4] be2net: re-enable vlan filtering mode asap

From: Sergei Shtylyov <[email-masked]>
Date: Fri, 27 Jun 2014 17:14:40 +0400

Hello.

On 06/27/2014 03:43 PM, Sathya Perla wrote:

> From: Kalesh AP <[email-masked]>

> While adding vlans, when the HW limit of vlan filters is reached, the
> driver enables vlan promiscuous mode.
> Similarily, while removing vlans, the driver must re-enable HW filtering
> as soon as the number of vlan filters is within the HW limit.

> Signed-off-by: Kalesh AP <[email-masked]>
> Signed-off-by: Sathya Perla <[email-masked]>
> ---
>   drivers/net/ethernet/emulex/benet/be_main.c |    9 +++------
>   1 files changed, 3 insertions(+), 6 deletions(-)

> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index 5ac9d13..3cf490b 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -1176,15 +1176,12 @@ static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid)
>
>   	/* Packets with VID 0 are always received by Lancer by default */
>   	if (lancer_chip(adapter) && vid == 0)
> -		goto ret;
> +		return status;
>
>   	clear_bit(vid, adapter->vids);
> +	adapter->vlans_added--;
> +
>   	status = be_vid_config(adapter);
> -	if (!status)
> -		adapter->vlans_added--;
> -	else
> -		set_bit(vid, adapter->vids);
> -ret:
>   	return status;

    You now can merge the above lines into:

	return be_vid_config(adapter);

WBR, Sergei