staging: rtl8723au: OnAssocReq23a(): Don't check for presence of BSSID twice
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 15 Apr 2014 17:44:14 +0000 (19:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2014 18:04:03 +0000 (11:04 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c

index fecbf2a300f337d049e1812deaa3b0c66dbb8f55..e1e8f2831478bdcc9f559b0fda01a338cc26b4d7 100644 (file)
@@ -1216,7 +1216,7 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
 
        /* now parse all ieee802_11 ie to point to elems */
        if (rtw_ieee802_11_parse_elems23a(pos, left, &elems, 1) ==
-           ParseFailed || !elems.ssid) {
+           ParseFailed) {
                DBG_8723A("STA " MAC_FMT " sent invalid association request\n",
                          MAC_ARG(pstat->hwaddr));
                status = WLAN_STATUS_UNSPECIFIED_FAILURE;
@@ -1227,8 +1227,11 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        /*  checking SSID */
        p = cfg80211_find_ie(WLAN_EID_SSID, pos, left);
        if (!p || p[1] == 0) {
-       /*  broadcast ssid, however it is not allowed in assocreq */
+               /*  broadcast ssid, however it is not allowed in assocreq */
+               DBG_8723A("STA " MAC_FMT " sent invalid association request "
+                         "lacking an SSID\n", MAC_ARG(pstat->hwaddr));
                status = WLAN_STATUS_UNSPECIFIED_FAILURE;
+               goto OnAssocReq23aFail;
        } else {
                /*  check if ssid match */
                if (memcmp(p + 2, cur->Ssid.ssid, cur->Ssid.ssid_len))