Commit 24687964 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Do not embed struct wlan_bssid_ex in struct survey_event

Instead allocate it separately and reference it from survey_event.
This will allow for us to pass it on later without having to copy it.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7195dc0e
......@@ -640,7 +640,7 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
struct survey_event *survey = (struct survey_event *)pbuf;
pnetwork = &survey->bss;
pnetwork = survey->bss;
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,
("rtw_survey_event_cb23a, ssid=%s\n", pnetwork->Ssid.ssid));
......@@ -691,6 +691,9 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
spin_unlock_bh(&pmlmepriv->lock);
kfree(survey->bss);
survey->bss = NULL;
return;
}
......
......@@ -4898,14 +4898,19 @@ void report_survey_event23a(struct rtw_adapter *padapter,
pc2h_evt_hdr->seq = atomic_inc_return(&pmlmeext->event_seq);
psurvey_evt = (struct survey_event*)(pevtcmd + sizeof(struct C2HEvent_Header));
psurvey_evt->bss = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
if (!psurvey_evt->bss) {
kfree(pcmd_obj);
kfree(pevtcmd);
}
if (collect_bss_info23a(padapter, precv_frame, &psurvey_evt->bss) == _FAIL) {
if (collect_bss_info23a(padapter, precv_frame, psurvey_evt->bss) == _FAIL) {
kfree(pcmd_obj);
kfree(pevtcmd);
return;
}
process_80211d(padapter, &psurvey_evt->bss);
process_80211d(padapter, psurvey_evt->bss);
rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj);
......
......@@ -22,7 +22,7 @@
Used to report a bss has been scanned
*/
struct survey_event {
struct wlan_bssid_ex bss;
struct wlan_bssid_ex *bss;
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment