Lines Matching refs:pAS_Info
363 *pAS_Info, in InsertNode()
371 if (pAS_Info->freeZones != NULL) { in InsertNode()
373 pNode = pAS_Info->freeZones; in InsertNode()
374 pAS_Info->freeZones = pNode->next_; in InsertNode()
377 pNode = &pAS_Info->MT2063_ExclZones[pAS_Info->nZones]; in InsertNode()
385 pNode->next_ = pAS_Info->usedZones; in InsertNode()
386 pAS_Info->usedZones = pNode; in InsertNode()
389 pAS_Info->nZones++; in InsertNode()
394 *pAS_Info, in RemoveNode()
408 pNodeToRemove->next_ = pAS_Info->freeZones; in RemoveNode()
409 pAS_Info->freeZones = pNodeToRemove; in RemoveNode()
412 pAS_Info->nZones--; in RemoveNode()
425 static void MT2063_AddExclZone(struct MT2063_AvoidSpursData_t *pAS_Info, in MT2063_AddExclZone() argument
428 struct MT2063_ExclZone_t *pNode = pAS_Info->usedZones; in MT2063_AddExclZone()
435 if ((f_max > (pAS_Info->f_if1_Center - (pAS_Info->f_if1_bw / 2))) in MT2063_AddExclZone()
436 && (f_min < (pAS_Info->f_if1_Center + (pAS_Info->f_if1_bw / 2))) in MT2063_AddExclZone()
459 pNode = InsertNode(pAS_Info, pPrev); in MT2063_AddExclZone()
470 pNext = RemoveNode(pAS_Info, pNode, pNext); in MT2063_AddExclZone()
479 static void MT2063_ResetExclZones(struct MT2063_AvoidSpursData_t *pAS_Info) in MT2063_ResetExclZones() argument
485 pAS_Info->nZones = 0; /* this clears the used list */ in MT2063_ResetExclZones()
486 pAS_Info->usedZones = NULL; /* reset ptr */ in MT2063_ResetExclZones()
487 pAS_Info->freeZones = NULL; /* reset ptr */ in MT2063_ResetExclZones()
490 pAS_Info->f_ref * in MT2063_ResetExclZones()
491 ((pAS_Info->f_if1_Center - pAS_Info->f_if1_bw / 2 + in MT2063_ResetExclZones()
492 pAS_Info->f_in) / pAS_Info->f_ref) - pAS_Info->f_in; in MT2063_ResetExclZones()
494 pAS_Info->f_if1_Center + pAS_Info->f_if1_bw / 2 + in MT2063_ResetExclZones()
495 pAS_Info->f_LO1_FracN_Avoid) { in MT2063_ResetExclZones()
497 MT2063_AddExclZone(pAS_Info, in MT2063_ResetExclZones()
498 center - pAS_Info->f_LO1_FracN_Avoid, in MT2063_ResetExclZones()
500 MT2063_AddExclZone(pAS_Info, center + 1, in MT2063_ResetExclZones()
501 center + pAS_Info->f_LO1_FracN_Avoid); in MT2063_ResetExclZones()
502 center += pAS_Info->f_ref; in MT2063_ResetExclZones()
506 pAS_Info->f_ref * in MT2063_ResetExclZones()
507 ((pAS_Info->f_if1_Center - pAS_Info->f_if1_bw / 2 - in MT2063_ResetExclZones()
508 pAS_Info->f_out) / pAS_Info->f_ref) + pAS_Info->f_out; in MT2063_ResetExclZones()
510 pAS_Info->f_if1_Center + pAS_Info->f_if1_bw / 2 + in MT2063_ResetExclZones()
511 pAS_Info->f_LO2_FracN_Avoid) { in MT2063_ResetExclZones()
513 MT2063_AddExclZone(pAS_Info, in MT2063_ResetExclZones()
514 center - pAS_Info->f_LO2_FracN_Avoid, in MT2063_ResetExclZones()
516 MT2063_AddExclZone(pAS_Info, center + 1, in MT2063_ResetExclZones()
517 center + pAS_Info->f_LO2_FracN_Avoid); in MT2063_ResetExclZones()
518 center += pAS_Info->f_ref; in MT2063_ResetExclZones()
521 if (MT2063_EXCLUDE_US_DECT_FREQUENCIES(pAS_Info->avoidDECT)) { in MT2063_ResetExclZones()
523 …MT2063_AddExclZone(pAS_Info, 1920836000 - pAS_Info->f_in, 1922236000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
524 …MT2063_AddExclZone(pAS_Info, 1922564000 - pAS_Info->f_in, 1923964000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
525 …MT2063_AddExclZone(pAS_Info, 1924292000 - pAS_Info->f_in, 1925692000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
526 …MT2063_AddExclZone(pAS_Info, 1926020000 - pAS_Info->f_in, 1927420000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
527 …MT2063_AddExclZone(pAS_Info, 1927748000 - pAS_Info->f_in, 1929148000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
530 if (MT2063_EXCLUDE_EURO_DECT_FREQUENCIES(pAS_Info->avoidDECT)) { in MT2063_ResetExclZones()
531 …MT2063_AddExclZone(pAS_Info, 1896644000 - pAS_Info->f_in, 1898044000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
532 …MT2063_AddExclZone(pAS_Info, 1894916000 - pAS_Info->f_in, 1896316000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
533 …MT2063_AddExclZone(pAS_Info, 1893188000 - pAS_Info->f_in, 1894588000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
534 …MT2063_AddExclZone(pAS_Info, 1891460000 - pAS_Info->f_in, 1892860000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
535 …MT2063_AddExclZone(pAS_Info, 1889732000 - pAS_Info->f_in, 1891132000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
536 …MT2063_AddExclZone(pAS_Info, 1888004000 - pAS_Info->f_in, 1889404000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
537 …MT2063_AddExclZone(pAS_Info, 1886276000 - pAS_Info->f_in, 1887676000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
538 …MT2063_AddExclZone(pAS_Info, 1884548000 - pAS_Info->f_in, 1885948000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
539 …MT2063_AddExclZone(pAS_Info, 1882820000 - pAS_Info->f_in, 1884220000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
540 …MT2063_AddExclZone(pAS_Info, 1881092000 - pAS_Info->f_in, 1882492000 - pAS_Info->f_in); /* Ctr = 1… in MT2063_ResetExclZones()
550 static u32 MT2063_ChooseFirstIF(struct MT2063_AvoidSpursData_t *pAS_Info) in MT2063_ChooseFirstIF() argument
561 pAS_Info->f_LO1_Step * in MT2063_ChooseFirstIF()
562 ((pAS_Info->f_if1_Request + pAS_Info->f_in + in MT2063_ChooseFirstIF()
563 pAS_Info->f_LO1_Step / 2) / pAS_Info->f_LO1_Step) - in MT2063_ChooseFirstIF()
564 pAS_Info->f_in; in MT2063_ChooseFirstIF()
566 (pAS_Info->f_LO1_Step > in MT2063_ChooseFirstIF()
567 pAS_Info->f_LO2_Step) ? pAS_Info->f_LO1_Step : pAS_Info-> in MT2063_ChooseFirstIF()
576 struct MT2063_ExclZone_t *pNode = pAS_Info->usedZones; in MT2063_ChooseFirstIF()
581 if (pAS_Info->nZones == 0) in MT2063_ChooseFirstIF()
588 if (pAS_Info->f_if1_Center > f_Desired) in MT2063_ChooseFirstIF()
592 ((pAS_Info->f_if1_Center - f_Desired + in MT2063_ChooseFirstIF()
598 ((f_Desired - pAS_Info->f_if1_Center + in MT2063_ChooseFirstIF()
678 static u32 IsSpurInBand(struct MT2063_AvoidSpursData_t *pAS_Info, in IsSpurInBand() argument
685 const u32 f_LO1 = pAS_Info->f_LO1; in IsSpurInBand()
686 const u32 f_LO2 = pAS_Info->f_LO2; in IsSpurInBand()
687 const u32 d = pAS_Info->f_out + pAS_Info->f_out_bw / 2; in IsSpurInBand()
688 const u32 c = d - pAS_Info->f_out_bw; in IsSpurInBand()
689 const u32 f = pAS_Info->f_zif_bw / 2; in IsSpurInBand()
690 const u32 f_Scale = (f_LO1 / (UINT_MAX / 2 / pAS_Info->maxH1)) + 1; in IsSpurInBand()
716 for (n = n0; n <= pAS_Info->maxH1; ++n) { in IsSpurInBand()
721 if (md >= pAS_Info->maxH1) in IsSpurInBand()
787 static u32 MT2063_AvoidSpurs(struct MT2063_AvoidSpursData_t *pAS_Info) in MT2063_AvoidSpurs() argument
791 pAS_Info->bSpurAvoided = 0; in MT2063_AvoidSpurs()
792 pAS_Info->nSpursFound = 0; in MT2063_AvoidSpurs()
796 if (pAS_Info->maxH1 == 0) in MT2063_AvoidSpurs()
810 pAS_Info->bSpurPresent = IsSpurInBand(pAS_Info, &fm, &fp); in MT2063_AvoidSpurs()
811 if (pAS_Info->bSpurPresent) { in MT2063_AvoidSpurs()
812 u32 zfIF1 = pAS_Info->f_LO1 - pAS_Info->f_in; /* current attempt at a 1st IF */ in MT2063_AvoidSpurs()
813 u32 zfLO1 = pAS_Info->f_LO1; /* current attempt at an LO1 freq */ in MT2063_AvoidSpurs()
814 u32 zfLO2 = pAS_Info->f_LO2; /* current attempt at an LO2 freq */ in MT2063_AvoidSpurs()
822 pAS_Info->nSpursFound++; in MT2063_AvoidSpurs()
825 MT2063_AddExclZone(pAS_Info, zfIF1 - fm, zfIF1 + fp); in MT2063_AvoidSpurs()
828 new_IF1 = MT2063_ChooseFirstIF(pAS_Info); in MT2063_AvoidSpurs()
831 pAS_Info->f_LO1 += (new_IF1 - zfIF1); in MT2063_AvoidSpurs()
832 pAS_Info->f_LO2 += (new_IF1 - zfIF1); in MT2063_AvoidSpurs()
834 pAS_Info->f_LO1 -= (zfIF1 - new_IF1); in MT2063_AvoidSpurs()
835 pAS_Info->f_LO2 -= (zfIF1 - new_IF1); in MT2063_AvoidSpurs()
839 if (zfIF1 > pAS_Info->f_if1_Center) in MT2063_AvoidSpurs()
840 delta_IF1 = zfIF1 - pAS_Info->f_if1_Center; in MT2063_AvoidSpurs()
842 delta_IF1 = pAS_Info->f_if1_Center - zfIF1; in MT2063_AvoidSpurs()
844 pAS_Info->bSpurPresent = IsSpurInBand(pAS_Info, &fm, &fp); in MT2063_AvoidSpurs()
849 } while ((2 * delta_IF1 + pAS_Info->f_out_bw <= pAS_Info->f_if1_bw) && pAS_Info->bSpurPresent); in MT2063_AvoidSpurs()
856 if (pAS_Info->bSpurPresent == 1) { in MT2063_AvoidSpurs()
858 pAS_Info->f_LO1 = zfLO1; in MT2063_AvoidSpurs()
859 pAS_Info->f_LO2 = zfLO2; in MT2063_AvoidSpurs()
861 pAS_Info->bSpurAvoided = 1; in MT2063_AvoidSpurs()
865 ((pAS_Info-> in MT2063_AvoidSpurs()