• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/rt2860/common/

Lines Matching refs:pAd

38 		pAd 					Pointer to our adapter
227 pAd Pointer to our adapter
238 void RTMPWPARemoveAllKeys(struct rt_rtmp_adapter *pAd)
245 pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus));
246 RTMP_CLEAR_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP);
249 if (pAd->StaCfg.AuthMode < Ndis802_11AuthModeWPA)
254 if (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPANone)
258 AsicRemovePairwiseKeyEntry(pAd, BSS0, BSSID_WCID);
264 CipherName[pAd->SharedKey[BSS0][i].CipherAlg], i));
265 NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(struct rt_cipher_key));
267 AsicRemoveSharedKeyEntry(pAd, BSS0, i);
269 RTMP_SET_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP);
283 pAd Pointer to our adapter
302 pAd - Pointer to our adapter
310 void RTMPSetPhyMode(struct rt_rtmp_adapter *pAd, unsigned long phymode)
317 if (pAd->CommonCfg.PhyMode == phymode)
320 pAd->CommonCfg.PhyMode = (u8)phymode;
324 pAd->CommonCfg.PhyMode, pAd->CommonCfg.Channel));
326 BuildChannelList(pAd);
329 for (i = 0; i < pAd->ChannelListNum; i++) {
330 if (pAd->CommonCfg.Channel == pAd->ChannelList[i].Channel)
334 if (i == pAd->ChannelListNum) {
335 pAd->CommonCfg.Channel = FirstChannel(pAd);
338 pAd->CommonCfg.Channel));
341 NdisZeroMemory(pAd->CommonCfg.SupRate, MAX_LEN_OF_SUPPORTED_RATES);
342 NdisZeroMemory(pAd->CommonCfg.ExtRate, MAX_LEN_OF_SUPPORTED_RATES);
343 NdisZeroMemory(pAd->CommonCfg.DesireRate, MAX_LEN_OF_SUPPORTED_RATES);
346 pAd->CommonCfg.SupRate[0] = 0x82; /* 1 mbps, in units of 0.5 Mbps, basic rate */
347 pAd->CommonCfg.SupRate[1] = 0x84; /* 2 mbps, in units of 0.5 Mbps, basic rate */
348 pAd->CommonCfg.SupRate[2] = 0x8B; /* 5.5 mbps, in units of 0.5 Mbps, basic rate */
349 pAd->CommonCfg.SupRate[3] = 0x96; /* 11 mbps, in units of 0.5 Mbps, basic rate */
350 pAd->CommonCfg.SupRateLen = 4;
351 pAd->CommonCfg.ExtRateLen = 0;
352 pAd->CommonCfg.DesireRate[0] = 2; /* 1 mbps, in units of 0.5 Mbps */
353 pAd->CommonCfg.DesireRate[1] = 4; /* 2 mbps, in units of 0.5 Mbps */
354 pAd->CommonCfg.DesireRate[2] = 11; /* 5.5 mbps, in units of 0.5 Mbps */
355 pAd->CommonCfg.DesireRate[3] = 22; /* 11 mbps, in units of 0.5 Mbps */
356 /*pAd->CommonCfg.HTPhyMode.field.MODE = MODE_CCK; // This MODE is only FYI. not use */
366 pAd->CommonCfg.SupRate[0] = 0x82; /* 1 mbps, in units of 0.5 Mbps, basic rate */
367 pAd->CommonCfg.SupRate[1] = 0x84; /* 2 mbps, in units of 0.5 Mbps, basic rate */
368 pAd->CommonCfg.SupRate[2] = 0x8B; /* 5.5 mbps, in units of 0.5 Mbps, basic rate */
369 pAd->CommonCfg.SupRate[3] = 0x96; /* 11 mbps, in units of 0.5 Mbps, basic rate */
370 pAd->CommonCfg.SupRate[4] = 0x12; /* 9 mbps, in units of 0.5 Mbps */
371 pAd->CommonCfg.SupRate[5] = 0x24; /* 18 mbps, in units of 0.5 Mbps */
372 pAd->CommonCfg.SupRate[6] = 0x48; /* 36 mbps, in units of 0.5 Mbps */
373 pAd->CommonCfg.SupRate[7] = 0x6c; /* 54 mbps, in units of 0.5 Mbps */
374 pAd->CommonCfg.SupRateLen = 8;
375 pAd->CommonCfg.ExtRate[0] = 0x0C; /* 6 mbps, in units of 0.5 Mbps */
376 pAd->CommonCfg.ExtRate[1] = 0x18; /* 12 mbps, in units of 0.5 Mbps */
377 pAd->CommonCfg.ExtRate[2] = 0x30; /* 24 mbps, in units of 0.5 Mbps */
378 pAd->CommonCfg.ExtRate[3] = 0x60; /* 48 mbps, in units of 0.5 Mbps */
379 pAd->CommonCfg.ExtRateLen = 4;
380 pAd->CommonCfg.DesireRate[0] = 2; /* 1 mbps, in units of 0.5 Mbps */
381 pAd->CommonCfg.DesireRate[1] = 4; /* 2 mbps, in units of 0.5 Mbps */
382 pAd->CommonCfg.DesireRate[2] = 11; /* 5.5 mbps, in units of 0.5 Mbps */
383 pAd->CommonCfg.DesireRate[3] = 22; /* 11 mbps, in units of 0.5 Mbps */
384 pAd->CommonCfg.DesireRate[4] = 12; /* 6 mbps, in units of 0.5 Mbps */
385 pAd->CommonCfg.DesireRate[5] = 18; /* 9 mbps, in units of 0.5 Mbps */
386 pAd->CommonCfg.DesireRate[6] = 24; /* 12 mbps, in units of 0.5 Mbps */
387 pAd->CommonCfg.DesireRate[7] = 36; /* 18 mbps, in units of 0.5 Mbps */
388 pAd->CommonCfg.DesireRate[8] = 48; /* 24 mbps, in units of 0.5 Mbps */
389 pAd->CommonCfg.DesireRate[9] = 72; /* 36 mbps, in units of 0.5 Mbps */
390 pAd->CommonCfg.DesireRate[10] = 96; /* 48 mbps, in units of 0.5 Mbps */
391 pAd->CommonCfg.DesireRate[11] = 108; /* 54 mbps, in units of 0.5 Mbps */
398 pAd->CommonCfg.SupRate[0] = 0x8C; /* 6 mbps, in units of 0.5 Mbps, basic rate */
399 pAd->CommonCfg.SupRate[1] = 0x12; /* 9 mbps, in units of 0.5 Mbps */
400 pAd->CommonCfg.SupRate[2] = 0x98; /* 12 mbps, in units of 0.5 Mbps, basic rate */
401 pAd->CommonCfg.SupRate[3] = 0x24; /* 18 mbps, in units of 0.5 Mbps */
402 pAd->CommonCfg.SupRate[4] = 0xb0; /* 24 mbps, in units of 0.5 Mbps, basic rate */
403 pAd->CommonCfg.SupRate[5] = 0x48; /* 36 mbps, in units of 0.5 Mbps */
404 pAd->CommonCfg.SupRate[6] = 0x60; /* 48 mbps, in units of 0.5 Mbps */
405 pAd->CommonCfg.SupRate[7] = 0x6c; /* 54 mbps, in units of 0.5 Mbps */
406 pAd->CommonCfg.SupRateLen = 8;
407 pAd->CommonCfg.ExtRateLen = 0;
408 pAd->CommonCfg.DesireRate[0] = 12; /* 6 mbps, in units of 0.5 Mbps */
409 pAd->CommonCfg.DesireRate[1] = 18; /* 9 mbps, in units of 0.5 Mbps */
410 pAd->CommonCfg.DesireRate[2] = 24; /* 12 mbps, in units of 0.5 Mbps */
411 pAd->CommonCfg.DesireRate[3] = 36; /* 18 mbps, in units of 0.5 Mbps */
412 pAd->CommonCfg.DesireRate[4] = 48; /* 24 mbps, in units of 0.5 Mbps */
413 pAd->CommonCfg.DesireRate[5] = 72; /* 36 mbps, in units of 0.5 Mbps */
414 pAd->CommonCfg.DesireRate[6] = 96; /* 48 mbps, in units of 0.5 Mbps */
415 pAd->CommonCfg.DesireRate[7] = 108; /* 54 mbps, in units of 0.5 Mbps */
416 /*pAd->CommonCfg.HTPhyMode.field.MODE = MODE_OFDM; // This MODE is only FYI. not use */
423 pAd->CommonCfg.BandState = UNKNOWN_BAND;
433 pAd - Pointer to our adapter
438 void RTMPSetHT(struct rt_rtmp_adapter *pAd, struct rt_oid_set_ht_phymode *pHTPhyMode)
444 u8 RxStream = pAd->CommonCfg.RxStream;
452 RTMPZeroMemory(&pAd->CommonCfg.HtCapability,
453 sizeof(pAd->CommonCfg.HtCapability));
454 RTMPZeroMemory(&pAd->CommonCfg.AddHTInfo,
455 sizeof(pAd->CommonCfg.AddHTInfo));
456 RTMPZeroMemory(&pAd->CommonCfg.NewExtChanOffset,
457 sizeof(pAd->CommonCfg.NewExtChanOffset));
458 RTMPZeroMemory(&pAd->CommonCfg.DesiredHtPhy,
459 sizeof(pAd->CommonCfg.DesiredHtPhy));
461 if (pAd->CommonCfg.bRdg) {
462 pAd->CommonCfg.HtCapability.ExtHtCapInfo.PlusHTC = 1;
463 pAd->CommonCfg.HtCapability.ExtHtCapInfo.RDGSupport = 1;
465 pAd->CommonCfg.HtCapability.ExtHtCapInfo.PlusHTC = 0;
466 pAd->CommonCfg.HtCapability.ExtHtCapInfo.RDGSupport = 0;
469 pAd->CommonCfg.HtCapability.HtCapParm.MaxRAmpduFactor = 3;
470 pAd->CommonCfg.DesiredHtPhy.MaxRAmpduFactor = 3;
474 pAd->CommonCfg.BACapability.field.RxBAWinLimit));
477 pAd->CommonCfg.DesiredHtPhy.AmsduEnable =
478 (u16)pAd->CommonCfg.BACapability.field.AmsduEnable;
479 pAd->CommonCfg.DesiredHtPhy.AmsduSize =
480 (u8)pAd->CommonCfg.BACapability.field.AmsduSize;
481 pAd->CommonCfg.DesiredHtPhy.MimoPs =
482 (u8)pAd->CommonCfg.BACapability.field.MMPSmode;
483 pAd->CommonCfg.DesiredHtPhy.MpduDensity =
484 (u8)pAd->CommonCfg.BACapability.field.MpduDensity;
486 pAd->CommonCfg.HtCapability.HtCapInfo.AMsduSize =
487 (u16)pAd->CommonCfg.BACapability.field.AmsduSize;
488 pAd->CommonCfg.HtCapability.HtCapInfo.MimoPs =
489 (u16)pAd->CommonCfg.BACapability.field.MMPSmode;
490 pAd->CommonCfg.HtCapability.HtCapParm.MpduDensity =
491 (u8)pAd->CommonCfg.BACapability.field.MpduDensity;
495 pAd->CommonCfg.DesiredHtPhy.AmsduSize,
496 pAd->CommonCfg.DesiredHtPhy.MimoPs,
497 pAd->CommonCfg.DesiredHtPhy.MpduDensity,
498 pAd->CommonCfg.DesiredHtPhy.MaxRAmpduFactor));
501 pAd->CommonCfg.HtCapability.HtCapInfo.GF = 1;
502 pAd->CommonCfg.DesiredHtPhy.GF = 1;
504 pAd->CommonCfg.DesiredHtPhy.GF = 0;
509 pAd->CommonCfg.HtCapability.MCSSet[0] = 0xff;
510 pAd->CommonCfg.HtCapability.MCSSet[1] = 0x00;
514 pAd->CommonCfg.HtCapability.MCSSet[0] = 0xff;
515 pAd->CommonCfg.HtCapability.MCSSet[1] = 0xff;
519 pAd->CommonCfg.HtCapability.MCSSet[0] = 0xff;
520 pAd->CommonCfg.HtCapability.MCSSet[1] = 0xff;
521 pAd->CommonCfg.HtCapability.MCSSet[2] = 0xff;
525 if (pAd->CommonCfg.bForty_Mhz_Intolerant
526 && (pAd->CommonCfg.Channel <= 14) && (pHTPhyMode->BW == BW_40)) {
528 pAd->CommonCfg.HtCapability.HtCapInfo.Forty_Mhz_Intolerant = 1;
532 pAd->CommonCfg.HtCapability.MCSSet[4] = 0x1; /* MCS 32 */
533 pAd->CommonCfg.HtCapability.HtCapInfo.ChannelWidth = 1;
534 if (pAd->CommonCfg.Channel <= 14)
535 pAd->CommonCfg.HtCapability.HtCapInfo.CCKmodein40 = 1;
537 pAd->CommonCfg.DesiredHtPhy.ChannelWidth = 1;
538 pAd->CommonCfg.AddHTInfo.AddHtInfo.RecomWidth = 1;
539 pAd->CommonCfg.AddHTInfo.AddHtInfo.ExtChanOffset =
543 RTMP_IO_READ32(pAd, TX_BAND_CFG, &Value);
544 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R3, &BBP3Value);
548 RTMP_IO_WRITE32(pAd, TX_BAND_CFG, Value);
552 RTMP_IO_WRITE32(pAd, TX_BAND_CFG, Value);
556 if ((pAd->OpMode == OPMODE_AP) || INFRA_ON(pAd) || ADHOC_ON(pAd)
558 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R4, &BBPValue);
561 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, BBPValue);
563 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R3, BBP3Value);
564 pAd->CommonCfg.BBPCurrentBW = BW_40;
567 pAd->CommonCfg.HtCapability.HtCapInfo.ChannelWidth = 0;
568 pAd->CommonCfg.DesiredHtPhy.ChannelWidth = 0;
569 pAd->CommonCfg.AddHTInfo.AddHtInfo.RecomWidth = 0;
570 pAd->CommonCfg.AddHTInfo.AddHtInfo.ExtChanOffset = EXTCHA_NONE;
571 pAd->CommonCfg.CentralChannel = pAd->CommonCfg.Channel;
574 RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R4, &BBPValue);
576 RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R4, BBPValue);
577 pAd->CommonCfg.BBPCurrentBW = BW_20;
582 pAd->CommonCfg.HtCapability.HtCapInfo.TxSTBC = 1;
583 pAd->CommonCfg.DesiredHtPhy.TxSTBC = 1;
584 pAd->CommonCfg.HtCapability.HtCapInfo.RxSTBC = 1;
585 pAd->CommonCfg.DesiredHtPhy.RxSTBC = 1;
587 pAd->CommonCfg.DesiredHtPhy.TxSTBC = 0;
588 pAd->CommonCfg.DesiredHtPhy.RxSTBC = 0;
592 pAd->CommonCfg.HtCapability.HtCapInfo.ShortGIfor20 = 1;
593 pAd->CommonCfg.HtCapability.HtCapInfo.ShortGIfor40 = 1;
594 pAd->CommonCfg.DesiredHtPhy.ShortGIfor20 = 1;
595 pAd->CommonCfg.DesiredHtPhy.ShortGIfor40 = 1;
597 pAd->CommonCfg.HtCapability.HtCapInfo.ShortGIfor20 = 0;
598 pAd->CommonCfg.HtCapability.HtCapInfo.ShortGIfor40 = 0;
599 pAd->CommonCfg.DesiredHtPhy.ShortGIfor20 = 0;
600 pAd->CommonCfg.DesiredHtPhy.ShortGIfor40 = 0;
604 pAd->CommonCfg.HtCapability.ExtHtCapInfo.MCSFeedback = MCSFBK_NONE; /*MCSFBK_UNSOLICIT; */
605 pAd->CommonCfg.AddHTInfo.ControlChan = pAd->CommonCfg.Channel;
609 if (pAd->CommonCfg.APEdcaParm.bValid == FALSE) {
610 pAd->CommonCfg.APEdcaParm.bValid = TRUE;
611 pAd->CommonCfg.APEdcaParm.Aifsn[0] = 3;
612 pAd->CommonCfg.APEdcaParm.Aifsn[1] = 7;
613 pAd->CommonCfg.APEdcaParm.Aifsn[2] = 1;
614 pAd->CommonCfg.APEdcaParm.Aifsn[3] = 1;
616 pAd->CommonCfg.APEdcaParm.Cwmin[0] = 4;
617 pAd->CommonCfg.APEdcaParm.Cwmin[1] = 4;
618 pAd->CommonCfg.APEdcaParm.Cwmin[2] = 3;
619 pAd->CommonCfg.APEdcaParm.Cwmin[3] = 2;
621 pAd->CommonCfg.APEdcaParm.Cwmax[0] = 6;
622 pAd->CommonCfg.APEdcaParm.Cwmax[1] = 10;
623 pAd->CommonCfg.APEdcaParm.Cwmax[2] = 4;
624 pAd->CommonCfg.APEdcaParm.Cwmax[3] = 3;
626 pAd->CommonCfg.APEdcaParm.Txop[0] = 0;
627 pAd->CommonCfg.APEdcaParm.Txop[1] = 0;
628 pAd->CommonCfg.APEdcaParm.Txop[2] = 94;
629 pAd->CommonCfg.APEdcaParm.Txop[3] = 47;
631 AsicSetEdcaParm(pAd, &pAd->CommonCfg.APEdcaParm);
634 RTMPSetIndividualHT(pAd, 0);
646 pAd - Pointer to our adapter
651 void RTMPSetIndividualHT(struct rt_rtmp_adapter *pAd, u8 apidx)
654 u8 TxStream = pAd->CommonCfg.TxStream;
659 pDesired_ht_phy = &pAd->StaCfg.DesiredHtPhyInfo;
661 pAd->StaCfg.DesiredTransmitSetting.field.MCS;
662 /*pAd->StaCfg.bAutoTxRateSwitch = (DesiredMcs == MCS_AUTO) ? TRUE : FALSE; */
685 if ((pAd->CommonCfg.DesiredHtPhy.ChannelWidth == BW_20)
737 if (pAd->CommonCfg.DesiredHtPhy.ChannelWidth == BW_40) {
742 if (pAd->OpMode == OPMODE_STA)
743 MlmeUpdateHtTxRates(pAd, BSS0);
745 MlmeUpdateHtTxRates(pAd, apidx);
793 void RTMPAddWcidAttributeEntry(struct rt_rtmp_adapter *pAd,
831 RTMP_IO_WRITE32(pAd, offset, WCIDAttri);
848 RTMP_IO_WRITE8(pAd, offset + 3, IVEIV);
851 RTUSBMultiWrite_OneByte(pAd, offset + 3, &IVEIV);
917 int SetCommonHT(struct rt_rtmp_adapter *pAd)
921 if (pAd->CommonCfg.PhyMode < PHY_11ABGN_MIXED)
924 SetHT.PhyMode = pAd->CommonCfg.PhyMode;
925 SetHT.TransmitNo = ((u8)pAd->Antenna.field.TxPath);
926 SetHT.HtMode = (u8)pAd->CommonCfg.RegTransmitSetting.field.HTMODE;
928 (u8)pAd->CommonCfg.RegTransmitSetting.field.EXTCHA;
930 SetHT.BW = (u8)pAd->CommonCfg.RegTransmitSetting.field.BW;
931 SetHT.STBC = (u8)pAd->CommonCfg.RegTransmitSetting.field.STBC;
932 SetHT.SHORTGI = (u8)pAd->CommonCfg.RegTransmitSetting.field.ShortGI;
934 RTMPSetHT(pAd, &SetHT);