ixgbe: fix setting of promisc mode when using mac-vlans
[deliverable/linux.git] / drivers / net / ixgbe / ixgbe_main.c
index 2ae5a5159ce4cf7e908c855c4463772ece65e0cd..15032c79e003c199eed2311bf6b6d4d6cbfafd30 100644 (file)
@@ -2722,7 +2722,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
                IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift));
                IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (1 << vf_shift));
                IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);
-               ixgbe_set_vmolr(hw, adapter->num_vfs);
+               ixgbe_set_vmolr(hw, adapter->num_vfs, true);
        }
 
        /* Program MRQC for the distribution of queues */
@@ -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
This page took 0.027974 seconds and 5 git commands to generate.