Commit 9d8e79ed authored by Xenia Ragiadakou's avatar Xenia Ragiadakou Committed by Greg Kroah-Hartman

staging: rtl8192u: fix spaces around relational operators in r819xU_phy.c

This patch fixes the whitespace around relational operators
to meet the linux kernel coding style.
Signed-off-by: default avatarXenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 111857c9
...@@ -86,7 +86,7 @@ void rtl8192_setBBreg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask, ...@@ -86,7 +86,7 @@ void rtl8192_setBBreg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask,
u32 OriginalValue, BitShift, NewValue; u32 OriginalValue, BitShift, NewValue;
if (dwBitMask!= bMaskDWord) { //if not "double word" write if (dwBitMask != bMaskDWord) { //if not "double word" write
read_nic_dword(dev, dwRegAddr, &OriginalValue); read_nic_dword(dev, dwRegAddr, &OriginalValue);
BitShift = rtl8192_CalculateBitShift(dwBitMask); BitShift = rtl8192_CalculateBitShift(dwBitMask);
NewValue = (((OriginalValue) & (~dwBitMask)) | (dwData << BitShift)); NewValue = (((OriginalValue) & (~dwBitMask)) | (dwData << BitShift));
...@@ -247,7 +247,7 @@ void rtl8192_phy_RFSerialWrite(struct net_device *dev, ...@@ -247,7 +247,7 @@ void rtl8192_phy_RFSerialWrite(struct net_device *dev,
rtl8192_setBBreg(dev, pPhyReg->rf3wireOffset, bMaskDWord, DataAndAddr); rtl8192_setBBreg(dev, pPhyReg->rf3wireOffset, bMaskDWord, DataAndAddr);
if (Offset==0x0) if (Offset == 0x0)
priv->RfReg0Value[eRFPath] = Data; priv->RfReg0Value[eRFPath] = Data;
// Switch back to Reg_Mode0; // Switch back to Reg_Mode0;
...@@ -470,7 +470,7 @@ void rtl8192_phy_configmac(struct net_device *dev) ...@@ -470,7 +470,7 @@ void rtl8192_phy_configmac(struct net_device *dev)
dwArrayLen = MACPHY_ArrayLength; dwArrayLen = MACPHY_ArrayLength;
pdwArray = rtl819XMACPHY_Array; pdwArray = rtl819XMACPHY_Array;
} }
for (i = 0; i<dwArrayLen; i = i+3) { for (i = 0; i < dwArrayLen; i = i+3) {
if (pdwArray[i] == 0x318) { if (pdwArray[i] == 0x318) {
pdwArray[i+2] = 0x00000800; pdwArray[i+2] = 0x00000800;
} }
...@@ -506,12 +506,12 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType) ...@@ -506,12 +506,12 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
} }
#endif #endif
if (ConfigType == BaseBand_Config_PHY_REG) { if (ConfigType == BaseBand_Config_PHY_REG) {
for (i = 0; i<PHY_REG_1T2RArrayLength; i += 2) { for (i = 0; i < PHY_REG_1T2RArrayLength; i += 2) {
rtl8192_setBBreg(dev, rtl819XPHY_REG_1T2RArray[i], bMaskDWord, rtl819XPHY_REG_1T2RArray[i+1]); rtl8192_setBBreg(dev, rtl819XPHY_REG_1T2RArray[i], bMaskDWord, rtl819XPHY_REG_1T2RArray[i+1]);
RT_TRACE(COMP_DBG, "i: %x, The Rtl819xUsbPHY_REGArray[0] is %x Rtl819xUsbPHY_REGArray[1] is %x \n",i, rtl819XPHY_REG_1T2RArray[i], rtl819XPHY_REG_1T2RArray[i+1]); RT_TRACE(COMP_DBG, "i: %x, The Rtl819xUsbPHY_REGArray[0] is %x Rtl819xUsbPHY_REGArray[1] is %x \n",i, rtl819XPHY_REG_1T2RArray[i], rtl819XPHY_REG_1T2RArray[i+1]);
} }
} else if (ConfigType == BaseBand_Config_AGC_TAB) { } else if (ConfigType == BaseBand_Config_AGC_TAB) {
for (i = 0; i<AGCTAB_ArrayLength; i += 2) { for (i = 0; i < AGCTAB_ArrayLength; i += 2) {
rtl8192_setBBreg(dev, rtl819XAGCTAB_Array[i], bMaskDWord, rtl819XAGCTAB_Array[i+1]); rtl8192_setBBreg(dev, rtl819XAGCTAB_Array[i], bMaskDWord, rtl819XAGCTAB_Array[i+1]);
RT_TRACE(COMP_DBG, "i:%x, The rtl819XAGCTAB_Array[0] is %x rtl819XAGCTAB_Array[1] is %x \n",i, rtl819XAGCTAB_Array[i], rtl819XAGCTAB_Array[i+1]); RT_TRACE(COMP_DBG, "i:%x, The rtl819XAGCTAB_Array[0] is %x rtl819XAGCTAB_Array[1] is %x \n",i, rtl819XAGCTAB_Array[i], rtl819XAGCTAB_Array[i+1]);
} }
...@@ -728,7 +728,7 @@ void rtl8192_BB_Config_ParaFile(struct net_device *dev) ...@@ -728,7 +728,7 @@ void rtl8192_BB_Config_ParaFile(struct net_device *dev)
/*----Ckeck FPGAPHY0 and PHY1 board is OK----*/ /*----Ckeck FPGAPHY0 and PHY1 board is OK----*/
// TODO: this function should be removed on ASIC , Emily 2007.2.2 // TODO: this function should be removed on ASIC , Emily 2007.2.2
for (eCheckItem = (HW90_BLOCK_E)HW90_BLOCK_PHY0; eCheckItem<=HW90_BLOCK_PHY1; eCheckItem++) { for (eCheckItem = (HW90_BLOCK_E)HW90_BLOCK_PHY0; eCheckItem <= HW90_BLOCK_PHY1; eCheckItem++) {
rtStatus = rtl8192_phy_checkBBAndRF(dev, (HW90_BLOCK_E)eCheckItem, (RF90_RADIO_PATH_E)0); //don't care RF path rtStatus = rtl8192_phy_checkBBAndRF(dev, (HW90_BLOCK_E)eCheckItem, (RF90_RADIO_PATH_E)0); //don't care RF path
if (rtStatus != 0) { if (rtStatus != 0) {
RT_TRACE((COMP_ERR | COMP_PHY), "PHY_RF8256_Config():Check PHY%d Fail!!\n", eCheckItem-1); RT_TRACE((COMP_ERR | COMP_PHY), "PHY_RF8256_Config():Check PHY%d Fail!!\n", eCheckItem-1);
...@@ -894,7 +894,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, ...@@ -894,7 +894,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
switch (eRFPath) { switch (eRFPath) {
case RF90_PATH_A: case RF90_PATH_A:
for (i = 0; i<RadioA_ArrayLength; i = i+2) { for (i = 0; i < RadioA_ArrayLength; i = i+2) {
if (rtl819XRadioA_Array[i] == 0xfe) { if (rtl819XRadioA_Array[i] == 0xfe) {
mdelay(100); mdelay(100);
...@@ -906,7 +906,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, ...@@ -906,7 +906,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
} }
break; break;
case RF90_PATH_B: case RF90_PATH_B:
for (i = 0; i<RadioB_ArrayLength; i = i+2) { for (i = 0; i < RadioB_ArrayLength; i = i+2) {
if (rtl819XRadioB_Array[i] == 0xfe) { if (rtl819XRadioB_Array[i] == 0xfe) {
mdelay(100); mdelay(100);
...@@ -918,7 +918,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, ...@@ -918,7 +918,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
} }
break; break;
case RF90_PATH_C: case RF90_PATH_C:
for (i = 0; i<RadioC_ArrayLength; i = i+2) { for (i = 0; i < RadioC_ArrayLength; i = i+2) {
if (rtl819XRadioC_Array[i] == 0xfe) { if (rtl819XRadioC_Array[i] == 0xfe) {
mdelay(100); mdelay(100);
...@@ -930,7 +930,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, ...@@ -930,7 +930,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
} }
break; break;
case RF90_PATH_D: case RF90_PATH_D:
for (i = 0; i<RadioD_ArrayLength; i = i+2) { for (i = 0; i < RadioD_ArrayLength; i = i+2) {
if (rtl819XRadioD_Array[i] == 0xfe) { if (rtl819XRadioD_Array[i] == 0xfe) {
mdelay(100); mdelay(100);
...@@ -1068,7 +1068,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev, ...@@ -1068,7 +1068,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
// //
//If Rf off reason is from IPS, Led should blink with no link, by Maddest 071015 //If Rf off reason is from IPS, Led should blink with no link, by Maddest 071015
// //
if (pMgntInfo->RfOffReason==RF_CHANGE_BY_IPS) if (pMgntInfo->RfOffReason == RF_CHANGE_BY_IPS)
Adapter->HalFunc.LedControlHandler(Adapter,LED_CTL_NO_LINK); Adapter->HalFunc.LedControlHandler(Adapter,LED_CTL_NO_LINK);
else else
// Turn off LED if RF is not ON. // Turn off LED if RF is not ON.
...@@ -1234,8 +1234,8 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8 *stage, ...@@ -1234,8 +1234,8 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8 *stage,
break; break;
} }
if (CurrentCmd->CmdID==CmdID_End) { if (CurrentCmd->CmdID == CmdID_End) {
if ((*stage)==2) { if ((*stage) == 2) {
(*delay) = CurrentCmd->msDelay; (*delay) = CurrentCmd->msDelay;
return true; return true;
} else { } else {
...@@ -1335,20 +1335,20 @@ u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel) ...@@ -1335,20 +1335,20 @@ u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel)
switch (priv->ieee80211->mode) { switch (priv->ieee80211->mode) {
case WIRELESS_MODE_A: case WIRELESS_MODE_A:
case WIRELESS_MODE_N_5G: case WIRELESS_MODE_N_5G:
if (channel<=14) { if (channel <= 14) {
RT_TRACE(COMP_ERR, "WIRELESS_MODE_A but channel<=14"); RT_TRACE(COMP_ERR, "WIRELESS_MODE_A but channel<=14");
return false; return false;
} }
break; break;
case WIRELESS_MODE_B: case WIRELESS_MODE_B:
if (channel>14) { if (channel > 14) {
RT_TRACE(COMP_ERR, "WIRELESS_MODE_B but channel>14"); RT_TRACE(COMP_ERR, "WIRELESS_MODE_B but channel>14");
return false; return false;
} }
break; break;
case WIRELESS_MODE_G: case WIRELESS_MODE_G:
case WIRELESS_MODE_N_24G: case WIRELESS_MODE_N_24G:
if (channel>14) { if (channel > 14) {
RT_TRACE(COMP_ERR, "WIRELESS_MODE_G but channel>14"); RT_TRACE(COMP_ERR, "WIRELESS_MODE_G but channel>14");
return false; return false;
} }
...@@ -1433,7 +1433,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) ...@@ -1433,7 +1433,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
if (priv->cck_present_attentuation > 22) if (priv->cck_present_attentuation > 22)
priv->cck_present_attentuation = 22; priv->cck_present_attentuation = 22;
if (priv->cck_present_attentuation< 0) if (priv->cck_present_attentuation < 0)
priv->cck_present_attentuation = 0; priv->cck_present_attentuation = 0;
RT_TRACE(COMP_INIT, "20M, pHalData->CCKPresentAttentuation = %d\n", priv->cck_present_attentuation); RT_TRACE(COMP_INIT, "20M, pHalData->CCKPresentAttentuation = %d\n", priv->cck_present_attentuation);
...@@ -1467,7 +1467,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) ...@@ -1467,7 +1467,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
if (priv->chan == 14 && !priv->bcck_in_ch14) { if (priv->chan == 14 && !priv->bcck_in_ch14) {
priv->bcck_in_ch14 = true; priv->bcck_in_ch14 = true;
dm_cck_txpower_adjust(dev,priv->bcck_in_ch14); dm_cck_txpower_adjust(dev,priv->bcck_in_ch14);
} else if (priv->chan!= 14 && priv->bcck_in_ch14) { } else if (priv->chan != 14 && priv->bcck_in_ch14) {
priv->bcck_in_ch14 = false; priv->bcck_in_ch14 = false;
dm_cck_txpower_adjust(dev,priv->bcck_in_ch14); dm_cck_txpower_adjust(dev,priv->bcck_in_ch14);
} else { } else {
...@@ -1532,9 +1532,9 @@ void rtl8192_SetBWMode(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth, ...@@ -1532,9 +1532,9 @@ void rtl8192_SetBWMode(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth,
priv->CurrentChannelBW = Bandwidth; priv->CurrentChannelBW = Bandwidth;
if (Offset==HT_EXTCHNL_OFFSET_LOWER) if (Offset == HT_EXTCHNL_OFFSET_LOWER)
priv->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_UPPER; priv->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_UPPER;
else if (Offset==HT_EXTCHNL_OFFSET_UPPER) else if (Offset == HT_EXTCHNL_OFFSET_UPPER)
priv->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_LOWER; priv->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_LOWER;
else else
priv->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_DONT_CARE; priv->nCur40MhzPrimeSC = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment