aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723au/core/rtw_ap.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2014-06-24 15:03:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-24 13:50:58 -0400
commitfb5fd46dbdd32faecd5f826f2d47e798732b7b4d (patch)
tree7481cac0ace824538fee5b66293ff14c98f37477 /drivers/staging/rtl8723au/core/rtw_ap.c
parentstaging: rtl8723au: rtw_get_cur_max_rate(): Use _FIXED_IE_LENGTH_ instead of hardcoded value (diff)
downloadlinux-dev-fb5fd46dbdd32faecd5f826f2d47e798732b7b4d.tar.xz
linux-dev-fb5fd46dbdd32faecd5f826f2d47e798732b7b4d.zip
staging: rtl8723au: rtw_add_beacon(): Construct a full beacon frame for validation
Clean up and correct the beacon frame validation using a full beacon frame, and pass that to rtw_check_beacon_data23a(). Previous we went through hoops to construct the frame, minus the ieee80211_3addr header which just made it more complicated, and resulted in inconsistencies and bugs. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723au/core/rtw_ap.c')
-rw-r--r--drivers/staging/rtl8723au/core/rtw_ap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index 18c9b307b4b4..08e933a3b531 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -789,8 +789,8 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
update_bmc_sta(padapter);
}
-int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
- unsigned int len)
+int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
+ struct ieee80211_mgmt *mgmt, unsigned int len)
{
int ret = _SUCCESS;
u8 *p;
@@ -808,7 +808,9 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_bssid_ex *pbss_network = &pmlmepriv->cur_network.network;
u8 *ie = pbss_network->IEs;
-
+ u8 *pbuf = mgmt->u.beacon.variable - _FIXED_IE_LENGTH_;
+ len -= (offsetof(struct ieee80211_mgmt, u.beacon.variable) -
+ _FIXED_IE_LENGTH_);
/* SSID */
/* Supported rates */
/* DS Params */