Skip to contentSkip to conversation

staging: r8188eu: Add files for new driver - part 14

DISCUSSION Dave Jones 1 participant 1 message Sep 5, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Dave Jones

author
#1 lore raw
Quoted 32 lines · Linux Kernel
Gitweb:     http://git.kernel.org/linus/;a=commit;h=615a4d12e55690269ce07e183553cb2752e1fa29
Commit:     615a4d12e55690269ce07e183553cb2752e1fa29
Parent:     7ef8ded0cfdb690e37581af85eea35fa67cdb38d
Author:     Larry Finger <[email protected]>
AuthorDate: Wed Aug 21 22:33:56 2013 -0500
Committer:  Greg Kroah-Hartman <[email protected]>
CommitDate: Thu Aug 22 10:20:01 2013 -0700
    staging: r8188eu: Add files for new driver - part 14
    
    This commit adds files hal/rtl8188e_hal_init.c, hal/rtl8188e_mp.c,
    hal/rtl8188e_phycfg.c, and hal/rtl8188e_rf6052.c.
(quoted diff) +19 -0
+void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent, bool AutoLoadFail)
+{
+	struct hal_data_8188e	*pHalData = GET_HAL_DATA(pAdapter);
+	struct registry_priv	*registry_par = &pAdapter->registrypriv;
+
+	if (!AutoLoadFail) {
+		/*  Antenna Diversity setting. */
+		if (registry_par->antdiv_cfg == 2) { /*  2:By EFUSE */
+			pHalData->AntDivCfg = (PROMContent[EEPROM_RF_BOARD_OPTION_88E]&0x18)>>3;
+			if (PROMContent[EEPROM_RF_BOARD_OPTION_88E] == 0xFF)
+				pHalData->AntDivCfg = (EEPROM_DEFAULT_BOARD_OPTION&0x18)>>3;;
+		} else {
+			pHalData->AntDivCfg = registry_par->antdiv_cfg;  /*  0:OFF , 1:ON, 2:By EFUSE */
+		}
+
+		if (registry_par->antdiv_type == 0) {
+			/* If TRxAntDivType is AUTO in advanced setting, use EFUSE value instead. */
+			pHalData->TRxAntDivType = PROMContent[EEPROM_RF_ANTENNA_OPT_88E];
+			if (pHalData->TRxAntDivType == 0xFF)

Review

Quoted 10 lines
(quoted diff) +10 -0
+				pHalData->TRxAntDivType = CG_TRX_HW_ANTDIV; /*  For 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) */
+		} else {
+			pHalData->TRxAntDivType = registry_par->antdiv_type;
+		}
+
+		if (pHalData->TRxAntDivType == CG_TRX_HW_ANTDIV || pHalData->TRxAntDivType == CGCS_RX_HW_ANTDIV)
+			pHalData->AntDivCfg = 1; /*  0xC1[3] is ignored. */
+	} else {
+		pHalData->AntDivCfg = 0;
+		pHalData->TRxAntDivType = pHalData->TRxAntDivType; /*  The value in the driver setting of device manager. */
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I suspect this should be setting itself to something more meaningful ? registry_par->antdiv_type maybe ?

What is 'device manager' in this context ?

Dave