qcacld-3.0: Avoid large stack allocation in getPhyMode ioctl
The getPhyMode ioctl allocates a large struct on the stack. This is problematic for a number of reasons, and can cause compilation errors. Migrate the allocation to the heap instead. Change-Id: I7a1df6bbc89dd169d11a541f1ebcded6136792e9 CRs-Fixed: 1114990
这个提交包含在:
@@ -8140,17 +8140,26 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||||||
tHalHandle hal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
tHalHandle hal = WLAN_HDD_GET_HAL_CTX(pAdapter);
|
||||||
eCsrPhyMode phymode;
|
eCsrPhyMode phymode;
|
||||||
eCsrBand currBand;
|
eCsrBand currBand;
|
||||||
tSmeConfigParams smeconfig;
|
tSmeConfigParams *sme_config;
|
||||||
|
|
||||||
sme_get_config_param(hal, &smeconfig);
|
sme_config = qdf_mem_malloc(sizeof(*sme_config));
|
||||||
|
if (!sme_config) {
|
||||||
|
hdd_err("Out of memory");
|
||||||
|
ret = -ENOMEM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
sme_get_config_param(hal, sme_config);
|
||||||
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE !=
|
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE !=
|
||||||
smeconfig.csrConfig.channelBondingMode24GHz)
|
sme_config->csrConfig.channelBondingMode24GHz)
|
||||||
ch_bond24 = true;
|
ch_bond24 = true;
|
||||||
|
|
||||||
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE !=
|
if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE !=
|
||||||
smeconfig.csrConfig.channelBondingMode5GHz)
|
sme_config->csrConfig.channelBondingMode5GHz)
|
||||||
ch_bond5g = true;
|
ch_bond5g = true;
|
||||||
|
|
||||||
|
qdf_mem_free(sme_config);
|
||||||
|
|
||||||
phymode = sme_get_phy_mode(hal);
|
phymode = sme_get_phy_mode(hal);
|
||||||
if ((QDF_STATUS_SUCCESS !=
|
if ((QDF_STATUS_SUCCESS !=
|
||||||
sme_get_freq_band(hal, &currBand))) {
|
sme_get_freq_band(hal, &currBand))) {
|
||||||
|
在新工单中引用
屏蔽一个用户