Commit 6b7112719fd48c29f35333ef152a5a450f01dc83

Authored by Guillaume Clement
Committed by Greg Kroah-Hartman
1 parent fe802546ce

staging: vt6655: Add missing blank lines after declarations

This patch fixes the missing blank lines after declarations in vt6655
reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 16 changed files with 52 additions and 0 deletions Side-by-side Diff

drivers/staging/vt6655/80211mgr.c
... ... @@ -546,6 +546,7 @@
546 546 )
547 547 {
548 548 PWLAN_IE pItem;
  549 +
549 550 pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
550 551  
551 552 /* Fixed Fields */
drivers/staging/vt6655/baseband.c
... ... @@ -2289,6 +2289,7 @@
2289 2289 {
2290 2290 int ii;
2291 2291 unsigned char byBase = 1;
  2292 +
2292 2293 for (ii = 0; ii < BB_MAX_CONTEXT_SIZE; ii++) {
2293 2294 BBbReadEmbedded(dwIoBase, (unsigned char)(ii*byBase), pbyBBRegs);
2294 2295 pbyBBRegs += byBase;
drivers/staging/vt6655/bssdb.c
... ... @@ -422,6 +422,7 @@
422 422  
423 423 if (pRSN != NULL) {
424 424 unsigned int uLen = pRSN->len + 2;
  425 +
425 426 if (uLen <= (uIELength - (unsigned int)((unsigned char *)pRSN - pbyIEs))) {
426 427 pBSSList->wRSNLen = uLen;
427 428 memcpy(pBSSList->byRSNIE, pRSN, uLen);
... ... @@ -598,6 +599,7 @@
598 599  
599 600 if (pRSNWPA != NULL) {
600 601 unsigned int uLen = pRSNWPA->len + 2;
  602 +
601 603 if (uLen <= (uIELength - (unsigned int)((unsigned char *)pRSNWPA - pbyIEs))) {
602 604 pBSSList->wWPALen = uLen;
603 605 memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
... ... @@ -609,6 +611,7 @@
609 611  
610 612 if (pRSN != NULL) {
611 613 unsigned int uLen = pRSN->len + 2;
  614 +
612 615 if (uLen <= (uIELength - (unsigned int)((unsigned char *)pRSN - pbyIEs))) {
613 616 pBSSList->wRSNLen = uLen;
614 617 memcpy(pBSSList->byRSNIE, pRSN, uLen);
... ... @@ -988,6 +991,7 @@
988 991 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
989 992 {
990 993 union iwreq_data wrqu;
  994 +
991 995 memset(&wrqu, 0, sizeof(wrqu));
992 996 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
993 997 PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
... ... @@ -1167,6 +1171,7 @@
1167 1171 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1168 1172 {
1169 1173 union iwreq_data wrqu;
  1174 +
1170 1175 memset(&wrqu, 0, sizeof(wrqu));
1171 1176 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
1172 1177 PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
... ... @@ -1267,6 +1272,7 @@
1267 1272 unsigned short wFallBackRate = RATE_1M;
1268 1273 unsigned char byFallBack;
1269 1274 unsigned int ii;
  1275 +
1270 1276 pTxBufHead = (PSTxBufHead) pbyBuffer;
1271 1277 if (pTxBufHead->wFIFOCtl & FIFOCTL_AUTO_FB_0)
1272 1278 byFallBack = AUTO_FB_0;
... ... @@ -1451,6 +1457,7 @@
1451 1457 /* Update BB Reg if RSSI is too strong */
1452 1458 long LocalldBmAverage = 0;
1453 1459 long uNumofdBm = 0;
  1460 +
1454 1461 for (ii = 0; ii < RSSI_STAT_COUNT; ii++) {
1455 1462 if (pBSSList->ldBmAverage[ii] != 0) {
1456 1463 uNumofdBm++;
drivers/staging/vt6655/card.c
... ... @@ -1770,6 +1770,7 @@
1770 1770 PSDevice pDevice = (PSDevice) pDeviceHandler;
1771 1771  
1772 1772 unsigned char byMaxMin = 0;
  1773 +
1773 1774 if (pDevice->byPacketType == PK_TYPE_11A) {//0000 0000 0000 0000,11a
1774 1775 pDevice->uSlot = C_SLOT_SHORT;
1775 1776 pDevice->uSIFS = C_SIFS_A;
drivers/staging/vt6655/device.h
... ... @@ -786,6 +786,7 @@
786 786 inline static PSRxMgmtPacket DeQueue(PSDevice pDevice)
787 787 {
788 788 PSRxMgmtPacket pRxMgmtPacket;
  789 +
789 790 if (pDevice->rxManeQueue.tail == pDevice->rxManeQueue.head) {
790 791 printk("Queue is Empty\n");
791 792 return NULL;
drivers/staging/vt6655/device_main.c
... ... @@ -326,6 +326,7 @@
326 326 static char *get_chip_name(int chip_id)
327 327 {
328 328 int i;
  329 +
329 330 for (i = 0; chip_info_table[i].name != NULL; i++)
330 331 if (chip_info_table[i].chip_id == chip_id)
331 332 break;
... ... @@ -464,6 +465,7 @@
464 465 unsigned char byOFDMPwrdBm = 0;
465 466 int zonetype = 0;
466 467 PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
  468 +
467 469 MACbShutdown(pDevice->PortOffset);
468 470 BBvSoftwareReset(pDevice->PortOffset);
469 471  
... ... @@ -1006,6 +1008,7 @@
1006 1008 unsigned char value = 0x00;
1007 1009 int ii, j;
1008 1010 u16 max_lat = 0x0000;
  1011 +
1009 1012 memset(pci_config, 0x00, 256);
1010 1013 #endif
1011 1014  
... ... @@ -1358,6 +1361,7 @@
1358 1361  
1359 1362 static void device_free_td0_ring(PSDevice pDevice) {
1360 1363 int i;
  1364 +
1361 1365 for (i = 0; i < pDevice->sOpts.nTxDescs[0]; i++) {
1362 1366 PSTxDesc pDesc = &(pDevice->apTD0Rings[i]);
1363 1367 PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo;
... ... @@ -2278,6 +2282,7 @@
2278 2282 unsigned char Descriptor_type;
2279 2283 unsigned short Key_info;
2280 2284 bool bTxeapol_key = false;
  2285 +
2281 2286 Protocol_Version = skb->data[ETH_HLEN];
2282 2287 Packet_Type = skb->data[ETH_HLEN+1];
2283 2288 Descriptor_type = skb->data[ETH_HLEN+1+1+2];
... ... @@ -2576,6 +2581,7 @@
2576 2581 while (--length >= 0) {
2577 2582 unsigned char current_octet = *data++;
2578 2583 int bit;
  2584 +
2579 2585 for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
2580 2586 crc = (crc << 1) ^
2581 2587 ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
... ... @@ -2671,6 +2677,7 @@
2671 2677 memset(mc_filter, 0, sizeof(mc_filter));
2672 2678 netdev_for_each_mc_addr(ha, dev) {
2673 2679 int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
  2680 +
2674 2681 mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31));
2675 2682 }
2676 2683 MACvSelectPage1(pDevice->PortOffset);
... ... @@ -2734,6 +2741,7 @@
2734 2741  
2735 2742 {
2736 2743 char essid[IW_ESSID_MAX_SIZE+1];
  2744 +
2737 2745 if (wrq->u.essid.length > IW_ESSID_MAX_SIZE) {
2738 2746 rc = -E2BIG;
2739 2747 break;
... ... @@ -2753,6 +2761,7 @@
2753 2761  
2754 2762 {
2755 2763 char essid[IW_ESSID_MAX_SIZE+1];
  2764 +
2756 2765 if (wrq->u.essid.pointer)
2757 2766 rc = iwctl_giwessid(dev, NULL,
2758 2767 &(wrq->u.essid), essid);
... ... @@ -3115,6 +3124,7 @@
3115 3124 switch (ethcmd) {
3116 3125 case ETHTOOL_GDRVINFO: {
3117 3126 struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
  3127 +
3118 3128 strncpy(info.driver, DEVICE_NAME, sizeof(info.driver)-1);
3119 3129 strncpy(info.version, DEVICE_VERSION, sizeof(info.version)-1);
3120 3130 if (copy_to_user(useraddr, &info, sizeof(info)))
... ... @@ -3171,6 +3181,7 @@
3171 3181 device_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
3172 3182 {
3173 3183 struct pci_dev *pdev = NULL;
  3184 +
3174 3185 switch (event) {
3175 3186 case SYS_DOWN:
3176 3187 case SYS_HALT:
drivers/staging/vt6655/dpc.c
... ... @@ -604,6 +604,7 @@
604 604 {
605 605 unsigned char Protocol_Version; //802.1x Authentication
606 606 unsigned char Packet_Type; //802.1x Authentication
  607 +
607 608 if (bIsWEP)
608 609 cbIVOffset = 8;
609 610 else
... ... @@ -761,6 +762,7 @@
761 762 union iwreq_data wrqu;
762 763 struct iw_michaelmicfailure ev;
763 764 int keyidx = pbyFrame[cbHeaderSize+3] >> 6; //top two-bits
  765 +
764 766 memset(&ev, 0, sizeof(ev));
765 767 ev.flags = keyidx & IW_MICFAILURE_KEY_ID;
766 768 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
... ... @@ -1114,6 +1116,7 @@
1114 1116 // Software TKIP
1115 1117 // 1. 3253 A
1116 1118 PS802_11Header pMACHeader = (PS802_11Header)(pbyFrame);
  1119 +
1117 1120 TKIPvMixKey(pKey->abyKey, pMACHeader->abyAddr2, *pwRxTSC15_0, *pdwRxTSC47_16, pDevice->abyPRNG);
1118 1121 rc4_init(&pDevice->SBox, pDevice->abyPRNG, TKIP_KEY_LEN);
1119 1122 rc4_encrypt(&pDevice->SBox, pbyIV+8, pbyIV+8, PayloadLen);
drivers/staging/vt6655/iwctl.c
... ... @@ -139,11 +139,13 @@
139 139 struct iw_scan_req *req = (struct iw_scan_req *)extra;
140 140 unsigned char abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
141 141 PWLAN_IE_SSID pItemSSID = NULL;
  142 +
142 143 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n");
143 144  
144 145 if (pDevice->byReAssocCount > 0) { //reject scan when re-associating!
145 146 //send scan event to wpa_Supplicant
146 147 union iwreq_data wrqu;
  148 +
147 149 PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n");
148 150 memset(&wrqu, 0, sizeof(wrqu));
149 151 wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
... ... @@ -255,6 +257,7 @@
255 257 //2008-0409-04, <Add> by Einsn Liu
256 258 {
257 259 int f = (int)pBSS->uChannel - 1;
  260 +
258 261 if (f < 0)f = 0;
259 262 iwe.u.freq.m = frequency_list[f] * 100000;
260 263 iwe.u.freq.e = 1;
... ... @@ -358,6 +361,7 @@
358 361 (wrq->m <= (int) 2.487e8)) {
359 362 int f = wrq->m / 100000;
360 363 int c = 0;
  364 +
361 365 while ((c < 14) && (f != frequency_list[c]))
362 366 c++;
363 367 wrq->e = 0;
... ... @@ -368,6 +372,7 @@
368 372 rc = -EOPNOTSUPP;
369 373 else {
370 374 int channel = wrq->m;
  375 +
371 376 if ((channel < 1) || (channel > 14)) {
372 377 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: New channel value of %d is invalid!\n", dev->name, wrq->m);
373 378 rc = -EINVAL;
... ... @@ -404,6 +409,7 @@
404 409 #else
405 410 {
406 411 int f = (int)pMgmt->uCurrChannel - 1;
  412 +
407 413 if (f < 0)
408 414 f = 0;
409 415 wrq->m = frequency_list[f] * 100000;
... ... @@ -658,6 +664,7 @@
658 664 // then ignore,because you don't known which one to be connect with??
659 665 {
660 666 unsigned int ii, uSameBssidNum = 0;
  667 +
661 668 for (ii = 0; ii < MAX_BSS_NUM; ii++) {
662 669 if (pMgmt->sBSSList[ii].bActive &&
663 670 ether_addr_equal(pMgmt->sBSSList[ii].abyBSSID,
... ... @@ -1059,6 +1066,7 @@
1059 1066  
1060 1067 {
1061 1068 int rthr = wrq->value;
  1069 +
1062 1070 if (wrq->disabled)
1063 1071 rthr = 2312;
1064 1072  
drivers/staging/vt6655/rc4.c
... ... @@ -82,6 +82,7 @@
82 82 unsigned char *pbySrc, unsigned int cbData_len)
83 83 {
84 84 unsigned int ii;
  85 +
85 86 for (ii = 0; ii < cbData_len; ii++)
86 87 pbyDest[ii] = (unsigned char)(pbySrc[ii] ^ rc4_byte(pRC4));
87 88 }
drivers/staging/vt6655/rf.c
... ... @@ -750,6 +750,7 @@
750 750 )
751 751 {
752 752 bool bResult = true;
  753 +
753 754 switch (pDevice->byRFType) {
754 755 case RF_AIROHA:
755 756 case RF_AL2230S:
... ... @@ -786,6 +787,7 @@
786 787 bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned char byChannel)
787 788 {
788 789 bool bResult = true;
  790 +
789 791 switch (byRFType) {
790 792 case RF_AIROHA:
791 793 case RF_AL2230S:
drivers/staging/vt6655/rxtx.c
... ... @@ -1084,6 +1084,7 @@
1084 1084 unsigned char byFBOption = AUTO_FB_NONE;
1085 1085  
1086 1086 PSTxBufHead pFifoHead = (PSTxBufHead)pTxBufHead;
  1087 +
1087 1088 pFifoHead->wReserved = wCurrentRate;
1088 1089 wFifoCtl = pFifoHead->wFIFOCtl;
1089 1090  
... ... @@ -1103,6 +1104,7 @@
1103 1104 //Fill RsvTime
1104 1105 if (pvRrvTime) {
1105 1106 PSRrvTime_gRTS pBuf = (PSRrvTime_gRTS)pvRrvTime;
  1107 +
1106 1108 pBuf->wRTSTxRrvTime_aa = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 1:2.4GHz
1107 1109 pBuf->wRTSTxRrvTime_ba = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 1, byPktType, cbFrameSize, wCurrentRate));//1:RTSTxRrvTime_ba, 1:2.4GHz
1108 1110 pBuf->wRTSTxRrvTime_bb = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz
... ... @@ -1116,6 +1118,7 @@
1116 1118 //Fill RsvTime
1117 1119 if (pvRrvTime) {
1118 1120 PSRrvTime_gCTS pBuf = (PSRrvTime_gCTS)pvRrvTime;
  1121 +
1119 1122 pBuf->wTxRrvTime_a = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM
1120 1123 pBuf->wTxRrvTime_b = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK
1121 1124 pBuf->wCTSTxRrvTime_ba = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 3, byPktType, cbFrameSize, wCurrentRate));//3:CTSTxRrvTime_Ba, 1:2.4GHz
... ... @@ -1129,6 +1132,7 @@
1129 1132 //Fill RsvTime
1130 1133 if (pvRrvTime) {
1131 1134 PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime;
  1135 +
1132 1136 pBuf->wRTSTxRrvTime = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz
1133 1137 pBuf->wTxRrvTime = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM
1134 1138 }
... ... @@ -1138,6 +1142,7 @@
1138 1142 //Fill RsvTime
1139 1143 if (pvRrvTime) {
1140 1144 PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime;
  1145 +
1141 1146 pBuf->wTxRrvTime = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK)); //0:OFDM
1142 1147 }
1143 1148 }
... ... @@ -1146,6 +1151,7 @@
1146 1151 //Fill RsvTime
1147 1152 if (pvRrvTime) {
1148 1153 PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime;
  1154 +
1149 1155 pBuf->wRTSTxRrvTime = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz
1150 1156 pBuf->wTxRrvTime = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK));//1:CCK
1151 1157 }
... ... @@ -1155,6 +1161,7 @@
1155 1161 //Fill RsvTime
1156 1162 if (pvRrvTime) {
1157 1163 PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime;
  1164 +
1158 1165 pBuf->wTxRrvTime = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK)); //1:CCK
1159 1166 }
1160 1167 }
... ... @@ -2025,6 +2032,7 @@
2025 2032  
2026 2033 if (pDevice->bLongHeader) {
2027 2034 PWLAN_80211HDR_A4 pMACA4Header = (PWLAN_80211HDR_A4) pbyBufferAddr;
  2035 +
2028 2036 pMACHeader->wFrameCtl |= (FC_TODS | FC_FROMDS);
2029 2037 memcpy(pMACA4Header->abyAddr4, pDevice->abyBSSID, WLAN_ADDR_LEN);
2030 2038 }
drivers/staging/vt6655/vntwifi.c
... ... @@ -128,6 +128,7 @@
128 128 )
129 129 {
130 130 PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
  131 +
131 132 return (PWLAN_IE_SSID) pMgmt->abyCurrSSID;
132 133 }
133 134  
... ... @@ -151,6 +152,7 @@
151 152 )
152 153 {
153 154 PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
  155 +
154 156 if (pMgmtHandle != NULL)
155 157 return pMgmt->uCurrChannel;
156 158  
... ... @@ -177,6 +179,7 @@
177 179 )
178 180 {
179 181 PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
  182 +
180 183 return pMgmt->wCurrAID;
181 184 }
182 185  
drivers/staging/vt6655/wcmd.c
... ... @@ -990,6 +990,7 @@
990 990 {
991 991 PSDevice pDevice = (PSDevice)hDeviceContext;
992 992 PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
  993 +
993 994 pDevice->nTxDataTimeCout++;
994 995  
995 996 if (pDevice->nTxDataTimeCout < 4) //don't tx data if timer less than 40s
drivers/staging/vt6655/wmgr.c
... ... @@ -1649,6 +1649,7 @@
1649 1649 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1650 1650 {
1651 1651 union iwreq_data wrqu;
  1652 +
1652 1653 memset(&wrqu, 0, sizeof(wrqu));
1653 1654 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
1654 1655 PRINT_K("wireless_send_event--->SIOCGIWAP(disauthen)\n");
... ... @@ -2541,6 +2542,7 @@
2541 2542 // This should only works for WPA2 BSS, and WPA2 BSS check must be done before.
2542 2543 if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) {
2543 2544 bool bResult = bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj);
  2545 +
2544 2546 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate: 1(%d)\n", bResult);
2545 2547 if (!bResult) {
2546 2548 vFlush_PMKID_Candidate((void *)pDevice);
drivers/staging/vt6655/wpa.c
... ... @@ -73,6 +73,7 @@
73 73 )
74 74 {
75 75 int ii;
  76 +
76 77 pBSSList->byGKType = WPA_TKIP;
77 78 for (ii = 0; ii < 4; ii++)
78 79 pBSSList->abyPKType[ii] = WPA_TKIP;
drivers/staging/vt6655/wpactl.c
... ... @@ -766,6 +766,7 @@
766 766 /*******search if ap_scan=2 ,which is associating request in hidden ssid mode ****/
767 767 {
768 768 PKnownBSS pCurr = NULL;
  769 +
769 770 pCurr = BSSpSearchBSSList(pDevice,
770 771 pMgmt->abyDesireBSSID,
771 772 pMgmt->abyDesireSSID,