staging: rtl8723au: rtw_get_wps_ie23a(): Remove unused dest pointer wps_ie
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7171511eae
commit
fbf380cf9a
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user