]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Respect the current setting of IFCAP_VLAN_HWTAGGING on
authoryar <yar@FreeBSD.org>
Wed, 26 Jan 2005 13:44:47 +0000 (13:44 +0000)
committeryar <yar@FreeBSD.org>
Wed, 26 Jan 2005 13:44:47 +0000 (13:44 +0000)
commit75baf17e629d24b3c8e9e77053d671e337eeeef5
tree671c7589938950cdf9de5fe63cda87d795990e72
parente63519573a6a790738ddad479f11dbfc1ffc9dcb
Respect the current setting of IFCAP_VLAN_HWTAGGING on
the interface when going to toggle VLAN support for
internal reasons.  If the IFCAP_VLAN_HWTAGGING bit is
cleared, we should rely on the (re)init routine to turn
VLAN support off and never touch the relevant hardware bits.

This applies to other capability bits, too.  The user
obviously has a reason for clearing a capability bit,
e.g., if his particular NIC is buggy and hangs if a
certain hardware capability is turned on even for a
fraction of a second.

The flag adapter->em_insert_vlan_header still is set or
reset irrespective of the IFCAP_VLAN_HWTAGGING setting,
as before, in order to handle the case when a user sets
promiscuous mode on an interface first and later turns
its IFCAP_VLAN_HWTAGGING bit on.

This change might look orthogonal to rev#1.85, but in fact
it is not.  It introduces bugfixes that hopefully will make
implementing the general scheme mentioned in the commit
message of rev#1.85 easier.
sys/dev/em/if_em.c