drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c

Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c

File Facts

System
Linux kernel
Corpus path
drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c
Extension
.c
Size
17062 bytes
Lines
556
Domain
Driver Families
Bucket
drivers/staging
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (v1 < 0x40000000) {
			odm_ConfigRF_RadioA_8723B(pDM_Odm, v1, v2);
			continue;
		} else {
			/*  This line is the beginning of branch. */
			bool bMatched = true;
			u8  cCond  = (u8)((v1 & (BIT29|BIT28)) >> 28);

			if (cCond == COND_ELSE) { /*  ELSE, ENDIF */
				bMatched = true;
				READ_NEXT_PAIR(v1, v2, i);
			} else if (!CheckPositive(pDM_Odm, v1, v2)) {
				bMatched = false;
				READ_NEXT_PAIR(v1, v2, i);
				READ_NEXT_PAIR(v1, v2, i);
			} else {
				READ_NEXT_PAIR(v1, v2, i);
				bMatched = true;
				READ_NEXT_PAIR(v1, v2, i);
			}

			if (!bMatched) {
				/*
				 *  Condition isn't matched.
				 *  Discard the following (offset, data) pairs.
				 */
				while (v1 < 0x40000000 && 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. */
				while (v1 < 0x40000000 && i < ArrayLen-2) {
					odm_ConfigRF_RadioA_8723B(pDM_Odm, v1, v2);
					READ_NEXT_PAIR(v1, v2, i);
				}

				/*  Keeps reading until ENDIF. */
				cCond = (u8)((v1 & (BIT29|BIT28)) >> 28);
				while (cCond != COND_ENDIF && i < ArrayLen-2) {
					READ_NEXT_PAIR(v1, v2, i);
					cCond = (u8)((v1 & (BIT29|BIT28)) >> 28);
				}
			}
		}
	}
}

/******************************************************************************
 *                           TxPowerTrack_SDIO.TXT
 ******************************************************************************/

static u8 gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6, 6,  6,
	7,  7,  7, 8,  8,  9,  9, 10, 10, 11, 12, 13, 14, 15
};
static u8 gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 3, 3, 4, 5, 5,  6,  6,  7,  7,  8,  8,
	9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15
};
static u8 gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6,  6,  6,
	7,  7,  7,  8,  8,  9,  9, 10, 10, 11, 12, 13, 14, 15
};
static u8 gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 3, 3, 4, 5, 5,  6,  6,  7,  7,  8,  8,
	9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15
};
static u8 gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 3, 3, 4, 4, 5,  6,  6,  7,  7,  7,  8,
	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
};
static u8 gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6,  7,  7,
	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
};
static u8 gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 3, 3, 4, 4, 5,  6,  6,  7,  7,  7,  8,
	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
};
static u8 gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8723B[] = {
	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6,  7,  7,
	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
};

void ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct dm_odm_t *pDM_Odm)
{
	struct odm_rf_cal_t *pRFCalibrateInfo = &pDM_Odm->RFCalibrateInfo;

Annotation

Implementation Notes