qcacld-3.0: Reduce hdd_hostapd_sap_event_cb frame size
In function hdd_hostapd_sap_event_cb frame size exceeds 1024 bytes due to changes to some structures in msm-4.4 kernel, so compilation for 32-bit systems might fail Thus, reduce structure allocations on heap instead of stack in hdd_hostapd_sap_event_cb. Change-Id: Ie710afbd6c066a3d770c6c9aac0cfd675ea57f53 CRs-fixed: 1046882
This commit is contained in:

committed by
Vishwajith Upendra

parent
d180c5ece8
commit
d295b1d8fd
@@ -1325,17 +1325,22 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
|
|||||||
HDD_SAP_WAKE_LOCK_DURATION,
|
HDD_SAP_WAKE_LOCK_DURATION,
|
||||||
WIFI_POWER_EVENT_WAKELOCK_SAP);
|
WIFI_POWER_EVENT_WAKELOCK_SAP);
|
||||||
{
|
{
|
||||||
struct station_info staInfo;
|
struct station_info *sta_info;
|
||||||
uint16_t iesLen =
|
uint16_t iesLen =
|
||||||
pSapEvent->sapevt.
|
pSapEvent->sapevt.
|
||||||
sapStationAssocReassocCompleteEvent.iesLen;
|
sapStationAssocReassocCompleteEvent.iesLen;
|
||||||
|
|
||||||
memset(&staInfo, 0, sizeof(staInfo));
|
sta_info = qdf_mem_malloc(sizeof(*sta_info));
|
||||||
|
if (!sta_info) {
|
||||||
|
hdd_err("Failed to allocate station info");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
memset(sta_info, 0, sizeof(*sta_info));
|
||||||
if (iesLen <= MAX_ASSOC_IND_IE_LEN) {
|
if (iesLen <= MAX_ASSOC_IND_IE_LEN) {
|
||||||
staInfo.assoc_req_ies =
|
sta_info->assoc_req_ies =
|
||||||
(const u8 *)&pSapEvent->sapevt.
|
(const u8 *)&pSapEvent->sapevt.
|
||||||
sapStationAssocReassocCompleteEvent.ies[0];
|
sapStationAssocReassocCompleteEvent.ies[0];
|
||||||
staInfo.assoc_req_ies_len = iesLen;
|
sta_info->assoc_req_ies_len = iesLen;
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
|
||||||
/*
|
/*
|
||||||
* After Kernel 4.0, it's no longer need to set
|
* After Kernel 4.0, it's no longer need to set
|
||||||
@@ -1343,18 +1348,18 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
|
|||||||
* changed to use assoc_req_ies_len length to
|
* changed to use assoc_req_ies_len length to
|
||||||
* check the existance of request IE.
|
* check the existance of request IE.
|
||||||
*/
|
*/
|
||||||
staInfo.filled |= STATION_INFO_ASSOC_REQ_IES;
|
sta_info->filled |= STATION_INFO_ASSOC_REQ_IES;
|
||||||
#endif
|
#endif
|
||||||
cfg80211_new_sta(dev,
|
cfg80211_new_sta(dev,
|
||||||
(const u8 *)&pSapEvent->sapevt.
|
(const u8 *)&pSapEvent->sapevt.
|
||||||
sapStationAssocReassocCompleteEvent.
|
sapStationAssocReassocCompleteEvent.
|
||||||
staMac.bytes[0], &staInfo,
|
staMac.bytes[0], sta_info,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
} else {
|
} else {
|
||||||
hdd_err("Assoc Ie length is too long");
|
hdd_err("Assoc Ie length is too long");
|
||||||
}
|
}
|
||||||
|
qdf_mem_free(sta_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
pScanInfo = &pHostapdAdapter->scan_info;
|
pScanInfo = &pHostapdAdapter->scan_info;
|
||||||
/* Lets do abort scan to ensure smooth authentication for client */
|
/* Lets do abort scan to ensure smooth authentication for client */
|
||||||
if ((pScanInfo != NULL) && pScanInfo->mScanPending) {
|
if ((pScanInfo != NULL) && pScanInfo->mScanPending) {
|
||||||
@@ -1746,6 +1751,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
|
|||||||
}
|
}
|
||||||
wireless_send_event(dev, we_event, &wrqu,
|
wireless_send_event(dev, we_event, &wrqu,
|
||||||
(char *)we_custom_event_generic);
|
(char *)we_custom_event_generic);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
stopbss:
|
stopbss:
|
||||||
|
Reference in New Issue
Block a user