1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
16 #include "odm_precomp.h"
17 #include "usb_ops_linux.h"
20 odm_ConfigRFReg_8723A(
21 struct dm_odm_t *pDM_Odm,
24 enum RF_RADIO_PATH RF_PATH,
30 } else if (Addr == 0xfd) {
32 } else if (Addr == 0xfc) {
34 } else if (Addr == 0xfb) {
36 } else if (Addr == 0xfa) {
38 } else if (Addr == 0xf9) {
41 ODM_SetRFReg(pDM_Odm, RF_PATH, RegAddr, bRFRegOffsetMask, Data);
42 /* Add 1us delay between BB/RF register setting. */
47 void odm_ConfigMAC_8723A(struct dm_odm_t *pDM_Odm, u32 addr, u8 data)
49 rtl8723au_write8(pDM_Odm->Adapter, addr, data);
50 ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
51 ("===> %s: [MAC_REG] %08X %08X\n", __func__, addr, data));
54 void odm_ConfigBB_AGC_8723A(struct dm_odm_t *pDM_Odm, u32 addr, u32 data)
56 rtl8723au_write32(pDM_Odm->Adapter, addr, data);
57 /* Add 1us delay between BB/RF register setting. */
60 ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
61 ("===> %s: [AGC_TAB] %08X %08X\n", __func__, addr, data));
65 odm_ConfigBB_PHY_8723A(struct dm_odm_t *pDM_Odm, u32 addr, u32 data)
69 else if (addr == 0xfd)
71 else if (addr == 0xfc)
73 else if (addr == 0xfb)
75 else if (addr == 0xfa)
77 else if (addr == 0xf9)
79 else if (addr == 0xa24)
80 pDM_Odm->RFCalibrateInfo.RegA24 = data;
81 rtl8723au_write32(pDM_Odm->Adapter, addr, data);
83 /* Add 1us delay between BB/RF register setting. */
86 ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
87 ("===> %s: [PHY_REG] %08X %08X\n", __func__, addr, data));