drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c

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

File Facts

System
Linux kernel
Corpus path
drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c
Extension
.c
Size
6011 bytes
Lines
238
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_ConfigMAC_8723B(pDM_Odm, v1, (u8)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_ConfigMAC_8723B(pDM_Odm, v1, (u8)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);
				}
			}
		}
	}
}

Annotation

Implementation Notes