Skip to contentSkip to conversation

Staging: rtl8192u: ieee80211: Move '{' up one line

PATCH In review Hatice ERTÜRK 2 participants 2 messages Mar 6, 2015 – Mar 7, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rtl8192u: ieee80211: Move '{' up one line

That open brace '{' should be on the previous line. This Error found with checkpatch.pl

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 99 ++++++++---------------
 1 file changed, 33 insertions(+), 66 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +33 -66
index c0d1468..2913c70 100644
@@ -185,8 +185,7 @@ int ieee80211_encrypt_fragment(
 	struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx];
 	int res;
 
-	if (!(crypt && crypt->ops))
-	{
+	if (!(crypt && crypt->ops)) {
 		printk("=========>%s(), crypt is null\n", __func__);
 		return -1;
 	}
@@ -325,40 +324,33 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 	if(!Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter))
 		return;
 #endif
-	if(!ieee->GetNmodeSupportBySecCfg(ieee->dev))
-	{
+	if(!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
 		return;
 	}
-	if(pHTInfo->bCurrentAMPDUEnable)
-	{
-		if (!GetTs(ieee, (PTS_COMMON_INFO *)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true))
-		{
+	if(pHTInfo->bCurrentAMPDUEnable) {
+		if (!GetTs(ieee, (PTS_COMMON_INFO *)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true)) {
 			printk("===>can't get TS\n");
 			return;
 		}
-		if (pTxTs->TxAdmittedBARecord.bValid == false)
-		{
+		if (pTxTs->TxAdmittedBARecord.bValid == false) {
 			TsStartAddBaProcess(ieee, pTxTs);
 			goto FORCED_AGG_SETTING;
 		}
-		else if (pTxTs->bUsingBa == false)
-		{
+		else if (pTxTs->bUsingBa == false) {
 			if (SN_LESS(pTxTs->TxAdmittedBARecord.BaStartSeqCtrl.field.SeqNum, (pTxTs->TxCurSeq+1)%4096))
 				pTxTs->bUsingBa = true;
 			else
 				goto FORCED_AGG_SETTING;
 		}
 
-		if (ieee->iw_mode == IW_MODE_INFRA)
-		{
+		if (ieee->iw_mode == IW_MODE_INFRA) {
 			tcb_desc->bAMPDUEnable = true;
 			tcb_desc->ampdu_factor = pHTInfo->CurrentAMPDUFactor;
 			tcb_desc->ampdu_density = pHTInfo->CurrentMPDUDensity;
 		}
 	}
 FORCED_AGG_SETTING:
-	switch (pHTInfo->ForcedAMPDUMode )
-	{
+	switch (pHTInfo->ForcedAMPDUMode ){
 		case HT_AGG_AUTO:
 			break;
 
@@ -382,12 +374,10 @@ static void ieee80211_qurey_ShortPreambleMode(struct ieee80211_device *ieee,
 					      cb_desc *tcb_desc)
 {
 	tcb_desc->bUseShortPreamble = false;
-	if (tcb_desc->data_rate == 2)
-	{ /* 1M can only use Long Preamble. 11B spec */
+	if (tcb_desc->data_rate == 2) { /* 1M can only use Long Preamble. 11B spec */
 		return;
 	}
-	else if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
-	{
+	else if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE) {
 		tcb_desc->bUseShortPreamble = true;
 	}
 	return;
@@ -402,8 +392,7 @@ ieee80211_query_HTCapShortGI(struct ieee80211_device *ieee, cb_desc *tcb_desc)
 	if(!pHTInfo->bCurrentHTSupport||!pHTInfo->bEnableHT)
 		return;
 
-	if(pHTInfo->bForcedShortGI)
-	{
+	if(pHTInfo->bForcedShortGI) {
 		tcb_desc->bUseShortGI = true;
 		return;
 	}
@@ -452,19 +441,16 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 	if (is_broadcast_ether_addr(skb->data+16))  /* check addr3 as infrastructure add3 is DA. */
 		return;
 
-	if (ieee->mode < IEEE_N_24G) //b, g mode
-	{
+	if (ieee->mode < IEEE_N_24G) //b, g mode {
 			/* (1) RTS_Threshold is compared to the MPDU, not MSDU.
 			   (2) If there are more than one frag in  this MSDU, only the first frag uses protection frame.
 					Other fragments are protected by previous fragment.
 					So we only need to check the length of first fragment. */
-		if (skb->len > ieee->rts)
-		{
+		if (skb->len > ieee->rts) {
 			tcb_desc->bRTSEnable = true;
 			tcb_desc->rts_rate = MGN_24M;
 		}
-		else if (ieee->current_network.buseprotection)
-		{
+		else if (ieee->current_network.buseprotection) {
 			/* Use CTS-to-SELF in protection mode. */
 			tcb_desc->bRTSEnable = true;
 			tcb_desc->bCTSEnable = true;
@@ -473,42 +459,35 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 		/* otherwise return; */
 		return;
 	}
-	else
-	{/* 11n High throughput case. */
+	else {/* 11n High throughput case. */
 		PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
-		while (true)
-		{
+		while (true) {
 			/* check ERP protection */
-			if (ieee->current_network.buseprotection)
-			{ /* CTS-to-SELF */
+			if (ieee->current_network.buseprotection) { /* CTS-to-SELF */
 				tcb_desc->bRTSEnable = true;
 				tcb_desc->bCTSEnable = true;
 				tcb_desc->rts_rate = MGN_24M;
 				break;
 			}
 			/* check HT op mode */
-			if(pHTInfo->bCurrentHTSupport  && pHTInfo->bEnableHT)
-			{
+			if(pHTInfo->bCurrentHTSupport  && pHTInfo->bEnableHT) {
 				u8 HTOpMode = pHTInfo->CurrentOpMode;
 				if((pHTInfo->bCurBW40MHz && (HTOpMode == 2 || HTOpMode == 3)) ||
-							(!pHTInfo->bCurBW40MHz && HTOpMode == 3) )
-				{
+							(!pHTInfo->bCurBW40MHz && HTOpMode == 3) ) {
 					tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 					tcb_desc->bRTSEnable = true;
 					break;
 				}
 			}
 			/* check rts */
-			if (skb->len > ieee->rts)
-			{
+			if (skb->len > ieee->rts) {
 				tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 				tcb_desc->bRTSEnable = true;
 				break;
 			}
 			/* to do list: check MIMO power save condition.
 			check AMPDU aggregation for TXOP */
-			if(tcb_desc->bAMPDUEnable)
-			{
+			if(tcb_desc->bAMPDUEnable) {
 				tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps.
 				 According to 8190 design, firmware sends CF-End only if RTS/CTS is enabled. However, it degrads
 				 throughput around 10M, so we disable of this mechanism. 2007.08.03 by Emily */
@@ -516,8 +495,7 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 				break;
 			}
 			/* check IOT action */
-			if(pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF)
-			{
+			if(pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF) {
 				tcb_desc->bCTSEnable	= true;
 				tcb_desc->rts_rate  =	MGN_24M;
 				tcb_desc->bRTSEnable = true;
@@ -551,16 +529,14 @@ static void ieee80211_txrate_selectmode(struct ieee80211_device *ieee,
 					cb_desc *tcb_desc)
 {
 #ifdef TO_DO_LIST
-	if(!IsDataFrame(pFrame))
-	{
+	if(!IsDataFrame(pFrame)) {
 		pTcb->bTxDisableRateFallBack = TRUE;
 		pTcb->bTxUseDriverAssingedRate = TRUE;
 		pTcb->RATRIndex = 7;
 		return;
 	}
 
-	if(pMgntInfo->ForcedDataRate!= 0)
-	{
+	if(pMgntInfo->ForcedDataRate!= 0) {
 		pTcb->bTxDisableRateFallBack = TRUE;
 		pTcb->bTxUseDriverAssingedRate = TRUE;
 		return;
@@ -571,8 +547,7 @@ static void ieee80211_txrate_selectmode(struct ieee80211_device *ieee,
 
 	if(ieee->bTxUseDriverAssingedRate)
 		tcb_desc->bTxUseDriverAssingedRate = true;
-	if(!tcb_desc->bTxDisableRateFallBack || !tcb_desc->bTxUseDriverAssingedRate)
-	{
+	if(!tcb_desc->bTxDisableRateFallBack || !tcb_desc->bTxUseDriverAssingedRate) {
 		if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC)
 			tcb_desc->RATRIndex = 0;
 	}
@@ -583,11 +558,9 @@ static void ieee80211_query_seqnum(struct ieee80211_device *ieee,
 {
 	if (is_multicast_ether_addr(dst))
 		return;
-	if (IsQoSDataFrame(skb->data)) /* we deal qos data only */
-	{
+	if (IsQoSDataFrame(skb->data)) /* we deal qos data only */ {
 		PTX_TS_RECORD pTS = NULL;
-		if (!GetTs(ieee, (PTS_COMMON_INFO *)(&pTS), dst, skb->priority, TX_DIR, true))
-		{
+		if (!GetTs(ieee, (PTS_COMMON_INFO *)(&pTS), dst, skb->priority, TX_DIR, true)) {
 			return;
 		}
 		pTS->TxCurSeq = (pTS->TxCurSeq+1)%4096;
@@ -709,8 +682,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		}
 
 		/* if (ieee->current_network.QoS_Enable) */
-		if(qos_actived)
-		{
+		if(qos_actived) {
 			hdr_len = IEEE80211_3ADDR_LEN + 2;
 
 			skb->priority = ieee80211_classify(skb, &ieee->current_network);
@@ -755,8 +727,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		txb->payload_size = bytes;
 
 		/* if (ieee->current_network.QoS_Enable) */
-		if(qos_actived)
-		{
+		if(qos_actived) {
 			txb->queue_index = UP2AC(skb->priority);
 		} else {
 			txb->queue_index = WME_AC_BK;
@@ -783,8 +754,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 					tcb_desc->bHwSec = 0;
 				skb_reserve(skb_frag, crypt->ops->extra_prefix_len);
 			}
-			else
-			{
+			else {
 				tcb_desc->bHwSec = 0;
 			}
 			frag_hdr = (struct ieee80211_hdr_3addrqos *)skb_put(skb_frag, hdr_len);
@@ -802,8 +772,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 				bytes = bytes_last_frag;
 			}
 			/* if(ieee->current_network.QoS_Enable) */
-			if(qos_actived)
-			{
+			if(qos_actived) {
 				/* add 1 only indicate to corresponding seq number control 2006/7/12 */
 				frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl[UP2AC(skb->priority)+1]<<4 | i);
 			} else {
@@ -832,8 +801,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 				skb_put(skb_frag, 4);
 		}
 
-		if(qos_actived)
-		{
+		if(qos_actived) {
 		  if (ieee->seq_ctrl[UP2AC(skb->priority) + 1] == 0xFFF)
 			ieee->seq_ctrl[UP2AC(skb->priority) + 1] = 0;
 		  else
@@ -865,8 +833,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 
  success:
 /* WB add to fill data tcb_desc here. only first fragment is considered, need to change, and you may remove to other place. */
-	if (txb)
-	{
+	if (txb) {
 		cb_desc *tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
 		tcb_desc->bTxEnableFwCalcDur = 1;
 		if (is_multicast_ether_addr(header.addr1))
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 7 lines · Hatice ERT�RK

That open brace '{' should be on the previous line. This Error found with checkpatch.pl

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 99 ++++++++---------------
 1 file changed, 33 insertions(+), 66 deletions(-)

This patch doesn't apply at all, what did you make it against?