Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b2d83d5 authored by Jinwei Chen's avatar Jinwei Chen Committed by snandini
Browse files

qcacmn: Remove hash key related member in hal_rx_fst

For MCC, hash key related member in struct hal_rx_fst is not used,
it requires big chunk memory > 40K bytes that sometimes may fail to
allocate from system, wlan start up failed.
Remove hash key related member in hal_rx_fst by macro
WLAN_SUPPORT_RX_FISA for MCC.

Change-Id: I4214e18155c3ebc3dcc800c8c74f7eed16d580b4
CRs-Fixed: 2732990
parent 1953e511
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -334,6 +334,7 @@ hal_rx_flow_delete_entry(struct hal_rx_fst *fst, void *hal_rx_fse)
}
qdf_export_symbol(hal_rx_flow_delete_entry);

#ifndef WLAN_SUPPORT_RX_FISA
/**
 * hal_rx_fst_key_configure() - Configure the Toeplitz key in the FST
 * @fst: Pointer to the Rx Flow Search Table
@@ -358,6 +359,11 @@ static void hal_rx_fst_key_configure(struct hal_rx_fst *fst)
	key_bitwise_shift_left(key_bytes, HAL_FST_HASH_KEY_SIZE_BYTES, 5);
	key_reverse(fst->shifted_key, key_bytes, HAL_FST_HASH_KEY_SIZE_BYTES);
}
#else
static void hal_rx_fst_key_configure(struct hal_rx_fst *fst)
{
}
#endif

/**
 * hal_rx_fst_get_base() - Retrieve the virtual base address of the Rx FST
@@ -441,6 +447,7 @@ QDF_STATUS hal_rx_flow_get_tuple_info(void *hal_fse,
	return QDF_STATUS_SUCCESS;
}

#ifndef WLAN_SUPPORT_RX_FISA
/**
 * hal_flow_toeplitz_create_cache() - Calculate hashes for each possible
 * byte value with the key taken as is
@@ -503,6 +510,11 @@ static void hal_flow_toeplitz_create_cache(struct hal_rx_fst *fst)
		cur_key = cur_key << 8 | new_key_byte;
	}
}
#else
static void hal_flow_toeplitz_create_cache(struct hal_rx_fst *fst)
{
}
#endif

/**
 * hal_rx_fst_attach() - Initialize Rx flow search table in HW FST
@@ -587,6 +599,7 @@ void hal_rx_fst_detach(struct hal_rx_fst *rx_fst,
}
qdf_export_symbol(hal_rx_fst_detach);

#ifndef WLAN_SUPPORT_RX_FISA
/**
 * hal_flow_toeplitz_hash() - Calculate Toeplitz hash by using the cached key
 *
@@ -634,6 +647,13 @@ hal_flow_toeplitz_hash(void *hal_fst, struct hal_rx_flow *flow)

	return hash;
}
#else
uint32_t
hal_flow_toeplitz_hash(void *hal_fst, struct hal_rx_flow *flow)
{
	return 0;
}
#endif
qdf_export_symbol(hal_flow_toeplitz_hash);

/**
+3 −1
Original line number Diff line number Diff line
@@ -94,11 +94,13 @@ struct hal_rx_fst {
	uint8_t *base_vaddr;
	qdf_dma_addr_t base_paddr;
	uint8_t *key;
#ifndef WLAN_SUPPORT_RX_FISA
	uint8_t  shifted_key[HAL_FST_HASH_KEY_SIZE_BYTES];
	uint32_t key_cache[HAL_FST_HASH_KEY_SIZE_BYTES][1 << 8];
#endif
	uint16_t max_entries;
	uint16_t max_skid_length;
	uint16_t hash_mask;
	uint32_t key_cache[HAL_FST_HASH_KEY_SIZE_BYTES][1 << 8];
	uint32_t add_flow_count;
	uint32_t del_flow_count;
};