ixgbe: fix setting of promisc mode when using mac-vlans
[safe/jmp/linux-2.6] / drivers / net / ixgbe / ixgbe_main.c
index 0a0e90e..15032c7 100644 (file)
@@ -2952,7 +2952,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
        fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
 
        if (netdev->flags & IFF_PROMISC) {
-               hw->addr_ctrl.user_set_promisc = 1;
+               hw->addr_ctrl.user_set_promisc = true;
                fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
                /* don't hardware filter vlans in promisc mode */
                ixgbe_vlan_filter_disable(adapter);
@@ -2960,11 +2960,11 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
                if (netdev->flags & IFF_ALLMULTI) {
                        fctrl |= IXGBE_FCTRL_MPE;
                        fctrl &= ~IXGBE_FCTRL_UPE;
-               } else {
+               } else if (!hw->addr_ctrl.uc_set_promisc) {
                        fctrl &= ~(IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
                }
                ixgbe_vlan_filter_enable(adapter);
-               hw->addr_ctrl.user_set_promisc = 0;
+               hw->addr_ctrl.user_set_promisc = false;
        }
 
        IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl);
@@ -6311,6 +6311,10 @@ static const struct net_device_ops ixgbe_netdev_ops = {
        .ndo_vlan_rx_add_vid    = ixgbe_vlan_rx_add_vid,
        .ndo_vlan_rx_kill_vid   = ixgbe_vlan_rx_kill_vid,
        .ndo_do_ioctl           = ixgbe_ioctl,
+       .ndo_set_vf_mac         = ixgbe_ndo_set_vf_mac,
+       .ndo_set_vf_vlan        = ixgbe_ndo_set_vf_vlan,
+       .ndo_set_vf_tx_rate     = ixgbe_ndo_set_vf_bw,
+       .ndo_get_vf_config      = ixgbe_ndo_get_vf_config,
 #ifdef CONFIG_NET_POLL_CONTROLLER
        .ndo_poll_controller    = ixgbe_netpoll,
 #endif