qcacld-3.0: Fix frame-larger-than build error

Build option -Werror=frame-larger-than= throws frame size larger than
1024 bytes build errors.

Change-Id: I7d6b87e247f8c4dc31b2f4f0cd108f404fabacd1
CRs-Fixed: 2165532
This commit is contained in:
jiad
2018-01-03 14:27:06 +08:00
committed by snandini
부모 7e3a9bef42
커밋 bdefb255ce
3개의 변경된 파일75개의 추가작업 그리고 21개의 파일을 삭제

파일 보기

@@ -7156,11 +7156,18 @@ hdd_display_netif_queue_history_compact(struct hdd_context *hdd_ctx)
u32 tbytes;
qdf_time_t total, pause, unpause, curr_time, delta;
char temp_str[20 * WLAN_REASON_TYPE_MAX];
char comb_log_str[(ADAP_NETIFQ_LOG_LEN * MAX_NUMBER_OF_ADAPTERS) + 1];
char *comb_log_str;
uint32_t comb_log_str_size;
struct hdd_adapter *adapter = NULL;
comb_log_str_size = (ADAP_NETIFQ_LOG_LEN * MAX_NUMBER_OF_ADAPTERS) + 1;
comb_log_str = qdf_mem_malloc(comb_log_str_size);
if (!comb_log_str) {
hdd_err("failed to alloc comb_log_str");
return;
}
bytes_written = 0;
qdf_mem_set(comb_log_str, 0, sizeof(comb_log_str));
hdd_for_each_adapter(hdd_ctx, adapter) {
curr_time = qdf_system_ticks();
@@ -7196,8 +7203,8 @@ hdd_display_netif_queue_history_compact(struct hdd_context *hdd_ctx)
hdd_warn("log truncated");
bytes_written += snprintf(&comb_log_str[bytes_written],
bytes_written >= sizeof(comb_log_str) ? 0 :
sizeof(comb_log_str) - bytes_written,
bytes_written >= comb_log_str_size ? 0 :
comb_log_str_size - bytes_written,
"[%d %d] (%d) %u/%ums %s|",
adapter->session_id, adapter->device_mode,
adapter->pause_map,
@@ -7212,8 +7219,10 @@ hdd_display_netif_queue_history_compact(struct hdd_context *hdd_ctx)
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO_LOW,
"STATS |%s", comb_log_str);
if (bytes_written >= sizeof(comb_log_str))
if (bytes_written >= comb_log_str_size)
hdd_warn("log string truncated");
qdf_mem_free(comb_log_str);
}
/**

파일 보기

@@ -839,8 +839,8 @@ const char *sme_scan_type_to_string(const uint8_t scan_type);
const char *sme_bss_type_to_string(const uint8_t bss_type);
QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
bool disablefwd);
uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal);
uint32_t sme_get_channel_bonding_mode24_g(tHalHandle hHal);
QDF_STATUS sme_get_channel_bonding_mode5_g(tHalHandle hHal, uint32_t *mode);
QDF_STATUS sme_get_channel_bonding_mode24_g(tHalHandle hHal, uint32_t *mode);
#ifdef WLAN_FEATURE_STATS_EXT
typedef struct sStatsExtRequestReq {
uint32_t request_data_len;

파일 보기

@@ -3106,37 +3106,82 @@ eCsrPhyMode sme_get_phy_mode(tHalHandle hHal)
}
/*
* sme_get_channel_bonding_mode5_g() -
* get the channel bonding mode for 5G band
* sme_get_channel_bonding_mode5_g() - get the channel bonding mode for 5G band
*
* hHal - HAL handle
* Return channel bonding mode for 5G
* mode - channel bonding mode
*
* Return QDF_STATUS
*/
uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal)
QDF_STATUS sme_get_channel_bonding_mode5_g(tHalHandle hHal, uint32_t *mode)
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
tSmeConfigParams smeConfig;
tSmeConfigParams *smeConfig;
sme_get_config_param(pMac, &smeConfig);
if (!mode) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: invalid mode", __func__);
return QDF_STATUS_E_FAILURE;
}
return smeConfig.csrConfig.channelBondingMode5GHz;
smeConfig = qdf_mem_malloc(sizeof(*smeConfig));
if (!smeConfig) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: failed to alloc smeConfig", __func__);
return QDF_STATUS_E_NOMEM;
}
if (sme_get_config_param(pMac, smeConfig) != QDF_STATUS_SUCCESS) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: sme_get_config_param failed", __func__);
qdf_mem_free(smeConfig);
return QDF_STATUS_E_FAILURE;
}
*mode = smeConfig->csrConfig.channelBondingMode5GHz;
qdf_mem_free(smeConfig);
return QDF_STATUS_SUCCESS;
}
/*
* sme_get_channel_bonding_mode24_g() -
* get the channel bonding mode for 2.4G band
* sme_get_channel_bonding_mode24_g() - get the channel bonding mode for 2.4G
* band
*
* hHal - HAL handle
* Return channel bonding mode for 2.4G
* mode - channel bonding mode
*
* Return QDF_STATUS
*/
uint32_t sme_get_channel_bonding_mode24_g(tHalHandle hHal)
QDF_STATUS sme_get_channel_bonding_mode24_g(tHalHandle hHal, uint32_t *mode)
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
tSmeConfigParams smeConfig;
tSmeConfigParams *smeConfig;
sme_get_config_param(pMac, &smeConfig);
if (!mode) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: invalid mode", __func__);
return QDF_STATUS_E_FAILURE;
}
return smeConfig.csrConfig.channelBondingMode24GHz;
smeConfig = qdf_mem_malloc(sizeof(*smeConfig));
if (!smeConfig) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: failed to alloc smeConfig", __func__);
return QDF_STATUS_E_NOMEM;
}
if (sme_get_config_param(pMac, smeConfig) != QDF_STATUS_SUCCESS) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: sme_get_config_param failed", __func__);
qdf_mem_free(smeConfig);
return QDF_STATUS_E_FAILURE;
}
*mode = smeConfig->csrConfig.channelBondingMode24GHz;
qdf_mem_free(smeConfig);
return QDF_STATUS_SUCCESS;
}
/*