staging: rtl8188eu: odm: conditional setting with no effect
authorNicholas Mc Guire <hofrat@osadl.org>
Wed, 4 Feb 2015 10:28:55 +0000 (05:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2015 09:37:52 +0000 (17:37 +0800)
The if and the else branch code are identical - so the condition has no
effect on the effective code - this patch removes the condition and the
duplicated code. Due to this being a fall-through-if here - the first
if condition has no effect either - so it also can be removed.
struct mlme_priv is thus also no longer needed here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/odm.c

index 878c460f846cf722bfbe11a3bbf3adc45b890c0b..06477e8346535cd60a50ebba8e08c74406e62cef 100644 (file)
@@ -1133,16 +1133,9 @@ static void FindMinimumRSSI(struct adapter *pAdapter)
 {
        struct hal_data_8188e   *pHalData = GET_HAL_DATA(pAdapter);
        struct dm_priv  *pdmpriv = &pHalData->dmpriv;
-       struct mlme_priv        *pmlmepriv = &pAdapter->mlmepriv;
-
-       /* 1 1.Determine the minimum RSSI */
-       if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) &&
-           (pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
-               pdmpriv->MinUndecoratedPWDBForDM = 0;
-       if (check_fwstate(pmlmepriv, _FW_LINKED) == true)       /*  Default port */
-               pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
-       else /*  associated entry pwdb */
-               pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
+
+       /* 1 1.Unconditionally set RSSI */
+       pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
 }
 
 void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm)