coding style changes to drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
Second attempt at this commit, apologies for that.
Coding style changes to resolve some of the scripts/checkpatch.pl issues with the file drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c.
There remain line length and CamelCase issues unresolved in the file.
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 1/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct braces
Coding style edit to clear the checkpatch.pl errors of the type:
ERROR: that open brace { should be on the previous line
--- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 197 ++++++++------------- 1 file changed, 70 insertions(+), 127 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +70 -127
@@ -7,28 +7,28 @@ u8 MCS_FILTER_ALL[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0u8 MCS_FILTER_1SS [16 ] = {0xff ,0x00 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 }; -u16 MCS_DATA_RATE [2 ][2 ][77 ] = - { { {13 ,26 ,39 ,52 ,78 ,104 ,117 ,130 ,26 ,52 ,78 ,104 ,156 ,208 ,234 ,260 , -39 ,78 ,117 ,234 ,312 ,351 ,390 ,52 ,104 ,156 ,208 ,312 ,416 ,468 ,520 , -0 ,78 ,104 ,130 ,117 ,156 ,195 ,104 ,130 ,130 ,156 ,182 ,182 ,208 ,156 ,195 , -195 ,234 ,273 ,273 ,312 ,130 ,156 ,181 ,156 ,181 ,208 ,234 ,208 ,234 ,260 ,260 , -286 ,195 ,234 ,273 ,234 ,273 ,312 ,351 ,312 ,351 ,390 ,390 ,429 },// Long GI, 20MHz - {14 ,29 ,43 ,58 ,87 ,116 ,130 ,144 ,29 ,58 ,87 ,116 ,173 ,231 ,260 ,289 , -43 ,87 ,130 ,173 ,260 ,347 ,390 ,433 ,58 ,116 ,173 ,231 ,347 ,462 ,520 ,578 , -0 ,87 ,116 ,144 ,130 ,173 ,217 ,116 ,144 ,144 ,173 ,202 ,202 ,231 ,173 ,217 , -217 ,260 ,303 ,303 ,347 ,144 ,173 ,202 ,173 ,202 ,231 ,260 ,231 ,260 ,289 ,289 , -318 ,217 ,260 ,303 ,260 ,303 ,347 ,390 ,347 ,390 ,433 ,433 ,477 } },// Short GI, 20MHz - { {27 ,54 ,81 ,108 ,162 ,216 ,243 ,270 ,54 ,108 ,162 ,216 ,324 ,432 ,486 ,540 , -81 ,162 ,243 ,324 ,486 ,648 ,729 ,810 ,108 ,216 ,324 ,432 ,648 ,864 ,972 ,1080 , -12 ,162 ,216 ,270 ,243 ,324 ,405 ,216 ,270 ,270 ,324 ,378 ,378 ,432 ,324 ,405 , -405 ,486 ,567 ,567 ,648 ,270 ,324 ,378 ,324 ,378 ,432 ,486 ,432 ,486 ,540 ,540 , -594 ,405 ,486 ,567 ,486 ,567 ,648 ,729 ,648 ,729 ,810 ,810 ,891 },// Long GI, 40MHz - {30 ,60 ,90 ,120 ,180 ,240 ,270 ,300 ,60 ,120 ,180 ,240 ,360 ,480 ,540 ,600 , -90 ,180 ,270 ,360 ,540 ,720 ,810 ,900 ,120 ,240 ,360 ,480 ,720 ,960 ,1080 ,1200 , -13 ,180 ,240 ,300 ,270 ,360 ,450 ,240 ,300 ,300 ,360 ,420 ,420 ,480 ,360 ,450 , -450 ,540 ,630 ,630 ,720 ,300 ,360 ,420 ,360 ,420 ,480 ,540 ,480 ,540 ,600 ,600 , -660 ,450 ,540 ,630 ,540 ,630 ,720 ,810 ,720 ,810 ,900 ,900 ,990 } }// Short GI, 40MHz - }; +u16 MCS_DATA_RATE [2 ][2 ][77 ] = { + { {13 ,26 ,39 ,52 ,78 ,104 ,117 ,130 ,26 ,52 ,78 ,104 ,156 ,208 ,234 ,260 , +39 ,78 ,117 ,234 ,312 ,351 ,390 ,52 ,104 ,156 ,208 ,312 ,416 ,468 ,520 , +0 ,78 ,104 ,130 ,117 ,156 ,195 ,104 ,130 ,130 ,156 ,182 ,182 ,208 ,156 ,195 , +195 ,234 ,273 ,273 ,312 ,130 ,156 ,181 ,156 ,181 ,208 ,234 ,208 ,234 ,260 ,260 , +286 ,195 ,234 ,273 ,234 ,273 ,312 ,351 ,312 ,351 ,390 ,390 ,429 },// Long GI, 20MHz + {14 ,29 ,43 ,58 ,87 ,116 ,130 ,144 ,29 ,58 ,87 ,116 ,173 ,231 ,260 ,289 , +43 ,87 ,130 ,173 ,260 ,347 ,390 ,433 ,58 ,116 ,173 ,231 ,347 ,462 ,520 ,578 , +0 ,87 ,116 ,144 ,130 ,173 ,217 ,116 ,144 ,144 ,173 ,202 ,202 ,231 ,173 ,217 , +217 ,260 ,303 ,303 ,347 ,144 ,173 ,202 ,173 ,202 ,231 ,260 ,231 ,260 ,289 ,289 , +318 ,217 ,260 ,303 ,260 ,303 ,347 ,390 ,347 ,390 ,433 ,433 ,477 } },// Short GI, 20MHz + { {27 ,54 ,81 ,108 ,162 ,216 ,243 ,270 ,54 ,108 ,162 ,216 ,324 ,432 ,486 ,540 , +81 ,162 ,243 ,324 ,486 ,648 ,729 ,810 ,108 ,216 ,324 ,432 ,648 ,864 ,972 ,1080 , +12 ,162 ,216 ,270 ,243 ,324 ,405 ,216 ,270 ,270 ,324 ,378 ,378 ,432 ,324 ,405 , +405 ,486 ,567 ,567 ,648 ,270 ,324 ,378 ,324 ,378 ,432 ,486 ,432 ,486 ,540 ,540 , +594 ,405 ,486 ,567 ,486 ,567 ,648 ,729 ,648 ,729 ,810 ,810 ,891 },// Long GI, 40MHz + {30 ,60 ,90 ,120 ,180 ,240 ,270 ,300 ,60 ,120 ,180 ,240 ,360 ,480 ,540 ,600 , +90 ,180 ,270 ,360 ,540 ,720 ,810 ,900 ,120 ,240 ,360 ,480 ,720 ,960 ,1080 ,1200 , +13 ,180 ,240 ,300 ,270 ,360 ,450 ,240 ,300 ,300 ,360 ,420 ,420 ,480 ,360 ,450 , +450 ,540 ,630 ,630 ,720 ,300 ,360 ,420 ,360 ,420 ,480 ,540 ,480 ,540 ,600 ,600 , +660 ,450 ,540 ,630 ,540 ,630 ,720 ,810 ,720 ,810 ,900 ,900 ,990 } }// Short GI, 40MHz +};static u8 UNKNOWN_BORADCOM [3 ] = {0x00 ,0x14 ,0xbf };static u8 LINKSYSWRT330_LINKSYSWRT300_BROADCOM [3 ] = {0x00 ,0x1a ,0x70 };
@@ -128,8 +128,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString )static u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily PHT_CAPABILITY_ELE pCapELE; -if (!memcmp (CapIE, EWC11NHTCap,sizeof (EWC11NHTCap))) - { +if (!memcmp (CapIE, EWC11NHTCap,sizeof (EWC11NHTCap))) {//EWC IE IEEE80211_DEBUG (IEEE80211_DL_HT ,"EWC IE in %s()\n" , __func__); pCapELE = (PHT_CAPABILITY_ELE )(&CapIE[4 ]);
@@ -165,8 +164,7 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)static u8 EWC11NHTInfo[] = {0x00 ,0x90 ,0x4c ,0x34 };// For 11n EWC definition, 2007.07.17, by Emily PHT_INFORMATION_ELE pHTInfoEle; -if (!memcmp (InfoIE, EWC11NHTInfo,sizeof (EWC11NHTInfo))) - { +if (!memcmp (InfoIE, EWC11NHTInfo,sizeof (EWC11NHTInfo))) {// Not EWC IE IEEE80211_DEBUG (IEEE80211_DL_HT ,"EWC IE in %s()\n" , __func__); pHTInfoEle = (PHT_INFORMATION_ELE )(&InfoIE[4 ]);
@@ -178,8 +176,7 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tPrimary channel = %d\n" , pHTInfoEle->ControlChl);IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSecondary channel =" ); -switch (pHTInfoEle->ExtChlOffset) - { +switch (pHTInfoEle->ExtChlOffset) {case 0 :IEEE80211_DEBUG (IEEE80211_DL_HT ,"Not Present\n" );break ;
@@ -196,8 +193,7 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tRecommended channel width = %s\n" , (pHTInfoEle->RecommemdedTxWidth)?"20Mhz" :"40Mhz" );IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tOperation mode for protection = " ); -switch (pHTInfoEle->OptMode) - { +switch (pHTInfoEle->OptMode) {case 0 :IEEE80211_DEBUG (IEEE80211_DL_HT ,"No Protection\n" );break ;
@@ -248,15 +244,13 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz) retValue = false; else if(!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) // station in half n mode retValue = false; - else if(is40MHz) // ap support 40 bw - { + else if(is40MHz) { // ap support 40 bwif (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)// ap support 40 bw short GI retValue = true;else retValue = false; } - else - { + else {if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)// ap support 40 bw short GI retValue = true;else
@@ -305,35 +299,26 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate)u8 is40MHz =0 ;u8 isShortGI =0 ; -if (nDataRate <12 ) - { +if (nDataRate <12 ) {return CCKOFDMRate[nDataRate]; } -else - { -if (nDataRate >=0x10 && nDataRate <=0x1f )//if(nDataRate > 11 && nDataRate < 28 ) - { +else { +if (nDataRate >=0x10 && nDataRate <=0x1f ) {//if(nDataRate > 11 && nDataRate < 28 ) is40MHz =0 ; isShortGI =0 ;// nDataRate = nDataRate - 12; - } -else if (nDataRate >=0x20 && nDataRate <=0x2f )//(27, 44) - { + }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) is40MHz =1 ; isShortGI =0 ;//nDataRate = nDataRate - 28; - } -else if (nDataRate >=0x30 && nDataRate <=0x3f )//(43, 60) - { + }else if (nDataRate >=0x30 && nDataRate <=0x3f ) {//(43, 60) is40MHz =0 ; isShortGI =1 ;//nDataRate = nDataRate - 44; - } -else if (nDataRate >=0x40 && nDataRate <=0x4f )//(59, 76) - { + }else if (nDataRate >=0x40 && nDataRate <=0x4f ) {//(59, 76) is40MHz =1 ; isShortGI =1 ;
@@ -505,9 +490,7 @@ static u8 HTIOTActIsMgntUseCCK6M(struct ieee80211_network *network)// 2008/01/28 MH We must prevent that we select null bssid to link. if (network->broadcom_cap_exist) - { retValue =1 ; - }return retValue; }
@@ -515,12 +498,10 @@ static u8 HTIOTActIsMgntUseCCK6M(struct ieee80211_network *network)static u8 HTIOTActIsCCDFsync (u8 *PeerMacAddr) {u8 retValue =0 ; -if ( (memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 )==0 ) || - (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 )==0 ) || - (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 )) - { +if ((memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 )==0 ) || + (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 )==0 ) || + (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 )) retValue =1 ; - }return retValue; }
@@ -550,19 +531,16 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, uPHT_CAPABILITY_ELE pCapELE =NULL ;//u8 bIsDeclareMCS13; -if ((posHTCap ==NULL ) || (pHT ==NULL )) - { +if ((posHTCap ==NULL ) || (pHT ==NULL )) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTCap or pHTInfo can't be null in HTConstructCapabilityElement()\n" );return ; }memset (posHTCap,0 , *len); -if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) - { +if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) {u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily memcpy (posHTCap, EWC11NHTCap,sizeof (EWC11NHTCap)); pCapELE = (PHT_CAPABILITY_ELE )&(posHTCap[4 ]); - }else - { + }else { pCapELE = (PHT_CAPABILITY_ELE )posHTCap; }
@@ -570,13 +548,9 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//HT capability info pCapELE->AdvCoding =0 ;// This feature is not supported now!! if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) - { pCapELE->ChlWidth =0 ; - }else - { pCapELE->ChlWidth = (pHT->bRegBW40MHz?1 :0 ); - }// pCapELE->ChlWidth = (pHT->bRegBW40MHz?1:0); pCapELE->MimoPwrSave = pHT->SelfMimoPs;
@@ -601,9 +575,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, uif (IsEncrypt) { pCapELE->MPDUDensity =7 ;// 8us pCapELE->MaxRxAMPDUFactor =2 ;// 2 is for 32 K and 3 is 64K - } -else - { + }else { pCapELE->MaxRxAMPDUFactor =3 ;// 2 is for 32 K and 3 is 64K pCapELE->MPDUDensity =0 ;// no density }
@@ -621,8 +593,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u// 2008.06.12 // For RTL819X, if pairwisekey = wep/tkip, ap is ralink, we support only MCS0~7. -if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) - { +if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) {int i;for (i =1 ; i<16 ; i++) pCapELE->MCS[i] =0 ;
@@ -666,15 +637,13 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le { PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo; PHT_INFORMATION_ELE pHTInfoEle = (PHT_INFORMATION_ELE)posHTInfo; - if ((posHTInfo == NULL) || (pHTInfoEle == NULL)) - { + if ((posHTInfo == NULL) || (pHTInfoEle == NULL)) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "posHTInfo or pHTInfoEle can't be null in HTConstructInfoElement()\n"); return; } memset(posHTInfo, 0, *len); - if ( (ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) //ap mode is not currently supported - { + if ( (ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) { //ap mode is not currently supported pHTInfoEle->ControlChl = ieee->current_network.channel; pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz)?HT_EXTCHNL_OFFSET_NO_EXT: (ieee->current_network.channel<=6)?
@@ -696,9 +665,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le *len =22 +2 ;//same above - } -else - { + }else {//STA should not generate High Throughput Information Element *len =0 ; }
@@ -791,21 +758,19 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,static u8 HT_PickMCSRate (struct ieee80211_device *ieee,u8 *pOperateMCS) {u8 i; -if (pOperateMCS ==NULL ) - { +if (pOperateMCS ==NULL ) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pOperateMCS can't be null in HT_PickMCSRate()\n" );return false; } -switch (ieee->mode) - { +switch (ieee->mode) {case IEEE_A :case IEEE_B :case IEEE_G ://legacy rate routine handled at selectedrate //no MCS rate -for (i=0 ;i<=15 ;i++){ +for (i=0 ;i<=15 ;i++) { pOperateMCS[i] =0 ; }break ;
@@ -857,31 +822,25 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFu8 bitMap;u8 mcsRate =0 ;u8 availableMcsRate[16 ]; -if (pMCSRateSet ==NULL || pMCSFilter ==NULL ) - { +if (pMCSRateSet ==NULL || pMCSFilter ==NULL ) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n" );return false; }for (i=0 ; i<16 ; i++) availableMcsRate[i] = pMCSRateSet[i] & pMCSFilter[i]; -for (i =0 ; i <16 ; i++) - { +for (i =0 ; i <16 ; i++) {if (availableMcsRate[i] !=0 )break ; }if (i ==16 )return false; -for (i =0 ; i <16 ; i++) - { -if (availableMcsRate[i] !=0 ) - { +for (i =0 ; i <16 ; i++) { +if (availableMcsRate[i] !=0 ) { bitMap = availableMcsRate[i]; -for (j =0 ; j <8 ; j++) - { -if ((bitMap%2 ) !=0 ) - { +for (j =0 ; j <8 ; j++) { +if ((bitMap%2 ) !=0 ) {if (HTMcsToDataRate (ieee, (8 *i+j)) >HTMcsToDataRate (ieee, mcsRate)) mcsRate = (8 *i+j); }
@@ -1022,27 +981,23 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// <1> Decide AMPDU Factor // By Emily -if (!pHTInfo->bRegRT2RTAggregation) - { +if (!pHTInfo->bRegRT2RTAggregation) {// Decide AMPDU Factor according to protocol handshake if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor) pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;else pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor; - }else - { + }else {// Set MPDU density to 2 to Realtek AP, and set it to 0 for others // Replace MPDU factor declared in original association response frame format. 2007.08.20 by Emily -if (ieee->current_network.bssht.bdRT2RTAggregation) - { +if (ieee->current_network.bssht.bdRT2RTAggregation) {if (ieee->pairwise_key_type !=KEY_TYPE_NA )// Realtek may set 32k in security mode and 64k for others pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;else pHTInfo->CurrentAMPDUFactor =HT_AGG_SIZE_64K ; - }else - { + }else {if (pPeerHTCap->MaxRxAMPDUFactor <HT_AGG_SIZE_32K ) pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;else
@@ -1062,12 +1017,10 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// Lanhsin: mark for tmp to avoid deauth by ap from s3 //if(memcmp(pMgntInfo->Bssid, NETGEAR834Bv2_BROADCOM, 3)==0) -if (0 ) - { - - pHTInfo->bCurrentAMPDUEnable = false; - pHTInfo->ForcedAMSDUMode =HT_AGG_FORCE_ENABLE ; - pHTInfo->ForcedAMSDUMaxSize =7935 ; +if (0 ) { + pHTInfo->bCurrentAMPDUEnable = false; + pHTInfo->ForcedAMSDUMode =HT_AGG_FORCE_ENABLE ; + pHTInfo->ForcedAMSDUMaxSize =7935 ; pHTInfo->IOTAction |=HT_IOT_ACT_TX_USE_AMSDU_8K ; }
@@ -1224,8 +1177,7 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802IEEE80211_DEBUG (IEEE80211_DL_HT ,"==============>%s()\n" , __func__);/*unmark bEnableHT flag here is the same reason why unmarked in function ieee80211_softmac_new_net. WB 2008.09.10*/ // if( pHTInfo->bEnableHT && pNetwork->bssht.bdSupportHT) -if (pNetwork->bssht.bdSupportHT) - { +if (pNetwork->bssht.bdSupportHT) { pHTInfo->bCurrentHTSupport = true; pHTInfo->ePeerHTSpecVer = pNetwork->bssht.bdHTSpecVer;
@@ -1237,13 +1189,10 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802memcpy (pHTInfo->PeerHTInfoBuf, pNetwork->bssht.bdHTInfoBuf, pNetwork->bssht.bdHTInfoLen);// Check whether RT to RT aggregation mode is enabled -if (pHTInfo->bRegRT2RTAggregation) - { +if (pHTInfo->bRegRT2RTAggregation) { pHTInfo->bCurrentRT2RTAggregation = pNetwork->bssht.bdRT2RTAggregation; pHTInfo->bCurrentRT2RTLongSlotTime = pNetwork->bssht.bdRT2RTLongSlotTime; - } -else - { + }else { pHTInfo->bCurrentRT2RTAggregation = false; pHTInfo->bCurrentRT2RTLongSlotTime = false; }
@@ -1280,9 +1229,7 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802 pHTInfo->IOTAction |=HT_IOT_ACT_CDD_FSYNC ; - } -else - { + }else { pHTInfo->bCurrentHTSupport = false; pHTInfo->bCurrentRT2RTAggregation = false; pHTInfo->bCurrentRT2RTLongSlotTime = false;
@@ -1298,8 +1245,7 @@ void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee, struct ieee80211_// PHT_CAPABILITY_ELE pPeerHTCap = (PHT_CAPABILITY_ELE)pNetwork->bssht.bdHTCapBuf; PHT_INFORMATION_ELE pPeerHTInfo = (PHT_INFORMATION_ELE )pNetwork->bssht.bdHTInfoBuf; -if (pHTInfo->bCurrentHTSupport) - { +if (pHTInfo->bCurrentHTSupport) {// // Config current operation mode. //
@@ -1323,8 +1269,7 @@ EXPORT_SYMBOL(HTUpdateSelfAndPeerSetting);********************************************************************************************************************/ u8 HTCCheck (struct ieee80211_device *ieee,u8 *pFrame) { -if (ieee->pHTInfo->bCurrentHTSupport) - { +if (ieee->pHTInfo->bCurrentHTSupport) {if ((IsQoSDataFrame (pFrame) &&Frame_Order (pFrame)) ==1 ) {IEEE80211_DEBUG (IEEE80211_DL_HT ,"HT CONTROL FILED EXIST!!\n" );return true;
@@ -1357,8 +1302,7 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH Bandwidtreturn ; }//if in half N mode, set to 20M bandwidth please 09.08.2008 WB. -if (Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))) - { +if (Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))) {// Handle Illegal extension channel offset!! if (ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER ) Offset =HT_EXTCHNL_OFFSET_NO_EXT ;
@@ -1391,8 +1335,7 @@ void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)IEEE80211_DEBUG (IEEE80211_DL_HT ,"======>%s()\n" , __func__); -if (pHTInfo->bCurBW40MHz) - { +if (pHTInfo->bCurBW40MHz) {if (pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_UPPER ) ieee->set_chan (ieee->dev, ieee->current_network.channel+2 );else if (pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_LOWER )
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg KH
maintainerRe: [PATCH 01/27] drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct braces
Quoted 5 lines · John Whitmore
Coding style edit to clear the checkpatch.pl errors of the type:
ERROR: that open brace { should be on the previous lineSigned-off-by John Whitmore <[email protected]>---
Any reason why your subject line has the full path and not the shorter description that I suggested in my last email?
Also, when resending a patch series, you need to version it, and describe what changed. The file Documentation/SubmittingPatches goes into the details on how to do this, see this section specifically:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
Please fix up and try again.
thanks,
greg k-h
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 2/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: space before ', '
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl errors of the type:
ERROR: space prohibited before that ','
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +2 -2
@@ -8,7 +8,7 @@ u8 MCS_FILTER_ALL[16] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0u8 MCS_FILTER_1SS [16 ] = {0xff ,0x00 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 };u16 MCS_DATA_RATE [2 ][2 ][77 ] = { - { {13 ,26 ,39 ,52 ,78 ,104 ,117 ,130 ,26 ,52 ,78 ,104 ,156 ,208 ,234 ,260 , + { {13 ,26 ,39 ,52 ,78 ,104 ,117 ,130 ,26 ,52 ,78 ,104 ,156 ,208 ,234 ,260 ,39 ,78 ,117 ,234 ,312 ,351 ,390 ,52 ,104 ,156 ,208 ,312 ,416 ,468 ,520 ,0 ,78 ,104 ,130 ,117 ,156 ,195 ,104 ,130 ,130 ,156 ,182 ,182 ,208 ,156 ,195 ,195 ,234 ,273 ,273 ,312 ,130 ,156 ,181 ,156 ,181 ,208 ,234 ,208 ,234 ,260 ,260 ,
@@ -295,7 +295,7 @@ u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate)u16 TxCountToDataRate (struct ieee80211_device *ieee,u8 nDataRate) {//PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; -u16 CCKOFDMRate[12 ] = {0x02 ,0x04 ,0x0b ,0x16 ,0x0c ,0x12 ,0x18 ,0x24 ,0x30 ,0x48 ,0x60 ,0x6c }; +u16 CCKOFDMRate[12 ] = {0x02 ,0x04 ,0x0b ,0x16 ,0x0c ,0x12 ,0x18 ,0x24 ,0x30 ,0x48 ,0x60 ,0x6c };u8 is40MHz =0 ;u8 isShortGI =0 ;
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 3/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct space before ')'
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl errors of the type:
ERROR: space prohibited before that close parenthesis ')'
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +8 -8
@@ -122,7 +122,7 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)* return: none * notice: Driver should not print out this message by default. * *****************************************************************************************************************/ -void HTDebugHTCapability (u8 *CapIE,u8 *TitleString ) +void HTDebugHTCapability (u8 *CapIE,u8 *TitleString) {static u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily
@@ -135,7 +135,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString ) }else pCapELE = (PHT_CAPABILITY_ELE )(&CapIE[0 ]); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"<Log HT Capability>. Called by %s\n" , TitleString ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"<Log HT Capability>. Called by %s\n" , TitleString);IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupported Channel Width = %s\n" , (pCapELE->ChlWidth)?"20MHz" :"20/40MHz" );IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport Short GI for 20M = %s\n" , (pCapELE->ShortGI20Mhz)?"YES" :"NO" );
@@ -308,17 +308,17 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate) isShortGI =0 ;// nDataRate = nDataRate - 12; - }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) + }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) is40MHz =1 ; isShortGI =0 ;//nDataRate = nDataRate - 28; - }else if (nDataRate >=0x30 && nDataRate <=0x3f ) {//(43, 60) + }else if (nDataRate >=0x30 && nDataRate <=0x3f ) {//(43, 60) is40MHz =0 ; isShortGI =1 ;//nDataRate = nDataRate - 44; - }else if (nDataRate >=0x40 && nDataRate <=0x4f ) {//(59, 76) + }else if (nDataRate >=0x40 && nDataRate <=0x4f ) {//(59, 76) is40MHz =1 ; isShortGI =1 ;
@@ -373,7 +373,7 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee)else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 )==0 ) || (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 )==0 )|| (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 )==0 )|| - (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 )==0 ) ) + (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 )==0 )) pHTInfo->IOTPeer =HT_IOT_PEER_BROADCOM ; else if((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3)==0) || (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3)==0) ||
@@ -967,7 +967,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize==0 )?3839 :7935 ; -if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize ) +if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize) pHTInfo->nCurrent_AMSDU_MaxSize = nMaxAMSDUSize;else pHTInfo->nCurrent_AMSDU_MaxSize = pHTInfo->nAMSDU_MaxSize;
@@ -1011,7 +1011,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density; else pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity; -if (ieee->pairwise_key_type !=KEY_TYPE_NA ) +if (ieee->pairwise_key_type !=KEY_TYPE_NA ) pHTInfo->CurrentMPDUDensity =7 ;// 8us // Force TX AMSDU
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 4/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct spaces around operators
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl errors of the type:
ERROR: spaces required around that...
--- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 122 ++++++++++----------- 1 file changed, 61 insertions(+), 61 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +61 -61
@@ -60,8 +60,8 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)//printk("pHTinfo:%p, &pHTinfo:%p, mptr:%p, offsetof:%x\n", pHTInfo, &pHTInfo, __mptr, offsetof(struct ieee80211_device, pHTInfo)); //printk("===>ieee:%p,\n", ieee); // ShortGI support - pHTInfo->bRegShortGI20MHz=1 ; - pHTInfo->bRegShortGI40MHz=1 ; + pHTInfo->bRegShortGI20MHz =1 ; + pHTInfo->bRegShortGI40MHz =1 ;// 40MHz channel support pHTInfo->bRegBW40MHz =1 ;
@@ -137,12 +137,12 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"<Log HT Capability>. Called by %s\n" , TitleString); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupported Channel Width = %s\n" , (pCapELE->ChlWidth)?"20MHz" :"20/40MHz" ); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport Short GI for 20M = %s\n" , (pCapELE->ShortGI20Mhz)?"YES" :"NO" ); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport Short GI for 40M = %s\n" , (pCapELE->ShortGI40Mhz)?"YES" :"NO" ); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport TX STBC = %s\n" , (pCapELE->TxSTBC)?"YES" :"NO" ); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMax AMSDU Size = %s\n" , (pCapELE->MaxAMSDUSize)?"3839" :"7935" ); -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport CCK in 20/40 mode = %s\n" , (pCapELE->DssCCk)?"YES" :"NO" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupported Channel Width = %s\n" , (pCapELE->ChlWidth) ?"20MHz" :"20/40MHz" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport Short GI for 20M = %s\n" , (pCapELE->ShortGI20Mhz) ?"YES" :"NO" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport Short GI for 40M = %s\n" , (pCapELE->ShortGI40Mhz) ?"YES" :"NO" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport TX STBC = %s\n" , (pCapELE->TxSTBC) ?"YES" :"NO" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMax AMSDU Size = %s\n" , (pCapELE->MaxAMSDUSize) ?"3839" :"7935" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupport CCK in 20/40 mode = %s\n" , (pCapELE->DssCCk) ?"YES" :"NO" );IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMax AMPDU Factor = %d\n" , pCapELE->MaxRxAMPDUFactor);IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMPDU Density = %d\n" , pCapELE->MPDUDensity); IEEE80211_DEBUG(IEEE80211_DL_HT, "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\
@@ -190,7 +190,7 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"Lower Channel\n" );break ; } -IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tRecommended channel width = %s\n" , (pHTInfoEle->RecommemdedTxWidth)?"20Mhz" :"40Mhz" ); +IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tRecommended channel width = %s\n" , (pHTInfoEle->RecommemdedTxWidth) ?"20Mhz" :"40Mhz" );IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tOperation mode for protection = " );switch (pHTInfoEle->OptMode) {
@@ -266,8 +266,8 @@ u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate)u8 is40MHz;u8 isShortGI; - is40MHz = (IsHTHalfNmode40Bandwidth (ieee))?1 :0 ; - isShortGI = (IsHTHalfNmodeSGI (ieee, is40MHz))?1 :0 ; + is40MHz = (IsHTHalfNmode40Bandwidth (ieee)) ?1 :0 ; + isShortGI = (IsHTHalfNmodeSGI (ieee, is40MHz)) ?1 :0 ;return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate&0x7f )]; }
@@ -277,10 +277,10 @@ u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate) {PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; -u8 is40MHz = (pHTInfo->bCurBW40MHz)?1 :0 ; -u8 isShortGI = (pHTInfo->bCurBW40MHz)? - ((pHTInfo->bCurShortGI40MHz)?1 :0 ): - ((pHTInfo->bCurShortGI20MHz)?1 :0 ); +u8 is40MHz = (pHTInfo->bCurBW40MHz) ?1 :0 ; +u8 isShortGI = (pHTInfo->bCurBW40MHz) ? + ((pHTInfo->bCurShortGI40MHz) ?1 :0 ) : + ((pHTInfo->bCurShortGI20MHz) ?1 :0 );return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate&0x7f )]; }
@@ -308,7 +308,7 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate) isShortGI =0 ;// nDataRate = nDataRate - 12; - }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) + }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) is40MHz =1 ; isShortGI =0 ;
@@ -334,17 +334,17 @@ bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee) {bool retValue = false;struct ieee80211_network *net = &ieee->current_network; -if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 )==0 ) || - (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 )==0 ) || - (memcmp (net->bssid,PCI_RALINK ,3 )==0 ) || - (memcmp (net->bssid,EDIMAX_RALINK ,3 )==0 ) || - (memcmp (net->bssid,AIRLINK_RALINK ,3 )==0 ) || +if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,PCI_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,EDIMAX_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,AIRLINK_RALINK ,3 ) ==0 ) || (net->ralink_cap_exist)) retValue = true; -else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 )==0 ) || - (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 )==0 )|| - (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 )==0 )|| - (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 )==0 ) || +else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 ) ==0 ) || + (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || + (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ) || + (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 ) ==0 ) || (net->broadcom_cap_exist)) retValue = true;else if (net->bssht.bdRT2RTAggregation)
@@ -370,21 +370,21 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee) pHTInfo->IOTPeer =HT_IOT_PEER_REALTEK ; else if(net->broadcom_cap_exist) pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM; - else if((memcmp(net->bssid, UNKNOWN_BORADCOM, 3)==0) || - (memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0)|| - (memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)==0)|| - (memcmp(net->bssid, NETGEAR834Bv2_BROADCOM, 3)==0)) + else if((memcmp(net->bssid, UNKNOWN_BORADCOM, 3) == 0) || + (memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) == 0) || + (memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) == 0) || + (memcmp(net->bssid, NETGEAR834Bv2_BROADCOM, 3) == 0)) pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM; - else if((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3)==0) || - (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3)==0) || - (memcmp(net->bssid, PCI_RALINK, 3)==0) || - (memcmp(net->bssid, EDIMAX_RALINK, 3)==0) || - (memcmp(net->bssid, AIRLINK_RALINK, 3)==0) || + else if((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) || + (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) == 0) || + (memcmp(net->bssid, PCI_RALINK, 3) == 0) || + (memcmp(net->bssid, EDIMAX_RALINK, 3) == 0) || + (memcmp(net->bssid, AIRLINK_RALINK, 3) == 0) || net->ralink_cap_exist) pHTInfo->IOTPeer = HT_IOT_PEER_RALINK; else if(net->atheros_cap_exist) pHTInfo->IOTPeer = HT_IOT_PEER_ATHEROS; - else if(memcmp(net->bssid, CISCO_BROADCOM, 3)==0) + else if(memcmp(net->bssid, CISCO_BROADCOM, 3) == 0) pHTInfo->IOTPeer = HT_IOT_PEER_CISCO; else pHTInfo->IOTPeer = HT_IOT_PEER_UNKNOWN;
@@ -423,7 +423,7 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee)#ifdef TODO // Apply for 819u only -#if (HAL_CODE_BASE ==RTL8192 ) +#if (HAL_CODE_BASE ==RTL8192 )#if (DEV_BUS_TYPE ==USB_INTERFACE )// Alway disable MCS15 by Jerry Chang's request.by Emily, 2008.04.15
@@ -498,9 +498,9 @@ static u8 HTIOTActIsMgntUseCCK6M(struct ieee80211_network *network)static u8 HTIOTActIsCCDFsync (u8 *PeerMacAddr) {u8 retValue =0 ; -if ((memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 )==0 ) || - (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 )==0 ) || - (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 )) +if ((memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 ) ==0 ) || + (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || + (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 )) retValue =1 ;return retValue;
@@ -550,7 +550,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, uif (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) pCapELE->ChlWidth =0 ;else - pCapELE->ChlWidth = (pHT->bRegBW40MHz?1 :0 ); + pCapELE->ChlWidth = (pHT->bRegBW40MHz ?1 :0 );// pCapELE->ChlWidth = (pHT->bRegBW40MHz?1:0); pCapELE->MimoPwrSave = pHT->SelfMimoPs;
@@ -562,8 +562,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->TxSTBC =1 ; pCapELE->RxSTBC =0 ; pCapELE->DelayBA =0 ;// Do not support now!! - pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >=7935 )?1 :0 ; - pCapELE->DssCCk = ((pHT->bRegBW40MHz)?(pHT->bRegSuppCCK?1 :0 ):0 ); + pCapELE->MaxAMSDUSize = (MAX_RECEIVE_BUFFER_SIZE >=7935 ) ?1 :0 ; + pCapELE->DssCCk = ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ?1 :0 ) :0 ); pCapELE->PSMP =0 ;// Do not support now!! pCapELE->LSigTxopProtect =0 ;// Do not support now!!
@@ -595,7 +595,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u// For RTL819X, if pairwisekey = wep/tkip, ap is ralink, we support only MCS0~7. if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) {int i; -for (i =1 ; i<16 ; i++) +for (i =1 ; i <16 ; i++) pCapELE->MCS[i] =0 ; }
@@ -645,9 +645,9 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *lememset (posHTInfo,0 , *len);if ( (ieee->iw_mode ==IW_MODE_ADHOC ) || (ieee->iw_mode ==IW_MODE_MASTER )) {//ap mode is not currently supported pHTInfoEle->ControlChl = ieee->current_network.channel; - pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz)?HT_EXTCHNL_OFFSET_NO_EXT : - (ieee->current_network.channel<=6 )? -HT_EXTCHNL_OFFSET_UPPER :HT_EXTCHNL_OFFSET_LOWER ); + pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz) ?HT_EXTCHNL_OFFSET_NO_EXT : + (ieee->current_network.channel <=6 ) ? +HT_EXTCHNL_OFFSET_UPPER :HT_EXTCHNL_OFFSET_LOWER ); pHTInfoEle->RecommemdedTxWidth = pHT->bRegBW40MHz; pHTInfoEle->RIFS =0 ; pHTInfoEle->PSMPAccessOnly =0 ;
@@ -770,7 +770,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)//legacy rate routine handled at selectedrate //no MCS rate -for (i=0 ;i<=15 ;i++) { +for (i =0 ; i <=15 ; i++) { pOperateMCS[i] =0 ; }break ;
@@ -782,9 +782,9 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)//HT part // TODO: may be different if we have different number of antenna - pOperateMCS[0 ] &=RATE_ADPT_1SS_MASK ;//support MCS 0~7 - pOperateMCS[1 ] &=RATE_ADPT_2SS_MASK ; - pOperateMCS[3 ] &=RATE_ADPT_MCS32_MASK ; + pOperateMCS[0 ] &=RATE_ADPT_1SS_MASK ;//support MCS 0~7 + pOperateMCS[1 ] &=RATE_ADPT_2SS_MASK ; + pOperateMCS[3 ] &=RATE_ADPT_MCS32_MASK ;break ;//should never reach here
@@ -826,7 +826,7 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFIEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n" );return false; } -for (i=0 ; i<16 ; i++) +for (i =0 ; i <16 ; i++) availableMcsRate[i] = pMCSRateSet[i] & pMCSFilter[i];for (i =0 ; i <16 ; i++) {
@@ -866,10 +866,10 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS, u8 *pOperateMCS) { -u8 i=0 ; +u8 i =0 ;// filter out operational rate set not supported by AP, the length of it is 16 -for (i=0 ;i<=15 ;i++){ +for (i =0 ; i <=15 ; i++){ pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i]&pSupportMCS[i]; }
@@ -888,7 +888,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,// For RTL819X, we support only MCS0~15. // And also, we do not know how to use MCS32 now. // -for (i=2 ; i<=15 ; i++) +for (i =2 ; i <=15 ; i++) pOperateMCS[i] =0 ;return true;
@@ -965,7 +965,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// pHTInfo->bCurrent_AMSDU_Support = pHTInfo->bAMSDU_Support; - nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize==0 )?3839 :7935 ; + nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize ==0 ) ?3839 :7935 ;if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize) pHTInfo->nCurrent_AMSDU_MaxSize = nMaxAMSDUSize;
@@ -1149,7 +1149,7 @@ void HTInitializeBssDesc(PBSS_HT pBssHT)memset (pBssHT->bdHTInfoBuf,0 ,sizeof (pBssHT->bdHTInfoBuf)); pBssHT->bdHTInfoLen =0 ; - pBssHT->bdHTSpecVer=HT_SPEC_VER_IEEE ; + pBssHT->bdHTSpecVer =HT_SPEC_VER_IEEE ; pBssHT->bdRT2RTAggregation = false; pBssHT->bdRT2RTLongSlotTime = false;
@@ -1302,11 +1302,11 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH Bandwidtreturn ; }//if in half N mode, set to 20M bandwidth please 09.08.2008 WB. -if (Bandwidth==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))) { +if (Bandwidth ==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))) {// Handle Illegal extension channel offset!! -if (ieee->current_network.channel<2 && Offset==HT_EXTCHNL_OFFSET_LOWER ) +if (ieee->current_network.channel <2 && Offset ==HT_EXTCHNL_OFFSET_LOWER ) Offset =HT_EXTCHNL_OFFSET_NO_EXT ; -if (Offset==HT_EXTCHNL_OFFSET_UPPER || Offset==HT_EXTCHNL_OFFSET_LOWER ) { +if (Offset ==HT_EXTCHNL_OFFSET_UPPER || Offset ==HT_EXTCHNL_OFFSET_LOWER ) { pHTInfo->bCurBW40MHz = true; pHTInfo->CurSTAExtChnlOffset = Offset; }else {
@@ -1336,9 +1336,9 @@ void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)IEEE80211_DEBUG (IEEE80211_DL_HT ,"======>%s()\n" , __func__);if (pHTInfo->bCurBW40MHz) { -if (pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_UPPER ) +if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_UPPER ) ieee->set_chan (ieee->dev, ieee->current_network.channel+2 ); -else if (pHTInfo->CurSTAExtChnlOffset==HT_EXTCHNL_OFFSET_LOWER ) +else if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_LOWER ) ieee->set_chan (ieee->dev, ieee->current_network.channel-2 );else ieee->set_chan (ieee->dev, ieee->current_network.channel);
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 5/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct missing space before '('
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl errors of the type:
ERROR: space required before the open parenthesis '('
--- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 176 ++++++++++----------- 1 file changed, 87 insertions(+), 89 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +87 -89
@@ -67,7 +67,7 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee) pHTInfo->bRegBW40MHz =1 ;// CCK rate support in 40MHz channel -if (pHTInfo->bRegBW40MHz) +if (pHTInfo->bRegBW40MHz) pHTInfo->bRegSuppCCK =1 ;else pHTInfo->bRegSuppCCK = true;
@@ -83,7 +83,7 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)// MIMO Power Save pHTInfo->SelfMimoPs =3 ;// 0: Static Mimo Ps, 1: Dynamic Mimo Ps, 3: No Limitation, 2: Reserved(Set to 3 automatically.) -if (pHTInfo->SelfMimoPs ==2 ) +if (pHTInfo->SelfMimoPs ==2 ) pHTInfo->SelfMimoPs =3 ;// 8190 only. Assign rate operation mode to firmware ieee->bTxDisableRateFallBack =0 ;
@@ -128,7 +128,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)static u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily PHT_CAPABILITY_ELE pCapELE; -if (!memcmp (CapIE, EWC11NHTCap,sizeof (EWC11NHTCap))) { +if (!memcmp (CapIE, EWC11NHTCap,sizeof (EWC11NHTCap))) {//EWC IE IEEE80211_DEBUG (IEEE80211_DL_HT ,"EWC IE in %s()\n" , __func__); pCapELE = (PHT_CAPABILITY_ELE )(&CapIE[4 ]);
@@ -164,13 +164,13 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)static u8 EWC11NHTInfo[] = {0x00 ,0x90 ,0x4c ,0x34 };// For 11n EWC definition, 2007.07.17, by Emily PHT_INFORMATION_ELE pHTInfoEle; -if (!memcmp (InfoIE, EWC11NHTInfo,sizeof (EWC11NHTInfo))) { +if (!memcmp (InfoIE, EWC11NHTInfo,sizeof (EWC11NHTInfo))) {// Not EWC IE IEEE80211_DEBUG (IEEE80211_DL_HT ,"EWC IE in %s()\n" , __func__); pHTInfoEle = (PHT_INFORMATION_ELE )(&InfoIE[4 ]); - }else + }else { pHTInfoEle = (PHT_INFORMATION_ELE )(&InfoIE[0 ]); - + }IEEE80211_DEBUG (IEEE80211_DL_HT ,"<Log HT Information Element>. Called by %s\n" , TitleString);
@@ -221,13 +221,13 @@ static bool IsHTHalfNmode40Bandwidth(struct ieee80211_device *ieee)bool retValue = false;PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; -if (!pHTInfo->bCurrentHTSupport)// wireless is n mode +if (!pHTInfo->bCurrentHTSupport)// wireless is n mode retValue = false; -else if (!pHTInfo->bRegBW40MHz)// station supports 40 bw +else if (!pHTInfo->bRegBW40MHz)// station supports 40 bw retValue = false; -else if (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))// station in half n mode +else if (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))// station in half n mode retValue = false; -else if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ChlWidth)// ap support 40 bw +else if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ChlWidth)// ap support 40 bw retValue = true;else retValue = false;
@@ -240,18 +240,17 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz)bool retValue = false;PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; -if (!pHTInfo->bCurrentHTSupport)// wireless is n mode +if (!pHTInfo->bCurrentHTSupport)// wireless is n mode retValue = false; -else if (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))// station in half n mode +else if (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))// station in half n mode retValue = false; -else if (is40MHz) {// ap support 40 bw -if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)// ap support 40 bw short GI +else if (is40MHz) {// ap support 40 bw +if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)// ap support 40 bw short GI retValue = true;else retValue = false; - } -else { -if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)// ap support 40 bw short GI + }else { +if (((PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)// ap support 40 bw short GI retValue = true;else retValue = false;
@@ -299,26 +298,25 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate)u8 is40MHz =0 ;u8 isShortGI =0 ; -if (nDataRate <12 ) { +if (nDataRate <12 ) {return CCKOFDMRate[nDataRate]; - } -else { + }else {if (nDataRate >=0x10 && nDataRate <=0x1f ) {//if(nDataRate > 11 && nDataRate < 28 ) is40MHz =0 ; isShortGI =0 ;// nDataRate = nDataRate - 12; - }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) + }else if (nDataRate >=0x20 && nDataRate <=0x2f ) {//(27, 44) is40MHz =1 ; isShortGI =0 ;//nDataRate = nDataRate - 28; - }else if (nDataRate >=0x30 && nDataRate <=0x3f ) {//(43, 60) + }else if (nDataRate >=0x30 && nDataRate <=0x3f ) {//(43, 60) is40MHz =0 ; isShortGI =1 ;//nDataRate = nDataRate - 44; - }else if (nDataRate >=0x40 && nDataRate <=0x4f ) {//(59, 76) + }else if (nDataRate >=0x40 && nDataRate <=0x4f ) {//(59, 76) is40MHz =1 ; isShortGI =1 ;
@@ -334,20 +332,20 @@ bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee) {bool retValue = false;struct ieee80211_network *net = &ieee->current_network; -if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,PCI_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,EDIMAX_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,AIRLINK_RALINK ,3 ) ==0 ) || - (net->ralink_cap_exist)) +if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,PCI_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,EDIMAX_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,AIRLINK_RALINK ,3 ) ==0 ) || + (net->ralink_cap_exist)) + retValue = true; +else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 ) ==0 ) || + (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || + (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ) || + (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 ) ==0 ) || + (net->broadcom_cap_exist)) retValue = true; -else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 ) ==0 ) || - (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || - (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ) || - (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 ) ==0 ) || - (net->broadcom_cap_exist)) - retValue = true; -else if (net->bssht.bdRT2RTAggregation) +else if (net->bssht.bdRT2RTAggregation) retValue = true;else retValue = false;
@@ -366,25 +364,25 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee) {PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;struct ieee80211_network *net = &ieee->current_network; -if (net->bssht.bdRT2RTAggregation) +if (net->bssht.bdRT2RTAggregation) pHTInfo->IOTPeer =HT_IOT_PEER_REALTEK ; -else if (net->broadcom_cap_exist) +else if (net->broadcom_cap_exist) pHTInfo->IOTPeer =HT_IOT_PEER_BROADCOM ; -else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 ) ==0 ) || +else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 ) ==0 ) || (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ) || (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 ) ==0 )) pHTInfo->IOTPeer =HT_IOT_PEER_BROADCOM ; -else if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 ) ==0 ) || +else if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 ) ==0 ) || (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 ) ==0 ) || (memcmp (net->bssid,PCI_RALINK ,3 ) ==0 ) || (memcmp (net->bssid,EDIMAX_RALINK ,3 ) ==0 ) || (memcmp (net->bssid,AIRLINK_RALINK ,3 ) ==0 ) || net->ralink_cap_exist) pHTInfo->IOTPeer =HT_IOT_PEER_RALINK ; -else if (net->atheros_cap_exist) +else if (net->atheros_cap_exist) pHTInfo->IOTPeer =HT_IOT_PEER_ATHEROS ; -else if (memcmp (net->bssid,CISCO_BROADCOM ,3 ) ==0 ) +else if (memcmp (net->bssid,CISCO_BROADCOM ,3 ) ==0 ) pHTInfo->IOTPeer =HT_IOT_PEER_CISCO ;else pHTInfo->IOTPeer =HT_IOT_PEER_UNKNOWN ;
@@ -498,9 +496,9 @@ static u8 HTIOTActIsMgntUseCCK6M(struct ieee80211_network *network)static u8 HTIOTActIsCCDFsync (u8 *PeerMacAddr) {u8 retValue =0 ; -if ((memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 ) ==0 ) || - (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || - (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 )) +if ((memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 ) ==0 ) || + (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || + (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 )) retValue =1 ;return retValue;
@@ -536,7 +534,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, ureturn ; }memset (posHTCap,0 , *len); -if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) { +if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) {u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily memcpy (posHTCap, EWC11NHTCap,sizeof (EWC11NHTCap)); pCapELE = (PHT_CAPABILITY_ELE )&(posHTCap[4 ]);
@@ -547,7 +545,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//HT capability info pCapELE->AdvCoding =0 ;// This feature is not supported now!! -if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) +if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) pCapELE->ChlWidth =0 ;else pCapELE->ChlWidth = (pHT->bRegBW40MHz ?1 :0 );
@@ -582,20 +580,20 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//Supported MCS set memcpy (pCapELE->MCS, ieee->Regdot11HTOperationalRateSet,16 ); -if (pHT->IOTAction &HT_IOT_ACT_DISABLE_MCS15 ) +if (pHT->IOTAction &HT_IOT_ACT_DISABLE_MCS15 ) pCapELE->MCS[1 ] &=0x7f ; -if (pHT->IOTAction &HT_IOT_ACT_DISABLE_MCS14 ) +if (pHT->IOTAction &HT_IOT_ACT_DISABLE_MCS14 ) pCapELE->MCS[1 ] &=0xbf ; -if (pHT->IOTAction &HT_IOT_ACT_DISABLE_ALL_2SS ) +if (pHT->IOTAction &HT_IOT_ACT_DISABLE_ALL_2SS ) pCapELE->MCS[1 ] &=0x00 ;// 2008.06.12 // For RTL819X, if pairwisekey = wep/tkip, ap is ralink, we support only MCS0~7. if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) {int i; -for (i =1 ; i <16 ; i++) +for (i =1 ; i <16 ; i++) pCapELE->MCS[i] =0 ; }
@@ -609,7 +607,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//Antenna Selection Capabilities pCapELE->ASCap =0 ;//add 2 to give space for element ID and len when construct frames -if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) +if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) *len =30 +2 ;else *len =26 +2 ;
@@ -770,7 +768,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)//legacy rate routine handled at selectedrate //no MCS rate -for (i =0 ; i <=15 ; i++) { +for (i =0 ; i <=15 ; i++) { pOperateMCS[i] =0 ; }break ;
@@ -826,22 +824,22 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFIEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n" );return false; } -for (i =0 ; i <16 ; i++) +for (i =0 ; i <16 ; i++) availableMcsRate[i] = pMCSRateSet[i] & pMCSFilter[i]; -for (i =0 ; i <16 ; i++) { -if (availableMcsRate[i] !=0 ) +for (i =0 ; i <16 ; i++) { +if (availableMcsRate[i] !=0 )break ; } -if (i ==16 ) +if (i ==16 )return false; -for (i =0 ; i <16 ; i++) { +for (i =0 ; i <16 ; i++) {if (availableMcsRate[i] !=0 ) { bitMap = availableMcsRate[i]; -for (j =0 ; j <8 ; j++) { +for (j =0 ; j <8 ; j++) {if ((bitMap%2 ) !=0 ) { -if (HTMcsToDataRate (ieee, (8 *i+j)) >HTMcsToDataRate (ieee, mcsRate)) +if (HTMcsToDataRate (ieee, (8 *i+j)) >HTMcsToDataRate (ieee, mcsRate)) mcsRate = (8 *i+j); } bitMap >>=1 ;
@@ -869,7 +867,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,u8 i =0 ;// filter out operational rate set not supported by AP, the length of it is 16 -for (i =0 ; i <=15 ; i++){ +for (i =0 ; i <=15 ; i++){ pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i]&pSupportMCS[i]; }
@@ -881,14 +879,14 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,HT_PickMCSRate (ieee, pOperateMCS);// For RTL819X, if pairwisekey = wep/tkip, we support only MCS0~7. -if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) +if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) pOperateMCS[1 ] =0 ;// // For RTL819X, we support only MCS0~15. // And also, we do not know how to use MCS32 now. // -for (i =2 ; i <=15 ; i++) +for (i =2 ; i <=15 ; i++) pOperateMCS[i] =0 ;return true;
@@ -921,7 +919,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)else pPeerHTCap = (PHT_CAPABILITY_ELE )(pHTInfo->PeerHTCapBuf); -if (!memcmp (pHTInfo->PeerHTInfoBuf, EWC11NHTInfo,sizeof (EWC11NHTInfo))) +if (!memcmp (pHTInfo->PeerHTInfoBuf, EWC11NHTInfo,sizeof (EWC11NHTInfo))) pPeerHTInfo = (PHT_INFORMATION_ELE )(&pHTInfo->PeerHTInfoBuf[4 ]);else pPeerHTInfo = (PHT_INFORMATION_ELE )(pHTInfo->PeerHTInfoBuf);
@@ -967,7 +965,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize ==0 ) ?3839 :7935 ; -if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize) +if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize) pHTInfo->nCurrent_AMSDU_MaxSize = nMaxAMSDUSize;else pHTInfo->nCurrent_AMSDU_MaxSize = pHTInfo->nAMSDU_MaxSize;
@@ -981,9 +979,9 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// <1> Decide AMPDU Factor // By Emily -if (!pHTInfo->bRegRT2RTAggregation) { +if (!pHTInfo->bRegRT2RTAggregation) {// Decide AMPDU Factor according to protocol handshake -if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor) +if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor) pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;else pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
@@ -998,7 +996,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)else pHTInfo->CurrentAMPDUFactor =HT_AGG_SIZE_64K ; }else { -if (pPeerHTCap->MaxRxAMPDUFactor <HT_AGG_SIZE_32K ) +if (pPeerHTCap->MaxRxAMPDUFactor <HT_AGG_SIZE_32K ) pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;else pHTInfo->CurrentAMPDUFactor =HT_AGG_SIZE_32K ;
@@ -1007,11 +1005,11 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// <2> Set AMPDU Minimum MPDU Start Spacing // 802.11n 3.0 section 9.7d.3 -if (pHTInfo->MPDU_Density > pPeerHTCap->MPDUDensity) +if (pHTInfo->MPDU_Density > pPeerHTCap->MPDUDensity) pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;else pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity; -if (ieee->pairwise_key_type !=KEY_TYPE_NA ) +if (ieee->pairwise_key_type !=KEY_TYPE_NA ) pHTInfo->CurrentMPDUDensity =7 ;// 8us // Force TX AMSDU
@@ -1036,7 +1034,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// Handle Ralink AP bad MCS rate set condition. Joseph. // This fix the bug of Ralink AP. This may be removed in the future. -if (pPeerHTCap->MCS[0 ] ==0 ) +if (pPeerHTCap->MCS[0 ] ==0 ) pPeerHTCap->MCS[0 ] =0xff ;HTFilterMCSRate (ieee, pPeerHTCap->MCS, ieee->dot11HTOperationalRateSet);
@@ -1045,7 +1043,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// Config MIMO Power Save setting // pHTInfo->PeerMimoPs = pPeerHTCap->MimoPwrSave; -if (pHTInfo->PeerMimoPs ==MIMO_PS_STATIC ) +if (pHTInfo->PeerMimoPs ==MIMO_PS_STATIC ) pMcsFilter =MCS_FILTER_1SS ;else pMcsFilter =MCS_FILTER_ALL ;
@@ -1182,14 +1180,14 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802 pHTInfo->ePeerHTSpecVer = pNetwork->bssht.bdHTSpecVer;// Save HTCap and HTInfo information Element -if (pNetwork->bssht.bdHTCapLen >0 && pNetwork->bssht.bdHTCapLen <=sizeof (pHTInfo->PeerHTCapBuf)) +if (pNetwork->bssht.bdHTCapLen >0 && pNetwork->bssht.bdHTCapLen <=sizeof (pHTInfo->PeerHTCapBuf))memcpy (pHTInfo->PeerHTCapBuf, pNetwork->bssht.bdHTCapBuf, pNetwork->bssht.bdHTCapLen); -if (pNetwork->bssht.bdHTInfoLen >0 && pNetwork->bssht.bdHTInfoLen <=sizeof (pHTInfo->PeerHTInfoBuf)) +if (pNetwork->bssht.bdHTInfoLen >0 && pNetwork->bssht.bdHTInfoLen <=sizeof (pHTInfo->PeerHTInfoBuf))memcpy (pHTInfo->PeerHTInfoBuf, pNetwork->bssht.bdHTInfoBuf, pNetwork->bssht.bdHTInfoLen);// Check whether RT to RT aggregation mode is enabled -if (pHTInfo->bRegRT2RTAggregation) { +if (pHTInfo->bRegRT2RTAggregation) { pHTInfo->bCurrentRT2RTAggregation = pNetwork->bssht.bdRT2RTAggregation; pHTInfo->bCurrentRT2RTLongSlotTime = pNetwork->bssht.bdRT2RTLongSlotTime; }else {
@@ -1204,28 +1202,28 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802// Must be called after the parameter of pHTInfo->bCurrentRT2RTAggregation is decided pHTInfo->IOTAction =0 ; bIOTAction =HTIOTActIsDisableMCS14 (ieee, pNetwork->bssid); -if (bIOTAction) +if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_DISABLE_MCS14 ; bIOTAction =HTIOTActIsDisableMCS15 (ieee); -if (bIOTAction) +if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_DISABLE_MCS15 ; bIOTAction =HTIOTActIsDisableMCSTwoSpatialStream (ieee, pNetwork->bssid); -if (bIOTAction) +if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_DISABLE_ALL_2SS ; bIOTAction =HTIOTActIsDisableEDCATurbo (ieee, pNetwork->bssid); -if (bIOTAction) +if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_DISABLE_EDCA_TURBO ; bIOTAction =HTIOTActIsMgntUseCCK6M (pNetwork); -if (bIOTAction) +if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_MGNT_USE_CCK_6M ; bIOTAction =HTIOTActIsCCDFsync (pNetwork->bssid); -if (bIOTAction) +if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_CDD_FSYNC ;
@@ -1249,7 +1247,7 @@ void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee, struct ieee80211_// // Config current operation mode. // -if (pNetwork->bssht.bdHTInfoLen !=0 ) +if (pNetwork->bssht.bdHTInfoLen !=0 ) pHTInfo->CurrentOpMode = pPeerHTInfo->OptMode;//
@@ -1286,7 +1284,7 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH BandwidtPRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;// u32 flags = 0; -if (!pHTInfo->bRegBW40MHz) +if (!pHTInfo->bRegBW40MHz)return ;
@@ -1302,11 +1300,11 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH Bandwidtreturn ; }//if in half N mode, set to 20M bandwidth please 09.08.2008 WB. -if (Bandwidth ==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))) { +if (Bandwidth ==HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))) {// Handle Illegal extension channel offset!! -if (ieee->current_network.channel <2 && Offset ==HT_EXTCHNL_OFFSET_LOWER ) +if (ieee->current_network.channel <2 && Offset ==HT_EXTCHNL_OFFSET_LOWER ) Offset =HT_EXTCHNL_OFFSET_NO_EXT ; -if (Offset ==HT_EXTCHNL_OFFSET_UPPER || Offset ==HT_EXTCHNL_OFFSET_LOWER ) { +if (Offset ==HT_EXTCHNL_OFFSET_UPPER || Offset ==HT_EXTCHNL_OFFSET_LOWER ) { pHTInfo->bCurBW40MHz = true; pHTInfo->CurSTAExtChnlOffset = Offset; }else {
@@ -1335,10 +1333,10 @@ void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)IEEE80211_DEBUG (IEEE80211_DL_HT ,"======>%s()\n" , __func__); -if (pHTInfo->bCurBW40MHz) { -if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_UPPER ) +if (pHTInfo->bCurBW40MHz) { +if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_UPPER ) ieee->set_chan (ieee->dev, ieee->current_network.channel+2 ); -else if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_LOWER ) +else if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_LOWER ) ieee->set_chan (ieee->dev, ieee->current_network.channel-2 );else ieee->set_chan (ieee->dev, ieee->current_network.channel);
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 6/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct braces of else statement
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl error:
ERROR: space required after that close brace '}'
And balanced the brace of the same else statement:
CHECK: Unbalanced braces around else statement
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +2 -2
@@ -132,9 +132,9 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)//EWC IE IEEE80211_DEBUG (IEEE80211_DL_HT ,"EWC IE in %s()\n" , __func__); pCapELE = (PHT_CAPABILITY_ELE )(&CapIE[4 ]); - }else + }else { pCapELE = (PHT_CAPABILITY_ELE )(&CapIE[0 ]); - + }IEEE80211_DEBUG (IEEE80211_DL_HT ,"<Log HT Capability>. Called by %s\n" , TitleString);IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSupported Channel Width = %s\n" , (pCapELE->ChlWidth) ?"20MHz" :"20/40MHz" );
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 7/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct indentation of switch statements
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl error:
ERROR: switch and case should be at the same indent
--- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +24 -24
@@ -177,35 +177,35 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tPrimary channel = %d\n" , pHTInfoEle->ControlChl);IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tSecondary channel =" );switch (pHTInfoEle->ExtChlOffset) { -case 0 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"Not Present\n" ); -break ; -case 1 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"Upper channel\n" ); -break ; -case 2 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"Reserved. Eooro!!!\n" ); -break ; -case 3 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"Lower Channel\n" ); -break ; +case 0 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"Not Present\n" ); +break ; +case 1 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"Upper channel\n" ); +break ; +case 2 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"Reserved. Eooro!!!\n" ); +break ; +case 3 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"Lower Channel\n" ); +break ; }IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tRecommended channel width = %s\n" , (pHTInfoEle->RecommemdedTxWidth) ?"20Mhz" :"40Mhz" );IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tOperation mode for protection = " );switch (pHTInfoEle->OptMode) { -case 0 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"No Protection\n" ); -break ; -case 1 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"HT non-member protection mode\n" ); -break ; -case 2 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"Suggest to open protection\n" ); -break ; -case 3 : -IEEE80211_DEBUG (IEEE80211_DL_HT ,"HT mixed mode\n" ); -break ; +case 0 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"No Protection\n" ); +break ; +case 1 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"HT non-member protection mode\n" ); +break ; +case 2 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"Suggest to open protection\n" ); +break ; +case 3 : +IEEE80211_DEBUG (IEEE80211_DL_HT ,"HT mixed mode\n" ); +break ; } IEEE80211_DEBUG(IEEE80211_DL_HT, "\tBasic MCS Rate Set = [%x][%x][%x][%x][%x]\n", pHTInfoEle->BasicMSC[0],\
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 8/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: correct whitespace style errors
In reply to John WhitmoreCoding style edit to clear the remaining checkpatch.pl errors:
ERROR: trailing whitespace
ERROR: space prohibited after that open parenthesis '('
ERROR: space required before the open brace '{'
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +3 -3
@@ -301,7 +301,7 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate)if (nDataRate <12 ) {return CCKOFDMRate[nDataRate]; }else { -if (nDataRate >=0x10 && nDataRate <=0x1f ) {//if(nDataRate > 11 && nDataRate < 28 ) +if (nDataRate >=0x10 && nDataRate <=0x1f ) {//if(nDataRate > 11 && nDataRate < 28 ) is40MHz =0 ; isShortGI =0 ;
@@ -641,7 +641,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le }memset (posHTInfo,0 , *len); - if ( (ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) { //ap mode is not currently supported + if ((ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) { //ap mode is not currently supported pHTInfoEle->ControlChl = ieee->current_network.channel; pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz) ? HT_EXTCHNL_OFFSET_NO_EXT : (ieee->current_network.channel <= 6) ?
@@ -867,7 +867,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,u8 i =0 ;// filter out operational rate set not supported by AP, the length of it is 16 -for (i =0 ; i <=15 ; i++){ +for (i =0 ; i <=15 ; i++) { pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i]&pSupportMCS[i]; }
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 9/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed redundant return statement
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warning:
WARNING: void function return statements are not generally useful
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -2
@@ -210,7 +210,6 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tBasic MCS Rate Set = [%x][%x][%x][%x][%x]\n" , pHTInfoEle->BasicMSC[0 ],\ pHTInfoEle->BasicMSC[1 ], pHTInfoEle->BasicMSC[2 ], pHTInfoEle->BasicMSC[3 ], pHTInfoEle->BasicMSC[4 ]); -return ; }/*
@@ -669,7 +668,6 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le }//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, posHTInfo, *len - 2); //HTDebugHTInfo(posHTInfo, "HTConstructInforElement"); -return ; }/*
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 10/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: Added missing blank line after declarations.
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warnings:
WARNING: Missing a blank line after declarations
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +9 -0
@@ -331,6 +331,7 @@ bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee) {bool retValue = false;struct ieee80211_network *net = &ieee->current_network; + if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) || (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3) == 0) || (memcmp(net->bssid, PCI_RALINK, 3) == 0) ||
@@ -363,6 +364,7 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee) {PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;struct ieee80211_network *net = &ieee->current_network; +if (net->bssht.bdRT2RTAggregation) pHTInfo->IOTPeer =HT_IOT_PEER_REALTEK ;else if (net->broadcom_cap_exist)
@@ -495,6 +497,7 @@ static u8 HTIOTActIsMgntUseCCK6M(struct ieee80211_network *network)static u8 HTIOTActIsCCDFsync (u8 *PeerMacAddr) {u8 retValue =0 ; +if ((memcmp (PeerMacAddr,UNKNOWN_BORADCOM ,3 ) ==0 ) || (memcmp (PeerMacAddr,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || (memcmp (PeerMacAddr,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ))
@@ -535,6 +538,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, umemset (posHTCap,0 , *len);if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) {u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily +memcpy (posHTCap, EWC11NHTCap,sizeof (EWC11NHTCap)); pCapELE = (PHT_CAPABILITY_ELE )&(posHTCap[4 ]); }else {
@@ -592,6 +596,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u// For RTL819X, if pairwisekey = wep/tkip, ap is ralink, we support only MCS0~7. if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) {int i; +for (i =1 ; i <16 ; i++) pCapELE->MCS[i] =0 ; }
@@ -634,6 +639,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le {PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo;PHT_INFORMATION_ELE pHTInfoEle = (PHT_INFORMATION_ELE )posHTInfo; +if ((posHTInfo ==NULL ) || (pHTInfoEle ==NULL )) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTInfo or pHTInfoEle can't be null in HTConstructInfoElement()\n" );return ;
@@ -754,6 +760,7 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,static u8 HT_PickMCSRate (struct ieee80211_device *ieee,u8 *pOperateMCS) {u8 i; +if (pOperateMCS ==NULL ) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pOperateMCS can't be null in HT_PickMCSRate()\n" );return false;
@@ -818,6 +825,7 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFu8 bitMap;u8 mcsRate =0 ;u8 availableMcsRate[16 ]; +if (pMCSRateSet ==NULL || pMCSFilter ==NULL ) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n" );return false;
@@ -1124,6 +1132,7 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee)//MCS rate initialized here {u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0 ]); + RegHTSuppRateSets[0 ] =0xFF ;//support MCS 0~7 RegHTSuppRateSets[1 ] =0xFF ;//support MCS 8~15 RegHTSuppRateSets[4 ] =0x01 ;//support MCS 32
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 11/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: corrected block comments
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl Warnings:
WARNING: Block comments should align the * on each line
--- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 181 +++++++++++---------- 1 file changed, 97 insertions(+), 84 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +97 -84
@@ -213,8 +213,8 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString) }/* -* Return: true if station in half n mode and AP supports 40 bw -*/ +* Return: true if station in half n mode and AP supports 40 bw +*/ static bool IsHTHalfNmode40Bandwidth (struct ieee80211_device *ieee) {bool retValue = false;
@@ -390,14 +390,15 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee)IEEE80211_DEBUG (IEEE80211_DL_IOT ,"Joseph debug!! IOTPEER: %x\n" , pHTInfo->IOTPeer); } -/******************************************************************************************************************** +/******************************************************************************* *function: Check whether driver should declare received rate up to MCS13 only since some chipset is not good * at receiving MCS14~15 frame from some AP. * input: struct ieee80211_device* ieee * u8 * PeerMacAddr * output: none * return: return 1 if driver should declare MCS13 only(otherwise return 0) -* *****************************************************************************************************************/ +******************************************************************************* +*/ static u8 HTIOTActIsDisableMCS14 (struct ieee80211_device *ieee,u8 *PeerMacAddr) {return 0 ;
@@ -405,17 +406,17 @@ static u8 HTIOTActIsDisableMCS14(struct ieee80211_device *ieee, u8 *PeerMacAddr)/** -* Function: HTIOTActIsDisableMCS15 -* -* Overview: Check whether driver should declare capability of receiving MCS15 -* -* Input: -* PADAPTER Adapter, -* -* Output: None -* Return: true if driver should disable MCS15 -* 2008.04.15 Emily -*/ +* Function: HTIOTActIsDisableMCS15 +* +* Overview: Check whether driver should declare capability of receiving MCS15 +* +* Input: +* PADAPTER Adapter, +* +* Output: None +* Return: true if driver should disable MCS15 +* 2008.04.15 Emily +*/ static bool HTIOTActIsDisableMCS15 (struct ieee80211_device *ieee) {bool retValue = false;
@@ -442,17 +443,17 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee) }/** -* Function: HTIOTActIsDisableMCSTwoSpatialStream -* -* Overview: Check whether driver should declare capability of receiving All 2 ss packets -* -* Input: -* PADAPTER Adapter, -* -* Output: None -* Return: true if driver should disable all two spatial stream packet -* 2008.04.21 Emily -*/ +* Function: HTIOTActIsDisableMCSTwoSpatialStream +* +* Overview: Check whether driver should declare capability of receiving All 2 ss packets +* +* Input: +* PADAPTER Adapter, +* +* Output: None +* Return: true if driver should disable all two spatial stream packet +* 2008.04.21 Emily +*/ static bool HTIOTActIsDisableMCSTwoSpatialStream (struct ieee80211_device *ieee,u8 *PeerMacAddr) {
@@ -462,25 +463,27 @@ static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee,return false; } -/******************************************************************************************************************** +/******************************************************************************* *function: Check whether driver should disable EDCA turbo mode * input: struct ieee80211_device* ieee * u8* PeerMacAddr * output: none * return: return 1 if driver should disable EDCA turbo mode(otherwise return 0) -* *****************************************************************************************************************/ +******************************************************************************* +*/ static u8 HTIOTActIsDisableEDCATurbo (struct ieee80211_device *ieee,u8 *PeerMacAddr) {/* default enable EDCA Turbo mode. */ return false; } -/******************************************************************************************************************** +/******************************************************************************* *function: Check whether we need to use OFDM to sned MGNT frame for broadcom AP * input: struct ieee80211_network *network //current network we live * output: none * return: return 1 if true -* *****************************************************************************************************************/ +******************************************************************************* +*/ static u8 HTIOTActIsMgntUseCCK6M (struct ieee80211_network *network) {u8 retValue =0 ;
@@ -515,7 +518,7 @@ void HTResetIOTSetting( } -/******************************************************************************************************************** +/******************************************************************************* *function: Construct Capablility Element in Beacon... if HTEnable is turned on * input: struct ieee80211_device* ieee * u8* posHTCap //pointer to store Capability Ele
@@ -524,7 +527,8 @@ void HTResetIOTSetting(* output: none * return: none * notice: posHTCap can't be null and should be initialized before. -* *****************************************************************************************************************/ +******************************************************************************* +*/ void HTConstructCapabilityElement (struct ieee80211_device *ieee,u8 *posHTCap,u8 *len,u8 IsEncrypt) {PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo;
@@ -625,7 +629,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, ureturn ; } -/******************************************************************************************************************** +/******************************************************************************* *function: Construct Information Element in Beacon... if HTEnable is turned on * input: struct ieee80211_device* ieee * u8* posHTCap //pointer to store Information Ele
@@ -634,7 +638,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u* output: none * return: none * notice: posHTCap can't be null and be initialized before. only AP and IBSS sta should do this -* *****************************************************************************************************************/ +******************************************************************************* +*/ void HTConstructInfoElement (struct ieee80211_device *ieee,u8 *posHTInfo,u8 *len,u8 IsEncrypt) {PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo;
@@ -677,24 +682,24 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le }/* -* According to experiment, Realtek AP to STA (based on rtl8190) may achieve best performance -* if both STA and AP set limitation of aggregation size to 32K, that is, set AMPDU density to 2 -* (Ref: IEEE 11n specification). However, if Realtek STA associates to other AP, STA should set -* limitation of aggregation size to 8K, otherwise, performance of traffic stream from STA to AP -* will be much less than the traffic stream from AP to STA if both of the stream runs concurrently -* at the same time. -* -* Frame Format -* Element ID Length OUI Type1 Reserved -* 1 byte 1 byte 3 bytes 1 byte 1 byte -* -* OUI = 0x00, 0xe0, 0x4c, -* Type = 0x02 -* Reserved = 0x00 -* -* 2007.8.21 by Emily -*/ -/******************************************************************************************************************** +* According to experiment, Realtek AP to STA (based on rtl8190) may achieve best performance +* if both STA and AP set limitation of aggregation size to 32K, that is, set AMPDU density to 2 +* (Ref: IEEE 11n specification). However, if Realtek STA associates to other AP, STA should set +* limitation of aggregation size to 8K, otherwise, performance of traffic stream from STA to AP +* will be much less than the traffic stream from AP to STA if both of the stream runs concurrently +* at the same time. +* +* Frame Format +* Element ID Length OUI Type1 Reserved +* 1 byte 1 byte 3 bytes 1 byte 1 byte +* +* OUI = 0x00, 0xe0, 0x4c, +* Type = 0x02 +* Reserved = 0x00 +* +* 2007.8.21 by Emily +*/ +/******************************************************************************* *function: Construct Information Element in Beacon... in RT2RT condition * input: struct ieee80211_device* ieee * u8* posRT2RTAgg //pointer to store Information Ele
@@ -702,7 +707,8 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le* output: none * return: none * notice: -* *****************************************************************************************************************/ +******************************************************************************* +*/ void HTConstructRT2RTAggElement (struct ieee80211_device *ieee,u8 *posRT2RTAgg,u8 *len) {if (posRT2RTAgg ==NULL ) {
@@ -750,13 +756,14 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, } -/******************************************************************************************************************** +/******************************************************************************* *function: Pick the right Rate Adaptive table to use * input: struct ieee80211_device* ieee * u8* pOperateMCS //A pointer to MCS rate bitmap * return: always we return true * notice: -* *****************************************************************************************************************/ +******************************************************************************* +*/ static u8 HT_PickMCSRate (struct ieee80211_device *ieee,u8 *pOperateMCS) {u8 i;
@@ -801,24 +808,25 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS) }/* -* Description: -* This function will get the highest speed rate in input MCS set. -* -* /param Adapter Pionter to Adapter entity -* pMCSRateSet Pointer to MCS rate bitmap -* pMCSFilter Pointer to MCS rate filter -* -* /return Highest MCS rate included in pMCSRateSet and filtered by pMCSFilter. -* -*/ -/******************************************************************************************************************** +* Description: +* This function will get the highest speed rate in input MCS set. +* +* /param Adapter Pionter to Adapter entity +* pMCSRateSet Pointer to MCS rate bitmap +* pMCSFilter Pointer to MCS rate filter +* +* /return Highest MCS rate included in pMCSRateSet and filtered by pMCSFilter. +* +*/ +/******************************************************************************* *function: This function will get the highest speed rate in input MCS set. * input: struct ieee80211_device* ieee * u8* pMCSRateSet //Pointer to MCS rate bitmap * u8* pMCSFilter //Pointer to MCS rate filter * return: Highest MCS rate included in pMCSRateSet and filtered by pMCSFilter * notice: -* *****************************************************************************************************************/ +******************************************************************************* +*/ u8 HTGetHighestMCSRate (struct ieee80211_device *ieee,u8 *pMCSRateSet,u8 *pMCSFilter) {u8 i, j;
@@ -858,14 +866,14 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSF/* -** -**1.Filter our operation rate set with AP's rate set -**2.shall reference channel bandwidth, STBC, Antenna number -**3.generate rate adative table for firmware -**David 20060906 -** -** \pHTSupportedCap: the connected STA's supported rate Capability element -*/ +* +* 1.Filter our operation rate set with AP's rate set +* 2.shall reference channel bandwidth, STBC, Antenna number +* 3.generate rate adative table for firmware +* David 20060906 +* +* \pHTSupportedCap: the connected STA's supported rate Capability element +*/ static u8 HTFilterMCSRate (struct ieee80211_device *ieee,u8 *pSupportMCS,u8 *pOperateMCS) {
@@ -1068,13 +1076,15 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) }void HTSetConnectBwModeCallback (struct ieee80211_device *ieee); -/******************************************************************************************************************** +/******************************************************************************* *function: initialize HT info(struct PRT_HIGH_THROUGHPUT) * input: struct ieee80211_device* ieee * output: none * return: none -* notice: This function is called when * (1) MPInitialization Phase * (2) Receiving of Deauthentication from AP -********************************************************************************************************************/ +* notice: This function is called when * (1) MPInitialization Phase +* * (2) Receiving of Deauthentication from AP +******************************************************************************* +*/ // TODO: Should this funciton be called when receiving of Disassociation? void HTInitializeHTInfo (struct ieee80211_device *ieee) {
@@ -1138,13 +1148,14 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee) RegHTSuppRateSets[4 ] =0x01 ;//support MCS 32 } } -/******************************************************************************************************************** +/******************************************************************************* *function: initialize Bss HT structure(struct PBSS_HT) * input: PBSS_HT pBssHT //to be initialized * output: none * return: none * notice: This function is called when initialize network structure -********************************************************************************************************************/ +******************************************************************************* +*/ void HTInitializeBssDesc (PBSS_HT pBssHT) {
@@ -1159,14 +1170,15 @@ void HTInitializeBssDesc(PBSS_HT pBssHT) pBssHT->bdRT2RTAggregation = false; pBssHT->bdRT2RTLongSlotTime = false; } -/******************************************************************************************************************** +/******************************************************************************* *function: initialize Bss HT structure(struct PBSS_HT) * input: struct ieee80211_device *ieee * struct ieee80211_network *pNetwork //usually current network we are live in * output: none * return: none * notice: This function should ONLY be called before association -********************************************************************************************************************/ +******************************************************************************* +*/ void HTResetSelfAndSavePeerSetting (struct ieee80211_device *ieee,struct ieee80211_network *pNetwork) {PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
@@ -1264,14 +1276,15 @@ void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee, struct ieee80211_ }EXPORT_SYMBOL (HTUpdateSelfAndPeerSetting); -/******************************************************************************************************************** +/******************************************************************************* *function: check whether HT control field exists * input: struct ieee80211_device *ieee * u8* pFrame //coming skb->data * output: none * return: return true if HT control field exists(false otherwise) * notice: -********************************************************************************************************************/ +******************************************************************************* +*/ u8 HTCCheck (struct ieee80211_device *ieee,u8 *pFrame) {if (ieee->pHTInfo->bCurrentHTSupport) {
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 12/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed space from start of line
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warning:
WARNING: please, no spaces at the start of a line
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +1 -1
@@ -402,7 +402,7 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee)static u8 HTIOTActIsDisableMCS14 (struct ieee80211_device *ieee,u8 *PeerMacAddr) {return 0 ; - } +}/**
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 13/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed redundant braces
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +3 -7
@@ -723,9 +723,8 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, *posRT2RTAgg++ =0x01 ; *posRT2RTAgg =0x10 ;//*posRT2RTAgg = 0x02; -if (ieee->bSupportRemoteWakeUp) { +if (ieee->bSupportRemoteWakeUp) *posRT2RTAgg |=0x08 ;//RT_HT_CAP_USE_WOW; - } *len =6 +2 ;return ;
@@ -780,9 +779,8 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)//legacy rate routine handled at selectedrate //no MCS rate -for (i =0 ; i <=15 ; i++) { +for (i =0 ; i <=15 ; i++) pOperateMCS[i] =0 ; - }break ;case IEEE_N_24G ://assume CCK rate ok
@@ -881,10 +879,8 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,u8 i =0 ;// filter out operational rate set not supported by AP, the length of it is 16 -for (i =0 ; i <=15 ; i++) { +for (i =0 ; i <=15 ; i++) pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i]&pSupportMCS[i]; - } -// TODO: adjust our operational rate set according to our channel bandwidth, STBC and Antenna number
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 14/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: corrected block comment style
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warning:
WARNING: Block comments use * on subsequent lines
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +9 -11
@@ -721,7 +721,7 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, *posRT2RTAgg++ =0x4c ; *posRT2RTAgg++ =0x02 ; *posRT2RTAgg++ =0x01 ; - *posRT2RTAgg =0x10 ;//*posRT2RTAgg = 0x02; + *posRT2RTAgg =0x10 ;// *posRT2RTAgg = 0x02; if (ieee->bSupportRemoteWakeUp) *posRT2RTAgg |=0x08 ;//RT_HT_CAP_USE_WOW;
@@ -731,16 +731,14 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,#ifdef TODO #if (HAL_CODE_BASE ==RTL8192 &&DEV_BUS_TYPE ==USB_INTERFACE )/* -//Emily. If it is required to Ask Realtek AP to send AMPDU during AES mode, enable this -section of code. -if(IS_UNDER_11N_AES_MODE(Adapter)) -{ -posRT2RTAgg->Octet[5] |=RT_HT_CAP_USE_AMPDU; -}else -{ -posRT2RTAgg->Octet[5] &= 0xfb; -} -*/ +* Emily. If it is required to Ask Realtek AP to send AMPDU during AES +* mode, enable this section of code. +* if(IS_UNDER_11N_AES_MODE(Adapter)) { +* posRT2RTAgg->Octet[5] |=RT_HT_CAP_USE_AMPDU; +* } else { +* posRT2RTAgg->Octet[5] &= 0xfb; +* } +*/ #else // Do Nothing
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 15/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: Use __func__ instead of hardcoded function name
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warnings:
WARNING: Prefer using '"%s...", __func__' to using 'xxxx', this function's name, in a string
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +6 -6
@@ -536,7 +536,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//u8 bIsDeclareMCS13; if ((posHTCap ==NULL ) || (pHT ==NULL )) { -IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTCap or pHTInfo can't be null in HTConstructCapabilityElement()\n" ); +IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTCap or pHTInfo can't be null in %s\n" , __func__);return ; }memset (posHTCap,0 , *len);
@@ -646,7 +646,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *lePHT_INFORMATION_ELE pHTInfoEle = (PHT_INFORMATION_ELE )posHTInfo;if ((posHTInfo ==NULL ) || (pHTInfoEle ==NULL )) { -IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTInfo or pHTInfoEle can't be null in HTConstructInfoElement()\n" ); +IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTInfo or pHTInfoEle can't be null in %s\n" , __func__);return ; }
@@ -712,7 +712,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *levoid HTConstructRT2RTAggElement (struct ieee80211_device *ieee,u8 *posRT2RTAgg,u8 *len) {if (posRT2RTAgg ==NULL ) { -IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posRT2RTAgg can't be null in HTConstructRT2RTAggElement()\n" ); +IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posRT2RTAgg can't be null in %s\n" , __func__);return ; }memset (posRT2RTAgg,0 , *len);
@@ -766,7 +766,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)u8 i;if (pOperateMCS ==NULL ) { -IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pOperateMCS can't be null in HT_PickMCSRate()\n" ); +IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pOperateMCS can't be null in %s\n" , __func__);return false; }
@@ -831,7 +831,7 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFu8 availableMcsRate[16 ];if (pMCSRateSet ==NULL || pMCSFilter ==NULL ) { -IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n" ); +IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in %s\n" , __func__);return false; }for (i =0 ; i <16 ; i++)
@@ -912,7 +912,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)static u8 EWC11NHTInfo[] = {0x00 ,0x90 ,0x4c ,0x34 };// For 11n EWC definition, 2007.07.17, by Emily if (!pHTInfo->bCurrentHTSupport) { -IEEE80211_DEBUG (IEEE80211_DL_ERR ,"<=== HTOnAssocRsp(): HT_DISABLE\n" ); +IEEE80211_DEBUG (IEEE80211_DL_ERR ,"<=== %s: HT_DISABLE\n" , __func__);return ; }IEEE80211_DEBUG (IEEE80211_DL_HT ,"===> HTOnAssocRsp_wq(): HT_ENABLE\n" );
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 16/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed blank lines before closing brace
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Blank lines aren't necessary before a close brace '}'
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 13 ------------- 1 file changed, 13 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -13
@@ -111,8 +111,6 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee) pHTInfo->UsbRxFwAggrPacketNum =8 ; pHTInfo->UsbRxFwAggrTimeout =16 ;////usb rx FW aggregation timeout threshold.It's in units of 64us #endif - - }/******************************************************************************************************************** *function: This function print out each field on HT capability IE mainly from (Beacon/ProbeRsp/AssocReq)
@@ -148,7 +146,6 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMCS Rate Set = [%x][%x][%x][%x][%x]\n" , pCapELE->MCS[0 ],\ pCapELE->MCS[1 ], pCapELE->MCS[2 ], pCapELE->MCS[3 ], pCapELE->MCS[4 ]);return ; - }/******************************************************************************************************************** *function: This function print out each field on HT Information IE mainly from (Beacon/ProbeRsp)
@@ -627,7 +624,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//Print each field in detail. Driver should not print out this message by default // HTDebugHTCapability(posHTCap, (u8*)"HTConstructCapability()"); return ; - }/******************************************************************************* *function: Construct Information Element in Beacon... if HTEnable is turned on
@@ -746,10 +742,6 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, posRT2RTAgg->Length =6 ;#endif - - - - }
@@ -797,7 +789,6 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)default :break ; - }return true;
@@ -1064,9 +1055,6 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)// Config current operation mode. // pHTInfo->CurrentOpMode = pPeerHTInfo->OptMode; - - - }void HTSetConnectBwModeCallback (struct ieee80211_device *ieee);
@@ -1247,7 +1235,6 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802 pHTInfo->IOTAction =0 ; } - }void HTUpdateSelfAndPeerSetting (struct ieee80211_device *ieee,struct ieee80211_network *pNetwork)
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 17/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: Added blank line after function
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Please use a blank line after function/struct/union/enum declarations
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +7 -0
@@ -112,6 +112,7 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee) pHTInfo->UsbRxFwAggrTimeout =16 ;////usb rx FW aggregation timeout threshold.It's in units of 64us #endif } +/******************************************************************************************************************** *function: This function print out each field on HT capability IE mainly from (Beacon/ProbeRsp/AssocReq) * input: u8* CapIE //Capability IE to be printed out
@@ -147,6 +148,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString) pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]);return ; } +/******************************************************************************************************************** *function: This function print out each field on HT Information IE mainly from (Beacon/ProbeRsp) * input: u8* InfoIE //Capability IE to be printed out
@@ -387,6 +389,7 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee)IEEE80211_DEBUG (IEEE80211_DL_IOT ,"Joseph debug!! IOTPEER: %x\n" , pHTInfo->IOTPeer); } +/******************************************************************************* *function: Check whether driver should declare received rate up to MCS13 only since some chipset is not good * at receiving MCS14~15 frame from some AP.
@@ -625,6 +628,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u// HTDebugHTCapability(posHTCap, (u8*)"HTConstructCapability()"); return ; } +/******************************************************************************* *function: Construct Information Element in Beacon... if HTEnable is turned on * input: struct ieee80211_device* ieee
@@ -890,6 +894,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,return true; } +void HTSetConnectBwMode (struct ieee80211_device *ieee,HT_CHANNEL_WIDTH Bandwidth,HT_EXTCHNL_OFFSET Offset);void HTOnAssocRsp (struct ieee80211_device *ieee) {
@@ -1130,6 +1135,7 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee) RegHTSuppRateSets[4 ] =0x01 ;//support MCS 32 } } +/******************************************************************************* *function: initialize Bss HT structure(struct PBSS_HT) * input: PBSS_HT pBssHT //to be initialized
@@ -1152,6 +1158,7 @@ void HTInitializeBssDesc(PBSS_HT pBssHT) pBssHT->bdRT2RTAggregation = false; pBssHT->bdRT2RTLongSlotTime = false; } +/******************************************************************************* *function: initialize Bss HT structure(struct PBSS_HT) * input: struct ieee80211_device *ieee
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 18/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: Removed blank lines after opening brace
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Blank lines aren't necessary after an open brace '{'
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -5
@@ -123,7 +123,6 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)* *****************************************************************************************************************/ void HTDebugHTCapability (u8 *CapIE,u8 *TitleString) { -static u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily PHT_CAPABILITY_ELE pCapELE;
@@ -159,7 +158,6 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)* *****************************************************************************************************************/ void HTDebugHTInfo (u8 *InfoIE,u8 *TitleString) { -static u8 EWC11NHTInfo[] = {0x00 ,0x90 ,0x4c ,0x34 };// For 11n EWC definition, 2007.07.17, by Emily PHT_INFORMATION_ELE pHTInfoEle;
@@ -259,7 +257,6 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz)u16 HTHalfMcsToDataRate (struct ieee80211_device *ieee,u8 nMcsRate) { -u8 is40MHz;u8 isShortGI;
@@ -868,7 +865,6 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFstatic u8 HTFilterMCSRate (struct ieee80211_device *ieee,u8 *pSupportMCS,u8 *pOperateMCS) { -u8 i =0 ;// filter out operational rate set not supported by AP, the length of it is 16
@@ -1146,7 +1142,6 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee)*/ void HTInitializeBssDesc (PBSS_HT pBssHT) { - pBssHT->bdSupportHT = false;memset (pBssHT->bdHTCapBuf,0 ,sizeof (pBssHT->bdHTCapBuf)); pBssHT->bdHTCapLen =0 ;
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 19/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed extra blank lines
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Please don't use multiple blank lines
--- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 24 ---------------------- 1 file changed, 24 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -24
@@ -266,7 +266,6 @@ u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate)return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate&0x7f )]; } -u16 HTMcsToDataRate (struct ieee80211_device *ieee,u8 nMcsRate) {PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
@@ -321,8 +320,6 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate) } } - -bool IsHTHalfNmodeAPs (struct ieee80211_device *ieee) {bool retValue = false;
@@ -401,7 +398,6 @@ static u8 HTIOTActIsDisableMCS14(struct ieee80211_device *ieee, u8 *PeerMacAddr)return 0 ; } -/** * Function: HTIOTActIsDisableMCS15 *
@@ -514,7 +510,6 @@ void HTResetIOTSetting( pHTInfo->IOTPeer =HT_IOT_PEER_UNKNOWN ; } -/******************************************************************************* *function: Construct Capablility Element in Beacon... if HTEnable is turned on * input: struct ieee80211_device* ieee
@@ -546,7 +541,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE = (PHT_CAPABILITY_ELE )posHTCap; } -//HT capability info pCapELE->AdvCoding =0 ;// This feature is not supported now!! if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev))
@@ -569,7 +563,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u pCapELE->PSMP =0 ;// Do not support now!! pCapELE->LSigTxopProtect =0 ;// Do not support now!! -//MAC HT parameters info // TODO: Nedd to take care of this part IEEE80211_DEBUG (IEEE80211_DL_HT ,"TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n" , pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
@@ -605,7 +598,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//Extended HT Capability Info memset (&pCapELE->ExtHTCapInfo,0 ,2 ); -//TXBF Capabilities memset (pCapELE->TxBFCap,0 ,4 );
@@ -617,8 +609,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, uelse *len =26 +2 ; - -// IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, posHTCap, *len -2); //Print each field in detail. Driver should not print out this message by default
@@ -667,7 +657,6 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *lememset (pHTInfoEle->BasicMSC,0 ,16 ); - *len =22 +2 ;//same above }else {
@@ -745,7 +734,6 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,#endif } -/******************************************************************************* *function: Pick the right Rate Adaptive table to use * input: struct ieee80211_device* ieee
@@ -851,8 +839,6 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFreturn (mcsRate|0x80 ); } - -/* * * 1.Filter our operation rate set with AP's rate set
@@ -924,7 +910,6 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)else pPeerHTInfo = (PHT_INFORMATION_ELE )(pHTInfo->PeerHTInfoBuf); -//////////////////////////////////////////////////////// // Configurations: ////////////////////////////////////////////////////////
@@ -957,7 +942,6 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK && (pPeerHTCap->DssCCk ==1 ); -// // Config and configure A-MSDU setting //
@@ -970,7 +954,6 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)else pHTInfo->nCurrent_AMSDU_MaxSize = pHTInfo->nAMSDU_MaxSize; -// // Config A-MPDU setting //
@@ -1102,8 +1085,6 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee) pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density; pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor; - -// Initialize all of the parameters related to 11n memset ((void *)(&(pHTInfo->SelfHTCap)),0 ,sizeof (pHTInfo->SelfHTCap));memset ((void *)(&(pHTInfo->SelfHTInfo)),0 ,sizeof (pHTInfo->SelfHTInfo));
@@ -1216,7 +1197,6 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_DISABLE_ALL_2SS ; - bIOTAction =HTIOTActIsDisableEDCATurbo (ieee, pNetwork->bssid);if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_DISABLE_EDCA_TURBO ;
@@ -1228,8 +1208,6 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, struct ieee802 bIOTAction =HTIOTActIsCCDFsync (pNetwork->bssid);if (bIOTAction) pHTInfo->IOTAction |=HT_IOT_ACT_CDD_FSYNC ; - - }else { pHTInfo->bCurrentHTSupport = false; pHTInfo->bCurrentRT2RTAggregation = false;
@@ -1290,8 +1268,6 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, HT_CHANNEL_WIDTH Bandwidtif (!pHTInfo->bRegBW40MHz)return ; - -// To reduce dummy operation // if((pHTInfo->bCurBW40MHz==false && Bandwidth==HT_CHANNEL_WIDTH_20) || // (pHTInfo->bCurBW40MHz==true && Bandwidth==HT_CHANNEL_WIDTH_20_40 && Offset==pHTInfo->CurSTAExtChnlOffset))
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 20/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: added spaces around '&'
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: spaces preferred around that '&'
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +4 -4
@@ -263,7 +263,7 @@ u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate) is40MHz = (IsHTHalfNmode40Bandwidth (ieee)) ?1 :0 ; isShortGI = (IsHTHalfNmodeSGI (ieee, is40MHz)) ?1 :0 ; -return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate&0x7f )]; +return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate &0x7f )]; }u16 HTMcsToDataRate (struct ieee80211_device *ieee,u8 nMcsRate)
@@ -274,7 +274,7 @@ u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate)u8 isShortGI = (pHTInfo->bCurBW40MHz) ? ((pHTInfo->bCurShortGI40MHz) ?1 :0 ) : ((pHTInfo->bCurShortGI20MHz) ?1 :0 ); -return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate&0x7f )]; +return MCS_DATA_RATE [is40MHz][isShortGI][(nMcsRate &0x7f )]; }/********************************************************************************************************************
@@ -316,7 +316,7 @@ u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate)//nDataRate = nDataRate - 60; } -return MCS_DATA_RATE [is40MHz][isShortGI][nDataRate&0xf ]; +return MCS_DATA_RATE [is40MHz][isShortGI][nDataRate &0xf ]; } }
@@ -855,7 +855,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,// filter out operational rate set not supported by AP, the length of it is 16 for (i =0 ; i <=15 ; i++) - pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i]&pSupportMCS[i]; + pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i] & pSupportMCS[i];// TODO: adjust our operational rate set according to our channel bandwidth, STBC and Antenna number
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 21/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: corrected indentation
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Alignment should match open parenthesis
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +8 -8
@@ -363,16 +363,16 @@ static void HTIOTPeerDetermine(struct ieee80211_device *ieee)else if (net->broadcom_cap_exist) pHTInfo->IOTPeer =HT_IOT_PEER_BROADCOM ;else if ((memcmp (net->bssid,UNKNOWN_BORADCOM ,3 ) ==0 ) || - (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || - (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ) || - (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 ) ==0 )) + (memcmp (net->bssid,LINKSYSWRT330_LINKSYSWRT300_BROADCOM ,3 ) ==0 ) || + (memcmp (net->bssid,LINKSYSWRT350_LINKSYSWRT150_BROADCOM ,3 ) ==0 ) || + (memcmp (net->bssid, NETGEAR834Bv2_BROADCOM,3 ) ==0 )) pHTInfo->IOTPeer =HT_IOT_PEER_BROADCOM ;else if ((memcmp (net->bssid,BELKINF5D8233V1_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,PCI_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,EDIMAX_RALINK ,3 ) ==0 ) || - (memcmp (net->bssid,AIRLINK_RALINK ,3 ) ==0 ) || - net->ralink_cap_exist) + (memcmp (net->bssid,BELKINF5D82334V3_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,PCI_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,EDIMAX_RALINK ,3 ) ==0 ) || + (memcmp (net->bssid,AIRLINK_RALINK ,3 ) ==0 ) || + net->ralink_cap_exist) pHTInfo->IOTPeer =HT_IOT_PEER_RALINK ;else if (net->atheros_cap_exist) pHTInfo->IOTPeer =HT_IOT_PEER_ATHEROS ;
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 22/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: coding style correction of a function declaration
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Lines should not end with a '('
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +1 -3
@@ -502,9 +502,7 @@ static u8 HTIOTActIsCCDFsync(u8 *PeerMacAddr)return retValue; } -void HTResetIOTSetting ( -PRT_HIGH_THROUGHPUT pHTInfo -) +void HTResetIOTSetting (PRT_HIGH_THROUGHPUT pHTInfo) { pHTInfo->IOTAction =0 ; pHTInfo->IOTPeer =HT_IOT_PEER_UNKNOWN ;
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 23/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed unnecessary parentheses
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Unnecessary parentheses around ...
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +6 -6
@@ -534,7 +534,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, uu8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily memcpy (posHTCap, EWC11NHTCap,sizeof (EWC11NHTCap)); - pCapELE = (PHT_CAPABILITY_ELE )&(posHTCap[4 ]); + pCapELE = (PHT_CAPABILITY_ELE )&posHTCap[4 ]; }else { pCapELE = (PHT_CAPABILITY_ELE )posHTCap; }
@@ -1084,10 +1084,10 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee) pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;// Initialize all of the parameters related to 11n -memset ((void *)(&(pHTInfo->SelfHTCap)),0 ,sizeof (pHTInfo->SelfHTCap)); -memset ((void *)(&(pHTInfo->SelfHTInfo)),0 ,sizeof (pHTInfo->SelfHTInfo)); -memset ((void *)(&(pHTInfo->PeerHTCapBuf)),0 ,sizeof (pHTInfo->PeerHTCapBuf)); -memset ((void *)(&(pHTInfo->PeerHTInfoBuf)),0 ,sizeof (pHTInfo->PeerHTInfoBuf)); +memset ((void *)(&pHTInfo->SelfHTCap),0 ,sizeof (pHTInfo->SelfHTCap)); +memset ((void *)(&pHTInfo->SelfHTInfo),0 ,sizeof (pHTInfo->SelfHTInfo)); +memset ((void *)(&pHTInfo->PeerHTCapBuf),0 ,sizeof (pHTInfo->PeerHTCapBuf)); +memset ((void *)(&pHTInfo->PeerHTInfoBuf),0 ,sizeof (pHTInfo->PeerHTInfoBuf)); pHTInfo->bSwBwInProgress = false; pHTInfo->ChnlOp =CHNLOP_NONE ;
@@ -1103,7 +1103,7 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee)//MCS rate initialized here { -u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0 ]); +u8 *RegHTSuppRateSets = &ieee->RegHTSuppRateSet[0 ]; RegHTSuppRateSets[0 ] =0xFF ;//support MCS 0~7 RegHTSuppRateSets[1 ] =0xFF ;//support MCS 8~15
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 24/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: coding style correction of NULL tests
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: Comparison to NULL could be written "!..."
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +5 -5
@@ -525,7 +525,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, uPHT_CAPABILITY_ELE pCapELE =NULL ;//u8 bIsDeclareMCS13; -if ((posHTCap ==NULL ) || (pHT ==NULL )) { +if (!posHTCap || !pHT) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTCap or pHTInfo can't be null in %s\n" , __func__);return ; }
@@ -630,7 +630,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *lePRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo;PHT_INFORMATION_ELE pHTInfoEle = (PHT_INFORMATION_ELE )posHTInfo; -if ((posHTInfo ==NULL ) || (pHTInfoEle ==NULL )) { +if (!posHTInfo || !pHTInfoEle) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posHTInfo or pHTInfoEle can't be null in %s\n" , __func__);return ; }
@@ -695,7 +695,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le*/ void HTConstructRT2RTAggElement (struct ieee80211_device *ieee,u8 *posRT2RTAgg,u8 *len) { -if (posRT2RTAgg ==NULL ) { +if (!posRT2RTAgg) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"posRT2RTAgg can't be null in %s\n" , __func__);return ; }
@@ -744,7 +744,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS) {u8 i; -if (pOperateMCS ==NULL ) { +if (!pOperateMCS) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pOperateMCS can't be null in %s\n" , __func__);return false; }
@@ -808,7 +808,7 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFu8 mcsRate =0 ;u8 availableMcsRate[16 ]; -if (pMCSRateSet ==NULL || pMCSFilter ==NULL ) { +if (!pMCSRateSet || !pMCSFilter) {IEEE80211_DEBUG (IEEE80211_DL_ERR ,"pMCSRateSet or pMCSFilter can't be null in %s\n" , __func__);return false; }
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 25/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: Added prefered spacing around operators
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl check:
CHECK: spaces preferred around that 'x'
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +8 -8
@@ -826,15 +826,15 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSFif (availableMcsRate[i] !=0 ) { bitMap = availableMcsRate[i];for (j =0 ; j <8 ; j++) { -if ((bitMap%2 ) !=0 ) { -if (HTMcsToDataRate (ieee, (8 *i+j)) >HTMcsToDataRate (ieee, mcsRate)) - mcsRate = (8 *i+j); +if ((bitMap %2 ) !=0 ) { +if (HTMcsToDataRate (ieee, (8 * i + j)) >HTMcsToDataRate (ieee, mcsRate)) + mcsRate = (8 * i + j); } bitMap >>=1 ; } } } -return (mcsRate|0x80 ); +return (mcsRate |0x80 ); }/*
@@ -911,7 +911,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)//////////////////////////////////////////////////////// // Configurations: //////////////////////////////////////////////////////// -IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_HT , pPeerHTCap,sizeof (HT_CAPABILITY_ELE )); +IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_HT , pPeerHTCap,sizeof (HT_CAPABILITY_ELE ));// IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_HT, pPeerHTInfo, sizeof(HT_INFORMATION_ELE)); // Config Supported Channel Width setting //
@@ -1045,7 +1045,7 @@ void HTSetConnectBwModeCallback(struct ieee80211_device *ieee);* input: struct ieee80211_device* ieee * output: none * return: none -* notice: This function is called when * (1) MPInitialization Phase +* notice: This function is called when * (1) MPInitialization Phase * * (2) Receiving of Deauthentication from AP ******************************************************************************* */
@@ -1312,9 +1312,9 @@ void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)if (pHTInfo->bCurBW40MHz) {if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_UPPER ) - ieee->set_chan (ieee->dev, ieee->current_network.channel+2 ); + ieee->set_chan (ieee->dev, ieee->current_network.channel +2 );else if (pHTInfo->CurSTAExtChnlOffset ==HT_EXTCHNL_OFFSET_LOWER ) - ieee->set_chan (ieee->dev, ieee->current_network.channel-2 ); + ieee->set_chan (ieee->dev, ieee->current_network.channel -2 );else ieee->set_chan (ieee->dev, ieee->current_network.channel);
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 26/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: Spelling correction in a comment
In reply to John WhitmoreSpelling correction in comment: singal -> signal
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +1 -1
@@ -858,7 +858,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,// TODO: adjust our operational rate set according to our channel bandwidth, STBC and Antenna number // TODO: fill suggested rate adaptive rate index and give firmware info using Tx command packet -// we also shall suggested the first start rate set according to our singal strength +// we also shall suggested the first start rate set according to our signal strength HT_PickMCSRate (ieee, pOperateMCS);// For RTL819X, if pairwisekey = wep/tkip, we support only MCS0~7.
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 27/27 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc: removed redundant return statement
In reply to John WhitmoreCoding style edit to clear the checkpatch.pl warnings:
WARNING: void function return statements are not generally useful
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -2
@@ -145,7 +145,6 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMPDU Density = %d\n" , pCapELE->MPDUDensity);IEEE80211_DEBUG (IEEE80211_DL_HT ,"\tMCS Rate Set = [%x][%x][%x][%x][%x]\n" , pCapELE->MCS[0 ],\ pCapELE->MCS[1 ], pCapELE->MCS[2 ], pCapELE->MCS[3 ], pCapELE->MCS[4 ]); -return ; }/********************************************************************************************************************
@@ -611,7 +610,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u//Print each field in detail. Driver should not print out this message by default // HTDebugHTCapability(posHTCap, (u8*)"HTConstructCapability()"); -return ; }/*******************************************************************************
Signature · 6 lines
2.16.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel