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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)));
+6 −11
Original line number Diff line number Diff line
@@ -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;

+3 −3
Original line number Diff line number Diff line
@@ -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(
+1 −1
Original line number Diff line number Diff line
@@ -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) ||
+1 −2
Original line number Diff line number Diff line
@@ -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)
Loading