Thread (3 messages) flat view 3 messages, 3 authors, 2011-06-16

Re: [PATCH 001/001] forcedeth: Don't enable hardware vlan support on hardware that doesn't support it

From: Antoine Reversat <hidden>
Date: 2011-06-15 21:08:19

On Wed, Jun 15, 2011 at 4:53 PM, Stephen Hemminger
[off-list ref] wrote:
This shouldn't be necessary. rx_register should not be called
unless NETIF_F_HW_VLAN_RX is set; and device should not be setting
NETIF_F_HW_VLAN_RX unless DEV_HAS_VLAN is set.
I can confirm that rx_register gets called on hardware that doesn't
have vlan support (namely MCP79).
From what I can see in vlan.c (in register_vlan_dev) there is no check
on the features of the device before calling the register function :

    if (ngrp) {
        if (ops->ndo_vlan_rx_register)
            ops->ndo_vlan_rx_register(real_dev, ngrp);
        rcu_assign_pointer(real_dev->vlgrp, ngrp);
    }

If the function exists, it's called. Should I send a patch to call the
function only if the hardware supports it ?
The real problem is vlan_dev.c, and applies to all devices.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help