linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2010-06-13  6:16 Mike Gilks
  2010-06-13  6:16 ` [PATCH 1/4] staging: rtl8192u: fix checkpatch.pl issues to line 4000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 4000 Mike Gilks
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mike Gilks @ 2010-06-13  6:16 UTC (permalink / raw)
  To: gregkh, mchehab, julia, joe; +Cc: devel, linux-kernel

Subject:r8192U_core.c Last pass
In-Reply-To: 


This is the last patch I can manage for this file.
Everything else to do with checkpatch.pl issues may require an actual developer to look at it.

Mike

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] staging: rtl8192u: fix checkpatch.pl issues to line 4000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 4000
  2010-06-13  6:16 Mike Gilks
@ 2010-06-13  6:16 ` Mike Gilks
  2010-06-13  6:16   ` [PATCH 2/4] staging: rtl8192u: fix checkpatch.pl issues to line 5000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5000 Mike Gilks
  2010-06-13  8:58 ` Tejun Heo
  2010-06-18 23:52 ` your mail Greg KH
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Gilks @ 2010-06-13  6:16 UTC (permalink / raw)
  To: gregkh, mchehab, julia, joe; +Cc: devel, linux-kernel, Mike Gilks

Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
---
 drivers/staging/rtl8192u/r8192U_core.c |  343 ++++++++++++++++----------------
 1 files changed, 173 insertions(+), 170 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 6f20518..21e3ac3 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3524,9 +3524,7 @@ void rtl8192_hwconfig(struct net_device *dev)
 		u32 ratr_value = 0;
 		ratr_value = regRATR;
 		if (priv->rf_type == RF_1T2R)
-		{
 			ratr_value &= ~(RATE_ALL_OFDM_2SS);
-		}
 		write_nic_dword(dev, RATR0, ratr_value);
 		write_nic_byte(dev, UFWP, 1);
 	}
@@ -3570,7 +3568,9 @@ bool rtl8192_adapter_start(struct net_device *dev)
 	else if (priv->pFirmware->firmware_status == FW_STATUS_5_READY)
 		dwRegRead |= CPU_GEN_FIRMWARE_RESET;
 	else
-		RT_TRACE(COMP_ERR, "ERROR in %s(): undefined firmware state(%d)\n", __func__,   priv->pFirmware->firmware_status);
+		RT_TRACE(COMP_ERR, "ERROR in %s(): undefined firmware "
+			"state(%d)\n", __func__,
+			priv->pFirmware->firmware_status);
 
 	write_nic_dword(dev, CPU_GEN, dwRegRead);
 	/* mdelay(30); */
@@ -3583,11 +3583,13 @@ bool rtl8192_adapter_start(struct net_device *dev)
 
 	dwRegRead = read_nic_dword(dev, CPU_GEN);
 	if (priv->LoopbackMode == RTL819xU_NO_LOOPBACK)
-		dwRegRead = ((dwRegRead & CPU_GEN_NO_LOOPBACK_MSK) | CPU_GEN_NO_LOOPBACK_SET);
+		dwRegRead = ((dwRegRead & CPU_GEN_NO_LOOPBACK_MSK) |
+					CPU_GEN_NO_LOOPBACK_SET);
 	else if (priv->LoopbackMode == RTL819xU_MAC_LOOPBACK)
 		dwRegRead |= CPU_CCK_LOOPBACK;
 	else
-		RT_TRACE(COMP_ERR, "Serious error in %s(): wrong loopback mode setting(%d)\n", __func__,  priv->LoopbackMode);
+		RT_TRACE(COMP_ERR, "Serious error in %s(): wrong loopback"
+			" mode setting(%d)\n", __func__,  priv->LoopbackMode);
 
 	write_nic_dword(dev, CPU_GEN, dwRegRead);
 
@@ -3606,27 +3608,34 @@ bool rtl8192_adapter_start(struct net_device *dev)
 	write_nic_byte(dev, CMDR, CR_RE|CR_TE);
 
 	/* set IDR0 here */
-	write_nic_dword(dev, MAC0, ((u32*)dev->dev_addr)[0]);
-	write_nic_word(dev, MAC4, ((u16*)(dev->dev_addr + 4))[0]);
+	write_nic_dword(dev, MAC0, ((u32 *)dev->dev_addr)[0]);
+	write_nic_word(dev, MAC4, ((u16 *)(dev->dev_addr + 4))[0]);
 
 	/* set RCR */
 	write_nic_dword(dev, RCR, priv->ReceiveConfig);
 
 	/* Initialize Number of Reserved Pages in Firmware Queue */
-	write_nic_dword(dev, RQPN1,  NUM_OF_PAGE_IN_FW_QUEUE_BK << RSVD_FW_QUEUE_PAGE_BK_SHIFT |\
-						NUM_OF_PAGE_IN_FW_QUEUE_BE << RSVD_FW_QUEUE_PAGE_BE_SHIFT | \
-						NUM_OF_PAGE_IN_FW_QUEUE_VI << RSVD_FW_QUEUE_PAGE_VI_SHIFT | \
-						NUM_OF_PAGE_IN_FW_QUEUE_VO <<RSVD_FW_QUEUE_PAGE_VO_SHIFT);
-	write_nic_dword(dev, RQPN2, NUM_OF_PAGE_IN_FW_QUEUE_MGNT << RSVD_FW_QUEUE_PAGE_MGNT_SHIFT |\
-						NUM_OF_PAGE_IN_FW_QUEUE_CMD << RSVD_FW_QUEUE_PAGE_CMD_SHIFT);
-	write_nic_dword(dev, RQPN3, APPLIED_RESERVED_QUEUE_IN_FW| \
-						NUM_OF_PAGE_IN_FW_QUEUE_BCN<<RSVD_FW_QUEUE_PAGE_BCN_SHIFT
+	write_nic_dword(dev, RQPN1,  NUM_OF_PAGE_IN_FW_QUEUE_BK <<
+					RSVD_FW_QUEUE_PAGE_BK_SHIFT |
+					NUM_OF_PAGE_IN_FW_QUEUE_BE <<
+						RSVD_FW_QUEUE_PAGE_BE_SHIFT |
+					NUM_OF_PAGE_IN_FW_QUEUE_VI <<
+						RSVD_FW_QUEUE_PAGE_VI_SHIFT |
+					NUM_OF_PAGE_IN_FW_QUEUE_VO <<
+						RSVD_FW_QUEUE_PAGE_VO_SHIFT);
+	write_nic_dword(dev, RQPN2, NUM_OF_PAGE_IN_FW_QUEUE_MGNT <<
+				RSVD_FW_QUEUE_PAGE_MGNT_SHIFT |
+				NUM_OF_PAGE_IN_FW_QUEUE_CMD <<
+				RSVD_FW_QUEUE_PAGE_CMD_SHIFT);
+	write_nic_dword(dev, RQPN3, APPLIED_RESERVED_QUEUE_IN_FW|
+						NUM_OF_PAGE_IN_FW_QUEUE_BCN <<
+						RSVD_FW_QUEUE_PAGE_BCN_SHIFT
 						/* | NUM_OF_PAGE_IN_FW_QUEUE_
 						 *PUB<<RSVD_FW_QUEUE_PAGE_
 						 *PUB_SHIFT
 						 */
 						);
-	write_nic_dword(dev, RATR0+4*7, (RATE_ALL_OFDM_AG | RATE_ALL_CCK));
+	write_nic_dword(dev, RATR0 + 4 * 7, (RATE_ALL_OFDM_AG | RATE_ALL_CCK));
 
 	/* Set AckTimeout */
 	/* TODO: (it value is only for FPGA version).
@@ -3637,17 +3646,17 @@ bool rtl8192_adapter_start(struct net_device *dev)
 	/* RT_TRACE(COMP_INIT, "%s():priv->ResetProgress is %d\n", __func__,
 	 *priv->ResetProgress);
 	 */
-	if(priv->ResetProgress == RESET_TYPE_NORESET)
-	rtl8192_SetWirelessMode(dev, priv->ieee80211->mode);
-	if(priv->ResetProgress == RESET_TYPE_NORESET){
-	CamResetAllEntry(dev);
-	{
-		u8 SECR_value = 0x0;
-		SECR_value |= SCR_TxEncEnable;
-		SECR_value |= SCR_RxDecEnable;
-		SECR_value |= SCR_NoSKMC;
-		write_nic_byte(dev, SECR, SECR_value);
-	}
+	if (priv->ResetProgress == RESET_TYPE_NORESET)
+		rtl8192_SetWirelessMode(dev, priv->ieee80211->mode);
+	if (priv->ResetProgress == RESET_TYPE_NORESET) {
+		CamResetAllEntry(dev);
+		{
+			u8 SECR_value = 0x0;
+			SECR_value |= SCR_TxEncEnable;
+			SECR_value |= SCR_RxDecEnable;
+			SECR_value |= SCR_NoSKMC;
+			write_nic_byte(dev, SECR, SECR_value);
+		}
 	}
 
 	/* Beacon related */
@@ -3657,17 +3666,18 @@ bool rtl8192_adapter_start(struct net_device *dev)
 	{
 #define DEFAULT_EDCA 0x005e4332
 		int i;
-		for (i=0; i<QOS_QUEUE_NUM; i++)
-		write_nic_dword(dev, WDCAPARA_ADD[i], DEFAULT_EDCA);
+		for (i = 0; i < QOS_QUEUE_NUM; i++)
+			write_nic_dword(dev, WDCAPARA_ADD[i], DEFAULT_EDCA);
 	}
 #ifdef USB_RX_AGGREGATION_SUPPORT
 	/* 3 For usb rx firmware aggregation control */
-	if(priv->ResetProgress == RESET_TYPE_NORESET)
-	{
+	if (priv->ResetProgress == RESET_TYPE_NORESET) {
 		u32 ulValue;
 		PRT_HIGH_THROUGHPUT	pHTInfo = priv->ieee80211->pHTInfo;
-		ulValue = (pHTInfo->UsbRxFwAggrEn<<24) | (pHTInfo->UsbRxFwAggrPageNum<<16) |
-					(pHTInfo->UsbRxFwAggrPacketNum<<8) | (pHTInfo->UsbRxFwAggrTimeout);
+		ulValue = (pHTInfo->UsbRxFwAggrEn<<24) |
+				(pHTInfo->UsbRxFwAggrPageNum<<16) |
+				(pHTInfo->UsbRxFwAggrPacketNum<<8) |
+				pHTInfo->UsbRxFwAggrTimeout);
 		/*
 		 * If usb rx firmware aggregation is enabled,
 		 * when anyone of three threshold conditions above is reached,
@@ -3680,67 +3690,72 @@ bool rtl8192_adapter_start(struct net_device *dev)
 
 	rtl8192_phy_configmac(dev);
 
-	if (priv->card_8192_version == (u8) VERSION_819xU_A)
-	{
+	if (priv->card_8192_version == (u8) VERSION_819xU_A) {
 		rtl8192_phy_getTxPower(dev);
 		rtl8192_phy_setTxPower(dev, priv->chan);
 	}
 
 	/* Firmware download */
 	init_status = init_firmware(dev);
-	if(!init_status)
-	{
-		RT_TRACE(COMP_ERR,"ERR!!! %s(): Firmware download is failed\n", __func__);
+	if (!init_status) {
+		RT_TRACE(COMP_ERR, "ERR!!! %s(): Firmware download is failed\n",
+			__func__);
 		return init_status;
 	}
 	RT_TRACE(COMP_INIT, "%s():after firmware download\n", __func__);
 
 #ifdef TO_DO_LIST
-if(Adapter->ResetProgress == RESET_TYPE_NORESET)
-	{
-		if(pMgntInfo->RegRfOff == TRUE) {
-			/* User disable RF via registry. */
-			RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
-			MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
-			/* Those action will be discard in MgntActSet_RF_State
-			 * because off the same state
-			 */
-			for(eRFPath = 0; eRFPath <pHalData->NumTotalRFPath; eRFPath++)
-				PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
-		}
-		else if(pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) {
+if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
+	if (pMgntInfo->RegRfOff == TRUE) {
+		/* User disable RF via registry. */
+		RT_TRACE((COMP_INIT | COMP_RF), DBG_LOUD,
+			("InitializeAdapter819xUsb(): Turn off RF for RegRfOff"
+			" ----------\n"));
+		MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
+		/* Those action will be discard in MgntActSet_RF_State
+		 * because off the same state
+		 */
+		for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
+			PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath,
+					0x4, 0xC00, 0x0);
+		} else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) {
 			/* H/W or S/W RF OFF before sleep. */
-			RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RfOffReason(%d) ----------\n", pMgntInfo->RfOffReason));
-			MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
-		}
-		else
-		{
+			RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD,
+				("InitializeAdapter819xUsb(): Turn off RF for"
+				" RfOffReason(%d) ----------\n",
+				pMgntInfo->RfOffReason));
+			MgntActSet_RF_State(Adapter, eRfOff,
+					pMgntInfo->RfOffReason);
+		} else {
 			pHalData->eRFPowerState = eRfOn;
 			pMgntInfo->RfOffReason = 0;
-			RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): RF is on ----------\n"));
+			RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD,
+				("InitializeAdapter819xUsb(): RF is on"
+				" ----------\n"));
 		}
-	}
-	else
-	{
-		if(pHalData->eRFPowerState == eRfOff)
-		{
-			MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
+	} else {
+		if (pHalData->eRFPowerState == eRfOff) {
+			MgntActSet_RF_State(Adapter, eRfOff,
+						pMgntInfo->RfOffReason);
 			/* Those action will be discard in MgntActSet_RF_State
 			 * because off the same state
 			 */
-			for(eRFPath = 0; eRFPath <pHalData->NumTotalRFPath; eRFPath++)
-				PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
+			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath;
+								eRFPath++)
+				PHY_SetRFReg(Adapter,
+					(RF90_RADIO_PATH_E)eRFPath,
+					0x4, 0xC00, 0x0);
 		}
 	}
 #endif
 	/* config RF. */
-	if(priv->ResetProgress == RESET_TYPE_NORESET){
-	rtl8192_phy_RFConfig(dev);
+	if (priv->ResetProgress == RESET_TYPE_NORESET) {
+		rtl8192_phy_RFConfig(dev);
 	RT_TRACE(COMP_INIT, "%s():after phy RF config\n", __func__);
 	}
 
 
-	if(priv->ieee80211->FwRWRF)
+	if (priv->ieee80211->FwRWRF)
 		/* We can force firmware to do RF-R/W */
 		priv->Rf_Mode = RF_OP_By_FW;
 	else
@@ -3752,54 +3767,49 @@ if(Adapter->ResetProgress == RESET_TYPE_NORESET)
 	rtl8192_setBBreg(dev, rFPGA0_RFMOD, bCCKEn, 0x1);
 	rtl8192_setBBreg(dev, rFPGA0_RFMOD, bOFDMEn, 0x1);
 
-	if(priv->ResetProgress == RESET_TYPE_NORESET)
-	{
+	if (priv->ResetProgress == RESET_TYPE_NORESET) {
 		/* if D or C cut */
 		u8 tmpvalue = read_nic_byte(dev, 0x301);
-		if(tmpvalue ==0x03)
-		{
+		if (tmpvalue == 0x03) {
 			priv->bDcut = TRUE;
 			RT_TRACE(COMP_POWER_TRACKING, "D-cut\n");
-		}
-		else
-		{
+		} else {
 			priv->bDcut = FALSE;
 			RT_TRACE(COMP_POWER_TRACKING, "C-cut\n");
 		}
 		dm_initialize_txpower_tracking(dev);
 
-		if(priv->bDcut == TRUE)
-		{
+		if (priv->bDcut == TRUE) {
 			u32 i, TempCCk;
-			u32 tmpRegA= rtl8192_QueryBBReg(dev,rOFDM0_XATxIQImbalance,bMaskDWord);
+			u32 tmpRegA = rtl8192_QueryBBReg(dev,
+					rOFDM0_XATxIQImbalance, bMaskDWord);
 			/* u32 tmpRegC= rtl8192_QueryBBReg(dev,
 			 * rOFDM0_XCTxIQImbalance,bMaskDWord);
 			 */
-			for(i = 0; i<TxBBGainTableLength; i++)
-			{
-				if(tmpRegA == priv->txbbgain_table[i].txbbgain_value)
-				{
-					priv->rfa_txpowertrackingindex= (u8)i;
-					priv->rfa_txpowertrackingindex_real= (u8)i;
-					priv->rfa_txpowertracking_default= priv->rfa_txpowertrackingindex;
+			for (i = 0; i < TxBBGainTableLength; i++) {
+				if (tmpRegA == priv->txbbgain_table[i].txbbgain_value) {
+					priv->rfa_txpowertrackingindex = (u8)i;
+					priv->rfa_txpowertrackingindex_real =
+									(u8)i;
+					priv->rfa_txpowertracking_default =
+						priv->rfa_txpowertrackingindex;
 					break;
 				}
 			}
 
-			TempCCk = rtl8192_QueryBBReg(dev, rCCK0_TxFilter1, bMaskByte2);
-
-			for(i=0 ; i<CCKTxBBGainTableLength ; i++)
-			{
+			TempCCk = rtl8192_QueryBBReg(dev, rCCK0_TxFilter1,
+							bMaskByte2);
 
-				if(TempCCk == priv->cck_txbbgain_table[i].ccktxbb_valuearray[0])
-				{
-					priv->cck_present_attentuation_20Mdefault=(u8) i;
+			for (i = 0 ; i < CCKTxBBGainTableLength ; i++) {
+				if (TempCCk == priv->cck_txbbgain_table[i].ccktxbb_valuearray[0]) {
+					priv->cck_present_attentuation_20Mdefault = (u8) i;
 					break;
 				}
 			}
-			priv->cck_present_attentuation_40Mdefault= 0;
-			priv->cck_present_attentuation_difference= 0;
-			priv->cck_present_attentuation = priv->cck_present_attentuation_20Mdefault;
+			priv->cck_present_attentuation_40Mdefault = 0;
+			priv->cck_present_attentuation_difference = 0;
+			priv->cck_present_attentuation =
+				priv->cck_present_attentuation_20Mdefault;
 
 			/* pMgntInfo->bTXPowerTracking = FALSE; */
 			/* TEMPLY DISABLE */
@@ -3833,14 +3843,13 @@ HalTxCheckStuck819xUsb(
 	)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	u16 		RegTxCounter = read_nic_word(dev, 0x128);
+	u16		RegTxCounter = read_nic_word(dev, 0x128);
 	bool		bStuck = FALSE;
-	RT_TRACE(COMP_RESET,"%s():RegTxCounter is %d,TxCounter is %d\n",__func__,RegTxCounter,priv->TxCounter);
-	if(priv->TxCounter==RegTxCounter)
+	RT_TRACE(COMP_RESET, "%s():RegTxCounter is %d, TxCounter is %d\n",
+				__func__, RegTxCounter, priv->TxCounter);
+	if (priv->TxCounter == RegTxCounter)
 		bStuck = TRUE;
-
 	priv->TxCounter = RegTxCounter;
-
 	return bStuck;
 }
 
@@ -3863,27 +3872,28 @@ TxCheckStuck(struct net_device *dev)
 	/* RT_TRACE(COMP_RESET, " ==> TxCheckStuck()\n"); */
 	/* PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); */
 	/* spin_lock_irqsave(&priv->ieee80211->lock,flags); */
-	     for (QueueID = 0; QueueID<=BEACON_QUEUE;QueueID ++)
-	     {
-	     		if(QueueID == TXCMD_QUEUE)
-		         continue;
+	for (QueueID = 0; QueueID <= BEACON_QUEUE; QueueID++) {
+		if (QueueID == TXCMD_QUEUE)
+			continue;
 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
-			if((skb_queue_len(&priv->ieee80211->skb_waitQ[QueueID]) == 0) && (skb_queue_len(&priv->ieee80211->skb_aggQ[QueueID]) == 0) && (skb_queue_len(&priv->ieee80211->skb_drv_aggQ[QueueID]) == 0))
+			if ((skb_queue_len(&priv->ieee80211->skb_waitQ[QueueID]) == 0)
+					&& (skb_queue_len(&priv->ieee80211->skb_aggQ[QueueID]) == 0)
+					&& (skb_queue_len(&priv->ieee80211->skb_drv_aggQ[QueueID]) == 0))
 #else
-		     	if((skb_queue_len(&priv->ieee80211->skb_waitQ[QueueID]) == 0)  && (skb_queue_len(&priv->ieee80211->skb_aggQ[QueueID]) == 0))
+			if ((skb_queue_len(&priv->ieee80211->skb_waitQ[QueueID]) == 0)
+					&& (skb_queue_len(&priv->ieee80211->skb_aggQ[QueueID]) == 0))
 #endif
-			 	continue;
+				continue;
 
-	             bCheckFwTxCnt = true;
+			bCheckFwTxCnt = true;
 	     }
 	/* PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); */
 	/* spin_unlock_irqrestore(&priv->ieee80211->lock,flags); */
 	/* RT_TRACE(COMP_RESET,"bCheckFwTxCnt is %d\n",bCheckFwTxCnt); */
-	if(bCheckFwTxCnt)
-	{
-		if(HalTxCheckStuck819xUsb(dev))
-		{
-			RT_TRACE(COMP_RESET, "TxCheckStuck(): Fw indicates no Tx condition! \n");
+	if (bCheckFwTxCnt) {
+		if (HalTxCheckStuck819xUsb(dev)) {
+			RT_TRACE(COMP_RESET, "TxCheckStuck(): Fw indicates no"
+					" Tx condition!\n");
 			return RESET_TYPE_SILENT;
 		}
 	}
@@ -3893,73 +3903,62 @@ TxCheckStuck(struct net_device *dev)
 bool
 HalRxCheckStuck819xUsb(struct net_device *dev)
 {
-	u16 	RegRxCounter = read_nic_word(dev, 0x130);
+	u16	RegRxCounter = read_nic_word(dev, 0x130);
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	bool bStuck = FALSE;
-	static u8	rx_chk_cnt = 0;
-	RT_TRACE(COMP_RESET,"%s(): RegRxCounter is %d,RxCounter is %d\n",__func__,RegRxCounter,priv->RxCounter);
+	static u8	rx_chk_cnt;
+	RT_TRACE(COMP_RESET, "%s(): RegRxCounter is %d, RxCounter is %d\n",
+				__func__, RegRxCounter, priv->RxCounter);
 	/* If rssi is small, we should check rx for long time because of bad rx.
 	 * or maybe it will continuous silent reset every 2 seconds.
 	 */
 	rx_chk_cnt++;
-	if(priv->undecorated_smoothed_pwdb >= (RateAdaptiveTH_High+5))
-	{
+	if (priv->undecorated_smoothed_pwdb >= (RateAdaptiveTH_High + 5))
 		rx_chk_cnt = 0;	/* high rssi, check rx stuck right now. */
-	}
-	else if(priv->undecorated_smoothed_pwdb < (RateAdaptiveTH_High+5) &&
-		((priv->CurrentChannelBW!=HT_CHANNEL_WIDTH_20&&priv->undecorated_smoothed_pwdb>=RateAdaptiveTH_Low_40M) ||
-		(priv->CurrentChannelBW==HT_CHANNEL_WIDTH_20&&priv->undecorated_smoothed_pwdb>=RateAdaptiveTH_Low_20M)) )
-	{
-		if(rx_chk_cnt < 2)
-		{
+	else if (priv->undecorated_smoothed_pwdb < (RateAdaptiveTH_High + 5) &&
+			((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 &&
+			priv->undecorated_smoothed_pwdb >=
+			RateAdaptiveTH_Low_40M) ||
+			(priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 &&
+			priv->undecorated_smoothed_pwdb >=
+			RateAdaptiveTH_Low_20M))) {
+		if (rx_chk_cnt < 2)
 			return bStuck;
-		}
 		else
-		{
 			rx_chk_cnt = 0;
-		}
-	}
-	else if(((priv->CurrentChannelBW!=HT_CHANNEL_WIDTH_20&&priv->undecorated_smoothed_pwdb<RateAdaptiveTH_Low_40M) ||
-		(priv->CurrentChannelBW==HT_CHANNEL_WIDTH_20&&priv->undecorated_smoothed_pwdb<RateAdaptiveTH_Low_20M)) &&
-		priv->undecorated_smoothed_pwdb >= VeryLowRSSI)
-	{
-		if(rx_chk_cnt < 4)
-		{
+	} else if (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 &&
+			priv->undecorated_smoothed_pwdb <
+			RateAdaptiveTH_Low_40M) ||
+			(priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 &&
+			priv->undecorated_smoothed_pwdb <
+			RateAdaptiveTH_Low_20M)) &&
+			priv->undecorated_smoothed_pwdb >= VeryLowRSSI) {
+		if (rx_chk_cnt < 4)
 			/* DbgPrint("RSSI < %d && RSSI >= %d,"
-			 *	" no check this time \n", RateAdaptiveTH_Low,
+			 *	" no check this time\n", RateAdaptiveTH_Low,
 			 *					 VeryLowRSSI);
 			 */
 			return bStuck;
-		}
 		else
-		{
 			rx_chk_cnt = 0;
 			/* DbgPrint("RSSI < %d && RSSI >= %d, check this time"
 			 *		"\n", RateAdaptiveTH_Low, VeryLowRSSI);
 			 */
-		}
-	}
-	else
-	{
-		if(rx_chk_cnt < 8)
-		{
-			/* DbgPrint("RSSI <= %d, no check this time \n",
+	} else {
+		if (rx_chk_cnt < 8)
+			/* DbgPrint("RSSI <= %d, no check this time\n",
 			 *					 VeryLowRSSI);
 			 */
 			return bStuck;
-		}
 		else
-		{
 			rx_chk_cnt = 0;
-			/* DbgPrint("RSSI <= %d, check this time \n",
+			/* DbgPrint("RSSI <= %d, check this time\n",
 			 *					 VeryLowRSSI);
 			 */
-		}
 	}
 
-	if(priv->RxCounter==RegRxCounter)
+	if (priv->RxCounter == RegRxCounter)
 		bStuck = TRUE;
-
 	priv->RxCounter = RegRxCounter;
 
 	return bStuck;
@@ -3975,15 +3974,13 @@ RxCheckStuck(struct net_device *dev)
 	/* RT_TRACE(COMP_RESET," ==> RxCheckStuck()\n"); */
 	/* PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); */
 
-	 if(priv->IrpPendingCount > 1)
+	 if (priv->IrpPendingCount > 1)
 		bRxCheck = TRUE;
 	/* PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); */
 
-	/* RT_TRACE(COMP_RESET,"bRxCheck is %d \n",bRxCheck); */
-	if(bRxCheck)
-	{
-		if(HalRxCheckStuck819xUsb(dev))
-		{
+	/* RT_TRACE(COMP_RESET,"bRxCheck is %d\n",bRxCheck); */
+	if (bRxCheck) {
+		if (HalRxCheckStuck819xUsb(dev)) {
 			RT_TRACE(COMP_RESET, "RxStuck Condition\n");
 			return RESET_TYPE_SILENT;
 		}
@@ -3991,30 +3988,35 @@ RxCheckStuck(struct net_device *dev)
 	return RESET_TYPE_NORESET;
 }
 
-/*	This function is called by Checkforhang to check whether we should ask OS to reset driver
+/*	This function is called by Checkforhang to check whether we should
+ *	 ask OS to reset driver
  *
  *	\param pAdapter	The adapter context for this miniport
  *
- *	Note:NIC with USB interface sholud not call this function because we cannot scan descriptor
+ *	Note:NIC with USB interface sholud not call this function because we
+ *	 cannot scan descriptor
  *	to judge whether there is tx stuck.
  *	Note: This function may be required to be rewrite for Vista OS.
  *	<<<Assumption: Tx spinlock has been acquired >>>
  *
- *	8185 and 8185b does not implement this function. This is added by Emily at 2006.11.24
+ *	8185 and 8185b does not implement this function.
+ *	 This is added by Emily at 2006.11.24
  */
 RESET_TYPE
 rtl819x_ifcheck_resetornot(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	RESET_TYPE	TxResetType = RESET_TYPE_NORESET;
-	RESET_TYPE	RxResetType = RESET_TYPE_NORESET;
-	RT_RF_POWER_STATE 	rfState;
+	RESET_TYPE		TxResetType = RESET_TYPE_NORESET;
+	RESET_TYPE		RxResetType = RESET_TYPE_NORESET;
+	RT_RF_POWER_STATE	rfState;
 
 	rfState = priv->ieee80211->eRFPowerState;
 
 	TxResetType = TxCheckStuck(dev);
-	if( rfState != eRfOff ||
-		/* ADAPTER_TEST_STATUS_FLAG(Adapter, ADAPTER_STATUS_FW_DOWNLOAD_FAILURE)) && */
+	if (rfState != eRfOff ||
+		/* ADAPTER_TEST_STATUS_FLAG(Adapter,
+		 * ADAPTER_STATUS_FW_DOWNLOAD_FAILURE)) &&
+		 */
 		(priv->ieee80211->iw_mode != IW_MODE_ADHOC))
 	{
 		/* If driver is in the status of firmware download failure,
@@ -4032,13 +4034,14 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
 		 */
 		RxResetType = RxCheckStuck(dev);
 	}
-	if(TxResetType==RESET_TYPE_NORMAL || RxResetType==RESET_TYPE_NORMAL)
+	if (TxResetType == RESET_TYPE_NORMAL ||
+				RxResetType == RESET_TYPE_NORMAL)
 		return RESET_TYPE_NORMAL;
-	else if(TxResetType==RESET_TYPE_SILENT || RxResetType==RESET_TYPE_SILENT){
-		RT_TRACE(COMP_RESET,"%s():silent reset\n",__func__);
+	else if(TxResetType == RESET_TYPE_SILENT ||
+				RxResetType==RESET_TYPE_SILENT){
+		RT_TRACE(COMP_RESET, "%s():silent reset\n", __func__);
 		return RESET_TYPE_SILENT;
-	}
-	else
+	} else
 		return RESET_TYPE_NORESET;
 
 }
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] staging: rtl8192u: fix checkpatch.pl issues to line 5000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5000
  2010-06-13  6:16 ` [PATCH 1/4] staging: rtl8192u: fix checkpatch.pl issues to line 4000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 4000 Mike Gilks
@ 2010-06-13  6:16   ` Mike Gilks
  2010-06-13  6:16     ` [PATCH 3/4] staging: rtl8192u: fix checkpatch.pl issues to line 5500 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5500 Mike Gilks
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Gilks @ 2010-06-13  6:16 UTC (permalink / raw)
  To: gregkh, mchehab, julia, joe; +Cc: devel, linux-kernel, Mike Gilks

Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
---
 drivers/staging/rtl8192u/r8192U_core.c |  724 ++++++++++++++++----------------
 1 files changed, 360 insertions(+), 364 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 21e3ac3..1a89b20 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4037,8 +4037,8 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
 	if (TxResetType == RESET_TYPE_NORMAL ||
 				RxResetType == RESET_TYPE_NORMAL)
 		return RESET_TYPE_NORMAL;
-	else if(TxResetType == RESET_TYPE_SILENT ||
-				RxResetType==RESET_TYPE_SILENT){
+	else if (TxResetType == RESET_TYPE_SILENT ||
+				RxResetType == RESET_TYPE_SILENT){
 		RT_TRACE(COMP_RESET, "%s():silent reset\n", __func__);
 		return RESET_TYPE_SILENT;
 	} else
@@ -4046,144 +4046,74 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
 
 }
 
-void rtl8192_cancel_deferred_work(struct r8192_priv* priv);
+void rtl8192_cancel_deferred_work(struct r8192_priv *priv);
 int _rtl8192_up(struct net_device *dev);
 int rtl8192_close(struct net_device *dev);
 
-
-
 void
-CamRestoreAllEntry(	struct net_device *dev)
+CamRestoreAllEntry(struct net_device *dev)
 {
 	u8 EntryId = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	u8*	MacAddr = priv->ieee80211->current_network.bssid;
+	u8 *MacAddr = priv->ieee80211->current_network.bssid;
 
 	static u8	CAM_CONST_ADDR[4][6] = {
 		{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 		{0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
 		{0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
-		{0x00, 0x00, 0x00, 0x00, 0x00, 0x03}};
-	static u8	CAM_CONST_BROAD[] =
-		{0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+		{0x00, 0x00, 0x00, 0x00, 0x00, 0x03} };
+	static u8	CAM_CONST_BROAD[] = {
+		0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
-	RT_TRACE(COMP_SEC, "CamRestoreAllEntry: \n");
+	RT_TRACE(COMP_SEC, "CamRestoreAllEntry:\n");
 
 
-	if ((priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP40)||
-	    (priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP104))
-	{
+	if ((priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP40) ||
+		(priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP104)) {
 
-		for(EntryId=0; EntryId<4; EntryId++)
-		{
-			{
-				MacAddr = CAM_CONST_ADDR[EntryId];
-				setKey(dev,
-						EntryId ,
-						EntryId,
-						priv->ieee80211->pairwise_key_type,
-						MacAddr,
-						0,
-						NULL);
-			}
+		for (EntryId = 0; EntryId < 4; EntryId++) {
+			MacAddr = CAM_CONST_ADDR[EntryId];
+			setKey(dev, EntryId, EntryId,
+				priv->ieee80211->pairwise_key_type,
+				MacAddr, 0, NULL);
 		}
-
-	}
-	else if(priv->ieee80211->pairwise_key_type == KEY_TYPE_TKIP)
-	{
-
-		{
-			if(priv->ieee80211->iw_mode == IW_MODE_ADHOC)
-				setKey(dev,
-						4,
-						0,
-						priv->ieee80211->pairwise_key_type,
-						(u8*)dev->dev_addr,
-						0,
-						NULL);
-			else
-				setKey(dev,
-						4,
-						0,
-						priv->ieee80211->pairwise_key_type,
-						MacAddr,
-						0,
-						NULL);
+	} else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_TKIP) {
+		if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
+			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
+				(u8 *)dev->dev_addr, 0,	NULL);
+		else
+			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
+				MacAddr, 0, NULL);
+	} else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP) {
+		if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
+			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
+				(u8 *)dev->dev_addr, 0, NULL);
+		else
+			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
+				MacAddr, 0, NULL);
 		}
-	}
-	else if(priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP)
-	{
 
-		{
-			if(priv->ieee80211->iw_mode == IW_MODE_ADHOC)
-				setKey(dev,
-						4,
-						0,
-						priv->ieee80211->pairwise_key_type,
-						(u8*)dev->dev_addr,
-						0,
-						NULL);
-			else
-				setKey(dev,
-						4,
-						0,
-						priv->ieee80211->pairwise_key_type,
-						MacAddr,
-						0,
-						NULL);
-		}
-	}
-
-
-
-	if(priv->ieee80211->group_key_type == KEY_TYPE_TKIP)
-	{
+	if (priv->ieee80211->group_key_type == KEY_TYPE_TKIP) {
 		MacAddr = CAM_CONST_BROAD;
-		for(EntryId=1 ; EntryId<4 ; EntryId++)
-		{
-			{
-				setKey(dev,
-						EntryId,
-						EntryId,
-						priv->ieee80211->group_key_type,
-						MacAddr,
-						0,
-						NULL);
-			}
+		for (EntryId = 1 ; EntryId < 4 ; EntryId++) {
+			setKey(dev, EntryId, EntryId,
+				priv->ieee80211->group_key_type,
+				MacAddr, 0, NULL);
 		}
-		if(priv->ieee80211->iw_mode == IW_MODE_ADHOC)
-				setKey(dev,
-						0,
-						0,
-						priv->ieee80211->group_key_type,
-						CAM_CONST_ADDR[0],
-						0,
-						NULL);
-	}
-	else if(priv->ieee80211->group_key_type == KEY_TYPE_CCMP)
-	{
+	}
+	if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
+		setKey(dev, 0, 0, priv->ieee80211->group_key_type,
+			CAM_CONST_ADDR[0], 0, NULL);
+	else if (priv->ieee80211->group_key_type == KEY_TYPE_CCMP) {
 		MacAddr = CAM_CONST_BROAD;
-		for(EntryId=1; EntryId<4 ; EntryId++)
-		{
-			{
-				setKey(dev,
-						EntryId ,
-						EntryId,
-						priv->ieee80211->group_key_type,
-						MacAddr,
-						0,
-						NULL);
-			}
+		for (EntryId = 1; EntryId < 4 ; EntryId++) {
+			setKey(dev, EntryId, EntryId,
+				priv->ieee80211->group_key_type,
+				MacAddr, 0, NULL);
 		}
-
-		if(priv->ieee80211->iw_mode == IW_MODE_ADHOC)
-				setKey(dev,
-						0 ,
-						0,
-						priv->ieee80211->group_key_type,
-						CAM_CONST_ADDR[0],
-						0,
-						NULL);
+	if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
+		setKey(dev, 0, 0, priv->ieee80211->group_key_type,
+		CAM_CONST_ADDR[0], 0, NULL);
 	}
 }
 
@@ -4205,24 +4135,24 @@ rtl819x_ifsilentreset(struct net_device *dev)
 	/* 2007.07.20. If we need to check CCK stop, uncomment this line. */
 	/* bStuck = Adapter->HalFunc.CheckHWStopHandler(Adapter); */
 
-	if(priv->ResetProgress==RESET_TYPE_NORESET)
-	{
-RESET_START:
+	if (priv->ResetProgress == RESET_TYPE_NORESET) {
+	RESET_START:
 
-		RT_TRACE(COMP_RESET,"=========>Reset progress!! \n");
+		RT_TRACE(COMP_RESET, "=========>Reset progress!!\n");
 
 		/* Set the variable for reset. */
 		priv->ResetProgress = RESET_TYPE_SILENT;
 		/* rtl8192_close(dev); */
 		down(&priv->wx_sem);
-		if(priv->up == 0)
-		{
-			RT_TRACE(COMP_ERR,"%s():the driver is not up! return\n",__func__);
+		if (priv->up == 0) {
+			RT_TRACE(COMP_ERR, "%s():the driver is not up!"
+				" return\n", __func__);
 			up(&priv->wx_sem);
 			return ;
 		}
 		priv->up = 0;
-		RT_TRACE(COMP_RESET,"%s():======>start to down the driver\n",__func__);
+		RT_TRACE(COMP_RESET, "%s():======>start to down the driver\n",
+				__func__);
 		/* if(!netif_queue_stopped(dev))
 		 *	netif_stop_queue(dev);
 		 */
@@ -4233,8 +4163,7 @@ RESET_START:
 		del_timer_sync(&priv->watch_dog_timer);
 
 		ieee->sync_scan_hurryup = 1;
-		if(ieee->state == IEEE80211_LINKED)
-		{
+		if (ieee->state == IEEE80211_LINKED) {
 			down(&ieee->wx_sem);
 			printk("ieee->state is IEEE80211_LINKED\n");
 			ieee80211_stop_send_beacons(priv->ieee80211);
@@ -4243,47 +4172,44 @@ RESET_START:
 			ieee80211_stop_scan(ieee);
 			netif_carrier_off(dev);
 			up(&ieee->wx_sem);
-		}
-		else{
+		} else {
 			printk("ieee->state is NOT LINKED\n");
-			ieee80211_softmac_stop_protocol(priv->ieee80211);			}
+			ieee80211_softmac_stop_protocol(priv->ieee80211);
+		}
 		up(&priv->wx_sem);
-		RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__func__);
+		RT_TRACE(COMP_RESET, "%s():<==========down process is"
+				" finished\n", __func__);
 		/* rtl8192_irq_disable(dev); */
-		RT_TRACE(COMP_RESET,"%s():===========>start to up the driver\n",__func__);
+		RT_TRACE(COMP_RESET, "%s():===========>start to up the"
+				" driver\n", __func__);
 		reset_status = _rtl8192_up(dev);
 
-		RT_TRACE(COMP_RESET,"%s():<===========up process is finished\n",__func__);
-		if(reset_status == -EAGAIN)
-		{
-			if(reset_times < 3)
-			{
+		RT_TRACE(COMP_RESET, "%s():<===========up process is"
+				" finished\n", __func__);
+		if (reset_status == -EAGAIN) {
+			if (reset_times < 3) {
 				reset_times++;
 				goto RESET_START;
-			}
-			else
-			{
-				RT_TRACE(COMP_ERR," ERR!!! %s():  Reset Failed!!\n", __func__);
-			}
+			} else
+				RT_TRACE(COMP_ERR, " ERR!!! %s():  Reset"
+						" Failed!!\n", __func__);
 		}
 		ieee->is_silent_reset = 1;
 		EnableHWSecurityConfig8192(dev);
-		if(ieee->state == IEEE80211_LINKED && ieee->iw_mode == IW_MODE_INFRA)
-		{
-			ieee->set_chan(ieee->dev, ieee->current_network.channel);
+		if (ieee->state == IEEE80211_LINKED && ieee->iw_mode ==
+				IW_MODE_INFRA) {
+			ieee->set_chan(ieee->dev,
+					ieee->current_network.channel);
 
 			queue_work(ieee->wq, &ieee->associate_complete_wq);
-
-		}
-		else if(ieee->state == IEEE80211_LINKED && ieee->iw_mode == IW_MODE_ADHOC)
-		{
-			ieee->set_chan(ieee->dev, ieee->current_network.channel);
+		} else if (ieee->state == IEEE80211_LINKED && ieee->iw_mode ==
+				IW_MODE_ADHOC) {
+			ieee->set_chan(ieee->dev,
+					ieee->current_network.channel);
 			ieee->link_change(ieee->dev);
 
 			/* notify_wx_assoc_event(ieee); */
-
 			ieee80211_start_send_beacons(ieee);
-
 			if (ieee->data_hard_resume)
 				ieee->data_hard_resume(ieee->dev);
 			netif_carrier_on(ieee->dev);
@@ -4294,132 +4220,139 @@ RESET_START:
 		priv->ResetProgress = RESET_TYPE_NORESET;
 		priv->reset_count++;
 
-		priv->bForcedSilentReset =false;
+		priv->bForcedSilentReset = false;
 		priv->bResetInProgress = false;
 
 		/* For test --> force write UFWP. */
 		write_nic_byte(dev, UFWP, 1);
-		RT_TRACE(COMP_RESET, "Reset finished!! ====>[%d]\n", priv->reset_count);
+		RT_TRACE(COMP_RESET, "Reset finished!! ====>[%d]\n",
+				priv->reset_count);
 	}
 }
 
 void CAM_read_entry(
 	struct net_device *dev,
-	u32	 		iIndex
+	u32	iIndex
 )
 {
- 	u32 target_command=0;
-	 u32 target_content=0;
-	 u8 entry_i=0;
-	 u32 ulStatus;
-	s32 i=100;
+	u32 target_command = 0;
+	u32 target_content = 0;
+	u8 entry_i = 0;
+	u32 ulStatus;
+	s32 i = 100;
 	/* printk("=======>start read CAM\n"); */
- 	for(entry_i=0;entry_i<CAM_CONTENT_COUNT;entry_i++)
- 	{
-   	/* polling bit, and No Write enable, and address */
-		target_command= entry_i + CAM_CONTENT_COUNT * iIndex;
-		target_command= target_command | BIT31;
+	for (entry_i = 0; entry_i < CAM_CONTENT_COUNT; entry_i++) {
+		/* polling bit, and No Write enable, and address */
+		target_command = entry_i + CAM_CONTENT_COUNT * iIndex;
+		target_command = target_command | BIT31;
 
 	/* Check polling bit is clear */
 	/* mdelay(1); */
-		while ((i--) >=0 ) {
+		while ((i--) >= 0) {
 			ulStatus = read_nic_dword(dev, RWCAM);
-			if(ulStatus & BIT31){
+			if (ulStatus & BIT31)
 				continue;
-			}
-			else{
+			else
 				break;
-			}
 		}
 		write_nic_dword(dev, RWCAM, target_command);
-		RT_TRACE(COMP_SEC,"CAM_read_entry(): WRITE A0: %x \n",target_command);
-		/* printk("CAM_read_entry(): WRITE A0: %lx \n",target_command); */
+		RT_TRACE(COMP_SEC, "CAM_read_entry(): WRITE A0: %x\n",
+				target_command);
+		/* printk("CAM_read_entry(): WRITE A0: %lx\n",
+		 * target_command);
+		 */
 		target_content = read_nic_dword(dev, RCAMO);
-		RT_TRACE(COMP_SEC, "CAM_read_entry(): WRITE A8: %x \n",target_content);
-	 	/* printk("CAM_read_entry(): WRITE A8: %lx \n",target_content); */
+		RT_TRACE(COMP_SEC, "CAM_read_entry(): WRITE A8: %x\n",
+				target_content);
+		/* printk("CAM_read_entry(): WRITE A8: %lx\n",
+		 *target_content);
+		 */
 	}
 	printk("\n");
 }
 
 void rtl819x_update_rxcounts(
 	struct r8192_priv *priv,
-	u32* TotalRxBcnNum,
-	u32* TotalRxDataNum
+	u32 *TotalRxBcnNum,
+	u32 *TotalRxDataNum
 )
 {
-	u16 			SlotIndex;
-	u8			i;
+	u16		SlotIndex;
+	u8		i;
 
 	*TotalRxBcnNum = 0;
 	*TotalRxDataNum = 0;
 
-	SlotIndex = (priv->ieee80211->LinkDetectInfo.SlotIndex++)%(priv->ieee80211->LinkDetectInfo.SlotNum);
-	priv->ieee80211->LinkDetectInfo.RxBcnNum[SlotIndex] = priv->ieee80211->LinkDetectInfo.NumRecvBcnInPeriod;
-	priv->ieee80211->LinkDetectInfo.RxDataNum[SlotIndex] = priv->ieee80211->LinkDetectInfo.NumRecvDataInPeriod;
-	for( i=0; i<priv->ieee80211->LinkDetectInfo.SlotNum; i++ ){
+	SlotIndex = (priv->ieee80211->LinkDetectInfo.SlotIndex++) %
+			(priv->ieee80211->LinkDetectInfo.SlotNum);
+	priv->ieee80211->LinkDetectInfo.RxBcnNum[SlotIndex] =
+			priv->ieee80211->LinkDetectInfo.NumRecvBcnInPeriod;
+	priv->ieee80211->LinkDetectInfo.RxDataNum[SlotIndex] =
+			priv->ieee80211->LinkDetectInfo.NumRecvDataInPeriod;
+	for (i = 0; i < priv->ieee80211->LinkDetectInfo.SlotNum; i++) {
 		*TotalRxBcnNum += priv->ieee80211->LinkDetectInfo.RxBcnNum[i];
-		*TotalRxDataNum += priv->ieee80211->LinkDetectInfo.RxDataNum[i];
+		*TotalRxDataNum +=
+			priv->ieee80211->LinkDetectInfo.RxDataNum[i];
 	}
 }
 
 
 extern	void	rtl819x_watchdog_wqcallback(struct work_struct *work)
 {
-	struct delayed_work *dwork = container_of(work,struct delayed_work,work);
-       struct r8192_priv *priv = container_of(dwork,struct r8192_priv,watch_dog_wq);
-       struct net_device *dev = priv->ieee80211->dev;
-	struct ieee80211_device* ieee = priv->ieee80211;
+	struct delayed_work *dwork = container_of(work, struct delayed_work,
+							work);
+	struct r8192_priv *priv = container_of(dwork, struct r8192_priv,
+							watch_dog_wq);
+	struct net_device *dev = priv->ieee80211->dev;
+	struct ieee80211_device *ieee = priv->ieee80211;
 	RESET_TYPE	ResetType = RESET_TYPE_NORESET;
-	static u8	check_reset_cnt=0;
+	static u8	check_reset_cnt;
 	bool bBusyTraffic = false;
 
-	if(!priv->up)
+	if (!priv->up)
 		return;
 	hal_dm_watchdog(dev);
 
 	/* to get busy traffic condition */
-	{ if(ieee->state == IEEE80211_LINKED) {
-			if(	ieee->LinkDetectInfo.NumRxOkInPeriod> 666 ||
-				ieee->LinkDetectInfo.NumTxOkInPeriod> 666 ) {
-				bBusyTraffic = true;
-			}
-			ieee->LinkDetectInfo.NumRxOkInPeriod = 0;
-			ieee->LinkDetectInfo.NumTxOkInPeriod = 0;
-			ieee->LinkDetectInfo.bBusyTraffic = bBusyTraffic;
-		}
+	if (ieee->state == IEEE80211_LINKED) {
+		if (ieee->LinkDetectInfo.NumRxOkInPeriod > 666 ||
+				ieee->LinkDetectInfo.NumTxOkInPeriod > 666)
+			bBusyTraffic = true;
+
+		ieee->LinkDetectInfo.NumRxOkInPeriod = 0;
+		ieee->LinkDetectInfo.NumTxOkInPeriod = 0;
+		ieee->LinkDetectInfo.bBusyTraffic = bBusyTraffic;
 	}
 	/* added by amy for AP roaming */
-	{
-		if(priv->ieee80211->state == IEEE80211_LINKED && priv->ieee80211->iw_mode == IW_MODE_INFRA)
-		{
-			u32	TotalRxBcnNum = 0;
-			u32	TotalRxDataNum = 0;
-
-			rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
-			if((TotalRxBcnNum+TotalRxDataNum) == 0)
-			{
-				#ifdef TODO
-				if(rfState == eRfOff)
-					RT_TRACE(COMP_ERR,"========>%s()\n",__func__);
-				#endif
-				printk("===>%s(): AP is power off,connect another one\n",__func__);
-				/* Dot11d_Reset(dev); */
-				priv->ieee80211->state = IEEE80211_ASSOCIATING;
-				notify_wx_assoc_event(priv->ieee80211);
-				RemovePeerTS(priv->ieee80211,priv->ieee80211->current_network.bssid);
-				priv->ieee80211->link_change(dev);
-                                queue_work(priv->ieee80211->wq, &priv->ieee80211->associate_procedure_wq);
-
+	if (priv->ieee80211->state == IEEE80211_LINKED &&
+			priv->ieee80211->iw_mode == IW_MODE_INFRA) {
+		u32	TotalRxBcnNum = 0;
+		u32	TotalRxDataNum = 0;
+		rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
+		if ((TotalRxBcnNum + TotalRxDataNum) == 0) {
+			#ifdef TODO
+			if (rfState == eRfOff)
+				RT_TRACE(COMP_ERR, "========>%s()\n",
+						__func__);
+			#endif
+			printk("===>%s(): AP is power off,connect"
+					" another one\n", __func__);
+			/* Dot11d_Reset(dev); */
+			priv->ieee80211->state = IEEE80211_ASSOCIATING;
+			notify_wx_assoc_event(priv->ieee80211);
+			RemovePeerTS(priv->ieee80211,
+				priv->ieee80211->current_network.bssid);
+			priv->ieee80211->link_change(dev);
+			queue_work(priv->ieee80211->wq,
+				&priv->ieee80211->associate_procedure_wq);
 			}
-		}
-		priv->ieee80211->LinkDetectInfo.NumRecvBcnInPeriod=0;
-		priv->ieee80211->LinkDetectInfo.NumRecvDataInPeriod=0;
 	}
+		priv->ieee80211->LinkDetectInfo.NumRecvBcnInPeriod = 0;
+		priv->ieee80211->LinkDetectInfo.NumRecvDataInPeriod = 0;
 	/* CAM_read_entry(dev,4); */
 	/* check if reset the driver */
-	if(check_reset_cnt++ >= 3)
-	{
-    		ResetType = rtl819x_ifcheck_resetornot(dev);
+	if (check_reset_cnt++ >= 3) {
+		ResetType = rtl819x_ifcheck_resetornot(dev);
 		check_reset_cnt = 3;
 		/* DbgPrint("Start to check silent reset\n"); */
 	}
@@ -4429,12 +4362,18 @@ extern	void	rtl819x_watchdog_wqcallback(struct work_struct *work)
 	 * priv->force_reset, priv->ResetProgress, priv->bForcedSilentReset,
 	 * priv->bDisableNormalResetCheck,ResetType);
 	 */
-	if( (priv->force_reset) || (priv->ResetProgress==RESET_TYPE_NORESET &&
-		(priv->bForcedSilentReset ||
-		(!priv->bDisableNormalResetCheck && ResetType==RESET_TYPE_SILENT))))
+	if ((priv->force_reset) || (priv->ResetProgress == RESET_TYPE_NORESET
+		&& (priv->bForcedSilentReset ||
+		(!priv->bDisableNormalResetCheck && ResetType ==
+		RESET_TYPE_SILENT))))
 		/*  This is control by OID set in Pomelo */
 	{
-		RT_TRACE(COMP_RESET,"%s():priv->force_reset is %d,priv->ResetProgress is %d, priv->bForcedSilentReset is %d,priv->bDisableNormalResetCheck is %d,ResetType is %d\n",__func__,priv->force_reset,priv->ResetProgress,priv->bForcedSilentReset,priv->bDisableNormalResetCheck,ResetType);
+		RT_TRACE(COMP_RESET, "%s():priv->force_reset is %d,"
+			"priv->ResetProgress is %d, priv->bForcedSilentReset"
+			" is %d,priv->bDisableNormalResetCheck is %d,ResetType"
+			" is %d\n", __func__, priv->force_reset,
+			priv->ResetProgress, priv->bForcedSilentReset,
+			priv->bDisableNormalResetCheck, ResetType);
 		rtl819x_ifsilentreset(dev);
 	}
 	priv->force_reset = false;
@@ -4448,32 +4387,33 @@ void watch_dog_timer_callback(unsigned long data)
 {
 	struct r8192_priv *priv = ieee80211_priv((struct net_device *) data);
 	/* printk("===============>watch_dog  timer\n"); */
-	queue_delayed_work(priv->priv_wq,&priv->watch_dog_wq, 0);
-	mod_timer(&priv->watch_dog_timer, jiffies + MSECS(IEEE80211_WATCH_DOG_TIME));
+	queue_delayed_work(priv->priv_wq, &priv->watch_dog_wq, 0);
+	mod_timer(&priv->watch_dog_timer, jiffies +
+			MSECS(IEEE80211_WATCH_DOG_TIME));
 }
 int _rtl8192_up(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	/* int i; */
 	int init_status = 0;
-	priv->up=1;
-	priv->ieee80211->ieee_up=1;
+	priv->up = 1;
+	priv->ieee80211->ieee_up = 1;
 	RT_TRACE(COMP_INIT, "Bringing up iface");
 	init_status = rtl8192_adapter_start(dev);
-	if(!init_status)
-	{
-		RT_TRACE(COMP_ERR,"ERR!!! %s(): initialization is failed!\n", __func__);
-		priv->up=priv->ieee80211->ieee_up = 0;
+	if (!init_status) {
+		RT_TRACE(COMP_ERR, "ERR!!! %s(): initialization is failed!\n",
+				__func__);
+		priv->up = priv->ieee80211->ieee_up = 0;
 		return -EAGAIN;
 	}
 	RT_TRACE(COMP_INIT, "start adapter finished\n");
 	rtl8192_rx_enable(dev);
 	/* rtl8192_tx_enable(dev); */
-	if(priv->ieee80211->state != IEEE80211_LINKED)
-	ieee80211_softmac_start_protocol(priv->ieee80211);
+	if (priv->ieee80211->state != IEEE80211_LINKED)
+		ieee80211_softmac_start_protocol(priv->ieee80211);
 	ieee80211_reset_queue(priv->ieee80211);
 	watch_dog_timer_callback((unsigned long) dev);
-	if(!netif_queue_stopped(dev))
+	if (!netif_queue_stopped(dev))
 		netif_start_queue(dev);
 	else
 		netif_wake_queue(dev);
@@ -4498,7 +4438,8 @@ int rtl8192_up(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
-	if (priv->up == 1) return -1;
+	if (priv->up == 1)
+		return -1;
 
 	return _rtl8192_up(dev);
 }
@@ -4524,9 +4465,10 @@ int rtl8192_down(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	int i;
 
-	if (priv->up == 0) return -1;
+	if (priv->up == 0)
+		return -1;
 
-	priv->up=0;
+	priv->up = 0;
 	priv->ieee80211->ieee_up = 0;
 	RT_TRACE(COMP_DOWN, "==========>%s()\n", __func__);
 	/* FIXME */
@@ -4537,16 +4479,12 @@ int rtl8192_down(struct net_device *dev)
 	/* rtl8192_irq_disable(dev); */
 
 	/* Tx related queue release */
-	for(i = 0; i < MAX_QUEUE_SIZE; i++) {
-		skb_queue_purge(&priv->ieee80211->skb_waitQ [i]);
-	}
-	for(i = 0; i < MAX_QUEUE_SIZE; i++) {
-		skb_queue_purge(&priv->ieee80211->skb_aggQ [i]);
-	}
-
-	for(i = 0; i < MAX_QUEUE_SIZE; i++) {
-		skb_queue_purge(&priv->ieee80211->skb_drv_aggQ [i]);
-	}
+	for (i = 0; i < MAX_QUEUE_SIZE; i++)
+		skb_queue_purge(&priv->ieee80211->skb_waitQ[i]);
+	for (i = 0; i < MAX_QUEUE_SIZE; i++)
+		skb_queue_purge(&priv->ieee80211->skb_aggQ[i]);
+	for (i = 0; i < MAX_QUEUE_SIZE; i++)
+		skb_queue_purge(&priv->ieee80211->skb_drv_aggQ[i]);
 
 	/* as cancel_delayed_work will del work->timer, so if work is not
 	 * defined as struct delayed_work, it will corrupt
@@ -4558,7 +4496,8 @@ int rtl8192_down(struct net_device *dev)
 
 
 	ieee80211_softmac_stop_protocol(priv->ieee80211);
-	memset(&priv->ieee80211->current_network, 0 , offsetof(struct ieee80211_network, list));
+	memset(&priv->ieee80211->current_network, 0,
+			offsetof(struct ieee80211_network, list));
 	RT_TRACE(COMP_DOWN, "<==========%s()\n", __func__);
 
 		return 0;
@@ -4570,7 +4509,8 @@ void rtl8192_commit(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	int reset_status = 0;
 	/* u8 reset_times = 0; */
-	if (priv->up == 0) return ;
+	if (priv->up == 0)
+		return ;
 	priv->up = 0;
 
 	rtl8192_cancel_deferred_work(priv);
@@ -4591,7 +4531,8 @@ void rtl8192_commit(struct net_device *dev)
  */
 void rtl8192_restart(struct work_struct *work)
 {
-	struct r8192_priv *priv = container_of(work, struct r8192_priv, reset_wq);
+	struct r8192_priv *priv = container_of(work, struct r8192_priv,
+						reset_wq);
 	struct net_device *dev = priv->ieee80211->dev;
 
 	down(&priv->wx_sem);
@@ -4610,7 +4551,7 @@ static void r8192_set_multicast(struct net_device *dev)
 
 	/* FIXME FIXME */
 
-	promisc = (dev->flags & IFF_PROMISC) ? 1:0;
+	promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
 
 	if (promisc != priv->promisc)
 		/* rtl8192_commit(dev); */
@@ -4642,10 +4583,10 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 	struct iwreq *wrq = (struct iwreq *)rq;
-	int ret=-1;
+	int ret = -1;
 	struct ieee80211_device *ieee = priv->ieee80211;
 	u32 key[4];
-	u8 broadcast_addr[6] = {0xff,0xff,0xff,0xff,0xff,0xff};
+	u8 broadcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 	struct iw_point *p = &wrq->u.data;
 	struct ieee_param *ipw = NULL;
 	/* (struct ieee_param *)wrq->u.data.pointer; */
@@ -4658,7 +4599,7 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 	}
 
 	ipw = kmalloc(p->length, GFP_KERNEL);
-	if (ipw == NULL){
+	if (ipw == NULL) {
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -4670,29 +4611,27 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 
 	switch (cmd) {
 	case RTL_IOCTL_WPA_SUPPLICANT:
-	/* parse here for HW security */
+		/* parse here for HW security */
 		if (ipw->cmd == IEEE_CMD_SET_ENCRYPTION) {
-			if (ipw->u.crypt.set_tx)
-			{
+			if (ipw->u.crypt.set_tx) {
 				if (strcmp(ipw->u.crypt.alg, "CCMP") == 0)
-						ieee->pairwise_key_type =
+					ieee->pairwise_key_type =
 								KEY_TYPE_CCMP;
 				else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0)
 					ieee->pairwise_key_type =
 								KEY_TYPE_TKIP;
-				else if (strcmp(ipw->u.crypt.alg, "WEP") == 0)
-					{
+				else if (strcmp(ipw->u.crypt.alg,
+							"WEP") == 0) {
 					if (ipw->u.crypt.key_len == 13)
 						ieee->pairwise_key_type =
 							KEY_TYPE_WEP104;
 					else if (ipw->u.crypt.key_len == 5)
 						ieee->pairwise_key_type =
 								KEY_TYPE_WEP40;
-				}
-				else
+				} else
 				ieee->pairwise_key_type = KEY_TYPE_NA;
 					if (ieee->pairwise_key_type) {
-						memcpy((u8*)key, ipw->
+						memcpy((u8 *)key, ipw->
 							u.crypt.key, 16);
 						EnableHWSecurityConfig8192
 									(dev);
@@ -4706,7 +4645,7 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 						setKey(dev, 4,
 							ipw->u.crypt.idx,
 							ieee->pairwise_key_type
-							, (u8*)ieee->
+							, (u8 *)ieee->
 							ap_mac_addr, 0, key);
 						if (ieee->auth_mode != 2)
 							setKey(dev, ipw->
@@ -4719,10 +4658,10 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 				} else {
 					/* if (ipw->u.crypt.idx) */
 					/* group key use idx > 0 */
-					memcpy((u8*)key, ipw->u.crypt.key, 16);
+					memcpy((u8 *)key, ipw->u.crypt.key, 16);
 					if (strcmp(ipw->u.crypt.alg, "CCMP")
 									== 0)
-						ieee->group_key_type=
+						ieee->group_key_type =
 								KEY_TYPE_CCMP;
 					else if (strcmp(ipw->u.crypt.alg,
 								"TKIP") == 0)
@@ -4767,7 +4706,7 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 								&wrq->u.data);
 		break;
 
-	    default:
+	default:
 		ret = -EOPNOTSUPP;
 		break;
 	}
@@ -4783,19 +4722,43 @@ u8 HwRateToMRate90(bool bIsHT, u8 rate)
 	u8  ret_rate = 0xff;
 
 	if (!bIsHT) {
-		switch(rate) {
-		case DESC90_RATE1M:   ret_rate = MGN_1M;         break;
-		case DESC90_RATE2M:   ret_rate = MGN_2M;         break;
-		case DESC90_RATE5_5M: ret_rate = MGN_5_5M;       break;
-		case DESC90_RATE11M:  ret_rate = MGN_11M;        break;
-		case DESC90_RATE6M:   ret_rate = MGN_6M;         break;
-		case DESC90_RATE9M:   ret_rate = MGN_9M;         break;
-		case DESC90_RATE12M:  ret_rate = MGN_12M;        break;
-		case DESC90_RATE18M:  ret_rate = MGN_18M;        break;
-		case DESC90_RATE24M:  ret_rate = MGN_24M;        break;
-		case DESC90_RATE36M:  ret_rate = MGN_36M;        break;
-		case DESC90_RATE48M:  ret_rate = MGN_48M;        break;
-		case DESC90_RATE54M:  ret_rate = MGN_54M;        break;
+		switch (rate) {
+		case DESC90_RATE1M:
+			ret_rate = MGN_1M;
+			break;
+		case DESC90_RATE2M:
+			ret_rate = MGN_2M;
+			break;
+		case DESC90_RATE5_5M:
+			ret_rate = MGN_5_5M;
+			break;
+		case DESC90_RATE11M:
+			ret_rate = MGN_11M;
+			break;
+		case DESC90_RATE6M:
+			ret_rate = MGN_6M;
+			break;
+		case DESC90_RATE9M:
+			ret_rate = MGN_9M;
+			break;
+		case DESC90_RATE12M:
+			ret_rate = MGN_12M;
+			break;
+		case DESC90_RATE18M:
+			ret_rate = MGN_18M;
+			break;
+		case DESC90_RATE24M:
+			ret_rate = MGN_24M;
+			break;
+		case DESC90_RATE36M:
+			ret_rate = MGN_36M;
+			break;
+		case DESC90_RATE48M:
+			ret_rate = MGN_48M;
+			break;
+		case DESC90_RATE54M:
+			ret_rate = MGN_54M;
+			break;
 		default:
 			ret_rate = 0xff;
 			RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported"
@@ -4803,28 +4766,62 @@ u8 HwRateToMRate90(bool bIsHT, u8 rate)
 			break;
 		}
 	} else {
-		switch(rate) {
-		case DESC90_RATEMCS0:   ret_rate = MGN_MCS0;    break;
-		case DESC90_RATEMCS1:   ret_rate = MGN_MCS1;    break;
-		case DESC90_RATEMCS2:   ret_rate = MGN_MCS2;    break;
-		case DESC90_RATEMCS3:   ret_rate = MGN_MCS3;    break;
-		case DESC90_RATEMCS4:   ret_rate = MGN_MCS4;    break;
-		case DESC90_RATEMCS5:   ret_rate = MGN_MCS5;    break;
-		case DESC90_RATEMCS6:   ret_rate = MGN_MCS6;    break;
-		case DESC90_RATEMCS7:   ret_rate = MGN_MCS7;    break;
-		case DESC90_RATEMCS8:   ret_rate = MGN_MCS8;    break;
-		case DESC90_RATEMCS9:   ret_rate = MGN_MCS9;    break;
-		case DESC90_RATEMCS10:  ret_rate = MGN_MCS10;   break;
-		case DESC90_RATEMCS11:  ret_rate = MGN_MCS11;   break;
-		case DESC90_RATEMCS12:  ret_rate = MGN_MCS12;   break;
-		case DESC90_RATEMCS13:  ret_rate = MGN_MCS13;   break;
-		case DESC90_RATEMCS14:  ret_rate = MGN_MCS14;   break;
-		case DESC90_RATEMCS15:  ret_rate = MGN_MCS15;   break;
-		case DESC90_RATEMCS32:  ret_rate = (0x80|0x20); break;
+		switch (rate) {
+		case DESC90_RATEMCS0:
+			ret_rate = MGN_MCS0;
+			break;
+		case DESC90_RATEMCS1:
+			ret_rate = MGN_MCS1;
+			break;
+		case DESC90_RATEMCS2:
+			ret_rate = MGN_MCS2;
+			break;
+		case DESC90_RATEMCS3:
+			ret_rate = MGN_MCS3;
+			break;
+		case DESC90_RATEMCS4:
+			ret_rate = MGN_MCS4;
+			break;
+		case DESC90_RATEMCS5:
+			ret_rate = MGN_MCS5;
+			break;
+		case DESC90_RATEMCS6:
+			ret_rate = MGN_MCS6;
+			break;
+		case DESC90_RATEMCS7:
+			ret_rate = MGN_MCS7;
+			break;
+		case DESC90_RATEMCS8:
+			ret_rate = MGN_MCS8;
+			break;
+		case DESC90_RATEMCS9:
+			ret_rate = MGN_MCS9;
+			break;
+		case DESC90_RATEMCS10:
+			ret_rate = MGN_MCS10;
+			break;
+		case DESC90_RATEMCS11:
+			ret_rate = MGN_MCS11;
+			break;
+		case DESC90_RATEMCS12:
+			ret_rate = MGN_MCS12;
+			break;
+		case DESC90_RATEMCS13:
+			ret_rate = MGN_MCS13;
+			break;
+		case DESC90_RATEMCS14:
+			ret_rate = MGN_MCS14;
+			break;
+		case DESC90_RATEMCS15:
+			ret_rate = MGN_MCS15;
+			break;
+		case DESC90_RATEMCS32:
+			ret_rate = (0x80|0x20);
+			break;
 		default:
 			ret_rate = 0xff;
 			RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported"
-				" Rate [%x], bIsHT = %d!!!\n",rate, bIsHT);
+				" Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
 			break;
 		}
 	}
@@ -4847,11 +4844,12 @@ u8 HwRateToMRate90(bool bIsHT, u8 rate)
  * Return:
  *               None
  */
-void UpdateRxPktTimeStamp8190 (struct net_device *dev, struct ieee80211_rx_stats *stats)
+void UpdateRxPktTimeStamp8190(struct net_device *dev,
+				struct ieee80211_rx_stats *stats)
 {
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 
-	if(stats->bIsAMPDU && !stats->bFirstMPDU) {
+	if (stats->bIsAMPDU && !stats->bFirstMPDU) {
 		stats->mac_time[0] = priv->LastRxDescTSFLow;
 		stats->mac_time[1] = priv->LastRxDescTSFHigh;
 	} else {
@@ -4862,7 +4860,7 @@ void UpdateRxPktTimeStamp8190 (struct net_device *dev, struct ieee80211_rx_stats
 
 /* by amy 080606 */
 
-long rtl819x_translate_todbm(u8 signal_strength_index	)/* 0-100 index. */
+long rtl819x_translate_todbm(u8 signal_strength_index)/* 0-100 index. */
 {
 	long	signal_power; /* in dBm. */
 
@@ -4879,22 +4877,25 @@ long rtl819x_translate_todbm(u8 signal_strength_index	)/* 0-100 index. */
  * value will be kept in memory or disk. We must delcare the value in adapter
  * and it will be reinitialized when return from S3/S4.
  */
-void rtl8192_process_phyinfo(struct r8192_priv * priv,u8* buffer, struct ieee80211_rx_stats * pprevious_stats, struct ieee80211_rx_stats * pcurrent_stats)
+void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
+				struct ieee80211_rx_stats *pprevious_stats,
+				struct ieee80211_rx_stats *pcurrent_stats)
 {
 	bool bcheck = false;
 	u8	rfpath;
 	u32	nspatial_stream, tmp_val;
 	/* u8	i; */
-	static u32 slide_rssi_index=0, slide_rssi_statistics=0;
-	static u32 slide_evm_index=0, slide_evm_statistics=0;
-	static u32 last_rssi=0, last_evm=0;
+	static u32 slide_rssi_index, slide_rssi_statistics;
+	static u32 slide_evm_index, slide_evm_statistics;
+	static u32 last_rssi, last_evm;
 
-	static u32 slide_beacon_adc_pwdb_index=0, slide_beacon_adc_pwdb_statistics=0;
-	static u32 last_beacon_adc_pwdb=0;
+	static u32 slide_beacon_adc_pwdb_index;
+	static u32 slide_beacon_adc_pwdb_statistics;
+	static u32 last_beacon_adc_pwdb;
 
 	struct ieee80211_hdr_3addr *hdr;
 	u16 sc ;
-	unsigned int frag,seq;
+	unsigned int frag, seq;
 	hdr = (struct ieee80211_hdr_3addr *)buffer;
 	sc = le16_to_cpu(hdr->seq_ctl);
 	frag = WLAN_GET_SEQ_FRAG(sc);
@@ -4904,25 +4905,20 @@ void rtl8192_process_phyinfo(struct r8192_priv * priv,u8* buffer, struct ieee802
 
 	/* Check whether we should take the previous packet into accounting */
 
-	if(!pprevious_stats->bIsAMPDU)
-	{
+	if (!pprevious_stats->bIsAMPDU)
 		/* if previous packet is not aggregated packet */
 		bcheck = true;
-	}else
-	{
-	}
-
 
-	if(slide_rssi_statistics++ >= PHY_RSSI_SLID_WIN_MAX)
-	{
+	if (slide_rssi_statistics++ >= PHY_RSSI_SLID_WIN_MAX) {
 		slide_rssi_statistics = PHY_RSSI_SLID_WIN_MAX;
 		last_rssi = priv->stats.slide_signal_strength[slide_rssi_index];
 		priv->stats.slide_rssi_total -= last_rssi;
 	}
 	priv->stats.slide_rssi_total += pprevious_stats->SignalStrength;
 
-	priv->stats.slide_signal_strength[slide_rssi_index++] = pprevious_stats->SignalStrength;
-	if(slide_rssi_index >= PHY_RSSI_SLID_WIN_MAX)
+	priv->stats.slide_signal_strength[slide_rssi_index++] =
+					pprevious_stats->SignalStrength;
+	if (slide_rssi_index >= PHY_RSSI_SLID_WIN_MAX)
 		slide_rssi_index = 0;
 
 	/* <1> Showed on UI for user, in dbm */
@@ -4932,74 +4928,73 @@ void rtl8192_process_phyinfo(struct r8192_priv * priv,u8* buffer, struct ieee802
 
 	/* If the previous packet does not match the criteria, neglect it */
 
-	if(!pprevious_stats->bPacketMatchBSSID)
-	{
-		if(!pprevious_stats->bToSelfBA)
+	if (!pprevious_stats->bPacketMatchBSSID) {
+		if (!pprevious_stats->bToSelfBA)
 			return;
 	}
-
-	if(!bcheck)
+	if (!bcheck)
 		return;
 
-
 	/* rtl8190_process_cck_rxpathsel(priv,pprevious_stats); */
 	/* only rtl8190 supported */
-
-
 	/* Check RSSI */
-
 	priv->stats.num_process_phyinfo++;
-
 	/* record the general signal strength to the sliding window. */
-
-
 	/* <2> Showed on UI for engineering */
 	/* hardware does not provide rssi information for each rf path
 	 *							 in CCK
 	 */
-	if(!pprevious_stats->bIsCCK && (pprevious_stats->bPacketToSelf || pprevious_stats->bToSelfBA))
-	{
-		for (rfpath = RF90_PATH_A; rfpath < priv->NumTotalRFPath; rfpath++)
-		{
-		     if (!rtl8192_phy_CheckIsLegalRFPath(priv->ieee80211->dev, rfpath))
-				 continue;
+	if (!pprevious_stats->bIsCCK && (pprevious_stats->bPacketToSelf ||
+					pprevious_stats->bToSelfBA)) {
+		for (rfpath = RF90_PATH_A; rfpath < priv->NumTotalRFPath;
+					rfpath++) {
+			if (!rtl8192_phy_CheckIsLegalRFPath(priv->ieee80211->dev,
+						rfpath))
+				continue;
 
 			/* Fixed by Jacken 2008-03-20 */
-			if(priv->stats.rx_rssi_percentage[rfpath] == 0)
-			{
-				priv->stats.rx_rssi_percentage[rfpath] = pprevious_stats->RxMIMOSignalStrength[rfpath];
-				/* DbgPrint("MIMO RSSI initialize \n"); */
-			}
-			if(pprevious_stats->RxMIMOSignalStrength[rfpath]  > priv->stats.rx_rssi_percentage[rfpath])
-			{
+			if (priv->stats.rx_rssi_percentage[rfpath] == 0) {
 				priv->stats.rx_rssi_percentage[rfpath] =
-					( (priv->stats.rx_rssi_percentage[rfpath]*(Rx_Smooth_Factor-1)) +
-					(pprevious_stats->RxMIMOSignalStrength[rfpath])) /(Rx_Smooth_Factor);
-				priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath]  + 1;
+						pprevious_stats->
+						RxMIMOSignalStrength[rfpath];
+				/* DbgPrint("MIMO RSSI initialize\n"); */
 			}
-			else
-			{
+			if (pprevious_stats->RxMIMOSignalStrength[rfpath]  >
+					priv->stats.rx_rssi_percentage[rfpath]
+					) {
 				priv->stats.rx_rssi_percentage[rfpath] =
-					( (priv->stats.rx_rssi_percentage[rfpath]*(Rx_Smooth_Factor-1)) +
-					(pprevious_stats->RxMIMOSignalStrength[rfpath])) /(Rx_Smooth_Factor);
+					((priv->stats.rx_rssi_percentage[rfpath] *
+					(Rx_Smooth_Factor-1)) +	(pprevious_stats->
+					RxMIMOSignalStrength[rfpath])) /
+					(Rx_Smooth_Factor);
+				priv->stats.rx_rssi_percentage[rfpath] =
+					priv->stats.rx_rssi_percentage[rfpath]
+					+ 1;
+			} else {
+				priv->stats.rx_rssi_percentage[rfpath] =
+					((priv->stats.rx_rssi_percentage[rfpath] *
+						(Rx_Smooth_Factor-1)) +
+					(pprevious_stats->RxMIMOSignalStrength[rfpath]))
+						/(Rx_Smooth_Factor);
 			}
-			RT_TRACE(COMP_DBG,"priv->stats.rx_rssi_percentage[rfPath]  = %d \n" ,priv->stats.rx_rssi_percentage[rfpath] );
+			RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath]"
+				"  = %d\n", priv->stats.rx_rssi_percentage[rfpath]);
 		}
 	}
 
 	/*  Check PWDB. */
 
 	RT_TRACE(COMP_RXDESC, "Smooth %s PWDB = %d\n",
-				pprevious_stats->bIsCCK? "CCK": "OFDM",
+				pprevious_stats->bIsCCK ? "CCK" : "OFDM",
 				pprevious_stats->RxPWDBAll);
 
-	if(pprevious_stats->bPacketBeacon)
-	{
+	if (pprevious_stats->bPacketBeacon) {
 		/* record the beacon pwdb to the sliding window. */
-		if(slide_beacon_adc_pwdb_statistics++ >= PHY_Beacon_RSSI_SLID_WIN_MAX)
-		{
+		if (slide_beacon_adc_pwdb_statistics++ >=
+					PHY_Beacon_RSSI_SLID_WIN_MAX) {
 			slide_beacon_adc_pwdb_statistics = PHY_Beacon_RSSI_SLID_WIN_MAX;
-			last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index];
+			last_beacon_adc_pwdb =
+				priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index];
 			priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb;
 			/* DbgPrint("slide_beacon_adc_pwdb_index = %d, "
 			 *		"last_beacon_adc_pwdb = %d, Adapter->"
@@ -5010,7 +5005,8 @@ void rtl8192_process_phyinfo(struct r8192_priv * priv,u8* buffer, struct ieee802
 			 */
 		}
 		priv->stats.Slide_Beacon_Total += pprevious_stats->RxPWDBAll;
-		priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = pprevious_stats->RxPWDBAll;
+		priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] =
+					pprevious_stats->RxPWDBAll;
 		/* DbgPrint("slide_beacon_adc_pwdb_index = %d, pPreviousRfd->"
 		 *	"Status.RxPWDBAll = %d\n", slide_beacon_adc_pwdb_index,
 		 *			pPreviousRfd->Status.RxPWDBAll);
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] staging: rtl8192u: fix checkpatch.pl issues to line 5500 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5500
  2010-06-13  6:16   ` [PATCH 2/4] staging: rtl8192u: fix checkpatch.pl issues to line 5000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5000 Mike Gilks
@ 2010-06-13  6:16     ` Mike Gilks
  2010-06-13  6:16       ` [PATCH 4/4] staging: rtl8192u: fix checkpatch.pl issues to end Fix most problems pointed out by checkpatch.pl in file r8192U_core.c to end of file. There are 2 errors and 93 warnings remaining, but they will need fixing by someone smarter than me Mike Gilks
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Gilks @ 2010-06-13  6:16 UTC (permalink / raw)
  To: gregkh, mchehab, julia, joe; +Cc: devel, linux-kernel, Mike Gilks

Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
---
 drivers/staging/rtl8192u/r8192U_core.c |  265 +++++++++++++++-----------------
 1 files changed, 124 insertions(+), 141 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 1a89b20..8dcf542 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -5012,85 +5012,93 @@ void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 		 *			pPreviousRfd->Status.RxPWDBAll);
 		 */
 		slide_beacon_adc_pwdb_index++;
-		if(slide_beacon_adc_pwdb_index >= PHY_Beacon_RSSI_SLID_WIN_MAX)
+		if (slide_beacon_adc_pwdb_index >=
+					PHY_Beacon_RSSI_SLID_WIN_MAX)
 			slide_beacon_adc_pwdb_index = 0;
-		pprevious_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total/slide_beacon_adc_pwdb_statistics;
-		if(pprevious_stats->RxPWDBAll >= 3)
+		pprevious_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total /
+					slide_beacon_adc_pwdb_statistics;
+		if (pprevious_stats->RxPWDBAll >= 3)
 			pprevious_stats->RxPWDBAll -= 3;
 	}
 
 	RT_TRACE(COMP_RXDESC, "Smooth %s PWDB = %d\n",
-				pprevious_stats->bIsCCK? "CCK": "OFDM",
+				pprevious_stats->bIsCCK ? "CCK" : "OFDM",
 				pprevious_stats->RxPWDBAll);
 
 
-	if(pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA)
-	{
-		if(priv->undecorated_smoothed_pwdb < 0)	/* initialize */
-		{
-			priv->undecorated_smoothed_pwdb = pprevious_stats->RxPWDBAll;
-			/* DbgPrint("First pwdb initialize \n"); */
-		}
-		if(pprevious_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb)
-		{
+	if (pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon ||
+					pprevious_stats->bToSelfBA) {
+		if (priv->undecorated_smoothed_pwdb < 0) /* initialize */ {
 			priv->undecorated_smoothed_pwdb =
-					( ((priv->undecorated_smoothed_pwdb)*(Rx_Smooth_Factor-1)) +
-					(pprevious_stats->RxPWDBAll)) /(Rx_Smooth_Factor);
-			priv->undecorated_smoothed_pwdb = priv->undecorated_smoothed_pwdb + 1;
+					pprevious_stats->RxPWDBAll;
+			/* DbgPrint("First pwdb initialize\n"); */
 		}
-		else
-		{
+		if (pprevious_stats->RxPWDBAll >
+					(u32)priv->undecorated_smoothed_pwdb) {
 			priv->undecorated_smoothed_pwdb =
-					( ((priv->undecorated_smoothed_pwdb)*(Rx_Smooth_Factor-1)) +
-					(pprevious_stats->RxPWDBAll)) /(Rx_Smooth_Factor);
+					(((priv->undecorated_smoothed_pwdb) *
+					(Rx_Smooth_Factor - 1)) +
+					(pprevious_stats->RxPWDBAll)) /
+					(Rx_Smooth_Factor);
+			priv->undecorated_smoothed_pwdb =
+					priv->undecorated_smoothed_pwdb + 1;
+		} else {
+			priv->undecorated_smoothed_pwdb =
+					(((priv->undecorated_smoothed_pwdb) *
+					(Rx_Smooth_Factor-1)) +
+					(pprevious_stats->RxPWDBAll)) /
+					(Rx_Smooth_Factor);
 		}
-
 	}
 
-
 	/* Check EVM */
 	/* record the general EVM to the sliding window. */
-	if(pprevious_stats->SignalQuality == 0)
-	{
-	}
-	else
-	{
-		if(pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA){
-			if(slide_evm_statistics++ >= PHY_RSSI_SLID_WIN_MAX){
+	if (pprevious_stats->SignalQuality == 0) {
+	} else {
+		if (pprevious_stats->bPacketToSelf ||
+				pprevious_stats->bPacketBeacon ||
+				pprevious_stats->bToSelfBA){
+			if (slide_evm_statistics++ >= PHY_RSSI_SLID_WIN_MAX) {
 				slide_evm_statistics = PHY_RSSI_SLID_WIN_MAX;
-				last_evm = priv->stats.slide_evm[slide_evm_index];
+				last_evm =
+				priv->stats.slide_evm[slide_evm_index];
 				priv->stats.slide_evm_total -= last_evm;
 			}
-
-			priv->stats.slide_evm_total += pprevious_stats->SignalQuality;
-
-			priv->stats.slide_evm[slide_evm_index++] = pprevious_stats->SignalQuality;
-			if(slide_evm_index >= PHY_RSSI_SLID_WIN_MAX)
+			priv->stats.slide_evm_total +=
+					pprevious_stats->SignalQuality;
+			priv->stats.slide_evm[slide_evm_index++] =
+					pprevious_stats->SignalQuality;
+			if (slide_evm_index >= PHY_RSSI_SLID_WIN_MAX)
 				slide_evm_index = 0;
 
 			/* <1> Showed on UI for user, in percentage. */
-			tmp_val = priv->stats.slide_evm_total/slide_evm_statistics;
+			tmp_val = priv->stats.slide_evm_total /
+						slide_evm_statistics;
 			priv->stats.signal_quality = tmp_val;
-			/* cosa add 10/11/2007, Showed on UI for user in Windows Vista, for Link quality. */
+			/* cosa add 10/11/2007, Showed on UI for user in
+			 * Windows Vista, for Link quality.
+			 */
 			priv->stats.last_signal_strength_inpercent = tmp_val;
 		}
 
 		/* <2> Showed on UI for engineering */
-		if(pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA)
-		{
-			for(nspatial_stream = 0; nspatial_stream<2 ; nspatial_stream++)
-				/* 2 spatial stream */
-			{
-				if(pprevious_stats->RxMIMOSignalQuality[nspatial_stream] != -1)
-				{
-					if(priv->stats.rx_evm_percentage[nspatial_stream] == 0)
-						/* initialize */
-					{
-						priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream];
+		if (pprevious_stats->bPacketToSelf ||
+				pprevious_stats->bPacketBeacon ||
+				pprevious_stats->bToSelfBA) {
+			for (nspatial_stream = 0; nspatial_stream < 2;
+						nspatial_stream++)
+						/* 2 spatial stream */{
+				if (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] != -1) {
+					if (priv->stats.rx_evm_percentage[nspatial_stream] == 0)
+						/* initialize */{
+						priv->stats.rx_evm_percentage[nspatial_stream] =
+						pprevious_stats->RxMIMOSignalQuality[nspatial_stream];
 					}
 					priv->stats.rx_evm_percentage[nspatial_stream] =
-						( (priv->stats.rx_evm_percentage[nspatial_stream]* (Rx_Smooth_Factor-1)) +
-						(pprevious_stats->RxMIMOSignalQuality[nspatial_stream]* 1)) / (Rx_Smooth_Factor);
+						((priv->stats.rx_evm_percentage[nspatial_stream] *
+						(Rx_Smooth_Factor-1)) +
+						(pprevious_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) /
+						(Rx_Smooth_Factor);
 				}
 			}
 		}
@@ -5112,7 +5120,8 @@ void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
  *
  * Revised History:
  *	When		Who		Remark
- *	05/26/2008	amy		Create Version 0 porting from windows code.
+ *	05/26/2008	amy		Create Version 0 porting from
+ *					 windows code.
  *
  *---------------------------------------------------------------------------*/
 static u8 rtl819x_query_rxpwrpercentage(
@@ -5120,18 +5129,11 @@ static u8 rtl819x_query_rxpwrpercentage(
 	)
 {
 	if ((antpower <= -100) || (antpower >= 20))
-	{
 		return	0;
-	}
 	else if (antpower >= 0)
-	{
 		return	100;
-	}
 	else
-	{
-		return	(100+antpower);
-	}
-
+		return	100 + antpower;
 }	/* QueryRxPwrPercentage */
 
 static u8
@@ -5143,15 +5145,15 @@ rtl819x_evm_dbtopercentage(
 
     ret_val = value;
 
-    if(ret_val >= 0)
-        ret_val = 0;
-    if(ret_val <= -33)
-        ret_val = -33;
-    ret_val = 0 - ret_val;
-    ret_val*=3;
-	if(ret_val == 99)
+	if (ret_val >= 0)
+		ret_val = 0;
+	if (ret_val <= -33)
+		ret_val = -33;
+	ret_val = 0 - ret_val;
+	ret_val *= 3;
+	if (ret_val == 99)
 		ret_val = 100;
-    return(ret_val);
+	return ret_val;
 }
 
 	/* Description:
@@ -5166,55 +5168,35 @@ rtl819x_signal_scale_mapping(
 	long retsig;
 
 	/* Step 1. Scale mapping. */
-	if(currsig >= 61 && currsig <= 100)
-	{
+	if (currsig >= 61 && currsig <= 100)
 		retsig = 90 + ((currsig - 60) / 4);
-	}
-	else if(currsig >= 41 && currsig <= 60)
-	{
+	else if (currsig >= 41 && currsig <= 60)
 		retsig = 78 + ((currsig - 40) / 2);
-	}
-	else if(currsig >= 31 && currsig <= 40)
-	{
+	else if (currsig >= 31 && currsig <= 40)
 		retsig = 66 + (currsig - 30);
-	}
-	else if(currsig >= 21 && currsig <= 30)
-	{
+	else if (currsig >= 21 && currsig <= 30)
 		retsig = 54 + (currsig - 20);
-	}
-	else if(currsig >= 5 && currsig <= 20)
-	{
+	else if (currsig >= 5 && currsig <= 20)
 		retsig = 42 + (((currsig - 5) * 2) / 3);
-	}
-	else if(currsig == 4)
-	{
+	else if (currsig == 4)
 		retsig = 36;
-	}
-	else if(currsig == 3)
-	{
+	else if (currsig == 3)
 		retsig = 27;
-	}
-	else if(currsig == 2)
-	{
+	else if (currsig == 2)
 		retsig = 18;
-	}
-	else if(currsig == 1)
-	{
+	else if (currsig == 1)
 		retsig = 9;
-	}
 	else
-	{
 		retsig = currsig;
-	}
 
 	return retsig;
 }
 
 static void rtl8192_query_rxphystatus(
-	struct r8192_priv * priv,
-	struct ieee80211_rx_stats * pstats,
-	rx_drvinfo_819x_usb  * pdrvinfo,
-	struct ieee80211_rx_stats * precord_stats,
+	struct r8192_priv *priv,
+	struct ieee80211_rx_stats *pstats,
+	rx_drvinfo_819x_usb  *pdrvinfo,
+	struct ieee80211_rx_stats *precord_stats,
 	bool bpacket_match_bssid,
 	bool bpacket_toself,
 	bool bPacketBeacon,
@@ -5222,19 +5204,20 @@ static void rtl8192_query_rxphystatus(
 	)
 {
 	/* PRT_RFD_STATUS		pRtRfdStatus = &(pRfd->Status); */
-	phy_sts_ofdm_819xusb_t*	pofdm_buf;
-	phy_sts_cck_819xusb_t	*	pcck_buf;
-	phy_ofdm_rx_status_rxsc_sgien_exintfflag* prxsc;
+	phy_sts_ofdm_819xusb_t *pofdm_buf;
+	phy_sts_cck_819xusb_t *pcck_buf;
+	phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
 	u8				*prxpkt;
-	u8				i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;
-	char				rx_pwr[4], rx_pwr_all=0;
+	u8				i, max_spatial_stream, tmp_rxsnr;
+	u8				tmp_rxevm, rxsc_sgien_exflg;
+	char				rx_pwr[4], rx_pwr_all = 0;
 	/* long				rx_avg_pwr = 0; */
 	char				rx_snrX, rx_evmX;
 	u8				evm, pwdb_all;
-	u32				RSSI, total_rssi=0;
-						/* , total_evm=0; */
+	u32				RSSI, total_rssi = 0;
+						/* , total_evm = 0; */
 	/* long				signal_strength_index = 0; */
-	u8				is_cck_rate=0;
+	u8				is_cck_rate = 0;
 	u8				rf_rx_num = 0;
 
 
@@ -5244,14 +5227,15 @@ static void rtl8192_query_rxphystatus(
 
 	/* Record it for next packet processing */
 	memset(precord_stats, 0, sizeof(struct ieee80211_rx_stats));
-	pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID = bpacket_match_bssid;
+	pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID =
+						bpacket_match_bssid;
 	pstats->bPacketToSelf = precord_stats->bPacketToSelf = bpacket_toself;
 	pstats->bIsCCK = precord_stats->bIsCCK = is_cck_rate;
 					/* RX_HAL_IS_CCK_RATE(pDrvInfo); */
 	pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon;
 	pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA;
 
-	prxpkt = (u8*)pdrvinfo;
+	prxpkt = (u8 *)pdrvinfo;
 
 	/* Move pointer to the 16th bytes. Phy status start address. */
 	prxpkt += sizeof(rx_drvinfo_819x_usb);
@@ -5347,7 +5331,7 @@ static void rtl8192_query_rxphystatus(
 			}
 			pstats->SignalQuality =
 					precord_stats->SignalQuality = sq;
-			pstats->RxMIMOSignalQuality[0] = 
+			pstats->RxMIMOSignalQuality[0] =
 				precord_stats->RxMIMOSignalQuality[0] = sq;
 			pstats->RxMIMOSignalQuality[1] =
 				precord_stats->RxMIMOSignalQuality[1] = -1;
@@ -5355,7 +5339,7 @@ static void rtl8192_query_rxphystatus(
 	} else {
 		priv->stats.numqry_phystatusHT++;
 		/* (1)Get RSSI for HT rate */
-		for (i = RF90_PATH_A; i<priv->NumTotalRFPath; i++) {
+		for (i = RF90_PATH_A; i < priv->NumTotalRFPath; i++) {
 			/* 2008/01/30 MH we will judge RF RX path now. */
 			if (priv->brfpath_rxenable[i])
 				rf_rx_num++;
@@ -5384,8 +5368,8 @@ static void rtl8192_query_rxphystatus(
 			/* Record Signal Strength for next packet */
 			/* if(bpacket_match_bssid) */
 			{
-				pstats->RxMIMOSignalStrength[i] =(u8) RSSI;
-				precord_stats->RxMIMOSignalStrength[i] =(u8)
+				pstats->RxMIMOSignalStrength[i] = (u8) RSSI;
+				precord_stats->RxMIMOSignalStrength[i] = (u8)
 									RSSI;
 			}
 		}
@@ -5396,7 +5380,7 @@ static void rtl8192_query_rxphystatus(
 
 		/* Fixed by Jacken from Bryant 2008-03-20 */
 		/* Original value is 106 */
-		rx_pwr_all = (((pofdm_buf->pwdb_all ) >> 1 )& 0x7f) -106;
+		rx_pwr_all = (((pofdm_buf->pwdb_all) >> 1) & 0x7f) - 106;
 		pwdb_all = rtl819x_query_rxpwrpercentage(rx_pwr_all);
 
 		pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all;
@@ -5431,7 +5415,7 @@ static void rtl8192_query_rxphystatus(
 				if (i == 0)
 					/*  Fill value in RFD,
 					 * Get the first spatial stream only */
-					pstats->SignalQuality = 
+					pstats->SignalQuality =
 						precord_stats->SignalQuality =
 							(u8)(evm & 0xff);
 				pstats->RxMIMOSignalQuality[i] =
@@ -5459,10 +5443,7 @@ static void rtl8192_query_rxphystatus(
 		pstats->SignalStrength = precord_stats->SignalStrength =
 			(u8)(rtl819x_signal_scale_mapping((long)pwdb_all));
 		/* PWDB_ALL; */
-
-	}
-	else
-	{
+	} else {
 		/* pRfd->Status.SignalStrength =
 		 * pRecordRfd->Status.SignalStrength =
 		 * (u8)(SignalScaleMapping(total_rssi/=RF90_PATH_MAX));
@@ -5472,14 +5453,14 @@ static void rtl8192_query_rxphystatus(
 		if (rf_rx_num != 0)
 			pstats->SignalStrength = precord_stats->SignalStrength
 				= (u8)(rtl819x_signal_scale_mapping(
-					(long)(total_rssi/=rf_rx_num)));
+					(long)(total_rssi /= rf_rx_num)));
 	}
 }	/* QueryRxPhyStatus8190Pci */
 
 void
 rtl8192_record_rxdesc_forlateruse(
-	struct ieee80211_rx_stats *	psrc_stats,
-	struct ieee80211_rx_stats *	ptarget_stats
+	struct ieee80211_rx_stats *psrc_stats,
+	struct ieee80211_rx_stats *ptarget_stats
 )
 {
 	ptarget_stats->bIsAMPDU = psrc_stats->bIsAMPDU;
@@ -5489,28 +5470,28 @@ rtl8192_record_rxdesc_forlateruse(
 
 
 void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
-				   struct ieee80211_rx_stats * pstats,
+				   struct ieee80211_rx_stats *pstats,
 				   rx_drvinfo_819x_usb  *pdrvinfo)
 {
 	/* TODO: We must only check packet for current MAC address.
 	 * Not finish */
 	rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
-	struct net_device *dev=info->dev;
+	struct net_device *dev = info->dev;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 	bool bpacket_match_bssid, bpacket_toself;
-	bool bPacketBeacon=FALSE, bToSelfBA=FALSE;
+	bool bPacketBeacon = FALSE, bToSelfBA = FALSE;
 	static struct ieee80211_rx_stats  previous_stats;
 	struct ieee80211_hdr_3addr *hdr;	/* by amy */
-	u16 fc,type;
+	u16 fc, type;
 
 	/* Get Signal Quality for only RX data queue (but not command queue) */
 
-	u8* tmp_buf;
+	u8 *tmp_buf;
 	/* u16 tmp_buf_len = 0; */
-	u8  *praddr;
+	u8 *praddr;
 
 	/* Get MAC frame start address. */
-	tmp_buf = (u8*)skb->data;
+	tmp_buf = (u8 *)skb->data;
 	/* + get_rxpacket_shiftbytes_819xusb(pstats); */
 
 	hdr = (struct ieee80211_hdr_3addr *)tmp_buf;
@@ -5520,19 +5501,21 @@ void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 
 	/* Check if the received packet is acceptabe. */
 	bpacket_match_bssid = ((IEEE80211_FTYPE_CTL != type) &&
-							(eqMacAddr(priv->ieee80211->current_network.bssid,  (fc & IEEE80211_FCTL_TODS)? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS )? hdr->addr2 : hdr->addr3))
-								 && (!pstats->bHwError) && (!pstats->bCRC)&& (!pstats->bICV));
-	bpacket_toself =  bpacket_match_bssid & (eqMacAddr(praddr, priv->ieee80211->dev->dev_addr));
-
-		if(WLAN_FC_GET_FRAMETYPE(fc)== IEEE80211_STYPE_BEACON)
-		{
+			(eqMacAddr(priv->ieee80211->current_network.bssid,
+			(fc & IEEE80211_FCTL_TODS) ? hdr->addr1 :
+			(fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 :
+			hdr->addr3)) && (!pstats->bHwError) &&
+			(!pstats->bCRC) && (!pstats->bICV));
+	bpacket_toself =  bpacket_match_bssid & (eqMacAddr(praddr,
+					priv->ieee80211->dev->dev_addr));
+
+		if (WLAN_FC_GET_FRAMETYPE(fc)== IEEE80211_STYPE_BEACON)
 			bPacketBeacon = true;
 			/* DbgPrint("Beacon 2, MatchBSSID = %d, ToSelf = %d \n"
-			 *		, bPacketMatchBSSID, bPacketToSelf); */
-		}
-		if(WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BLOCKACK)
-		{
-			if((eqMacAddr(praddr,dev->dev_addr)))
+			 *		, bPacketMatchBSSID, bPacketToSelf);
+			 */
+		if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BLOCKACK) {
+			if ((eqMacAddr(praddr, dev->dev_addr)))
 				bToSelfBA = true;
 				/* DbgPrint("BlockAck, MatchBSSID = %d,
 				 *	 ToSelf = %d \n", bPacketMatchBSSID,
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] staging: rtl8192u: fix checkpatch.pl issues to end Fix most problems pointed out by checkpatch.pl in file r8192U_core.c to end of file. There are 2 errors and 93 warnings remaining, but they will need fixing by someone smarter than me.
  2010-06-13  6:16     ` [PATCH 3/4] staging: rtl8192u: fix checkpatch.pl issues to line 5500 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5500 Mike Gilks
@ 2010-06-13  6:16       ` Mike Gilks
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Gilks @ 2010-06-13  6:16 UTC (permalink / raw)
  To: gregkh, mchehab, julia, joe; +Cc: devel, linux-kernel, Mike Gilks

Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com>
---
 drivers/staging/rtl8192u/r8192U_core.c |  400 +++++++++++++++++++-------------
 1 files changed, 237 insertions(+), 163 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 8dcf542..7c66c63 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -5509,9 +5509,9 @@ void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 	bpacket_toself =  bpacket_match_bssid & (eqMacAddr(praddr,
 					priv->ieee80211->dev->dev_addr));
 
-		if (WLAN_FC_GET_FRAMETYPE(fc)== IEEE80211_STYPE_BEACON)
+		if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BEACON)
 			bPacketBeacon = true;
-			/* DbgPrint("Beacon 2, MatchBSSID = %d, ToSelf = %d \n"
+			/* DbgPrint("Beacon 2, MatchBSSID = %d, ToSelf = %d\n"
 			 *		, bPacketMatchBSSID, bPacketToSelf);
 			 */
 		if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BLOCKACK) {
@@ -5523,18 +5523,19 @@ void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 				 */
 		}
 
-	if(bpacket_match_bssid)
+	if (bpacket_match_bssid)
 		priv->stats.numpacket_matchbssid++;
-	if(bpacket_toself){
+	if (bpacket_toself)
 		priv->stats.numpacket_toself++;
-	}
+
 
 	/* Process PHY information for previous packet (RSSI/PWDB/EVM)
 	 * Because phy information is contained in the last packet of AMPDU
 	 * only, so driver should process phy information of previous packet
 	 */
 	rtl8192_process_phyinfo(priv, tmp_buf, &previous_stats, pstats);
-	rtl8192_query_rxphystatus(priv, pstats, pdrvinfo, &previous_stats, bpacket_match_bssid,bpacket_toself,bPacketBeacon,bToSelfBA);
+	rtl8192_query_rxphystatus(priv, pstats, pdrvinfo, &previous_stats,
+		bpacket_match_bssid, bpacket_toself, bPacketBeacon, bToSelfBA);
 	rtl8192_record_rxdesc_forlateruse(pstats, &previous_stats);
 
 }
@@ -5544,7 +5545,7 @@ void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 * Overview:	Recored down the received data rate
 *
 * Input:
-* 	struct net_device *dev
+*	struct net_device *dev
 *	struct ieee80211_rx_stats *stats
 *
 * Output:
@@ -5560,67 +5561,124 @@ UpdateReceivedRateHistogramStatistics8190(
 	)
 {
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
-	u32 rcvType=1;   /* 0: Total, 1:OK, 2:CRC, 3:ICV */
+	u32 rcvType = 1;   /* 0: Total, 1:OK, 2:CRC, 3:ICV */
 	u32 rateIndex;
 	u32 preamble_guardinterval;
 	/* 1: short preamble/GI, 0: long preamble/GI */
 
 
-	if(stats->bCRC)
-	rcvType = 2;
-	else if(stats->bICV)
-	rcvType = 3;
+	if (stats->bCRC)
+		rcvType = 2;
+	else if (stats->bICV)
+		rcvType = 3;
 
-	if(stats->bShortPreamble)
-	preamble_guardinterval = 1;		/* short */
+	if (stats->bShortPreamble)
+		preamble_guardinterval = 1;		/* short */
 	else
-	preamble_guardinterval = 0;		/* long */
+		preamble_guardinterval = 0;		/* long */
 
 	switch (stats->rate) {
 	/* CCK rate */
-	case MGN_1M:    rateIndex = 0;  break;
-	case MGN_2M:    rateIndex = 1;  break;
-	case MGN_5_5M:  rateIndex = 2;  break;
-	case MGN_11M:   rateIndex = 3;  break;
+	case MGN_1M:
+		rateIndex = 0;
+		break;
+	case MGN_2M:
+		rateIndex = 1;
+		break;
+	case MGN_5_5M:
+		rateIndex = 2;
+		break;
+	case MGN_11M:
+		rateIndex = 3;
+		break;
 	/* Legacy OFDM rate */
-	case MGN_6M:    rateIndex = 4;  break;
-	case MGN_9M:    rateIndex = 5;  break;
-	case MGN_12M:   rateIndex = 6;  break;
-	case MGN_18M:   rateIndex = 7;  break;
-	case MGN_24M:   rateIndex = 8;  break;
-	case MGN_36M:   rateIndex = 9;  break;
-	case MGN_48M:   rateIndex = 10; break;
-	case MGN_54M:   rateIndex = 11; break;
+	case MGN_6M:
+		rateIndex = 4;
+		break;
+	case MGN_9M:
+		rateIndex = 5;
+		break;
+	case MGN_12M:
+		rateIndex = 6;
+		break;
+	case MGN_18M:
+		rateIndex = 7;
+		break;
+	case MGN_24M:
+		rateIndex = 8;
+		break;
+	case MGN_36M:
+		rateIndex = 9;
+		break;
+	case MGN_48M:
+		rateIndex = 10;
+		break;
+	case MGN_54M:
+		rateIndex = 11;
+		break;
 	/* 11n High throughput rate */
-	case MGN_MCS0:  rateIndex = 12; break;
-	case MGN_MCS1:  rateIndex = 13; break;
-	case MGN_MCS2:  rateIndex = 14; break;
-	case MGN_MCS3:  rateIndex = 15; break;
-	case MGN_MCS4:  rateIndex = 16; break;
-	case MGN_MCS5:  rateIndex = 17; break;
-	case MGN_MCS6:  rateIndex = 18; break;
-	case MGN_MCS7:  rateIndex = 19; break;
-	case MGN_MCS8:  rateIndex = 20; break;
-	case MGN_MCS9:  rateIndex = 21; break;
-	case MGN_MCS10: rateIndex = 22; break;
-	case MGN_MCS11: rateIndex = 23; break;
-	case MGN_MCS12: rateIndex = 24; break;
-	case MGN_MCS13: rateIndex = 25; break;
-	case MGN_MCS14: rateIndex = 26; break;
-	case MGN_MCS15: rateIndex = 27; break;
-	default:        rateIndex = 28; break;
+	case MGN_MCS0:
+		rateIndex = 12;
+		break;
+	case MGN_MCS1:
+		rateIndex = 13;
+		break;
+	case MGN_MCS2:
+		rateIndex = 14;
+		break;
+	case MGN_MCS3:
+		rateIndex = 15;
+		break;
+	case MGN_MCS4:
+		rateIndex = 16;
+		break;
+	case MGN_MCS5:
+		rateIndex = 17;
+		break;
+	case MGN_MCS6:
+		rateIndex = 18;
+		break;
+	case MGN_MCS7:
+		rateIndex = 19;
+		break;
+	case MGN_MCS8:
+		rateIndex = 20;
+		break;
+	case MGN_MCS9:
+		rateIndex = 21;
+		break;
+	case MGN_MCS10:
+		rateIndex = 22;
+		break;
+	case MGN_MCS11:
+		rateIndex = 23;
+		break;
+	case MGN_MCS12:
+		rateIndex = 24;
+		break;
+	case MGN_MCS13:
+		rateIndex = 25;
+		break;
+	case MGN_MCS14:
+		rateIndex = 26;
+		break;
+	case MGN_MCS15:
+		rateIndex = 27;
+		break;
+	default:
+		rateIndex = 28;
+		break;
 	}
 	priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++;
 	priv->stats.received_rate_histogram[0][rateIndex]++;	/* total */
 	priv->stats.received_rate_histogram[rcvType][rateIndex]++;
 }
 
-
 void query_rxdesc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats,
 							bool bIsRxAggrSubframe)
 {
 	rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
-	struct net_device *dev=info->dev;
+	struct net_device *dev = info->dev;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 	/* rx_desc_819x_usb *desc = (rx_desc_819x_usb *)skb->data; */
 	rx_drvinfo_819x_usb  *driver_info = NULL;
@@ -5695,8 +5753,7 @@ void query_rxdesc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats,
 			} else {
 				stats->rate = ret_rate;
 			}
-		}
-		else
+		} else
 			stats->rate = 0x02;
 
 		stats->bShortPreamble = driver_info->SPLCP;
@@ -5709,9 +5766,9 @@ void query_rxdesc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats,
 		stats->TimeStampLow = driver_info->TSFL;
 		/* xiong mask it, 070514 */
 		/* pRfd->Status.TimeStampHigh =
-		 * 			PlatformEFIORead4Byte(Adapter, TSFR+4);
+		 * PlatformEFIORead4Byte(Adapter, TSFR+4);
 		 */
-		/* stats->TimeStampHigh = read_nic_dword(dev,  TSFR+4); */
+		/* stats->TimeStampHigh = read_nic_dword(dev, TSFR+4); */
 
 		UpdateRxPktTimeStamp8190(dev, stats);
 
@@ -5733,35 +5790,34 @@ void query_rxdesc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats,
 	/* for the rx aggregated sub frame, the redundant space truly
 	 * contained in the packet
 	 */
-	if(bIsRxAggrSubframe) {
+	if (bIsRxAggrSubframe)
 		skb_pull(skb, 8);
-	}
 #endif
 	/* for debug 2008.5.29 */
 
 	/* added by vivi, for MP, 20080108 */
 	stats->RxIs40MHzPacket = driver_info->BW;
-	if(stats->RxDrvInfoSize != 0)
+	if (stats->RxDrvInfoSize != 0)
 		TranslateRxSignalStuff819xUsb(skb, stats, driver_info);
-
 }
 
-u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status, bool bIsRxAggrSubframe)
+u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats  *Status,
+					bool bIsRxAggrSubframe)
 {
 #ifdef USB_RX_AGGREGATION_SUPPORT
 	if (bIsRxAggrSubframe)
-		return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize
-			+ Status->RxBufShift + 8);
+		return sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize
+			+ Status->RxBufShift + 8;
 	else
 #endif
-		return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize
-				+ Status->RxBufShift);
+		return sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize
+				+ Status->RxBufShift;
 }
 
-void rtl8192_rx_nomal(struct sk_buff* skb)
+void rtl8192_rx_nomal(struct sk_buff *skb)
 {
 	rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
-	struct net_device *dev=info->dev;
+	struct net_device *dev = info->dev;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 	struct ieee80211_rx_stats stats = {
 		.signal = 0,
@@ -5789,7 +5845,8 @@ void rtl8192_rx_nomal(struct sk_buff* skb)
 #endif
 
 	/* 20 is for ps-poll */
-	if((skb->len >=(20 + sizeof(rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
+	if ((skb->len >= (20 + sizeof(rx_desc_819x_usb))) &&
+				(skb->len < RX_URB_SIZE)) {
 #ifdef USB_RX_AGGREGATION_SUPPORT
 		TempByte = *(skb->data + sizeof(rx_desc_819x_usb));
 #endif
@@ -5809,8 +5866,10 @@ void rtl8192_rx_nomal(struct sk_buff* skb)
 			TempDWord = *(u32 *)(agg_skb->data - 4);
 			PacketLength = (u16)(TempDWord & 0x3FFF); /*sCrcLng*/
 			skb = dev_alloc_skb(PacketLength);
-			memcpy(skb_put(skb,PacketLength),agg_skb->data,PacketLength);
-			PacketShiftBytes = GetRxPacketShiftBytes819xUsb(&stats, false);
+			memcpy(skb_put(skb, PacketLength), agg_skb->data,
+							PacketLength);
+			PacketShiftBytes = GetRxPacketShiftBytes819xUsb(&stats,
+							false);
 		}
 #endif
 		/* Process the MPDU recevied */
@@ -5819,50 +5878,56 @@ void rtl8192_rx_nomal(struct sk_buff* skb)
 		rx_pkt_len = skb->len;
 		ieee80211_hdr = (struct ieee80211_hdr_1addr *)skb->data;
 		unicast_packet = false;
-		if(is_broadcast_ether_addr(ieee80211_hdr->addr1)) {
+		if (is_broadcast_ether_addr(ieee80211_hdr->addr1)) {
 			/* TODO */
-		}else if(is_multicast_ether_addr(ieee80211_hdr->addr1)){
+		} else if (is_multicast_ether_addr(ieee80211_hdr->addr1)) {
 			/* TODO */
-		}else {
+		} else {
 			/* unicast packet */
 			unicast_packet = true;
 		}
 
-		if(!ieee80211_rx(priv->ieee80211,skb, &stats)) {
+		if (!ieee80211_rx(priv->ieee80211, skb, &stats)) {
 			dev_kfree_skb_any(skb);
 		} else {
 			priv->stats.rxoktotal++;
-			if(unicast_packet) {
+			if (unicast_packet)
 				priv->stats.rxbytesunicast += rx_pkt_len;
-			}
 		}
 #ifdef USB_RX_AGGREGATION_SUPPORT
 		testing = 1;
 		/* (PipeIndex == 0) && (TempByte & BIT0) => TotalLength > 0. */
 		if (TotalLength > 0) {
-			PacketOccupiedLendth = PacketLength + (PacketShiftBytes + 8);
+			PacketOccupiedLendth = PacketLength +
+						(PacketShiftBytes + 8);
 			if ((PacketOccupiedLendth & 0xFF) != 0)
-				PacketOccupiedLendth = (PacketOccupiedLendth & 0xFFFFFF00) + 256;
+				PacketOccupiedLendth =
+					(PacketOccupiedLendth & 0xFFFFFF00)
+					+ 256;
 			PacketOccupiedLendth -= 8;
-			TempDWord = PacketOccupiedLendth - PacketShiftBytes; /*- PacketLength */
+			TempDWord = PacketOccupiedLendth - PacketShiftBytes;
+				/*- PacketLength */
 			if (agg_skb->len > TempDWord)
 				skb_pull(agg_skb, TempDWord);
 			else
 				agg_skb->len = 0;
 
-			while (agg_skb->len>=GetRxPacketShiftBytes819xUsb(&stats, true)) {
+			while (agg_skb->len >= GetRxPacketShiftBytes819xUsb
+							(&stats, true)) {
 				u8 tmpCRC = 0, tmpICV = 0;
 				/* RT_TRACE(COMP_RECV,"%s:aggred pkt,total_len"
 				 *	" = %d\n",__func__,agg_skb->len);
 				 */
-				RxDescr = (rx_desc_819x_usb_aggr_subframe *)(agg_skb->data);
+				RxDescr = (rx_desc_819x_usb_aggr_subframe *)
+							(agg_skb->data);
 				tmpCRC = RxDescr->CRC32;
 				tmpICV = RxDescr->ICV;
 				memcpy(agg_skb->data, &agg_skb->data[44], 2);
 				RxDescr->CRC32 = tmpCRC;
 				RxDescr->ICV = tmpICV;
 
-				memset(&stats, 0, sizeof(struct ieee80211_rx_stats));
+				memset(&stats, 0,
+					sizeof(struct ieee80211_rx_stats));
 				stats.signal = 0;
 				stats.noise = -98;
 				stats.rate = 0;
@@ -5870,41 +5935,51 @@ void rtl8192_rx_nomal(struct sk_buff* skb)
 				query_rxdesc_status(agg_skb, &stats, true);
 				PacketLength = stats.Length;
 
-				if(PacketLength > agg_skb->len) {
+				if (PacketLength > agg_skb->len)
 					break;
-				}
 				/* Process the MPDU recevied */
 				skb = dev_alloc_skb(PacketLength);
-				memcpy(skb_put(skb,PacketLength),agg_skb->data, PacketLength);
+				memcpy(skb_put(skb, PacketLength),
+					agg_skb->data, PacketLength);
 				skb_trim(skb, skb->len - 4/*sCrcLng*/);
 
 				rx_pkt_len = skb->len;
-				ieee80211_hdr = (struct ieee80211_hdr_1addr *)skb->data;
+				ieee80211_hdr = (struct ieee80211_hdr_1addr *)
+								skb->data;
 				unicast_packet = false;
-				if(is_broadcast_ether_addr(ieee80211_hdr->addr1)) {
+				if (is_broadcast_ether_addr
+						(ieee80211_hdr->addr1)) {
 					/* TODO */
-				}else if(is_multicast_ether_addr(ieee80211_hdr->addr1)){
+				} else if (is_multicast_ether_addr
+						(ieee80211_hdr->addr1)) {
 					/* TODO */
-				}else {
+				} else
 					/* unicast packet */
 					unicast_packet = true;
-				}
-				if(!ieee80211_rx(priv->ieee80211,skb, &stats)) {
+				if (!ieee80211_rx(priv->ieee80211, skb,
+						&stats)) {
 					dev_kfree_skb_any(skb);
 				} else {
 					priv->stats.rxoktotal++;
-					if(unicast_packet) {
-						priv->stats.rxbytesunicast += rx_pkt_len;
+					if (unicast_packet) {
+						priv->stats.rxbytesunicast +=
+								rx_pkt_len;
 					}
 				}
-				/* should trim the packet which has been copied to target skb */
+				/* should trim the packet which has been
+				 * copied to target skb
+				 */
 				skb_pull(agg_skb, PacketLength);
-				PacketShiftBytes = GetRxPacketShiftBytes819xUsb(&stats, true);
-				PacketOccupiedLendth = PacketLength + PacketShiftBytes;
+				PacketShiftBytes = GetRxPacketShiftBytes819xUsb
+								(&stats, true);
+				PacketOccupiedLendth = PacketLength +
+							PacketShiftBytes;
 				if ((PacketOccupiedLendth & 0xFF) != 0) {
-					PaddingBytes = 256 - (PacketOccupiedLendth & 0xFF);
+					PaddingBytes = 256 -
+						(PacketOccupiedLendth & 0xFF);
 					if (agg_skb->len > PaddingBytes)
-						skb_pull(agg_skb, PaddingBytes);
+						skb_pull(agg_skb,
+								PaddingBytes);
 					else
 						agg_skb->len = 0;
 				}
@@ -5926,9 +6001,9 @@ rtl819xusb_process_received_packet(
 	struct ieee80211_rx_stats *pstats
 	)
 {
-	/* bool bfreerfd=false, bqueued=false; */
-	u8* 	frame;
-	u16     frame_len=0;
+	/* bool bfreerfd = false, bqueued = false; */
+	u8 *frame;
+	u16	frame_len = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	/* u8			index = 0; */
 	/* u8			TID = 0; */
@@ -5943,7 +6018,7 @@ rtl819xusb_process_received_packet(
 	frame = pstats->virtual_address;
 	frame_len = pstats->packetlength;
 #ifdef TODO	/* by amy about HCT */
-	if(!Adapter->bInHctTest)
+	if (!Adapter->bInHctTest)
 		CountRxErrStatistics(Adapter, pRfd);
 #endif
 	{
@@ -5955,11 +6030,10 @@ rtl819xusb_process_received_packet(
 		 * changed and hw switch is being changed.
 		 * 2006.12.04, by shien chang.
 		 */
-		Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (u8* )(&rtState));
+		Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE,
+							(u8 *)(&rtState));
 		if (rtState == eRfOff)
-		{
 			return;
-		}
 	#endif
 	priv->stats.rxframgment++;
 
@@ -5968,11 +6042,11 @@ rtl819xusb_process_received_packet(
 	RmMonitorSignalStrength(Adapter, pRfd);
 #endif
 	/* 2007/01/16 MH Add RX command packet handle here. */
-	/* 2007/03/01 MH We have to release RFD and return if rx pkt is cmd pkt. */
+	/* 2007/03/01 MH We have to release RFD and return if
+	 * rx pkt is cmd pkt.
+	 */
 	if (rtl819xusb_rx_command_packet(dev, pstats))
-	{
 		return;
-	}
 
 #ifdef SW_CRC_CHECK
 	SwCrcCheck();
@@ -5981,7 +6055,8 @@ rtl819xusb_process_received_packet(
 
 }
 
-void query_rx_cmdpkt_desc_status(struct sk_buff *skb, struct ieee80211_rx_stats *stats)
+void query_rx_cmdpkt_desc_status(struct sk_buff *skb,
+				struct ieee80211_rx_stats *stats)
 {
 	/* rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb; */
 	/* struct net_device *dev=info->dev; */
@@ -5992,7 +6067,7 @@ void query_rx_cmdpkt_desc_status(struct sk_buff *skb, struct ieee80211_rx_stats
 	/* rx_drvinfo_819x_usb  *driver_info; */
 
 	/* Get Rx Descriptor Information */
-	stats->virtual_address = (u8*)skb->data;
+	stats->virtual_address = (u8 *)skb->data;
 	stats->Length = desc->Length;
 	stats->RxDrvInfoSize = 0;
 	stats->RxBufShift = 0;
@@ -6018,17 +6093,15 @@ void rtl8192_rx_cmd(struct sk_buff *skb)
 		.freq = IEEE80211_24GHZ_BAND,
 	};
 
-	if((skb->len >=(20 + sizeof(rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE))
-	{
-
-		query_rx_cmdpkt_desc_status(skb,&stats);
+	if ((skb->len >= (20 + sizeof(rx_desc_819x_usb))) &&
+				(skb->len < RX_URB_SIZE)) {
+		query_rx_cmdpkt_desc_status(skb, &stats);
 		/* this is to be done by amy 080508     prfd->queue_id = 1; */
 
 		/*  Process the command packet received. */
-		rtl819xusb_process_received_packet(dev,&stats);
+		rtl819xusb_process_received_packet(dev, &stats);
 		dev_kfree_skb_any(skb);
-	}
-	else
+	} else
 		;
 }
 
@@ -6087,7 +6160,7 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
 {
 	/* unsigned long ioaddr = 0; */
 	struct net_device *dev = NULL;
-	struct r8192_priv *priv= NULL;
+	struct r8192_priv *priv = NULL;
 	struct usb_device *udev = interface_to_usbdev(intf);
 	RT_TRACE(COMP_INIT, "Oops: i'm coming\n");
 
@@ -6098,7 +6171,7 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
 	SET_NETDEV_DEV(dev, &intf->dev);
 	priv = ieee80211_priv(dev);
 	priv->ieee80211 = netdev_priv(dev);
-	priv->udev=udev;
+	priv->udev = udev;
 
 	dev->netdev_ops = &rtl8192_netdev_ops;
 
@@ -6107,20 +6180,22 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
 #if WIRELESS_EXT < 17
 	dev->get_wireless_stats = r8192_get_wireless_stats;
 #endif
-	dev->wireless_handlers = (struct iw_handler_def *) &r8192_wx_handlers_def;
+	dev->wireless_handlers = (struct iw_handler_def *)
+					&r8192_wx_handlers_def;
 #endif
-	dev->type=ARPHRD_ETHER;
+	dev->type = ARPHRD_ETHER;
 
-	dev->watchdog_timeo = HZ*3;	/* modified by john, 0805 */
+	dev->watchdog_timeo = HZ * 3;	/* modified by john, 0805 */
 
-	if (dev_alloc_name(dev, ifname) < 0){
-		RT_TRACE(COMP_INIT, "Oops: devname already taken! Trying wlan%%d...\n");
+	if (dev_alloc_name(dev, ifname) < 0) {
+		RT_TRACE(COMP_INIT, "Oops: devname already taken!"
+				" Trying wlan%%d...\n");
 		ifname = "wlan%d";
 		dev_alloc_name(dev, ifname);
 	}
 
 	RT_TRACE(COMP_INIT, "Driver probe completed1\n");
-	if(rtl8192_init(dev)!=0){
+	if (rtl8192_init(dev) != 0) {
 		RT_TRACE(COMP_ERR, "Initialization failed");
 		goto fail;
 	}
@@ -6128,7 +6203,7 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf,
 	netif_stop_queue(dev);
 
 	register_netdev(dev);
-	RT_TRACE(COMP_INIT, "dev name=======> %s\n",dev->name);
+	RT_TRACE(COMP_INIT, "dev name=======> %s\n", dev->name);
 	rtl8192_proc_init_one(dev);
 
 
@@ -6147,7 +6222,7 @@ fail:
 /*detach all the work and timer structure declared or
  * inititialize in r8192U_init function.
  */
-void rtl8192_cancel_deferred_work(struct r8192_priv* priv)
+void rtl8192_cancel_deferred_work(struct r8192_priv *priv)
 {
 
 	cancel_work_sync(&priv->reset_wq);
@@ -6165,16 +6240,15 @@ static void __devexit rtl8192_usb_disconnect(struct usb_interface *intf)
 	struct net_device *dev = usb_get_intfdata(intf);
 
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	if(dev){
-
+	if (dev) {
 		unregister_netdev(dev);
 
-		RT_TRACE(COMP_DOWN, "=============>wlan driver to be removed\n");
+		RT_TRACE(COMP_DOWN, "=============>wlan driver to be"
+				" removed\n");
 		rtl8192_proc_remove_one(dev);
 
 			rtl8192_down(dev);
-		if (priv->pFirmware)
-		{
+		if (priv->pFirmware) {
 			kfree(priv->pFirmware);
 			priv->pFirmware = NULL;
 		}
@@ -6185,7 +6259,6 @@ static void __devexit rtl8192_usb_disconnect(struct usb_interface *intf)
 		/* rtl8192_irq_disable(dev); */
 		/* rtl8192_reset(dev); */
 		mdelay(10);
-
 	}
 	free_ieee80211(dev);
 	RT_TRACE(COMP_DOWN, "wlan driver removed\n");
@@ -6264,11 +6337,11 @@ void rtl8192_try_wake_queue(struct net_device *dev, int pri)
 	short enough_desc;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 
-	spin_lock_irqsave(&priv->tx_lock,flags);
-	enough_desc = check_nic_enough_desc(dev,pri);
-	spin_unlock_irqrestore(&priv->tx_lock,flags);
+	spin_lock_irqsave(&priv->tx_lock, flags);
+	enough_desc = check_nic_enough_desc(dev, pri);
+	spin_unlock_irqrestore(&priv->tx_lock, flags);
 
-	if(enough_desc)
+	if (enough_desc)
 		ieee80211_wake_queue(priv->ieee80211);
 }
 
@@ -6276,15 +6349,15 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
 {
 	u8 SECR_value = 0x0;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
-	 struct ieee80211_device* ieee = priv->ieee80211;
+	 struct ieee80211_device *ieee = priv->ieee80211;
 	SECR_value = SCR_TxEncEnable | SCR_RxDecEnable;
-	if (((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || (KEY_TYPE_WEP104 == ieee->pairwise_key_type)) && (priv->ieee80211->auth_mode != 2))
-	{
+	if (((KEY_TYPE_WEP40 == ieee->pairwise_key_type) ||
+			(KEY_TYPE_WEP104 == ieee->pairwise_key_type)) &&
+			(priv->ieee80211->auth_mode != 2)) {
 		SECR_value |= SCR_RxUseDK;
 		SECR_value |= SCR_TxUseDK;
-	}
-	else if ((ieee->iw_mode == IW_MODE_ADHOC) && (ieee->pairwise_key_type & (KEY_TYPE_CCMP | KEY_TYPE_TKIP)))
-	{
+	} else if ((ieee->iw_mode == IW_MODE_ADHOC) && (ieee->pairwise_key_type
+			& (KEY_TYPE_CCMP | KEY_TYPE_TKIP))) {
 		SECR_value |= SCR_RxUseDK;
 		SECR_value |= SCR_TxUseDK;
 	}
@@ -6298,28 +6371,28 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
 	ieee->hwsec_active = 1;
 
 	if ((ieee->pHTInfo->IOTAction&HT_IOT_ACT_PURE_N_MODE) || !hwwep)
-	/* !ieee->hwsec_support) */
-	/*add hwsec_support flag to totol control hw_sec on/off */
+		/* !ieee->hwsec_support) */
+		/*add hwsec_support flag to totol control hw_sec on/off */
 	{
 		ieee->hwsec_active = 0;
 		SECR_value &= ~SCR_RxDecEnable;
 	}
-	RT_TRACE(COMP_SEC,"%s:, hwsec:%d, pairwise_key:%d, SECR_value:%x\n", __func__, \
-			ieee->hwsec_active, ieee->pairwise_key_type, SECR_value);
+	RT_TRACE(COMP_SEC, "%s:, hwsec:%d, pairwise_key:%d, SECR_value:%x\n",
+			__func__, ieee->hwsec_active, ieee->pairwise_key_type,
+			SECR_value);
 	{
 		write_nic_byte(dev, SECR,  SECR_value);
 					/* SECR_value |  SCR_UseDK ); */
 	}
 }
 
-
-void setKey(	struct net_device *dev,
+void setKey(struct net_device *dev,
 		u8 EntryNo,
 		u8 KeyIndex,
 		u16 KeyType,
 		u8 *MacAddr,
 		u8 DefaultKey,
-		u32 *KeyContent )
+		u32 *KeyContent)
 {
 	u32 TargetCommand = 0;
 	u32 TargetContent = 0;
@@ -6328,7 +6401,9 @@ void setKey(	struct net_device *dev,
 	if (EntryNo >= TOTAL_CAM_ENTRY)
 		RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n");
 
-	RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr);
+	RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d,"
+			" KeyType:%d, MacAddr%pM\n", dev, EntryNo, KeyIndex,
+			KeyType, MacAddr);
 
 	if (DefaultKey)
 		usConfig |= BIT15 | (KeyType<<2);
@@ -6337,34 +6412,33 @@ void setKey(	struct net_device *dev,
 	/* usConfig |= BIT15 | (KeyType<<2) | (DefaultKey<<5) | KeyIndex; */
 
 
-	for(i=0 ; i<CAM_CONTENT_COUNT; i++){
-		TargetCommand  = i+CAM_CONTENT_COUNT*EntryNo;
+	for (i = 0; i < CAM_CONTENT_COUNT; i++) {
+		TargetCommand  = i + CAM_CONTENT_COUNT * EntryNo;
 		TargetCommand |= BIT31|BIT16;
 
-		if(i==0){		/* MAC|Config */
-			TargetContent = (u32)(*(MacAddr+0)) << 16|
-					(u32)(*(MacAddr+1)) << 24|
+		if (i == 0) {		/* MAC|Config */
+			TargetContent = (u32)(*(MacAddr + 0)) << 16|
+					(u32)(*(MacAddr + 1)) << 24|
 					(u32)usConfig;
 
 			write_nic_dword(dev, WCAMI, TargetContent);
 			write_nic_dword(dev, RWCAM, TargetCommand);
-			/* printk("setkey cam =%8x\n",
-			 *			 read_cam(dev, i+6*EntryNo));
+			/* printk("setkey cam =% 8x\n",
+			 *		read_cam(dev, i + 6 * EntryNo));
 			 */
-		}
-		else if(i==1){		/* MAC */
-			TargetContent = (u32)(*(MacAddr+2)) 	 |
-					(u32)(*(MacAddr+3)) <<  8|
-					(u32)(*(MacAddr+4)) << 16|
-					(u32)(*(MacAddr+5)) << 24;
+		} else if (i == 1) {		/* MAC */
+			TargetContent = (u32)(*(MacAddr + 2))|
+					(u32)(*(MacAddr + 3)) <<  8|
+					(u32)(*(MacAddr + 4)) << 16|
+					(u32)(*(MacAddr + 5)) << 24;
 			write_nic_dword(dev, WCAMI, TargetContent);
 			write_nic_dword(dev, RWCAM, TargetCommand);
-		}
-		else {
+		} else {
 			/* Key Material */
-			if(KeyContent !=NULL){
-			write_nic_dword(dev, WCAMI, (u32)(*(KeyContent+i-2)) );
-			write_nic_dword(dev, RWCAM, TargetCommand);
+			if (KeyContent != NULL) {
+				write_nic_dword(dev, WCAMI,
+					(u32)(*(KeyContent + i - 2)));
+				write_nic_dword(dev, RWCAM, TargetCommand);
 		}
 	}
 	}
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re:
  2010-06-13  6:16 Mike Gilks
  2010-06-13  6:16 ` [PATCH 1/4] staging: rtl8192u: fix checkpatch.pl issues to line 4000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 4000 Mike Gilks
@ 2010-06-13  8:58 ` Tejun Heo
  2010-06-18 23:52 ` your mail Greg KH
  2 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2010-06-13  8:58 UTC (permalink / raw)
  To: Mike Gilks; +Cc: gregkh, mchehab, julia, joe, devel, linux-kernel

Hello,

On 06/13/2010 08:16 AM, Mike Gilks wrote:
> Subject:r8192U_core.c Last pass
> In-Reply-To: 
> 
> 
> This is the last patch I can manage for this file.
> Everything else to do with checkpatch.pl issues may require an actual developer to look at it.

Can you please fix up your sending script or whatever?  You've been
sending multiple patchsets without subject.

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: your mail
  2010-06-13  6:16 Mike Gilks
  2010-06-13  6:16 ` [PATCH 1/4] staging: rtl8192u: fix checkpatch.pl issues to line 4000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 4000 Mike Gilks
  2010-06-13  8:58 ` Tejun Heo
@ 2010-06-18 23:52 ` Greg KH
  2 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2010-06-18 23:52 UTC (permalink / raw)
  To: Mike Gilks; +Cc: gregkh, mchehab, julia, joe, devel, linux-kernel

On Sun, Jun 13, 2010 at 02:16:47PM +0800, Mike Gilks wrote:
> Subject:r8192U_core.c Last pass
> In-Reply-To: 
> 
> 
> This is the last patch I can manage for this file.
> Everything else to do with checkpatch.pl issues may require an actual developer to look at it.

I have a whole bunch of series of patches from you (one duplicating
Linus's patch, I don't think you ment to send that...)  So, which should
I apply?

How about I delete them all and you send me the latest ones that you
want me to apply, as I'm totally confused which is your latest version
and which isn't and I see lots of duplicates.

Sound good?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-18 23:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-13  6:16 Mike Gilks
2010-06-13  6:16 ` [PATCH 1/4] staging: rtl8192u: fix checkpatch.pl issues to line 4000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 4000 Mike Gilks
2010-06-13  6:16   ` [PATCH 2/4] staging: rtl8192u: fix checkpatch.pl issues to line 5000 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5000 Mike Gilks
2010-06-13  6:16     ` [PATCH 3/4] staging: rtl8192u: fix checkpatch.pl issues to line 5500 Fix most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 5500 Mike Gilks
2010-06-13  6:16       ` [PATCH 4/4] staging: rtl8192u: fix checkpatch.pl issues to end Fix most problems pointed out by checkpatch.pl in file r8192U_core.c to end of file. There are 2 errors and 93 warnings remaining, but they will need fixing by someone smarter than me Mike Gilks
2010-06-13  8:58 ` Tejun Heo
2010-06-18 23:52 ` your mail Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).