void ODM_ReadAndConfig_AGC_TAB_1T_8723A(struct dm_odm_t *pDM_Odm) { u32 hex; u32 i; u8 platform = 0x04; u8 interfaceValue = pDM_Odm->SupportInterface; u8 board = pDM_Odm->BoardType; u32 ArrayLen = sizeof(Array_AGC_TAB_1T_8723A)/sizeof(u32); u32 *Array = Array_AGC_TAB_1T_8723A; hex = board; hex += interfaceValue << 8; hex += platform << 16; hex += 0xFF000000; for (i = 0; i < ArrayLen; i += 2) { u32 v1 = Array[i]; u32 v2 = Array[i+1]; /* This (offset, data) pair meets the condition. */ if (v1 < 0xCDCDCDCD) { odm_ConfigBB_AGC_8723A(pDM_Odm, v1, bMaskDWord, v2); continue; } else { if (!CheckCondition(Array[i], hex)) { /* Discard the following (offset, data) pairs. */ READ_NEXT_PAIR(v1, v2, i); while (v2 != 0xDEAD && v2 != 0xCDEF && v2 != 0xCDCD && i < ArrayLen - 2) READ_NEXT_PAIR(v1, v2, i); i -= 2; /* prevent from for-loop += 2 */ } else { /* Configure matched pairs and skip to end of if-else. */ READ_NEXT_PAIR(v1, v2, i); while (v2 != 0xDEAD && v2 != 0xCDEF && v2 != 0xCDCD && i < ArrayLen - 2) { odm_ConfigBB_AGC_8723A(pDM_Odm, v1, bMaskDWord, v2); READ_NEXT_PAIR(v1, v2, i); } while (v2 != 0xDEAD && i < ArrayLen - 2) READ_NEXT_PAIR(v1, v2, i); } } } }
void ODM_ReadAndConfig_AGC_TAB_1T_8723A( IN PDM_ODM_T pDM_Odm ) { u4Byte hex = 0; u4Byte i = 0; u2Byte count = 0; pu4Byte ptr_array = NULL; u1Byte platform = pDM_Odm->SupportPlatform; u1Byte interface = pDM_Odm->SupportInterface; u1Byte board = pDM_Odm->BoardType; u4Byte ArrayLen = sizeof(Array_AGC_TAB_1T_8723A)/sizeof(u4Byte); pu4Byte Array = Array_AGC_TAB_1T_8723A; hex += board; hex += interface << 8; hex += platform << 16; hex += 0xFF000000; for (i = 0; i < ArrayLen; i += 2 ) { u4Byte v1 = Array[i]; u4Byte v2 = Array[i+1]; // This (offset, data) pair meets the condition. if ( v1 < 0xCDCDCDCD ) { odm_ConfigBB_AGC_8723A(pDM_Odm, v1, bMaskDWord, v2); continue; } else { // This line is the start line of branch. if ( !CheckCondition(Array[i], hex) ) { // Discard the following (offset, data) pairs. i += 2; v1 = Array[i]; v2 = Array[i+1]; while (v2 != 0xDEAD && v2 != 0xCDEF && v2 != 0xCDCD) { i += 2; v1 = Array[i]; v2 = Array[i+1]; } } } } }