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

staging: rtl8723au: Make rtw_is_same_ibss23a() return bool

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b2e06a1
......@@ -188,13 +188,25 @@ int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter,
!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid,
ssid->ssid_len)) {
if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
("Set SSID is the same ssid, fw_state = 0x%08x\n",
RT_TRACE(_module_rtl871x_ioctl_set_c_,
_drv_err_, ("New SSID is same SSID, "
"fw_state = 0x%08x\n",
get_fwstate(pmlmepriv)));
if (rtw_is_same_ibss23a(padapter, pnetwork) == false)
{
/* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */
if (rtw_is_same_ibss23a(padapter, pnetwork)) {
/*
* it means driver is in
* WIFI_ADHOC_MASTER_STATE, we needn't
* create bss again.
*/
goto release_mlme_lock;
}
/*
* if in WIFI_ADHOC_MASTER_STATE |
* WIFI_ADHOC_STATE, create bss or
* rejoin again
*/
rtw_disassoc_cmd23a(padapter, 0, true);
if (check_fwstate(pmlmepriv, _FW_LINKED))
......@@ -202,12 +214,12 @@ int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter,
rtw_free_assoc_resources23a(padapter, 1);
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
}
} else {
goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
if (check_fwstate(pmlmepriv,
WIFI_ADHOC_MASTER_STATE)) {
_clr_fwstate_(pmlmepriv,
WIFI_ADHOC_MASTER_STATE);
set_fwstate(pmlmepriv,
WIFI_ADHOC_STATE);
}
} else {
rtw_lps_ctrl_wk_cmd23a(padapter, LPS_CTRL_JOINBSS, 1);
......
......@@ -334,10 +334,10 @@ static void rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
_rtw_free_network23a(pmlmepriv, pnetwork);
}
int rtw_is_same_ibss23a(struct rtw_adapter *adapter,
bool rtw_is_same_ibss23a(struct rtw_adapter *adapter,
struct wlan_network *pnetwork)
{
int ret = true;
int ret;
struct security_priv *psecuritypriv = &adapter->securitypriv;
if (psecuritypriv->dot11PrivacyAlgrthm != 0 &&
......
......@@ -361,7 +361,7 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter,
void rtw_issue_addbareq_cmd23a(struct rtw_adapter *padapter,
struct xmit_frame *pxmitframe);
int rtw_is_same_ibss23a(struct rtw_adapter *adapter,
bool rtw_is_same_ibss23a(struct rtw_adapter *adapter,
struct wlan_network *pnetwork);
int is_same_network23a(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst);
......
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