gianfar: Revive VLAN support
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Mon, 26 Jan 2009 22:33:23 +0000 (14:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Jan 2009 22:33:23 +0000 (14:33 -0800)
commitcd1f55a5b49b74e13ed9e7bc74d005803aaa0da8
tree583d167d95098d3a282290259e732184a4d5aa92
parent116cb42855fbd052fc8cd2ca3e06050bff762673
gianfar: Revive VLAN support

commit 77ecaf2d5a8bfd548eed3f05c1c2e6573d5de4ba ("gianfar: Fix VLAN
HW feature related frame/buffer size calculation") wrongly removed
priv->vlgrp assignment, and now priv->vlgrp is always NULL.

This patch fixes the issue, plus fixes following sparse warning
introduced by the same commit:
gianfar.c:1406:13: warning: context imbalance in 'gfar_vlan_rx_register' - wrong count at exit

gfar_vlan_rx_register() checks for "if (old_grp == grp)" and tries
to return w/o dropping the lock.

According to net/8021q/vlan.c VLAN core issues rx_register() callback:
1. In register_vlan_dev() only on a newly created group;
2. In unregister_vlan_dev() only if the group becomes empty.

Thus the check in the gianfar driver isn't needed.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c