X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=drivers%2Fstaging%2Frtl8192u%2Fr819xU_phy.c;h=c8dc648a59eedd15acffe2c690b871706dde04d1;hb=d0049dfc88d18657da302023782473b615f3fcf4;hp=058960251bacdd72a69b55df6a15a78de4d6c738;hpb=cdce6ac277a4a1aa5316cd0cdf30fff927433917;p=deliverable%2Flinux.git diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index 058960251bac..c8dc648a59ee 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -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. */ @@ -1365,11 +1363,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) {