mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: Replace typedef dphHashTableClass
The naming and usage of typedef dphHashTableClass does not conform to the Linux coding style, so replace it with struct dph_hash_table. Rename dph_hash_table_class_init() as well to match the new naming. Change-Id: I38df3c01736dfbeff3d51be05582ebfe69c1353b CRs-Fixed: 2361805
This commit is contained in:
parent
96cec3c413
commit
ace219da57
8 changed files with 41 additions and 54 deletions
|
|
@ -36,25 +36,8 @@
|
|||
#include "wma_if.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
/**
|
||||
* dphHashTableClass()
|
||||
*
|
||||
* FUNCTION:
|
||||
* Constructor function
|
||||
*
|
||||
* LOGIC:
|
||||
*
|
||||
* ASSUMPTIONS:
|
||||
*
|
||||
* NOTE:
|
||||
*
|
||||
* @param None
|
||||
* @return None
|
||||
*/
|
||||
|
||||
void dph_hash_table_class_init(struct mac_context *mac,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
void dph_hash_table_init(struct mac_context *mac,
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
|
|
@ -120,7 +103,7 @@ static uint16_t hash_function(struct mac_context *mac, uint8_t staAddr[],
|
|||
|
||||
tpDphHashNode dph_lookup_hash_entry(struct mac_context *mac, uint8_t staAddr[],
|
||||
uint16_t *pAssocId,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
tpDphHashNode ptr = NULL;
|
||||
uint16_t index = hash_function(mac, staAddr, pDphHashTable->size);
|
||||
|
|
@ -158,7 +141,7 @@ tpDphHashNode dph_lookup_hash_entry(struct mac_context *mac, uint8_t staAddr[],
|
|||
*/
|
||||
|
||||
tpDphHashNode dph_get_hash_entry(struct mac_context *mac, uint16_t peerIdx,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
if (peerIdx < pDphHashTable->size) {
|
||||
if (pDphHashTable->pDphNodeArray[peerIdx].added)
|
||||
|
|
@ -171,7 +154,7 @@ tpDphHashNode dph_get_hash_entry(struct mac_context *mac, uint16_t peerIdx,
|
|||
}
|
||||
|
||||
static inline tpDphHashNode get_node(struct mac_context *mac, uint8_t assocId,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
return &pDphHashTable->pDphNodeArray[assocId];
|
||||
}
|
||||
|
|
@ -196,7 +179,7 @@ static inline tpDphHashNode get_node(struct mac_context *mac, uint8_t assocId,
|
|||
*/
|
||||
tpDphHashNode dph_lookup_assoc_id(struct mac_context *mac, uint16_t staIdx,
|
||||
uint16_t *assocId,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
|
|
@ -228,7 +211,7 @@ tpDphHashNode dph_lookup_assoc_id(struct mac_context *mac, uint16_t staIdx,
|
|||
|
||||
tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr,
|
||||
uint16_t assocId, uint8_t validStaIdx,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
|
|
@ -295,7 +278,7 @@ tpDphHashNode dph_init_sta_state(struct mac_context *mac, tSirMacAddr staAddr,
|
|||
|
||||
tpDphHashNode dph_add_hash_entry(struct mac_context *mac, tSirMacAddr staAddr,
|
||||
uint16_t assocId,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
tpDphHashNode ptr, node;
|
||||
uint16_t index = hash_function(mac, staAddr, pDphHashTable->size);
|
||||
|
|
@ -368,7 +351,7 @@ tpDphHashNode dph_add_hash_entry(struct mac_context *mac, tSirMacAddr staAddr,
|
|||
|
||||
QDF_STATUS dph_delete_hash_entry(struct mac_context *mac, tSirMacAddr staAddr,
|
||||
uint16_t assocId,
|
||||
dphHashTableClass *pDphHashTable)
|
||||
struct dph_hash_table *pDphHashTable)
|
||||
{
|
||||
tpDphHashNode ptr, prev;
|
||||
uint16_t index = hash_function(mac, staAddr, pDphHashTable->size);
|
||||
|
|
|
|||
|
|
@ -42,48 +42,52 @@ static inline uint8_t dph_compare_mac_addr(uint8_t addr1[], uint8_t addr2[])
|
|||
(addr1[4] == addr2[4]) && (addr1[5] == addr2[5]);
|
||||
}
|
||||
|
||||
/* Hash table class */
|
||||
typedef struct {
|
||||
|
||||
/* The hash table itself */
|
||||
/**
|
||||
* struct dph_hash_table - DPH hash table
|
||||
* @pHashTable: The actual hash table
|
||||
* @pDphNodeArray: The state array
|
||||
* @size: The size of the hash table
|
||||
*/
|
||||
struct dph_hash_table {
|
||||
tpDphHashNode *pHashTable;
|
||||
|
||||
/* The state array */
|
||||
tDphHashNode *pDphNodeArray;
|
||||
uint16_t size;
|
||||
} dphHashTableClass;
|
||||
|
||||
/* The hash table object */
|
||||
extern dphHashTableClass dphHashTable;
|
||||
};
|
||||
|
||||
tpDphHashNode dph_lookup_hash_entry(struct mac_context *mac, uint8_t staAddr[],
|
||||
uint16_t *pStaId,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
tpDphHashNode dph_lookup_assoc_id(struct mac_context *mac, uint16_t staIdx,
|
||||
uint16_t *assocId,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
|
||||
/* Get a pointer to the hash node */
|
||||
extern tpDphHashNode dph_get_hash_entry(struct mac_context *mac, uint16_t staId,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
|
||||
/* Add an entry to the hash table */
|
||||
extern tpDphHashNode dph_add_hash_entry(struct mac_context *mac,
|
||||
tSirMacAddr staAddr,
|
||||
uint16_t staId,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
|
||||
/* Delete an entry from the hash table */
|
||||
QDF_STATUS dph_delete_hash_entry(struct mac_context *mac,
|
||||
tSirMacAddr staAddr, uint16_t staId,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
|
||||
/**
|
||||
* dph_hash_table_init - Initialize a DPH Hash Table
|
||||
* @mac: Global MAC Context
|
||||
* @pDphHashTable: Pointer to the Hash Table to initialize
|
||||
*/
|
||||
void dph_hash_table_init(struct mac_context *mac,
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
|
||||
void dph_hash_table_class_init(struct mac_context *mac,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
/* Initialize STA state */
|
||||
extern tpDphHashNode dph_init_sta_state(struct mac_context *mac,
|
||||
tSirMacAddr staAddr,
|
||||
uint16_t staId, uint8_t validStaIdx,
|
||||
dphHashTableClass *pDphHashTable);
|
||||
tpDphHashNode dph_init_sta_state(struct mac_context *mac,
|
||||
tSirMacAddr staAddr,
|
||||
uint16_t staId, uint8_t validStaIdx,
|
||||
struct dph_hash_table *pDphHashTable);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ typedef struct sDphHashNode {
|
|||
/* ------------------------------------------------------------------- */
|
||||
typedef struct sAniSirDph {
|
||||
/* The hash table object */
|
||||
dphHashTableClass dphHashTable;
|
||||
struct dph_hash_table dphHashTable;
|
||||
} tAniSirDph, *tpAniSirDph;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2558,7 +2558,7 @@ tMgmtFrmDropReason lim_is_pkt_candidate_for_drop(struct mac_context *mac,
|
|||
(subType == SIR_MAC_MGMT_DISASSOC) &&
|
||||
(subType == SIR_MAC_MGMT_DEAUTH)) {
|
||||
uint16_t assoc_id;
|
||||
dphHashTableClass *dph_table;
|
||||
struct dph_hash_table *dph_table;
|
||||
tDphHashNode *sta_ds;
|
||||
qdf_time_t *timestamp;
|
||||
|
||||
|
|
|
|||
|
|
@ -1346,7 +1346,7 @@ void lim_ibss_del_bss_rsp(struct mac_context *mac, void *msg, struct pe_session
|
|||
|
||||
lim_ibss_delete(mac, pe_session);
|
||||
|
||||
dph_hash_table_class_init(mac, &pe_session->dph.dphHashTable);
|
||||
dph_hash_table_init(mac, &pe_session->dph.dphHashTable);
|
||||
lim_delete_pre_auth_list(mac);
|
||||
|
||||
pe_session->limMlmState = eLIM_MLM_IDLE_STATE;
|
||||
|
|
|
|||
|
|
@ -1830,7 +1830,7 @@ void lim_process_ap_mlm_del_bss_rsp(struct mac_context *mac,
|
|||
* to occupy the medium during non channel occupancy period. So resume the transmission after
|
||||
* HAL gives back the response.
|
||||
*/
|
||||
dph_hash_table_class_init(mac, &pe_session->dph.dphHashTable);
|
||||
dph_hash_table_init(mac, &pe_session->dph.dphHashTable);
|
||||
lim_delete_pre_auth_list(mac);
|
||||
/* Initialize number of associated stations during cleanup */
|
||||
pe_session->gLimNumOfCurrentSTAs = 0;
|
||||
|
|
|
|||
|
|
@ -3222,7 +3222,7 @@ void lim_process_sme_del_bss_rsp(struct mac_context *mac,
|
|||
(void)body;
|
||||
SET_LIM_PROCESS_DEFD_MESGS(mac, true);
|
||||
lim_ibss_delete(mac, pe_session);
|
||||
dph_hash_table_class_init(mac, &pe_session->dph.dphHashTable);
|
||||
dph_hash_table_init(mac, &pe_session->dph.dphHashTable);
|
||||
lim_delete_pre_auth_list(mac);
|
||||
lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP, eSIR_SME_SUCCESS,
|
||||
pe_session->smeSessionId,
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ struct pe_session *pe_create_session(struct mac_context *mac,
|
|||
session_ptr->dph.dphHashTable.pDphNodeArray =
|
||||
pe_get_session_dph_node_array(i);
|
||||
session_ptr->dph.dphHashTable.size = numSta + 1;
|
||||
dph_hash_table_class_init(mac, &session_ptr->dph.dphHashTable);
|
||||
dph_hash_table_init(mac, &session_ptr->dph.dphHashTable);
|
||||
session_ptr->gpLimPeerIdxpool = qdf_mem_malloc(
|
||||
sizeof(*(session_ptr->gpLimPeerIdxpool)) *
|
||||
lim_get_peer_idxpool_size(numSta, bssType));
|
||||
|
|
@ -833,7 +833,7 @@ pe_find_session_by_sta_id(struct mac_context *mac_ctx,
|
|||
{
|
||||
uint8_t i, j;
|
||||
struct pe_session *session_ptr;
|
||||
dphHashTableClass *dph_ptr;
|
||||
struct dph_hash_table *dph_ptr;
|
||||
|
||||
for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
|
||||
if (!mac_ctx->lim.gpSession[i].valid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue