diff options
Diffstat (limited to 'kernel/drivers/staging/rtl8712/rtl871x_ioctl_set.c')
-rw-r--r-- | kernel/drivers/staging/rtl8712/rtl871x_ioctl_set.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/kernel/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/kernel/drivers/staging/rtl8712/rtl871x_ioctl_set.c index 22262b355..f772675ae 100644 --- a/kernel/drivers/staging/rtl8712/rtl871x_ioctl_set.c +++ b/kernel/drivers/staging/rtl8712/rtl871x_ioctl_set.c @@ -136,12 +136,12 @@ u8 r8712_set_802_11_bssid(struct _adapter *padapter, u8 *bssid) } spin_lock_irqsave(&pmlmepriv->lock, irqL); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | - _FW_UNDER_LINKING) == true) { + _FW_UNDER_LINKING)) { status = check_fwstate(pmlmepriv, _FW_UNDER_LINKING); goto _Abort_Set_BSSID; } if (check_fwstate(pmlmepriv, - _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) { + _FW_LINKED | WIFI_ADHOC_MASTER_STATE)) { if (!memcmp(&pmlmepriv->cur_network.network.MacAddress, bssid, ETH_ALEN)) { if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) @@ -149,7 +149,7 @@ u8 r8712_set_802_11_bssid(struct _adapter *padapter, u8 *bssid) * WIFI_ADHOC_MASTER_STATE */ } else { r8712_disassoc_cmd(padapter); - if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + if (check_fwstate(pmlmepriv, _FW_LINKED)) r8712_ind_disconnect(padapter); r8712_free_assoc_resources(padapter); if ((check_fwstate(pmlmepriv, @@ -180,11 +180,11 @@ void r8712_set_802_11_ssid(struct _adapter *padapter, if (!padapter->hw_init_completed) return; spin_lock_irqsave(&pmlmepriv->lock, irqL); - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING)) { check_fwstate(pmlmepriv, _FW_UNDER_LINKING); goto _Abort_Set_SSID; } - if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) { + if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE)) { if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) && (!memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength))) { @@ -197,7 +197,7 @@ void r8712_set_802_11_ssid(struct _adapter *padapter, */ r8712_disassoc_cmd(padapter); if (check_fwstate(pmlmepriv, - _FW_LINKED) == true) + _FW_LINKED)) r8712_ind_disconnect(padapter); r8712_free_assoc_resources(padapter); if (check_fwstate(pmlmepriv, @@ -207,24 +207,25 @@ void r8712_set_802_11_ssid(struct _adapter *padapter, set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); } - } else + } else { goto _Abort_Set_SSID; /* driver is in * WIFI_ADHOC_MASTER_STATE */ + } } } else { r8712_disassoc_cmd(padapter); - if (check_fwstate(pmlmepriv, _FW_LINKED) == true) + if (check_fwstate(pmlmepriv, _FW_LINKED)) r8712_ind_disconnect(padapter); r8712_free_assoc_resources(padapter); if (check_fwstate(pmlmepriv, - WIFI_ADHOC_MASTER_STATE) == true) { + WIFI_ADHOC_MASTER_STATE)) { _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE); set_fwstate(pmlmepriv, WIFI_ADHOC_STATE); } } } - if (padapter->securitypriv.btkip_countermeasure == true) + if (padapter->securitypriv.btkip_countermeasure) goto _Abort_Set_SSID; if (!validate_ssid(ssid)) goto _Abort_Set_SSID; @@ -248,13 +249,13 @@ void r8712_set_802_11_infrastructure_mode(struct _adapter *padapter, if (*pold_state != networktype) { spin_lock_irqsave(&pmlmepriv->lock, irqL); - if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) || + if (check_fwstate(pmlmepriv, _FW_LINKED) || (*pold_state == Ndis802_11IBSS)) r8712_disassoc_cmd(padapter); if (check_fwstate(pmlmepriv, - _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) + _FW_LINKED | WIFI_ADHOC_MASTER_STATE)) r8712_free_assoc_resources(padapter); - if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) || + if (check_fwstate(pmlmepriv, _FW_LINKED) || (*pold_state == Ndis802_11Infrastructure) || (*pold_state == Ndis802_11IBSS)) { /* will clr Linked_state before this function, @@ -291,7 +292,7 @@ u8 r8712_set_802_11_disassociate(struct _adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; spin_lock_irqsave(&pmlmepriv->lock, irqL); - if (check_fwstate(pmlmepriv, _FW_LINKED) == true) { + if (check_fwstate(pmlmepriv, _FW_LINKED)) { r8712_disassoc_cmd(padapter); r8712_ind_disconnect(padapter); r8712_free_assoc_resources(padapter); @@ -312,8 +313,8 @@ u8 r8712_set_802_11_bssid_list_scan(struct _adapter *padapter) if (!padapter->hw_init_completed) return false; spin_lock_irqsave(&pmlmepriv->lock, irqL); - if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)) || - (pmlmepriv->sitesurveyctrl.traffic_busy == true)) { + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) || + pmlmepriv->sitesurveyctrl.traffic_busy) { /* Scan or linking is in progress, do nothing. */ ret = (u8)check_fwstate(pmlmepriv, _FW_UNDER_SURVEY); } else { |