Commit 2d5f72b0 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

staging: rtl8188eu: clean up comparsion style issues



Move constants to the right side of comparsions to follow kernel
coding style and clear checkpatch warnings. In case of comparsion
to _FAIL we can use '!' since _FAIL is defined as '0'.

WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200917071330.31740-2-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a620afdb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2981,7 +2981,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
			status = _STATS_FAILURE_;
	}

	if (_STATS_SUCCESSFUL_ != status)
	if (status != _STATS_SUCCESSFUL_)
		goto OnAssocReqFail;

	/*  check if the supported rate is ok */
@@ -3072,7 +3072,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
		wpa_ie_len = 0;
	}

	if (_STATS_SUCCESSFUL_ != status)
	if (status != _STATS_SUCCESSFUL_)
		goto OnAssocReqFail;

	pstat->flags &= ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS);
@@ -3282,7 +3282,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
	spin_unlock_bh(&pstapriv->asoc_list_lock);

	/*  now the station is qualified to join our BSS... */
	if ((pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) {
	if ((pstat->state & WIFI_FW_ASSOC_SUCCESS) && (status == _STATS_SUCCESSFUL_)) {
		/* 1 bss_cap_update & sta_info_update */
		bss_cap_update_on_sta_join(padapter, pstat);
		sta_info_update(padapter, pstat);
+2 −2
Original line number Diff line number Diff line
@@ -829,9 +829,9 @@ bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI, bool bForceUpdate
	}

	/*  Decide RATRState by RSSI. */
	if (RSSI > HighRSSIThreshForRA)
	if (HighRSSIThreshForRA < RSSI)
		RATRState = DM_RATR_STA_HIGH;
	else if (RSSI > LowRSSIThreshForRA)
	else if (LowRSSIThreshForRA < RSSI)
		RATRState = DM_RATR_STA_MIDDLE;
	else
		RATRState = DM_RATR_STA_LOW;
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static s32 _LLTWrite(struct adapter *padapter, u32 address, u32 data)
	/* polling */
	do {
		value = usb_read32(padapter, LLTReg);
		if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value))
		if (_LLT_OP_VALUE(value) == _LLT_NO_ACTIVE)
			break;

		if (count > POLLING_LLT_THRESHOLD) {
+2 −2
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ static inline void set_fwstate(struct mlme_priv *pmlmepriv, int state)
{
	pmlmepriv->fw_state |= state;
	/* FOR HW integration */
	if (_FW_UNDER_SURVEY == state)
	if (state == _FW_UNDER_SURVEY)
		pmlmepriv->bScanInProcess = true;
}

@@ -274,7 +274,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
{
	pmlmepriv->fw_state &= ~state;
	/* FOR HW integration */
	if (_FW_UNDER_SURVEY == state)
	if (state == _FW_UNDER_SURVEY)
		pmlmepriv->bScanInProcess = false;
}

+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)

static inline int IsFrameTypeCtrl(unsigned char *pframe)
{
	if (WIFI_CTRL_TYPE == GetFrameType(pframe))
	if (GetFrameType(pframe) == WIFI_CTRL_TYPE)
		return true;
	else
		return false;
Loading