diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c index eee250f12df3..5cfde7176617 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c @@ -134,70 +134,6 @@ u8 rtw_do_join(struct adapter *padapter) return ret; } -u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid) -{ - u8 status = _SUCCESS; - - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - - netdev_dbg(padapter->pnetdev, "set bssid:%pM\n", bssid); - - if ((bssid[0] == 0x00 && bssid[1] == 0x00 && bssid[2] == 0x00 && bssid[3] == 0x00 && bssid[4] == 0x00 && bssid[5] == 0x00) || - (bssid[0] == 0xFF && bssid[1] == 0xFF && bssid[2] == 0xFF && bssid[3] == 0xFF && bssid[4] == 0xFF && bssid[5] == 0xFF)) { - status = _FAIL; - goto exit; - } - - spin_lock_bh(&pmlmepriv->lock); - - - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) - goto handle_tkip_countermeasure; - else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) - goto release_mlme_lock; - - if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) { - if (!memcmp(&pmlmepriv->cur_network.network.mac_address, bssid, ETH_ALEN)) { - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false) - goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */ - } else { - rtw_disassoc_cmd(padapter, 0, true); - - if (check_fwstate(pmlmepriv, _FW_LINKED) == true) - rtw_indicate_disconnect(padapter); - - rtw_free_assoc_resources(padapter, 1); - - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) { - _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE); - set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); - } - } - } - -handle_tkip_countermeasure: - if (rtw_handle_tkip_countermeasure(padapter, __func__) == _FAIL) { - status = _FAIL; - goto release_mlme_lock; - } - - memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid)); - memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); - pmlmepriv->assoc_by_bssid = true; - - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) - pmlmepriv->to_join = true; - else - status = rtw_do_join(padapter); - -release_mlme_lock: - spin_unlock_bh(&pmlmepriv->lock); - -exit: - - return status; -} - u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid) { u8 status = _SUCCESS; diff --git a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h index 31424bf2d926..ab349de733c8 100644 --- a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h +++ b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h @@ -11,7 +11,6 @@ typedef u8 NDIS_802_11_PMKID_VALUE[16]; u8 rtw_set_802_11_authentication_mode(struct adapter *pdapter, enum ndis_802_11_authentication_mode authmode); -u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid); u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep); u8 rtw_set_802_11_disassociate(struct adapter *padapter); u8 rtw_set_802_11_bssid_list_scan(struct adapter *padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num);