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

staging: rtl8723au: Don't check check_fwstate() == false

In addition, remove a followon check for false just after having
checked for true.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6ab752c
......@@ -187,8 +187,7 @@ int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter,
if ((pmlmepriv->assoc_ssid.ssid_len == ssid->ssid_len) &&
!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid,
ssid->ssid_len)) {
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false))
{
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",
get_fwstate(pmlmepriv)));
......
......@@ -234,7 +234,7 @@ static void SwLedBlink1(struct led_8723a *pLed)
pLed->BlinkingLedState = RTW_LED_ON;
delay = LED_BLINK_LINK_INTERVAL_ALPHA;
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
} else if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
} else {
pLed->bLedNoLinkBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_SLOWLY;
if (pLed->bLedOn)
......@@ -267,8 +267,7 @@ static void SwLedBlink1(struct led_8723a *pLed)
pLed->BlinkingLedState = RTW_LED_ON;
delay = LED_BLINK_LINK_INTERVAL_ALPHA;
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
} else if (check_fwstate(pmlmepriv,
_FW_LINKED) == false) {
} else {
pLed->bLedNoLinkBlinkInProgress = true;
pLed->CurrLedState = LED_BLINK_SLOWLY;
if (pLed->bLedOn)
......@@ -354,7 +353,7 @@ static void SwLedBlink2(struct led_8723a *pLed)
RT_TRACE(_module_rtl8712_led_c_, _drv_info_,
("stop scan blink CurrLedState %d\n",
pLed->CurrLedState));
} else if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
} else {
pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF;
SwLedOff23a(padapter, pLed);
......@@ -390,7 +389,7 @@ static void SwLedBlink2(struct led_8723a *pLed)
RT_TRACE(_module_rtl8712_led_c_, _drv_info_,
("stop CurrLedState %d\n", pLed->CurrLedState));
} else if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
} else {
pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF;
SwLedOff23a(padapter, pLed);
......@@ -457,9 +456,7 @@ static void SwLedBlink3(struct led_8723a *pLed)
SwLedOn23a(padapter, pLed);
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
}
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
{
} else {
pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF;
if (pLed->bLedOn)
......@@ -507,9 +504,7 @@ static void SwLedBlink3(struct led_8723a *pLed)
SwLedOn23a(padapter, pLed);
RT_TRACE(_module_rtl8712_led_c_, _drv_info_, ("CurrLedState %d\n", pLed->CurrLedState));
}
else if (check_fwstate(pmlmepriv, _FW_LINKED) == false)
{
} else {
pLed->CurrLedState = RTW_LED_OFF;
pLed->BlinkingLedState = RTW_LED_OFF;
......
......@@ -221,7 +221,7 @@ int rtw_if_up23a(struct rtw_adapter *padapter)
int res;
if (padapter->bDriverStopped || padapter->bSurpriseRemoved ||
check_fwstate(&padapter->mlmepriv, _FW_LINKED) == false) {
!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
("rtw_if_up23a:bDriverStopped(%d) OR "
"bSurpriseRemoved(%d)", padapter->bDriverStopped,
......@@ -682,7 +682,7 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
}
/* lock pmlmepriv->lock when you accessing network_q */
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == false) {
if (!check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
if (pnetwork->Ssid.ssid[0] == 0)
pnetwork->Ssid.ssid_len = 0;
......@@ -730,7 +730,7 @@ rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
if (pmlmepriv->to_join == true) {
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
if (rtw_select_and_join_from_scanned_queue23a(
......
......@@ -299,7 +299,7 @@ static u8 PS_RDY_CHECK(struct rtw_adapter * padapter)
if (delta_time < LPS_DELAY_TIME)
return false;
if (check_fwstate(pmlmepriv, _FW_LINKED) == false ||
if (!check_fwstate(pmlmepriv, _FW_LINKED) ||
check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) ||
check_fwstate(pmlmepriv, WIFI_AP_STATE) ||
check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
......
......@@ -2379,8 +2379,7 @@ void rtw_signal_stat_timer_hdl23a(unsigned long data)
}
/* update value of signal_strength, rssi, signal_qual */
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) ==
false) {
if (!check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY)) {
tmp_s = (avg_signal_strength + (_alpha - 1) *
recvpriv->signal_strength);
if (tmp_s %_alpha)
......
......@@ -560,7 +560,7 @@ static int update_attrib(struct rtw_adapter *padapter,
pattrib->encrypt = 0;
if ((pattrib->ether_type != ETH_P_PAE) &&
(check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)) {
!check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
("\npsta->ieee8021x_blocked == true, "
"pattrib->ether_type(%.4x) != 0x888e\n",
......@@ -1968,7 +1968,7 @@ int xmitframe_enqueue_for_sleeping_sta23a(struct rtw_adapter *padapter, struct x
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int bmcst = is_multicast_ether_addr(pattrib->ra);
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false)
if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
return ret;
if (pattrib->psta) {
......
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