mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
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: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7195dc0e1a
commit
246879640e
|
|
@ -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;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user