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