]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/staging/brcm80211/sys/wlc_ampdu.c
Staging: brcm80211: remove broken MIN() implementation
[linux-beck.git] / drivers / staging / brcm80211 / sys / wlc_ampdu.c
index a888484906deb5b7446b491b52431e2d37b32d4c..f7e290401068108cf67e9828c3d52db0d16f187e 100644 (file)
@@ -290,13 +290,13 @@ static void scb_ampdu_update_config(ampdu_info_t *ampdu, struct scb *scb)
        if (ampdu->max_pdu != AUTO)
                scb_ampdu->max_pdu = (u8) ampdu->max_pdu;
 
-       scb_ampdu->release = MIN(scb_ampdu->max_pdu, AMPDU_SCB_MAX_RELEASE);
+       scb_ampdu->release = min(scb_ampdu->max_pdu, AMPDU_SCB_MAX_RELEASE);
 
        if (scb_ampdu->max_rxlen)
                scb_ampdu->release =
-                   MIN(scb_ampdu->release, scb_ampdu->max_rxlen / 1600);
+                   min(scb_ampdu->release, scb_ampdu->max_rxlen / 1600);
 
-       scb_ampdu->release = MIN(scb_ampdu->release,
+       scb_ampdu->release = min(scb_ampdu->release,
                                 ampdu->fifo_tb[TX_AC_BE_FIFO].
                                 mcs2ampdu_table[FFPLD_MAX_MCS]);
 
@@ -396,7 +396,7 @@ static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int fid)
                return 0;
        }
        max_mpdu =
-           MIN(fifo->mcs2ampdu_table[FFPLD_MAX_MCS], AMPDU_NUM_MPDU_LEGACY);
+           min(fifo->mcs2ampdu_table[FFPLD_MAX_MCS], AMPDU_NUM_MPDU_LEGACY);
 
        /* In case max value max_pdu is already lower than
           the fifo depth, there is nothing more we can do.
@@ -462,7 +462,7 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f)
        /* recompute the dma rate */
        /* note : we divide/multiply by 100 to avoid integer overflows */
        max_mpdu =
-           MIN(fifo->mcs2ampdu_table[FFPLD_MAX_MCS], AMPDU_NUM_MPDU_LEGACY);
+           min(fifo->mcs2ampdu_table[FFPLD_MAX_MCS], AMPDU_NUM_MPDU_LEGACY);
        phy_rate = MCS_RATE(FFPLD_MAX_MCS, TRUE, FALSE);
        dma_rate =
            (((phy_rate / 100) *
@@ -478,7 +478,7 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f)
                if (phy_rate > dma_rate) {
                        tmp = ((fifo->ampdu_pld_size * phy_rate) /
                               ((phy_rate - dma_rate) * FFPLD_MPDU_SIZE)) + 1;
-                       tmp = MIN(tmp, 255);
+                       tmp = min(tmp, 255);
                        fifo->mcs2ampdu_table[i] = (u8) tmp;
                }
        }
@@ -694,7 +694,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
                        mcs = plcp0 & ~MIMO_PLCP_40MHZ;
                        ASSERT(mcs < MCS_TABLE_SIZE);
                        maxlen =
-                           MIN(scb_ampdu->max_rxlen,
+                           min(scb_ampdu->max_rxlen,
                                ampdu->max_txlen[mcs][is40][sgi]);
 
                        WL_NONE(("sendampdu: sgi %d, is40 %d, mcs %d\n", sgi,
@@ -832,7 +832,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
 
                /* set the preload length */
                if (MCS_RATE(mcs, TRUE, FALSE) >= f->dmaxferrate) {
-                       dma_len = MIN(dma_len, f->ampdu_pld_size);
+                       dma_len = min(dma_len, f->ampdu_pld_size);
                        txh->PreloadSize = htol16(dma_len);
                } else
                        txh->PreloadSize = 0;