staging: rtl8723au: rtw_survey_event_cb23a(): Remember to clone beacon data
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 21 Jun 2014 14:50:16 +0000 (16:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jun 2014 20:08:37 +0000 (13:08 -0700)
We need to clone all the beacon information, not just the IE data, in
particular as the long term goal is to stop carrying this information
in the IE data.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme.c

index fc848316c3f5a685c688e68de20cf095091e7475..c91ea8c64af0731f18ffdb4d8991a301a9a6cfb7 100644 (file)
@@ -621,6 +621,11 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
 
                        memcpy(pmlmepriv->cur_network.network.IEs,
                               pnetwork->IEs, 8);
+                       pmlmepriv->cur_network.network.beacon_interval =
+                               pnetwork->beacon_interval;
+                       pmlmepriv->cur_network.network.capability =
+                               pnetwork->capability;
+                       pmlmepriv->cur_network.network.tsf = pnetwork->tsf;
                        spin_lock_bh(&pmlmepriv->scanned_queue.lock);
                        ibss_wlan = rtw_find_network23a(
                                &pmlmepriv->scanned_queue,
@@ -628,6 +633,12 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
                        if (ibss_wlan) {
                                memcpy(ibss_wlan->network.IEs,
                                       pnetwork->IEs, 8);
+                               pmlmepriv->cur_network.network.beacon_interval =
+                                       ibss_wlan->network.beacon_interval;
+                               pmlmepriv->cur_network.network.capability =
+                                       ibss_wlan->network.capability;
+                               pmlmepriv->cur_network.network.tsf =
+                                       ibss_wlan->network.tsf;
                                spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
                                goto exit;
                        }