Commit ea4190b1 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_joinbss_cmd23a(): Remove unnecessary typecast

and remove use-once variable t_len.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0348dc74
...@@ -530,10 +530,9 @@ u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter) ...@@ -530,10 +530,9 @@ u8 rtw_createbss_cmd23a(struct rtw_adapter *padapter)
} }
u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
struct wlan_network * pnetwork) struct wlan_network *pnetwork)
{ {
u8 *auth, res = _SUCCESS; u8 *auth, res = _SUCCESS;
uint t_len = 0;
struct wlan_bssid_ex *psecnetwork; struct wlan_bssid_ex *psecnetwork;
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
...@@ -567,8 +566,6 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, ...@@ -567,8 +566,6 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
"fail!!!\n")); "fail!!!\n"));
goto exit; goto exit;
} }
/* for IEs is fix buf size */
t_len = sizeof(struct wlan_bssid_ex);
/* for hidden ap to set fw_state here */ /* for hidden ap to set fw_state here */
if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) { if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {
...@@ -586,7 +583,7 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, ...@@ -586,7 +583,7 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
} }
} }
psecnetwork = (struct wlan_bssid_ex *)&psecuritypriv->sec_bss; psecnetwork = &psecuritypriv->sec_bss;
if (!psecnetwork) { if (!psecnetwork) {
if (pcmd) if (pcmd)
kfree(pcmd); kfree(pcmd);
...@@ -599,7 +596,7 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter, ...@@ -599,7 +596,7 @@ u8 rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
goto exit; goto exit;
} }
memset(psecnetwork, 0, t_len); memset(psecnetwork, 0, sizeof(struct wlan_bssid_ex));
memcpy(psecnetwork, &pnetwork->network, memcpy(psecnetwork, &pnetwork->network,
get_wlan_bssid_ex_sz(&pnetwork->network)); get_wlan_bssid_ex_sz(&pnetwork->network));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment