MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / usb / net / Zydas / zdinlinef.h
blobe5e6f6b8a080a6ba2b45b52e418fb5747b30aee8
1 #ifndef _ZD_INLINEF_H
2 #define _ZD_INLINEF_H
3 #include "zd1205.h"
4 #include "zdglobal.h"
5 #include "zddebug.h"
7 #define write_str(a,b)
8 extern zd_80211Obj_t dot11Obj;
10 #if defined(OFDM)
11 extern u8 OfdmRateTbl_11A[12];
13 extern u8 OfdmRateTbl[12];
14 #endif
17 __inline void
18 Cal_Us_Service(
19 u8 TxRate,
20 u16 Len,
21 u16 *pLenInUs,
22 u8 *pService
25 u32 Remainder;
26 u32 Delta;
28 #if defined(OFDM)
29 *(pService) = 0x00;
30 #endif
32 switch(TxRate){
33 case RATE_1M: /* 1M bps */
34 *(pLenInUs) = Len << 3;
35 break;
37 case RATE_2M: /* 2M bps */
38 *(pLenInUs) = Len << 2;
39 break;
41 case RATE_5M: /* 5.5M bps */
42 *(pLenInUs) = (u16)(((u32)Len << 4)/11);
43 Remainder = (((u32)Len << 4) % 11);
44 if ( Remainder ){
45 *(pLenInUs) += 1;
47 break;
49 case RATE_11M: /* 11M bps */
50 *(pLenInUs) = (u16)(((u32)Len << 3)/11);
51 Remainder = (((u32)Len << 3) % 11);
52 Delta = 11 - Remainder;
53 if ( Remainder ){
54 *(pLenInUs) += 1;
55 if ( Delta >= 8 ){
56 *(pService) |= BIT_7;
59 break;
61 #if !(defined(GCCK) && defined(OFDM))
62 case RATE_16M: // 16.5M bps
63 *(pLenInUs) = (u16)(((u32)Len << 4)/33);
64 Remainder = (((u32)Len << 4) % 33);
65 Delta = 33 - Remainder;
66 if ( Remainder ){
67 *(pLenInUs) += 1;
68 if ( Delta < 16 ){
70 else if ( (Delta >= 16) && (Delta < 32) ){
71 *(pService) |= BIT_7;
73 else if ( Delta >= 32 ){
74 *(pService) |= BIT_6;
77 break;
79 case RATE_22M: // 22M bps
80 *(pLenInUs) = (u16)(((u32)Len << 2)/11);
81 Remainder = (((u32)Len << 2) % 11);
82 Delta = 11 - Remainder;
83 if ( Remainder ){
84 *(pLenInUs) += 1;
85 if ( Delta < 4 ){
87 else if ( (Delta >= 4) && (Delta < 8) ){
88 *(pService) |= BIT_7;
90 else if ( Delta >= 8 ){
91 *(pService) |= BIT_6;
94 break;
98 case RATE_27M: // 27.5 bps
99 *(pLenInUs) = (u16)(((u32)Len << 4)/55);
100 Remainder = (((u32)Len << 4) % 55);
101 Delta = 55 - Remainder;
102 if ( Remainder ){
103 *(pLenInUs) += 1;
104 if ( Delta < 16 ){
106 else if ( (Delta >= 16) && (Delta < 32) ){
107 *(pService) |= BIT_7;
111 else if ( (Delta >= 32) && (Delta < 48) ){
112 *(pService) |= BIT_6;
114 else if ( Delta >= 48 ){
115 *(pService) |= (BIT_6 | BIT_7);
118 break;
120 case RATE_33M: // 33M bps
121 *(pLenInUs) = (u16)(((u32)Len << 3)/33);
122 Remainder = (((u32)Len << 3) % 33);
123 Delta = 33 - Remainder;
124 if ( Remainder ){
125 *(pLenInUs) += 1;
126 if ( Delta < 8 ){
128 else if ( (Delta >= 8) && (Delta < 16) ){
129 *(pService) |= BIT_7;
131 else if ( (Delta >= 16) && (Delta < 24) ){
132 *(pService) |= BIT_6;
134 else if ( (Delta >= 24) && (Delta < 32) ){
135 *(pService) |= (BIT_6 | BIT_7);
137 else if ( Delta >= 32 ){
138 *(pService) |= BIT_5;
141 break;
143 case RATE_38M: // 38.5M bps
144 *(pLenInUs) = (u16)(((u32)Len << 4)/77);
145 Remainder = (((u32)Len << 4) % 77);
146 Delta = 77 - Remainder;
147 if ( Remainder ){
148 *(pLenInUs) += 1;
149 if ( Delta < 16 ){
151 else if ( (Delta >= 16) && (Delta < 32) ){
152 *(pService) |= BIT_7;
156 else if ( (Delta >= 32) && (Delta < 48) ){
157 *(pService) |= BIT_6;
159 else if ( (Delta >= 48) && (Delta < 64) ){
160 *(pService) |= (BIT_6 | BIT_7);
162 else if ( Delta >= 64){
163 *(pService) |= BIT_5;
166 break;
168 case RATE_44M: // 44M bps
169 *(pLenInUs) = (u16)(((u32)Len << 1)/11);
170 Remainder = (((u32)Len << 1) % 11);
171 Delta = 11 - Remainder;
172 if ( Remainder ){
173 *(pLenInUs) += 1;
174 if ( Delta < 2 ){
176 else if ( (Delta >= 2) && (Delta < 4) ){
177 *(pService) |= BIT_7;
179 else if ( (Delta >= 4) && (Delta < 6) ){
180 *(pService) |= BIT_6;
182 else if ( (Delta >= 6) && (Delta < 8) ){
183 *(pService) |= (BIT_6 | BIT_7);
185 else if ( (Delta >= 8) && (Delta < 10) ){
186 *(pService) |= BIT_5;
188 else if ( Delta >= 10 ){
189 *(pService) |= (BIT_5 | BIT_7);
192 break;
194 case RATE_49M: // 49.5M bps
195 *(pLenInUs) = (u16)(((u32)Len << 4)/99);
196 Remainder = (((u32)Len << 4) % 99);
197 Delta = 99 - Remainder;
198 if ( Remainder ){
199 *(pLenInUs) += 1;
200 if ( Delta < 16 ){
202 else if ( (Delta >= 16) && (Delta < 32) ){
203 *(pService) |= BIT_7;
205 else if ( (Delta >= 32) && (Delta < 48) ){
206 *(pService) |= BIT_6;
208 else if ( (Delta >= 48) && (Delta < 64) ){
209 *(pService) |= (BIT_6 | BIT_7);
213 else if ( (Delta >= 64) && (Delta < 80) ){
214 *(pService) |= BIT_5;
216 else if ( (Delta >= 80) && (Delta < 96) ){
217 *(pService) |= (BIT_5 | BIT_7);
219 else if ( Delta >= 96 ){
220 *(pService) |= (BIT_5 | BIT_6);
223 break;
225 case RATE_55M: // 55M bps
226 *(pLenInUs) = (u16)(((u32)Len << 3)/55);
227 Remainder = (((u32)Len << 3) % 55);
228 Delta = 55 - Remainder;
229 if ( Remainder ){
230 *(pLenInUs) += 1;
231 if ( Delta < 8 ){
233 else if ( (Delta >= 8) && (Delta < 16) ){
234 *(pService) |= BIT_7;
236 else if ( (Delta >= 16) && (Delta < 24) ){
237 *(pService) |= BIT_6;
239 else if ( (Delta >= 24) && (Delta < 32) ){
240 *(pService) |= (BIT_6 | BIT_7);
242 else if ( (Delta >= 32) && (Delta < 40) ){
243 *(pService) |= BIT_5;
245 else if ( (Delta >= 40) && (Delta < 48) ){
246 *(pService) |= (BIT_5 | BIT_7);
248 else if ( Delta >= 48 ){
249 *(pService) |= (BIT_5 | BIT_6);
252 break;
254 case RATE_60M: // 60.5M bps
255 *(pLenInUs) = (u16)(((u32)Len << 4)/121);
256 Remainder = (((u32)Len << 4) % 121);
257 Delta = 121 - Remainder;
258 if ( Remainder ){
259 *(pLenInUs) += 1;
260 if ( Delta < 16 ){
262 else if ( (Delta >= 16) && (Delta < 32) ){
263 *(pService) |= BIT_7;
265 else if ( (Delta >= 32) && (Delta < 48) ){
266 *(pService) |= BIT_6;
268 else if ( (Delta >= 48) && (Delta < 64) ){
269 *(pService) |= (BIT_6 | BIT_7);
271 else if ( (Delta >= 64) && (Delta < 80) ){
272 *(pService) |= BIT_5;
274 else if ( (Delta >= 80) && (Delta < 96) ){
275 *(pService) |= (BIT_5 | BIT_7);
277 else if ( (Delta >= 96) && (Delta < 112) ){
278 *(pService) |= (BIT_5 | BIT_6);
280 else if ( Delta >= 112 ){
281 *(pService) |= (BIT_5 | BIT_6 | BIT_7);
284 break;
286 case 13: // 8.25M bps
287 *(pLenInUs) = (u16)(((u32)Len * 32)/33);
288 Remainder = (((u32)Len * 32) % 33);
289 Delta = 33 - Remainder;
290 if ( Remainder ){
291 *(pLenInUs) += 1;
292 if (Delta < 32){
294 else {
295 *(pService) |= BIT_7;
299 break;
300 #else
301 case RATE_6M: // 6M
302 *(pLenInUs) = (u16)(((u32)Len << 3)/6);
303 break;
305 case RATE_9M: // 9M
306 *(pLenInUs) = (u16)(((u32)Len << 3)/9);
307 break;
309 case RATE_12M: // 12M
310 *(pLenInUs) = (u16)(((u32)Len << 3)/12);
311 break;
313 case RATE_18M: // 18M
314 *(pLenInUs) = (u16)(((u32)Len << 3)/18);
315 break;
317 case RATE_24M: // 24M
318 *(pLenInUs) = (u16)(((u32)Len << 3)/24);
319 break;
321 case RATE_36M: // 36M
322 *(pLenInUs) = (u16)(((u32)Len << 3)/36);
324 break;
326 case RATE_48M: // 48M
327 *(pLenInUs) = (u16)(((u32)Len << 3)/48);
328 break;
330 case RATE_54M: // 54M
331 *(pLenInUs) = (u16)(((u32)Len << 3)/54);
332 break;
333 #endif
335 default:
336 printk(KERN_ERR "zd1205: Invalid RF module parameter\n");
341 char DbgStr100[]="TKIP:";
342 char DbgStr101[]="CtrlSetting";
343 char DbgStr102[]="EncryType";
344 #define CTRL_SIZE 25
345 __inline unsigned long
346 Cfg_CtrlSetting(
347 struct zd1205_private *macp,
348 zd1205_SwTcb_t *pSwTcb,
349 wla_Header_t *pWlaHdr,
350 ctrl_Set_parm_t *pSetParms
353 zd1205_Ctrl_Set_t *pCtrlSet = pSwTcb->pHwCtrlPtr;
354 u8 tmp;
355 u16 Len = 0;
356 u16 NextLen = 0;
357 u16 LenInUs;
358 u16 NextLenInUs;
359 u8 Service;
360 u8 TxRate;
361 u8 Rate = pSetParms->Rate;
362 u8 Preamble = pSetParms->Preamble;
363 u32 CurrFragLen = pSetParms->CurrFragLen;
364 u32 NextFragLen = pSetParms->NextFragLen;
365 u8 encryType = pSetParms->encryType;
366 //u8 vapId = pSetParms->vapId;
367 u8 bMgtFrame = 0;
368 u8 bGroupAddr = 0;
369 u8 EnCipher = ((pWlaHdr->FrameCtrl[1] & ENCRY_BIT) ? 1 : 0);
370 u16 FragNum = (pWlaHdr->SeqCtrl[0] & 0x0F);
371 card_Setting_t *pCardSettting = &macp->cardSetting;
372 u16 FrameType = pWlaHdr->FrameCtrl[0];
373 u8 bBusrt = 0;
374 #ifdef ZD1211B
375 u8 LengthDiff=0;
376 #endif
378 memset(pCtrlSet,0,sizeof(zd1205_Ctrl_Set_t));
380 if (Rate > macp->AdapterMaxRate)
381 Rate = macp->AdapterMaxRate;
383 if ((FrameType & 0x0c) == MANAGEMENT){
384 bMgtFrame = 1;
385 Rate = dot11Obj.BasicRate;
387 if ((FrameType & 0x0c) == DATA){
388 write_str(DbgStr101, EnCipher);
390 if (bMgtFrame){
391 if(macp->RF_Mode == UW2453_RF)
393 Rate = RATE_1M;
394 Preamble = 0;
396 else if ((FrameType == PROBE_RSP) || (FrameType == PROBE_REQ)){
397 // Ensure Site-Survey smooth
398 if(PURE_A_MODE != pCardSettting->MacMode) {
399 Rate = RATE_1M;
400 Preamble = 0;
402 else if(PURE_A_MODE == pCardSettting->MacMode) {
403 Rate = RATE_6M;
404 Preamble =1;
410 if (FrameType == PS_POLL){
411 // For compatibility with D-Link AP
412 if(PURE_A_MODE != pCardSettting->MacMode) {
413 Rate = RATE_1M;
414 Preamble = 0;
416 else if(PURE_A_MODE == pCardSettting->MacMode) {
417 Rate = RATE_6M;
418 Preamble = 1;
423 if ((Rate == RATE_1M) && (Preamble == 1)){ //1M && short preamble
424 Rate = RATE_2M;
427 if (macp->bFixedRate){
428 if (!bMgtFrame)
429 Rate = pCardSettting->FixedRate;
432 pSwTcb->Rate = Rate;
433 //FPRINT_V("zdinline Rate", Rate);
435 #if !defined(OFDM)
436 pCtrlSet->CtrlSetting[0] = (Rate | (Preamble << 5));
437 #else
438 if (Rate < RATE_6M){ //CCK frame
439 pCtrlSet->CtrlSetting[0] = (Rate | (Preamble << 5));
440 //``JWEI 2003/12/22
441 #if fTX_PWR_CTRL
442 if ((macp->TxOFDMCnt > 0) && (macp->TxOFDMCnt < cTX_SENT_LEN))
443 macp->TxOFDMCnt --;
444 macp->TxPwrCCK ++;
445 #endif
448 else{
449 #if fTX_PWR_CTRL
450 macp->TxPwrOFDM ++;
451 macp->TxOFDMCnt ++;
452 if (Rate == RATE_48M){
453 if (macp->TxOFDMType != cTX_48M)
454 macp->TxOFDMCnt = 0;
455 macp->TxOFDMType = cTX_48M;
457 else if (Rate == RATE_54M){
458 if (macp->TxOFDMType != cTX_54M)
459 macp->TxOFDMCnt = 0;
460 macp->TxOFDMType = cTX_54M;
462 else {
463 if (macp->TxOFDMType != cTX_OFDM)
464 macp->TxOFDMCnt = 0;
465 macp->TxOFDMType = cTX_OFDM;
467 #endif
469 if(PURE_A_MODE != pCardSettting->MacMode)
470 pCtrlSet->CtrlSetting[0] = OfdmRateTbl[Rate];
471 else if(PURE_A_MODE == pCardSettting->MacMode) {
472 pCtrlSet->CtrlSetting[0] = OfdmRateTbl_11A[Rate];
476 #endif
478 TxRate = Rate;
480 //keep current Tx rate
481 pCardSettting->CurrTxRate = TxRate;
483 /* Length in byte */
484 if (EnCipher){
485 if (!pCardSettting->SwCipher){
486 write_str(DbgStr102, encryType);
487 switch(encryType){
488 case WEP64:
489 case WEP128:
490 case WEP256:
491 Len = CurrFragLen + 36; /* Header(24) + CRC32(4) + IV(4) + ICV(4) */
492 NextLen = NextFragLen + 36;
493 #ifdef ZD1211B
494 LengthDiff=17;
495 #endif
497 break;
499 case TKIP:
500 write_str(DbgStr100, CurrFragLen);
501 Len = CurrFragLen + 40; /* Header(24) + CRC32(4) + IV(4) + EIV(4) + ICV(4) */
502 NextLen = NextFragLen + 40;
503 #ifdef ZD1211B
504 LengthDiff=17;
505 #endif
506 break;
508 case AES:
509 Len = CurrFragLen + 44; /* Header(24) + CRC32(4) + IV(4) + ExtendedIV(4) + MIC(8) */
510 NextLen = NextFragLen + 44;
511 #ifdef ZD1211B
512 LengthDiff=13;
513 #endif
514 //FPRINT_V("Len", Len);
515 break;
517 default:
518 printk(KERN_DEBUG "error encryType = %x\n", encryType);
519 break;
522 else { //use software encryption
523 if (pCardSettting->DynKeyMode == DYN_KEY_TKIP){
524 if ((pWlaHdr->DA[0] & BIT_0) && (pCardSettting->WpaBcKeyLen != 32)) { //multicast
525 Len = CurrFragLen + 32; // Header(24) + CRC32(4) + IV(4), ICV was packed under payload
527 NextLen = NextFragLen + 32;
529 else {
530 Len = CurrFragLen + 36; // Header(24) + CRC32(4) + IV(4) + ExtendIV(4), ICV was packed under payload
531 NextLen = NextFragLen + 36;
534 else {
535 Len = CurrFragLen + 32; // Header(24) + CRC32(4) + IV(4), ICV was packed under payload
536 NextLen = NextFragLen + 32;
540 else{ // no cipher
541 Len = CurrFragLen + 28; /* Header(24) + CRC32(4) */
542 NextLen = NextFragLen + 28;
543 #ifdef ZD1211B
544 LengthDiff=21;
545 #endif
549 /* Corret some exceptions */
550 if (FrameType == PS_POLL){
551 Len = CurrFragLen + 20; // Header(16) + CRC32(4)
554 /* Corret some exceptions */
555 if (NextFragLen == 0)
556 NextLen = 0;
558 pCtrlSet->CtrlSetting[1] = (u8)Len; /* low byte */
559 pCtrlSet->CtrlSetting[2] = (u8)(Len >> 8); /* high byte */
561 /* TCB physical address */
562 pCtrlSet->CtrlSetting[3] = (u8)(pSwTcb->TcbPhys);
563 pCtrlSet->CtrlSetting[4] = (u8)(pSwTcb->TcbPhys >> 8);
564 pCtrlSet->CtrlSetting[5] = (u8)(pSwTcb->TcbPhys >> 16);
565 pCtrlSet->CtrlSetting[6] = (u8)(pSwTcb->TcbPhys >> 24);
567 pCtrlSet->CtrlSetting[7] = 0x00;
568 pCtrlSet->CtrlSetting[8] = 0x00;
569 pCtrlSet->CtrlSetting[9] = 0x00;
570 pCtrlSet->CtrlSetting[10] = 0x00;
572 /* Misc */
573 tmp = 0;
574 if (!FragNum){
575 tmp |= BIT_0;
577 if (macp->bTxBurstEnable){
578 if (macp->activeTxQ->count > 0){
579 // AT LEAST one packet in ActiveChainList
580 macp->TxBurstCount++;
581 if (macp->TxBurstCount == 3) // only 3 packets
582 macp->TxBurstCount = 0;
584 else{
585 // recount again, next packet will back off
586 macp->TxBurstCount = 0;
589 // burst mode
590 if (macp->TxBurstCount == 0){
591 tmp |= BIT_0; //need back off
593 else{
594 tmp &= ~BIT_0; //burst, no need back off
595 bBusrt = 1;
597 pCtrlSet->CtrlSetting[0] |= BIT_7;
602 if (pWlaHdr->DA[0] & BIT_0){ /* Multicast */
603 bGroupAddr = 1;
604 tmp |= BIT_1;
607 //if (bMgtFrame){
608 // tmp |= BIT_3;
611 if (FrameType == PS_POLL) //AP don't send PS_POLL
612 tmp |= BIT_2;
615 #ifndef HOST_IF_USB
616 if ((pCardSettting->BssType == INDEPENDENT_BSS) && (!bMgtFrame)){
617 if (zd1205_DestPowerSave(macp, &pWlaHdr->DA[0])){
618 tmp |= BIT_4;
621 #endif
623 if (Len > pCardSettting->RTSThreshold){
624 if ((!bMgtFrame) && (!bGroupAddr)) {
625 if(PURE_A_MODE != macp->cardSetting.MacMode)
626 tmp |= BIT_5;
627 else if(PURE_A_MODE == macp->cardSetting.MacMode)
628 tmp |= BIT_7;
632 #if (defined(GCCK) && defined(OFDM))
634 if (TxRate > RATE_11M && PURE_A_MODE != macp->cardSetting.MacMode){
636 if (tmp & BIT_5){
637 // need to send RTS or CTS, in OFDM only send CTS, in CCK send RTS
638 tmp &= ~BIT_5;
639 tmp |= BIT_7;
641 //else if ((dot11Obj.ConfigFlag & ENABLE_PROTECTION_SET) && dot11Obj.bDisProtection==0)
642 else if ((dot11Obj.ConfigFlag & ENABLE_PROTECTION_SET))
644 // id SelfCTS on, force send CTS when OFDM
645 tmp |= BIT_7;
648 #endif
650 if ((EnCipher) && (!pCardSettting->SwCipher)){
651 tmp |= BIT_6;
655 if ((macp->bTxBurstEnable)){
656 if (!bBusrt)
657 // bBusrt off, this is the first one, force send CTS
658 tmp |= BIT_7;
659 else
660 // bBusrt on, this is the burst one, no need CTS
661 tmp &= ~BIT_7;
664 pCtrlSet->CtrlSetting[11] = tmp;
666 /* Address1 */
667 pCtrlSet->CtrlSetting[12] = pWlaHdr->DA[0];
668 pCtrlSet->CtrlSetting[13] = pWlaHdr->DA[1];
669 pCtrlSet->CtrlSetting[14] = pWlaHdr->DA[2];
670 pCtrlSet->CtrlSetting[15] = pWlaHdr->DA[3];
671 pCtrlSet->CtrlSetting[16] = pWlaHdr->DA[4];
672 pCtrlSet->CtrlSetting[17] = pWlaHdr->DA[5];
674 if (FrameType == DATA){
675 macp->TotalTxDataFrmBytes += Len;
676 if (pCtrlSet->CtrlSetting[12] & BIT_0){
677 macp->txMulticastFrm ++;
678 macp->txMulticastOctets += CurrFragLen;
680 else{
681 macp->txUnicastFrm ++;
682 macp->txUnicastOctets += CurrFragLen;
683 macp->txDataPerSec += CurrFragLen;
688 /* NextLen */
689 #ifdef ZD1211
690 if (NextLen){
691 pCtrlSet->CtrlSetting[18] = (u8)NextLen;
692 pCtrlSet->CtrlSetting[19] = (u8)(NextLen >> 8);
694 #elif defined(ZD1211B)
695 pSwTcb->LengthDiff = LengthDiff;
696 #endif
698 /* LenInUs */
699 Cal_Us_Service(TxRate, Len, &LenInUs, &Service);
701 if (macp->bTxBurstEnable)
702 if (!bBusrt)
703 LenInUs = LenInUs * 4;
705 pCtrlSet->CtrlSetting[20] = (u8)LenInUs;
706 pCtrlSet->CtrlSetting[21] = (u8)(LenInUs >> 8);
708 /* Service */
709 #if !(defined(GCCK) && defined(OFDM))
710 pCtrlSet->CtrlSetting[22] = Service;
711 #else
712 if (Rate < RATE_6M){
713 pCtrlSet->CtrlSetting[22] = Service;
715 else{
716 pCtrlSet->CtrlSetting[22] = 0;
718 #endif
720 if (NextLen == 0){
721 NextLenInUs = 0;
723 else {
724 Cal_Us_Service(TxRate, NextLen, &NextLenInUs, &Service);
725 pCtrlSet->CtrlSetting[23] = (u8)NextLenInUs;
726 pCtrlSet->CtrlSetting[24] = (u8)(NextLenInUs >> 8);
728 #ifdef OFDM
729 // NextLen
730 // backup NextLen, because OFDM use these 2 bytes as total length,
731 // so we backup here for Retry fail use.
732 pCtrlSet->CtrlSetting[26] = (u8)NextLen;
733 pCtrlSet->CtrlSetting[27] = (u8)(NextLen >> 8);
734 #endif
737 return(CTRL_SIZE);
741 #define LOW8(v16) ((u8)( (v16) & 0xFF))
742 #define HIGH8(v16) ((u8)(((v16)>>8) & 0xFF))
743 __inline u8
744 ABS(u8 N1, u8 N2) {
745 s16 Result;
747 Result = N1-N2;
748 if(Result < 0 ) Result *= -1;
749 return (u8)Result;
753 __inline u32
754 Cfg_MacHeader(
755 struct zd1205_private *macp,
756 zd1205_SwTcb_t *pSwTcb,
757 wla_Header_t *pWlaHdr,
758 u8 hdrLen
761 zd1205_Header_t *pHdr;
762 u8 HdrLen;
764 pHdr = pSwTcb->pHwHeaderPtr;
766 HdrLen = hdrLen;
767 memcpy(&pHdr->MacHeader[0], (u8 *)pWlaHdr, hdrLen);
769 return(HdrLen);
772 #endif