staging: rtl8723au: rtw_get_wps_ie23a(): Remove unused dest pointer wps_ie
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 9 Jun 2014 13:15:53 +0000 (15:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2014 22:30:33 +0000 (15:30 -0700)
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_ieee80211.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/include/ieee80211.h
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c

index c8700b38386d49c713d2a50c8fcac92d28afbed6..976d4e430ca93cf89d323549f77491418e579dba 100644 (file)
@@ -660,7 +660,9 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        /* check if there is wps ie, */
        /* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
        /* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
-       if (NULL == rtw_get_wps_ie23a(pnetwork->IEs+_FIXED_IE_LENGTH_, pnetwork->IELength-_FIXED_IE_LENGTH_, NULL, NULL))
+       if (NULL == rtw_get_wps_ie23a(pnetwork->IEs + _FIXED_IE_LENGTH_,
+                                     pnetwork->IELength - _FIXED_IE_LENGTH_,
+                                     NULL))
                pmlmeext->bstart_bss = true;
 
        /* todo: update wmm, ht cap */
@@ -1239,7 +1241,8 @@ static void update_bcn_wps_ie(struct rtw_adapter *padapter)
        if (pwps_ie_src == NULL)
                return;
 
-       pwps_ie = rtw_get_wps_ie23a(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
+       pwps_ie = rtw_get_wps_ie23a(ie + _FIXED_IE_LENGTH_,
+                                   ielen - _FIXED_IE_LENGTH_, &wps_ielen);
 
        if (pwps_ie == NULL || wps_ielen == 0)
                return;
index adb86a54bdb261326aa626e7e500986834244d71..52eb5ffac158e033ad0a13638f0b516ba5f80de2 100644 (file)
@@ -700,14 +700,12 @@ int rtw_get_sec_ie23a(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
  * rtw_get_wps_ie23a - Search WPS IE from a series of IEs
  * @in_ie: Address of IEs to search
  * @in_len: Length limit from in_ie
- * @wps_ie: If not NULL and WPS IE is found, WPS IE will be copied to the
- *          buf starting from wps_ie
  * @wps_ielen: If not NULL and WPS IE is found, will set to the length of
  *             the entire WPS IE
  *
  * Returns: The address of the WPS IE found, or NULL
  */
-u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
+u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, uint *wps_ielen)
 {
        uint cnt;
        u8 *wpsie_ptr = NULL;
@@ -728,9 +726,6 @@ u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
                    !memcmp(&in_ie[cnt+2], wps_oui, 4)) {
                        wpsie_ptr = &in_ie[cnt];
 
-                       if (wps_ie)
-                               memcpy(wps_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
-
                        if (wps_ielen)
                                *wps_ielen = in_ie[cnt + 1] + 2;
 
index 7170258d260123b1392232bdc3c235bc888da28e..f292fce8ad1f892715b9f2dc1efecacaaa2b2445 100644 (file)
@@ -600,7 +600,7 @@ static int rtw_is_desired_network(struct rtw_adapter *adapter,
        if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
                if (rtw_get_wps_ie23a(pnetwork->network.IEs + _FIXED_IE_LENGTH_,
                                      pnetwork->network.IELength -
-                                     _FIXED_IE_LENGTH_, NULL, &wps_ielen))
+                                     _FIXED_IE_LENGTH_, &wps_ielen))
                        return true;
                else
                        return false;
index e1b28a2342597c15715f3ae7dc05b1c887826214..c1e8299d38022a7c2dcbfcdaef04bc4b069cad82 100644 (file)
@@ -2511,8 +2511,7 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
                                           sizeof (struct ieee80211_hdr_3addr) +
                                           _BEACON_IE_OFFSET_, pattrib->pktlen -
                                           sizeof (struct ieee80211_hdr_3addr) -
-                                          _BEACON_IE_OFFSET_, NULL,
-                                          &wps_ielen);
+                                          _BEACON_IE_OFFSET_, &wps_ielen);
                if (wps_ie && wps_ielen > 0) {
                        rtw_get_wps_attr_content23a(wps_ie, wps_ielen,
                                                    WPS_ATTR_SELECTED_REGISTRAR,
@@ -2677,8 +2676,7 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
                pwps_ie = rtw_get_wps_ie23a(cur_network->IEs +
                                            _FIXED_IE_LENGTH_,
                                            cur_network->IELength -
-                                           _FIXED_IE_LENGTH_, NULL,
-                                           &wps_ielen);
+                                           _FIXED_IE_LENGTH_, &wps_ielen);
 
                /* inerset & update wps_probe_resp_ie */
                if (pmlmepriv->wps_probe_resp_ie && pwps_ie && wps_ielen > 0) {
index 69c0f5c94fccb2b4b6e3bf0738ec10869bfa5a79..68ee71bea41561fae11b1627a6c94c471fc65727 100644 (file)
@@ -432,7 +432,7 @@ int rtw_parse_wpa2_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, in
 
 int rtw_get_sec_ie23a(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len);
 
-u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen);
+u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, uint *wps_ielen);
 u8 *rtw_get_wps_attr23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr);
 u8 *rtw_get_wps_attr_content23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content);
 
index f0839f6a9345073a23f5b2db4d4f613a071e9369..693310cc7c9b6df39f5bdf6d8e4c9669a4e6dbed 100644 (file)
@@ -1486,7 +1486,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct rtw_adapter *padapter,
        DBG_8723A("%s, ielen =%d\n", __func__, len);
 
        if (len > 0) {
-               wps_ie = rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen);
+               wps_ie = rtw_get_wps_ie23a(buf, len, &wps_ielen);
                if (wps_ie) {
                        DBG_8723A("probe_req_wps_ielen =%d\n", wps_ielen);
 
@@ -1886,7 +1886,7 @@ static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
                uint wps_ielen;
                u8 *wps_ie;
 
-               wps_ie = rtw_get_wps_ie23a(buf, ielen, NULL, &wps_ielen);
+               wps_ie = rtw_get_wps_ie23a(buf, ielen, &wps_ielen);
                if (wps_ie && wps_ielen > 0) {
                        DBG_8723A("got wps_ie, wps_ielen:%u\n", wps_ielen);
                        padapter->securitypriv.wps_ie_len =
@@ -2825,9 +2825,8 @@ static int rtw_add_beacon(struct rtw_adapter *adapter, const u8 *head,
        len = head_len + tail_len - 24;
 
        /* check wps ie if inclued */
-       if (rtw_get_wps_ie23a
-           (pbuf + _FIXED_IE_LENGTH_, len - _FIXED_IE_LENGTH_, NULL,
-            &wps_ielen))
+       if (rtw_get_wps_ie23a(pbuf + _FIXED_IE_LENGTH_, len - _FIXED_IE_LENGTH_,
+                             &wps_ielen))
                DBG_8723A("add bcn, wps_ielen =%d\n", wps_ielen);
 
        /* pbss_network->IEs will not include p2p_ie, wfd ie */