BNX2X: spatch ether->mtu -> ether->maxmtu
[akaros.git] / kern / drivers / net / bnx2x / bnx2x_cmn.c
index 309408c..1d1c65f 100644 (file)
@@ -1007,7 +1007,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
                /* Since we don't have a jumbo ring
                 * copy small packets if mtu > 1500
                 */
-               if ((bp->dev->mtu > ETH_MAX_PACKET_SIZE) &&
+               if ((bp->dev->maxmtu > ETH_MAX_PACKET_SIZE) &&
                    (len <= RX_COPY_THRESH)) {
                        skb = napi_alloc_skb(&fp->napi, len);
                        if (skb == NULL) {
@@ -1388,7 +1388,7 @@ void bnx2x_init_rx_rings(struct bnx2x *bp)
                struct bnx2x_fastpath *fp = &bp->fp[j];
 
                DP(NETIF_MSG_IFUP,
-                  "mtu %d  rx_buf_size %d\n", bp->dev->mtu, fp->rx_buf_size);
+                  "mtu %d  rx_buf_size %d\n", bp->dev->maxmtu, fp->rx_buf_size);
 
                if (!fp->disable_tpa) {
                        /* Fill the per-aggregation pool */
@@ -2013,7 +2013,7 @@ static void bnx2x_set_rx_buf_size(struct bnx2x *bp)
                         */
                        mtu = BNX2X_FCOE_MINI_JUMBO_MTU;
                else
-                       mtu = bp->dev->mtu;
+                       mtu = bp->dev->maxmtu;
                fp->rx_buf_size = BNX2X_FW_RX_ALIGN_START +
                                  IP_HEADER_ALIGNMENT_PADDING +
                                  ETH_OVREHEAD +
@@ -2475,7 +2475,7 @@ static void bnx2x_bz_fp(struct bnx2x *bp, int index)
         */
        fp->disable_tpa = !(bp->flags & TPA_ENABLE_FLAG ||
                                  (bp->flags & GRO_ENABLE_FLAG &&
-                                  bnx2x_mtu_allows_gro(bp->dev->mtu)));
+                                  bnx2x_mtu_allows_gro(bp->dev->maxmtu)));
        if (bp->flags & TPA_ENABLE_FLAG)
                fp->mode = TPA_MODE_LRO;
        else if (bp->flags & GRO_ENABLE_FLAG)
@@ -4797,7 +4797,7 @@ int bnx2x_change_mtu(struct ether *dev, int new_mtu)
         * because the actual alloc size is
         * only updated as part of load
         */
-       dev->mtu = new_mtu;
+       dev->maxmtu = new_mtu;
 
        return bnx2x_reload_if_running(dev);
 }