igb: Always prepare for vlan when setup reception unit
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 6 Apr 2012 09:30:34 +0000 (17:30 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 6 Apr 2012 09:30:34 +0000 (17:30 +0800)
vlan could be added after igb is initialized/brought up.

sys/dev/netif/e1000/if_igb.c

index 6de2375..91bf9e4 100644 (file)
@@ -3912,9 +3912,9 @@ igb_initialize_receive_units(struct adapter *adapter)
 
                /* Set maximum packet len */
                psize = adapter->max_frame_size;
-               /* are we on a vlan? */
-               if (adapter->ifp->if_vlantrunks != NULL)
-                       psize += VLAN_TAG_SIZE;
+
+               /* Prepare for VLAN */
+               psize += VLAN_TAG_SIZE;
                E1000_WRITE_REG(&adapter->hw, E1000_RLPML, psize);
        } else {
                rctl &= ~E1000_RCTL_LPE;