qcacld-3.0: Replace typedef tSirTxPowerLimit

The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tSirTxPowerLimit typedef does
not meet any of those criteria, so replace it with a reference to the
underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names and
so-called Hungarian notation, so in conjunction rename the underlying
struct to be in compliance.

Change-Id: I0c466bfbf4b820911e983f8bf74dc9e6f7e8ab70
CRs-Fixed: 2399110
This commit is contained in:
Jeff Johnson 2019-02-08 22:56:23 -08:00 • committed by nshrivas
commit 19ce8d0f84
7 changed files with 11 additions and 10 deletions

View file

@ -10793,7 +10793,7 @@ static int hdd_init_mws_coex(struct hdd_context *hdd_ctx)
*/
static int hdd_features_init(struct hdd_context *hdd_ctx)
{
tSirTxPowerLimit hddtxlimit;
struct tx_power_limit hddtxlimit;
QDF_STATUS status;
int ret;
mac_handle_t mac_handle;

View file

@ -3048,11 +3048,11 @@ typedef struct {
uint8_t throttle_duty_cycle_tbl[WLAN_THROTTLE_DUTY_CYCLE_LEVEL_MAX];
} t_thermal_mgmt, *tp_thermal_mgmt;
typedef struct sSirTxPowerLimit {
struct tx_power_limit {
/* Thermal limits for 2g and 5g */
uint32_t txPower2g;
uint32_t txPower5g;
} tSirTxPowerLimit;
};
enum bad_peer_thresh_levels {
WLAN_WMA_IEEE80211_B_LEVEL = 0,

View file

@ -945,7 +945,8 @@ int sme_set_addba_accept(mac_handle_t mac_handle, uint8_t session_id,
QDF_STATUS sme_init_thermal_info(mac_handle_t mac_handle);
QDF_STATUS sme_set_thermal_level(mac_handle_t mac_handle, uint8_t level);
QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle, tSirTxPowerLimit *psmetx);
QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle,
struct tx_power_limit *psmetx);
/**
* sme_get_link_speed() - Retrieve current link speed

View file

@ -8957,13 +8957,14 @@ QDF_STATUS sme_set_thermal_level(mac_handle_t mac_handle, uint8_t level)
* psmetx : power limits for 2g/5g
* Return QDF_STATUS
*/
QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle, tSirTxPowerLimit *psmetx)
QDF_STATUS sme_txpower_limit(mac_handle_t mac_handle,
struct tx_power_limit *psmetx)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
struct scheduler_msg message = {0};
struct mac_context *mac = MAC_CONTEXT(mac_handle);
tSirTxPowerLimit *tx_power_limit;
struct tx_power_limit *tx_power_limit;
tx_power_limit = qdf_mem_malloc(sizeof(*tx_power_limit));
if (!tx_power_limit)

View file

@ -852,7 +852,7 @@ int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
uint32_t len);
QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle,
tSirTxPowerLimit *ptxlim);
struct tx_power_limit *ptxlim);
void wma_update_noa(struct beacon_info *beacon,
struct p2p_sub_element_noa *noa_ie);

View file

@ -8511,8 +8511,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
qdf_mem_free(msg->bodyptr);
break;
case WMA_TX_POWER_LIMIT:
wma_process_tx_power_limits(wma_handle,
(tSirTxPowerLimit *) msg->bodyptr);
wma_process_tx_power_limits(wma_handle, msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case WMA_SEND_ADDBA_REQ:

View file

@ -1203,7 +1203,7 @@ int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
* Return: QDF_STATUS_SUCCESS for success or error code.
*/
QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle,
tSirTxPowerLimit *ptxlim)
struct tx_power_limit *ptxlim)
{
tp_wma_handle wma = (tp_wma_handle) handle;
int32_t ret = 0;