diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h index ba72b654b9f8..43ca18e867e6 100644 --- a/core/dp/htt/htt_internal.h +++ b/core/dp/htt/htt_internal.h @@ -905,7 +905,6 @@ void htt_rx_dbg_rxbuf_deinit(struct htt_pdev_t *pdev) #endif #define HTT_FCS_LEN (4) -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #ifdef HTT_DEBUG_DATA #define HTT_PKT_DUMP(x) x diff --git a/core/dp/htt/htt_monitor_rx.c b/core/dp/htt/htt_monitor_rx.c index ad91ce71234e..f98f77502af1 100644 --- a/core/dp/htt/htt_monitor_rx.c +++ b/core/dp/htt/htt_monitor_rx.c @@ -40,8 +40,6 @@ #define HTT_FCS_LEN (4) -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) - enum { HW_RX_DECAP_FORMAT_RAW = 0, HW_RX_DECAP_FORMAT_NWIFI, @@ -106,7 +104,7 @@ int htt_mon_rx_handle_amsdu_packet(qdf_nbuf_t msdu, htt_pdev_handle pdev, qdf_nbuf_set_pktlen(frag_nbuf, HTT_RX_BUF_SIZE); qdf_nbuf_unmap(pdev->osdev, frag_nbuf, QDF_DMA_FROM_DEVICE); /* For msdu's other than parent will not have htt_host_rx_desc_base */ - len = MIN(amsdu_len, HTT_RX_BUF_SIZE); + len = QDF_MIN(amsdu_len, HTT_RX_BUF_SIZE); amsdu_len -= len; qdf_nbuf_trim_tail(frag_nbuf, HTT_RX_BUF_SIZE - len); @@ -131,7 +129,7 @@ int htt_mon_rx_handle_amsdu_packet(qdf_nbuf_t msdu, htt_pdev_handle pdev, qdf_nbuf_set_pktlen(frag_nbuf, HTT_RX_BUF_SIZE); qdf_nbuf_unmap(pdev->osdev, frag_nbuf, QDF_DMA_FROM_DEVICE); - len = MIN(amsdu_len, HTT_RX_BUF_SIZE); + len = QDF_MIN(amsdu_len, HTT_RX_BUF_SIZE); amsdu_len -= len; qdf_nbuf_trim_tail(frag_nbuf, HTT_RX_BUF_SIZE - len); HTT_PKT_DUMP(qdf_trace_hex_dump(QDF_MODULE_ID_TXRX, @@ -673,7 +671,7 @@ int htt_rx_mon_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev, * MAX_RX_PAYLOAD_SZ when we have AMSDU packet. amsdu_len in * which case is the total length of sum of all AMSDU's */ - len = MIN(amsdu_len, MAX_RX_PAYLOAD_SZ); + len = QDF_MIN(amsdu_len, MAX_RX_PAYLOAD_SZ); amsdu_len -= len; qdf_nbuf_trim_tail(msdu, HTT_RX_BUF_SIZE - (RX_STD_DESC_SIZE + len)); diff --git a/core/dp/txrx/ol_tx_sched.c b/core/dp/txrx/ol_tx_sched.c index bdfc34954a02..e30818e059f1 100644 --- a/core/dp/txrx/ol_tx_sched.c +++ b/core/dp/txrx/ol_tx_sched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -69,10 +69,6 @@ struct ol_tx_sched_ctx { typedef TAILQ_HEAD(ol_tx_frms_queue_list_s, ol_tx_frms_queue_t) ol_tx_frms_queue_list; -#define OL_A_MAX(_x, _y) ((_x) > (_y) ? (_x) : (_y)) - -#define OL_A_MIN(_x, _y) ((_x) < (_y) ? (_x) : (_y)) - /*--- scheduler algorithm selection ---*/ /*--- scheduler options ----------------------------------------------- @@ -210,7 +206,7 @@ ol_tx_sched_select_batch_rr( next_tq = TAILQ_FIRST(&txq_queue->head); TAILQ_REMOVE(&txq_queue->head, next_tq, list_elem); - credit = OL_A_MIN(credit, TX_SCH_MAX_CREDIT_FOR_THIS_TID(next_tq)); + credit = QDF_MIN(credit, TX_SCH_MAX_CREDIT_FOR_THIS_TID(next_tq)); frames = next_tq->frms; /* download as many frames as credit allows */ tx_limit = ol_tx_bad_peer_dequeue_check(next_tq, frames, diff --git a/core/sme/inc/csr_link_list.h b/core/sme/inc/csr_link_list.h index bed69365ab60..85f35e624d2f 100644 --- a/core/sme/inc/csr_link_list.h +++ b/core/sme/inc/csr_link_list.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, 2014-2016, 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014-2016, 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -64,8 +64,6 @@ typedef struct tagDblLinkList { (((_Field) + ((_Boundary) - 1)) & ~((_Boundary) - 1)) #define BITS_ON(_Field, _Bitmask) ((_Field) |= (_Bitmask)) #define BITS_OFF(_Field, _Bitmask) ((_Field) &= ~(_Bitmask)) -#define CSR_MAX(a, b) ((a) > (b) ? (a) : (b)) -#define CSR_MIN(a, b) ((a) < (b) ? (a) : (b)) #define csrIsListEmpty(pHead) ((pHead)->next == (pHead)) uint32_t csr_ll_count(tDblLinkList *pList); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 9b6cea9727fe..356b59224d95 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -13737,8 +13737,8 @@ static void csr_roam_determine_max_rate_for_ad_hoc(struct mac_context *mac, pRate = pSirRateSet->rate; for (i = 0; i < pSirRateSet->numRates; i++) { - MaxRate = CSR_MAX(MaxRate, (pRate[i] & - (~CSR_DOT11_BASIC_RATE_MASK))); + MaxRate = QDF_MAX(MaxRate, (pRate[i] & + (~CSR_DOT11_BASIC_RATE_MASK))); } /* Save the max rate in the connected state information. diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 15e4eebc3d59..7c07cfa384be 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -632,7 +632,7 @@ void csr_apply_channel_power_info_to_fw(struct mac_context *mac_ctx, struct csr_channel tmp_ch_lst; if (ch_lst->numChannels) { - tempNumChannels = CSR_MIN(ch_lst->numChannels, + tempNumChannels = QDF_MIN(ch_lst->numChannels, CFG_VALID_CHANNEL_LIST_LEN); for (i = 0; i < tempNumChannels; i++) { tmp_ch_lst.channelList[num_ch] = ch_lst->channelList[i];