Staging: rtl8192u: Remove break statement
[deliverable/linux.git] / drivers / staging / rtl8192u / r819xU_phy.c
index 058960251bacdd72a69b55df6a15a78de4d6c738..3d4f57d97d515b84d916cc13e4325b4fc163fdee 100644 (file)
@@ -106,10 +106,10 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 /******************************************************************************
  * function:  This function reads specific bits from BB register
  * input:     net_device       *dev
- *            u32              reg_addr   //target addr to be readback
- *            u32              bitmask    //taget bit pos to be readback
+ *            u32              reg_addr   //target addr to be readback
+ *            u32              bitmask    //taget bit pos to be readback
  * output:    none
- * return:    u32              data       //the readback register value
+ * return:    u32              data       //the readback register value
  * notice:
  ******************************************************************************/
 u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
@@ -352,16 +352,14 @@ u32 rtl8192_phy_QueryRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
                return 0;
        if (priv->Rf_Mode == RF_OP_By_FW) {
                reg = phy_FwRFSerialRead(dev, eRFPath, reg_addr);
-               bitshift =  rtl8192_CalculateBitShift(bitmask);
-               reg = (reg & bitmask) >> bitshift;
                udelay(200);
-               return reg;
        } else {
                reg = rtl8192_phy_RFSerialRead(dev, eRFPath, reg_addr);
-               bitshift =  rtl8192_CalculateBitShift(bitmask);
-               reg = (reg & bitmask) >> bitshift;
-               return reg;
        }
+       bitshift =  rtl8192_CalculateBitShift(bitmask);
+       reg = (reg & bitmask) >> bitshift;
+       return reg;
+
 }
 
 /******************************************************************************
@@ -478,7 +476,7 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 /******************************************************************************
  * function:  This function reads BB parameters from header file we generate,
  *            and do register read/write
- * input:     net_device       *dev
+ * input:     net_device       *dev
  * output:    none
  * return:    none
  * notice:    BB parameters may change all the time, so please make
@@ -1187,7 +1185,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
                                /* Turn on RF we are still linked, which might
                                   happen when we quickly turn off and on HW RF.
                                 */
-                               if (pMgntInfo->bMediaConnect == TRUE)
+                               if (pMgntInfo->bMediaConnect)
                                        Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK);
                                else
                                        /* Turn off LED if RF is not ON. */
@@ -1344,7 +1342,6 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
        default:
                RT_TRACE(COMP_ERR, "Unknown RFChipID: %d\n", priv->rf_chip);
                return true;
-               break;
        }
 
 
@@ -1365,11 +1362,10 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
                        if ((*stage) == 2) {
                                (*delay) = CurrentCmd->msDelay;
                                return true;
-                       } else {
-                               (*stage)++;
-                               (*step) = 0;
-                               continue;
                        }
+                       (*stage)++;
+                       (*step) = 0;
+                       continue;
                }
 
                switch (CurrentCmd->CmdID) {
This page took 0.025364 seconds and 5 git commands to generate.