staging: rtl8723au: struct mlme_priv->wps_beacon_ie is never set
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 21 Jun 2014 14:50:09 +0000 (16:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jun 2014 20:08:36 +0000 (13:08 -0700)
Remove all code trying to use it

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

index 2a960b1ba06664119d1078d8a55d97c27dffc72b..8ba346f54bbb8a59f33cd370c3333d38ca72114d 100644 (file)
@@ -1227,60 +1227,9 @@ static void update_bcn_wmm_ie(struct rtw_adapter *padapter)
 
 static void update_bcn_wps_ie(struct rtw_adapter *padapter)
 {
-       const u8 *pwps_ie, *premainder_ie;
-       u8 *pwps_ie_src, *pbackup_remainder_ie = NULL;
-       uint wps_ielen = 0, wps_offset, remainder_ielen;
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-       struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
-       unsigned char *ie = pnetwork->IEs;
-       u32 ielen = pnetwork->IELength;
-
        DBG_8723A("%s\n", __func__);
 
-       pwps_ie_src = pmlmepriv->wps_beacon_ie;
-       if (pwps_ie_src == NULL)
-               return;
-
-       pwps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
-                                         WLAN_OUI_TYPE_MICROSOFT_WPS,
-                                         ie + _FIXED_IE_LENGTH_,
-                                         ielen - _FIXED_IE_LENGTH_);
-
-       if (pwps_ie == NULL || pwps_ie[1] == 0)
-               return;
-
-       wps_ielen = pwps_ie[1];
-       wps_offset = (uint)(pwps_ie-ie);
-
-       premainder_ie = pwps_ie + wps_ielen;
-
-       remainder_ielen = ielen - wps_offset - wps_ielen;
-
-       if (remainder_ielen > 0) {
-               pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_ATOMIC);
-               if (pbackup_remainder_ie)
-                       memcpy(pbackup_remainder_ie, premainder_ie,
-                              remainder_ielen);
-       }
-
-       wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
-       if ((wps_offset+wps_ielen+2+remainder_ielen)<= MAX_IE_SZ)
-       {
-               memcpy(ie + wps_offset, pwps_ie_src, wps_ielen + 2);
-               pwps_ie += (wps_ielen+2);
-
-               if (pbackup_remainder_ie)
-                       memcpy(ie + wps_offset + wps_ielen + 2,
-                              pbackup_remainder_ie, remainder_ielen);
-
-               /* update IELength */
-               pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen;
-       }
-
-       if (pbackup_remainder_ie)
-               kfree(pbackup_remainder_ie);
+       return;
 }
 
 static void update_bcn_p2p_ie(struct rtw_adapter *padapter)
@@ -1966,7 +1915,6 @@ void start_ap_mode23a(struct rtw_adapter *padapter)
        for (i = 0; i<NUM_STA; i++)
                pstapriv->sta_aid[i] = NULL;
 
-       pmlmepriv->wps_beacon_ie = NULL;
        pmlmepriv->wps_probe_resp_ie = NULL;
        pmlmepriv->wps_assoc_resp_ie = NULL;
 
index 9a8c9ffd18376efc50aa89a1a10d340daab13fcb..eefe40a7a5647dbc0580dc71e541641e4a40a40b 100644 (file)
@@ -87,8 +87,6 @@ void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
 #ifdef CONFIG_8723AU_AP_MODE
        kfree(pmlmepriv->assoc_req);
        kfree(pmlmepriv->assoc_rsp);
-       rtw_free_mlme_ie_data(&pmlmepriv->wps_beacon_ie,
-                             &pmlmepriv->wps_beacon_ie_len);
        rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_req_ie,
                              &pmlmepriv->wps_probe_req_ie_len);
        rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_resp_ie,
index 4047f6dadff21b12bef87c5b37109753f2649d51..8590faa483fa2562e4ef6afeb0ff5188b509d8d2 100644 (file)
@@ -1534,31 +1534,6 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
                                   "Association Request - possible WPS use\n");
                        pstat->flags |= WLAN_STA_MAYBE_WPS;
                }
-
-               /*  AP support WPA/RSN, and sta is going to do WPS, but AP
-                   is not ready */
-               /*  that the selected registrar of AP is _FLASE */
-               if (psecuritypriv->wpa_psk > 0 &&
-                   pstat->flags & (WLAN_STA_WPS|WLAN_STA_MAYBE_WPS)) {
-                       if (pmlmepriv->wps_beacon_ie) {
-                               u8 selected_registrar = 0;
-
-                               rtw_get_wps_attr_content23a(
-                                       pmlmepriv->wps_beacon_ie,
-                                       pmlmepriv->wps_beacon_ie_len,
-                                       WPS_ATTR_SELECTED_REGISTRAR,
-                                       &selected_registrar, NULL);
-
-                               if (!selected_registrar) {
-                                       DBG_8723A("selected_registrar is false,"
-                                                 "or AP is not ready to do "
-                                                 "WPS\n");
-
-                                       status = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
-                                       goto OnAssocReq23aFail;
-                               }
-                       }
-               }
        } else {
                int copy_len;
 
index a67954569d3e50e466dae8247a53529c2d752ad4..6dccfb045ffe3e588c728962ff527c09680a3a3f 100644 (file)
@@ -167,8 +167,6 @@ struct mlme_priv {
        u8 *wps_assoc_resp_ie;
        u8 *wps_probe_resp_ie;
        u32 wps_probe_resp_ie_len;
-       u8 *wps_beacon_ie;
-       u32 wps_beacon_ie_len;
        u32 p2p_go_probe_resp_ie_len; /* for GO */
        u32 p2p_assoc_req_ie_len;
        u8 *p2p_beacon_ie;