diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-03-26 16:48:38 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-31 16:00:09 -0700 |
| commit | 4025d3df375fef7e5f5a5e395f25117a1f5458a1 (patch) | |
| tree | 44d071c4217480451c05512b86235ea8b3376b81 | |
| parent | f8ac640484c8ae85d45692c4b3a280a5b25d1ffc (diff) | |
qcacld-3.0: Replace lim_log() with pe_* log levels in dph_hash_table.c
Replace lim_log() with pe_* appropriate log levels in dph_hash_table.c
Change-Id: I5e41c8e6ceacff0804a673670d5cfd28c08ec8b2
CRs-Fixed: 1093093
| -rw-r--r-- | core/mac/src/dph/dph_hash_table.c | 72 | ||||
| -rw-r--r-- | core/mac/src/dph/dph_hash_table.h | 6 |
2 files changed, 19 insertions, 59 deletions
diff --git a/core/mac/src/dph/dph_hash_table.c b/core/mac/src/dph/dph_hash_table.c index 0c1a861f2299..3ebcb6a6d55f 100644 --- a/core/mac/src/dph/dph_hash_table.c +++ b/core/mac/src/dph/dph_hash_table.c @@ -134,7 +134,7 @@ tpDphHashNode dph_lookup_hash_entry(tpAniSirGlobal pMac, uint8_t staAddr[], uint16_t index = hash_function(pMac, staAddr, pDphHashTable->size); if (!pDphHashTable->pHashTable) { - lim_log(pMac, LOGE, FL("pHashTable is NULL")); + pe_err("pHashTable is NULL"); return ptr; } @@ -244,16 +244,13 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal pMac, tSirMacAddr staAddr, uint16_t staIdx = STA_INVALID_IDX; if (assocId >= pDphHashTable->size) { - PELOGE(lim_log(pMac, LOGE, FL("Invalid Assoc Id %d"), assocId);) + pe_err("Invalid Assoc Id %d", assocId); return NULL; } pStaDs = get_node(pMac, (uint8_t) assocId, pDphHashTable); staIdx = pStaDs->staIndex; - PELOG1(lim_log - (pMac, LOG1, FL("Assoc Id %d, Addr %08X"), assocId, pStaDs); - ) /* Clear the STA node except for the next pointer (last 4 bytes) */ qdf_mem_set((uint8_t *) pStaDs, sizeof(tDphHashNode) - sizeof(tpDphHashNode), 0); @@ -271,8 +268,7 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal pMac, tSirMacAddr staAddr, /* Initialize fragmentation threshold */ if (wlan_cfg_get_int(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, &val) != eSIR_SUCCESS) - lim_log(pMac, LOGP, - FL("could not retrieve fragmentation threshold")); + pe_warn("could not retrieve fragmentation threshold"); else pStaDs->fragSize = (uint16_t) val; @@ -312,23 +308,23 @@ tpDphHashNode dph_add_hash_entry(tpAniSirGlobal pMac, tSirMacAddr staAddr, tpDphHashNode ptr, node; uint16_t index = hash_function(pMac, staAddr, pDphHashTable->size); - PELOG1(lim_log(pMac, LOG1, FL("assocId %d index %d STA addr"), - assocId, index); dph_print_mac_addr(pMac, staAddr, LOG1); - ) + pe_debug("assocId %d index %d STA addr", + assocId, index); + pe_debug(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(staAddr)); if (assocId >= pDphHashTable->size) { - PELOGE(lim_log(pMac, LOGE, FL("invalid STA id %d"), assocId);) + pe_err("invalid STA id %d", assocId); return NULL; } if (pDphHashTable->pDphNodeArray[assocId].added) { - PELOGE(lim_log(pMac, LOGE, FL("already added STA %d"), assocId);) + pe_err("already added STA %d", assocId); return NULL; } for (ptr = pDphHashTable->pHashTable[index]; ptr; ptr = ptr->next) { if (ptr == ptr->next) { - PELOGE(lim_log(pMac, LOGE, FL("Infinite Loop"));) + pe_err("Infinite Loop"); return NULL; } @@ -339,16 +335,13 @@ tpDphHashNode dph_add_hash_entry(tpAniSirGlobal pMac, tSirMacAddr staAddr, if (ptr) { /* Duplicate entry */ - lim_log(pMac, LOGE, FL("assocId %d hashIndex %d entry exists"), + pe_err("assocId %d hashIndex %d entry exists", assocId, index); return NULL; } else { if (dph_init_sta_state (pMac, staAddr, assocId, false, pDphHashTable) == NULL) { - PELOGE(lim_log - (pMac, LOGE, FL("could not Init STAid=%d"), - assocId); - ) + pe_err("could not Init STA id: %d", assocId); return NULL; } /* Add the node to the link list */ @@ -388,17 +381,16 @@ tSirRetStatus dph_delete_hash_entry(tpAniSirGlobal pMac, tSirMacAddr staAddr, tpDphHashNode ptr, prev; uint16_t index = hash_function(pMac, staAddr, pDphHashTable->size); - PELOG1(lim_log(pMac, LOG1, FL("assocId %d index %d STA addr"), - assocId, index); dph_print_mac_addr(pMac, staAddr, LOG1); - ) + pe_debug("assocId %d index %d STA addr", assocId, index); + pe_debug(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(staAddr)); if (assocId >= pDphHashTable->size) { - PELOGE(lim_log(pMac, LOGE, FL("invalid STA id %d"), assocId);) + pe_err("invalid STA id %d", assocId); return eSIR_FAILURE; } if (pDphHashTable->pDphNodeArray[assocId].added == 0) { - PELOGE(lim_log(pMac, LOGE, FL("STA %d never added"), assocId);) + pe_err("STA %d never added", assocId); return eSIR_FAILURE; } @@ -407,7 +399,7 @@ tSirRetStatus dph_delete_hash_entry(tpAniSirGlobal pMac, tSirMacAddr staAddr, if (dph_compare_mac_addr(staAddr, ptr->staAddr)) break; if (prev == ptr) { - PELOGE(lim_log(pMac, LOGE, FL("Infinite Loop"));) + pe_err("Infinite Loop"); return eSIR_FAILURE; } } @@ -428,40 +420,12 @@ tSirRetStatus dph_delete_hash_entry(tpAniSirGlobal pMac, tSirMacAddr staAddr, ptr->sta_deletion_in_progress = false; ptr->next = 0; } else { - /* / Entry not present */ - PELOGE(lim_log(pMac, LOGE, FL("Entry not present STA addr")); - dph_print_mac_addr(pMac, staAddr, LOGE); - ) + pe_err("Entry not present STA addr"); + pe_err(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(staAddr)); return eSIR_FAILURE; } return eSIR_SUCCESS; } -/* --------------------------------------------------------------------- */ -/** - * dph_print_mac_addr - * - * FUNCTION: - * Print a MAC address - * - * LOGIC: - * - * ASSUMPTIONS: - * - * NOTE: - * - * @param addr MAC address - * @return None - */ - -void dph_print_mac_addr(tpAniSirGlobal pMac, uint8_t addr[], uint32_t level) -{ - lim_log(pMac, (uint16_t) level, - FL("MAC ADDR = %02x:%02x:%02x:%02x:%02x:%02x"), - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); -} - -/* --------------------------------------------------------------------- */ - diff --git a/core/mac/src/dph/dph_hash_table.h b/core/mac/src/dph/dph_hash_table.h index 1a55f586a838..5e666f0a1433 100644 --- a/core/mac/src/dph/dph_hash_table.h +++ b/core/mac/src/dph/dph_hash_table.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2015, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -65,10 +65,6 @@ typedef struct { /* The hash table object */ extern dphHashTableClass dphHashTable; -/* Print MAC addresse */ -extern void dph_print_mac_addr(struct sAniSirGlobal *pMac, uint8_t addr[], - uint32_t); - tpDphHashNode dph_lookup_hash_entry(tpAniSirGlobal pMac, uint8_t staAddr[], uint16_t *pStaId, dphHashTableClass *pDphHashTable); |
