]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix disjunct computation of netdev features
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 Oct 2008 08:11:29 +0000 (01:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Oct 2008 08:11:29 +0000 (01:11 -0700)
commit3175b2da1293f547d4f0f908d285834b310e349c
tree85bd8f91f3de954c697aa44544b4adf191e7f5aa
parentd80999d755271a572909a5281844f33b5a1d6877
net: Fix disjunct computation of netdev features

My change

    commit f1f247053d0b6fa9f2f45eba0431dffaf2983d6d
    net: Enable TSO if supported by at least one device

didn't do what was intended because the netdev_compute_features
function was designed for conjunctions.  So what happened was that
it would simply take the TSO status of the last constituent device.

This patch extends it to support both conjunctions and disjunctions
under the new name of netdev_increment_features.

It also adds a new function netdev_fix_features which does the
sanity checking that usually occurs upon registration.  This ensures
that the computation doesn't result in an illegal combination
since this checking is absent when the change is initiated via
ethtool.

The two users of netdev_compute_features have been converted.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
include/linux/netdevice.h
net/bridge/br_device.c
net/bridge/br_if.c
net/core/dev.c