diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 11:30:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 11:30:39 -0800 |
commit | 46f7b635569731ff81a3b72d1bcd4415b293b637 (patch) | |
tree | e97e5e28d1768bb281116d92292851758ea20024 /drivers/staging/rtl8723au | |
parent | 9682ec9692e5ac11c6caebd079324e727b19e7ce (diff) | |
parent | 533e80b1ea709577ec5cf73b8b566569bc711259 (diff) |
Merge tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging drivers patches from Greg KH:
"Here's the big staging driver tree update for 3.20-rc1.
Lots of little things in here, adding up to lots of overall cleanups.
The IIO driver updates are also in here as they cross the staging tree
boundry a lot. I2O has moved into staging as well, as a plan to drop
it from the tree eventually as that's a dead subsystem.
All of this has been in linux-next with no reported issues for a
while"
* tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (740 commits)
staging: lustre: lustre: libcfs: define symbols as static
staging: rtl8712: Do coding style cleanup
staging: lustre: make obd_updatemax_lock static
staging: rtl8188eu: core: switch with redundant cases
staging: rtl8188eu: odm: conditional setting with no effect
staging: rtl8188eu: odm: condition with no effect
staging: ft1000: fix braces warning
staging: sm7xxfb: fix remaining CamelCase
staging: sm7xxfb: fix CamelCase
staging: rtl8723au: multiple condition with no effect - if identical to else
staging: sm7xxfb: make smtc_scr_info static
staging/lustre/mdc: Initialize req in mdc_enqueue for !it case
staging/lustre/clio: Do not allow group locks with gid 0
staging/lustre/llite: don't add to page cache upon failure
staging/lustre/llite: Add exception entry check after radix_tree
staging/lustre/libcfs: protect kkuc_groups from write access
staging/lustre/fld: refer to MDT0 for fld lookup in some cases
staging/lustre/llite: Solve a race to access lli_has_smd in read case
staging/lustre/ptlrpc: hold rq_lock when modify rq_flags
staging/lustre/lnet: portal spreading rotor should be unsigned
...
Diffstat (limited to 'drivers/staging/rtl8723au')
22 files changed, 208 insertions, 608 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index e394d12c36b0..c6327c072918 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -456,8 +456,8 @@ static void update_bmc_sta(struct rtw_adapter *padapter) sizeof(struct stainfo_stats)); /* prepare for add_RATid23a */ - supportRateNum = rtw_get_rateset_len23a((u8*)&pcur_network->SupportedRates); - network_type = rtw_check_network_type23a((u8*)&pcur_network->SupportedRates, supportRateNum, 1); + supportRateNum = rtw_get_rateset_len23a((u8 *)&pcur_network->SupportedRates); + network_type = rtw_check_network_type23a((u8 *)&pcur_network->SupportedRates, supportRateNum, 1); memcpy(psta->bssrateset, &pcur_network->SupportedRates, supportRateNum); psta->bssratelen = supportRateNum; @@ -897,7 +897,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, pairwise_cipher = 0; psecuritypriv->wpa_group_cipher = 0; psecuritypriv->wpa_pairwise_cipher = 0; - for (p = ie; ;p += (ie_len + 2)) { + for (p = ie; ; p += (ie_len + 2)) { p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len, pbss_network->IELength - (ie_len + 2)); if ((p) && (!memcmp(p+2, RTW_WPA_OUI23A_TYPE, 4))) { @@ -924,7 +924,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, ie_len = 0; pmlmepriv->qos_option = 0; if (pregistrypriv->wmm_enable) { - for (p = ie; ;p += (ie_len + 2)) { + for (p = ie; ; p += (ie_len + 2)) { p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len, (pbss_network->IELength - (ie_len + 2))); @@ -1204,7 +1204,7 @@ static void update_bcn_p2p_ie(struct rtw_adapter *padapter) { } -static void update_bcn_vendor_spec_ie(struct rtw_adapter *padapter, u8*oui) +static void update_bcn_vendor_spec_ie(struct rtw_adapter *padapter, u8 *oui) { DBG_8723A("%s\n", __func__); diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 60e0ded8ae02..2447a56df838 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -245,11 +245,6 @@ exit: return res; } -void rtw_cmd_clr_isr23a(struct cmd_priv *pcmdpriv) -{ - pcmdpriv->cmd_done_cnt++; -} - void rtw_free_cmd_obj23a(struct cmd_obj *pcmd) { @@ -852,62 +847,6 @@ exit: return res; } -/* - * This is only ever called from on_action_spct23a_ch_switch () which isn't - * called from anywhere itself - */ -int rtw_set_ch_cmd23a(struct rtw_adapter *padapter, u8 ch, u8 bw, u8 ch_offset, - u8 enqueue) -{ - struct cmd_obj *pcmdobj; - struct set_ch_parm *set_ch_parm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - int res = _SUCCESS; - - DBG_8723A("%s(%s): ch:%u, bw:%u, ch_offset:%u\n", __func__, - padapter->pnetdev->name, ch, bw, ch_offset); - - /* check input parameter */ - - /* prepare cmd parameter */ - set_ch_parm = kzalloc(sizeof(*set_ch_parm), GFP_KERNEL); - if (!set_ch_parm) { - res = _FAIL; - goto exit; - } - set_ch_parm->ch = ch; - set_ch_parm->bw = bw; - set_ch_parm->ch_offset = ch_offset; - - if (enqueue) { - /* need enqueue, prepare cmd_obj and enqueue */ - pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (!pcmdobj) { - kfree(set_ch_parm); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(pcmdobj, set_ch_parm, - GEN_CMD_CODE(_SetChannel)); - res = rtw_enqueue_cmd23a(pcmdpriv, pcmdobj); - } else { - /* no need to enqueue, do the cmd hdl directly and - free cmd parameter */ - if (H2C_SUCCESS != set_ch_hdl23a(padapter, (u8 *)set_ch_parm)) - res = _FAIL; - - kfree(set_ch_parm); - } - - /* do something based on res... */ -exit: - - DBG_8723A("%s(%s): res:%u\n", __func__, padapter->pnetdev->name, res); - - return res; -} - static void traffic_status_watchdog(struct rtw_adapter *padapter) { u8 bEnterPS; diff --git a/drivers/staging/rtl8723au/core/rtw_efuse.c b/drivers/staging/rtl8723au/core/rtw_efuse.c index 81960e788f89..a6deddc02291 100644 --- a/drivers/staging/rtl8723au/core/rtw_efuse.c +++ b/drivers/staging/rtl8723au/core/rtw_efuse.c @@ -327,15 +327,9 @@ EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address) *---------------------------------------------------------------------------*/ void -EFUSE_Write1Byte( - struct rtw_adapter * Adapter, - u16 Address, - u8 Value); +EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value); void -EFUSE_Write1Byte( - struct rtw_adapter * Adapter, - u16 Address, - u8 Value) +EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value) { u8 Bytetemp = {0x00}; u8 temp = {0x00}; @@ -635,10 +629,7 @@ Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse) * *---------------------------------------------------------------------------*/ static void -efuse_ShadowRead1Byte( - struct rtw_adapter * pAdapter, - u16 Offset, - u8 *Value) +efuse_ShadowRead1Byte(struct rtw_adapter *pAdapter, u16 Offset, u8 *Value) { struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); @@ -647,10 +638,7 @@ efuse_ShadowRead1Byte( /* Read Two Bytes */ static void -efuse_ShadowRead2Byte( - struct rtw_adapter * pAdapter, - u16 Offset, - u16 *Value) +efuse_ShadowRead2Byte(struct rtw_adapter *pAdapter, u16 Offset, u16 *Value) { struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); @@ -660,10 +648,7 @@ efuse_ShadowRead2Byte( /* Read Four Bytes */ static void -efuse_ShadowRead4Byte( - struct rtw_adapter * pAdapter, - u16 Offset, - u32 *Value) +efuse_ShadowRead4Byte(struct rtw_adapter *pAdapter, u16 Offset, u32 *Value) { struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); @@ -722,11 +707,8 @@ void EFUSE_ShadowMapUpdate23a(struct rtw_adapter *pAdapter, u8 efuseType) * *---------------------------------------------------------------------------*/ void -EFUSE_ShadowRead23a( - struct rtw_adapter * pAdapter, - u8 Type, - u16 Offset, - u32 *Value) +EFUSE_ShadowRead23a(struct rtw_adapter *pAdapter, + u8 Type, u16 Offset, u32 *Value) { if (Type == 1) efuse_ShadowRead1Byte(pAdapter, Offset, (u8 *)Value); diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c index 7a5e6bf0d1ae..1c82dffcf596 100644 --- a/drivers/staging/rtl8723au/core/rtw_xmit.c +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c @@ -2372,12 +2372,3 @@ int rtw_ack_tx_wait23a(struct xmit_priv *pxmitpriv, u32 timeout_ms) return rtw_sctx_wait23a(pack_tx_ops); } -void rtw_ack_tx_done23a(struct xmit_priv *pxmitpriv, int status) -{ - struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops; - - if (pxmitpriv->ack_tx) - rtw23a_sctx_done_err(&pack_tx_ops, status); - else - DBG_8723A("%s ack_tx not set\n", __func__); -} diff --git a/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c b/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c index 1da4eece6f9a..33777d2852f4 100644 --- a/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c +++ b/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c @@ -47,11 +47,11 @@ u8 HalPwrSeqCmdParsing23a(struct rtw_adapter *padapter, u8 CutVersion, u8 FabVersion, u8 InterfaceType, struct wlan_pwr_cfg PwrSeqCmd[]) { - struct wlan_pwr_cfg PwrCfgCmd = { 0 }; - u8 bPollingBit = false; + struct wlan_pwr_cfg PwrCfgCmd; + u8 bPollingBit; u32 AryIdx = 0; - u8 value = 0; - u32 offset = 0; + u8 value; + u32 offset; u32 pollingCount = 0; /* polling autoload done. */ u32 maxPollingCnt = 5000; diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index 1c0f106d5996..5269b46445f4 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -187,24 +187,13 @@ void odm23a_DynBBPSInit(struct dm_odm_t *pDM_Odm); void odm_DynamicBBPowerSaving23a(struct dm_odm_t *pDM_Odm); -void odm_1R_CCA23a(struct dm_odm_t *pDM_Odm); /* END---------BB POWER SAVE----------------------- */ -void odm_RefreshRateAdaptiveMask23aMP23a(struct dm_odm_t *pDM_Odm); - void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm); -void odm_RefreshRateAdaptiveMask23aAPADSL23a(struct dm_odm_t *pDM_Odm); - void odm_DynamicTxPower23aInit(struct dm_odm_t *pDM_Odm); -void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm); - -void odm_RSSIMonitorCheck23aMP(struct dm_odm_t *pDM_Odm); - void odm_RSSIMonitorCheck23aCE(struct dm_odm_t *pDM_Odm); -void odm_RSSIMonitorCheck23aAP(struct dm_odm_t *pDM_Odm); - void odm_RSSIMonitorCheck23a(struct dm_odm_t *pDM_Odm); void odm_DynamicTxPower23a(struct dm_odm_t *pDM_Odm); @@ -212,16 +201,12 @@ void odm_RefreshRateAdaptiveMask23a(struct dm_odm_t *pDM_Odm); void ODM_TXPowerTrackingCheck23a(struct dm_odm_t *pDM_Odm); -void odm_TXPowerTrackingCheckAP(struct dm_odm_t *pDM_Odm); - void odm_RateAdaptiveMaskInit23a(struct dm_odm_t *pDM_Odm); void odm_TXPowerTrackingThermalMeterInit23a(struct dm_odm_t *pDM_Odm); void odm_TXPowerTrackingInit23a(struct dm_odm_t *pDM_Odm); -void odm_TXPowerTrackingCheckMP(struct dm_odm_t *pDM_Odm); - void odm_TXPowerTrackingCheckCE23a(struct dm_odm_t *pDM_Odm); static void odm_EdcaTurboCheck23a(struct dm_odm_t *pDM_Odm); @@ -946,47 +931,13 @@ void odm_DynamicBBPowerSaving23a(struct dm_odm_t *pDM_Odm) return; } -void odm_1R_CCA23a(struct dm_odm_t *pDM_Odm) -{ - struct dynamic_pwr_sav *pDM_PSTable = &pDM_Odm->DM_PSTable; - - if (pDM_Odm->RSSI_Min != 0xFF) { - if (pDM_PSTable->PreCCAState == CCA_2R) { - if (pDM_Odm->RSSI_Min >= 35) - pDM_PSTable->CurCCAState = CCA_1R; - else - pDM_PSTable->CurCCAState = CCA_2R; - } else { - if (pDM_Odm->RSSI_Min <= 30) - pDM_PSTable->CurCCAState = CCA_2R; - else - pDM_PSTable->CurCCAState = CCA_1R; - } - } else { - pDM_PSTable->CurCCAState = CCA_MAX; - } - - if (pDM_PSTable->PreCCAState != pDM_PSTable->CurCCAState) { - if (pDM_PSTable->CurCCAState == CCA_1R) { - if (pDM_Odm->RFType == ODM_2T2R) - ODM_SetBBReg(pDM_Odm, 0xc04, bMaskByte0, 0x13); - else - ODM_SetBBReg(pDM_Odm, 0xc04, bMaskByte0, 0x23); - } else { - ODM_SetBBReg(pDM_Odm, 0xc04, bMaskByte0, 0x33); - /* PHY_SetBBReg(pAdapter, 0xe70, bMaskByte3, 0x63); */ - } - pDM_PSTable->PreCCAState = pDM_PSTable->CurCCAState; - } -} - void ODM_RF_Saving23a(struct dm_odm_t *pDM_Odm, u8 bForceInNormal) { struct dynamic_pwr_sav *pDM_PSTable = &pDM_Odm->DM_PSTable; - u8 Rssi_Up_bound = 30 ; + u8 Rssi_Up_bound = 30; u8 Rssi_Low_bound = 25; if (pDM_Odm->PatchID == 40) { /* RT_CID_819x_FUNAI_TV */ - Rssi_Up_bound = 50 ; + Rssi_Up_bound = 50; Rssi_Low_bound = 45; } if (pDM_PSTable->initialize == 0) { @@ -1177,10 +1128,6 @@ void odm_RefreshRateAdaptiveMask23a(struct dm_odm_t *pDM_Odm) odm_RefreshRateAdaptiveMask23aCE23a(pDM_Odm); } -void odm_RefreshRateAdaptiveMask23aMP23a(struct dm_odm_t *pDM_Odm) -{ -} - void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm) { u8 i; @@ -1216,10 +1163,6 @@ void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm) } -void odm_RefreshRateAdaptiveMask23aAPADSL23a(struct dm_odm_t *pDM_Odm) -{ -} - /* Return Value: bool */ /* - true: RATRState is changed. */ bool ODM_RAStateCheck23a(struct dm_odm_t *pDM_Odm, s32 RSSI, bool bForceUpdate, @@ -1284,14 +1227,6 @@ void odm_DynamicTxPower23aInit(struct dm_odm_t *pDM_Odm) pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; } -/* 3 ============================================================ */ -/* 3 RSSI Monitor */ -/* 3 ============================================================ */ - -void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm) -{ -} - void odm_RSSIMonitorCheck23a(struct dm_odm_t *pDM_Odm) { /* For AP/ADSL use struct rtl8723a_priv * */ @@ -1306,10 +1241,6 @@ void odm_RSSIMonitorCheck23a(struct dm_odm_t *pDM_Odm) odm_RSSIMonitorCheck23aCE(pDM_Odm); } /* odm_RSSIMonitorCheck23a */ -void odm_RSSIMonitorCheck23aMP(struct dm_odm_t *pDM_Odm) -{ -} - static void FindMinimumRSSI( struct rtw_adapter *pAdapter @@ -1378,10 +1309,6 @@ void odm_RSSIMonitorCheck23aCE(struct dm_odm_t *pDM_Odm) ODM_CmnInfoUpdate23a(&pHalData->odmpriv, ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); } -void odm_RSSIMonitorCheck23aAP(struct dm_odm_t *pDM_Odm) -{ -} - /* endif */ /* 3 ============================================================ */ /* 3 Tx Power Tracking */ @@ -1422,19 +1349,12 @@ void odm_TXPowerTrackingCheckCE23a(struct dm_odm_t *pDM_Odm) { } -void odm_TXPowerTrackingCheckMP(struct dm_odm_t *pDM_Odm) -{ -} - -void odm_TXPowerTrackingCheckAP(struct dm_odm_t *pDM_Odm) -{ -} - /* EDCA Turbo */ static void ODM_EdcaTurboInit23a(struct dm_odm_t *pDM_Odm) { struct rtw_adapter *Adapter = pDM_Odm->Adapter; + pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false; pDM_Odm->DM_EDCA_Table.bIsCurRDLState = false; Adapter->recvpriv.bIsAnyNonBEPkts = false; @@ -1591,6 +1511,7 @@ ConvertTo_dB23a( void ODM_SingleDualAntennaDefaultSetting(struct dm_odm_t *pDM_Odm) { struct sw_ant_sw *pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table; + pDM_SWAT_Table->ANTA_ON = true; pDM_SWAT_Table->ANTB_ON = true; } diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c b/drivers/staging/rtl8723au/hal/odm_HWConfig.c index fb3cc872f205..33aafa01f900 100644 --- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c @@ -113,7 +113,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct dm_odm_t *pDM_Odm, cck_highpwr = pDM_Odm->bCckHighPower; - cck_agc_rpt = pPhyStaRpt->cck_agc_rpt_ofdm_cfosho_a ; + cck_agc_rpt = pPhyStaRpt->cck_agc_rpt_ofdm_cfosho_a; /* The RSSI formula should be modified according to the gain table */ if (!cck_highpwr) { @@ -138,16 +138,16 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct dm_odm_t *pDM_Odm, report = (cck_agc_rpt & 0x60)>>5; switch (report) { case 0x3: - rx_pwr_all = -46 - ((cck_agc_rpt & 0x1f)<<1) ; + rx_pwr_all = -46 - ((cck_agc_rpt & 0x1f)<<1); break; case 0x2: rx_pwr_all = -26 - ((cck_agc_rpt & 0x1f)<<1); break; case 0x1: - rx_pwr_all = -12 - ((cck_agc_rpt & 0x1f)<<1) ; + rx_pwr_all = -12 - ((cck_agc_rpt & 0x1f)<<1); break; case 0x0: - rx_pwr_all = 16 - ((cck_agc_rpt & 0x1f)<<1) ; + rx_pwr_all = 16 - ((cck_agc_rpt & 0x1f)<<1); break; } } diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index 86a83975f4f0..73cfddd6df9a 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -7255,63 +7255,19 @@ btdm_2AntTdmaDurationAdjust(struct rtw_adapter *padapter, u8 bScoHid, RTPRINT(FBT, BT_TRACE, ("[BTCoex], first run TdmaDurationAdjust()!!\n")); if (bScoHid) { if (bTxPause) { - if (maxInterval == 1) { - btdm_2AntPsTdma(padapter, true, 15); - pBtdm8723->psTdmaDuAdjType = 15; - } else if (maxInterval == 2) { - btdm_2AntPsTdma(padapter, true, 15); - pBtdm8723->psTdmaDuAdjType = 15; - } else if (maxInterval == 3) { - btdm_2AntPsTdma(padapter, true, 15); - pBtdm8723->psTdmaDuAdjType = 15; - } else { - btdm_2AntPsTdma(padapter, true, 15); - pBtdm8723->psTdmaDuAdjType = 15; - } + btdm_2AntPsTdma(padapter, true, 15); + pBtdm8723->psTdmaDuAdjType = 15; } else { - if (maxInterval == 1) { - btdm_2AntPsTdma(padapter, true, 11); - pBtdm8723->psTdmaDuAdjType = 11; - } else if (maxInterval == 2) { - btdm_2AntPsTdma(padapter, true, 11); - pBtdm8723->psTdmaDuAdjType = 11; - } else if (maxInterval == 3) { - btdm_2AntPsTdma(padapter, true, 11); - pBtdm8723->psTdmaDuAdjType = 11; - } else { - btdm_2AntPsTdma(padapter, true, 11); - pBtdm8723->psTdmaDuAdjType = 11; - } + btdm_2AntPsTdma(padapter, true, 11); + pBtdm8723->psTdmaDuAdjType = 11; } } else { if (bTxPause) { - if (maxInterval == 1) { - btdm_2AntPsTdma(padapter, true, 7); - pBtdm8723->psTdmaDuAdjType = 7; - } else if (maxInterval == 2) { - btdm_2AntPsTdma(padapter, true, 7); - pBtdm8723->psTdmaDuAdjType = 7; - } else if (maxInterval == 3) { - btdm_2AntPsTdma(padapter, true, 7); - pBtdm8723->psTdmaDuAdjType = 7; - } else { - btdm_2AntPsTdma(padapter, true, 7); - pBtdm8723->psTdmaDuAdjType = 7; - } + btdm_2AntPsTdma(padapter, true, 7); + pBtdm8723->psTdmaDuAdjType = 7; } else { - if (maxInterval == 1) { - btdm_2AntPsTdma(padapter, true, 3); - pBtdm8723->psTdmaDuAdjType = 3; - } else if (maxInterval == 2) { - btdm_2AntPsTdma(padapter, true, 3); - pBtdm8723->psTdmaDuAdjType = 3; - } else if (maxInterval == 3) { - btdm_2AntPsTdma(padapter, true, 3); - pBtdm8723->psTdmaDuAdjType = 3; - } else { - btdm_2AntPsTdma(padapter, true, 3); - pBtdm8723->psTdmaDuAdjType = 3; - } + btdm_2AntPsTdma(padapter, true, 3); + pBtdm8723->psTdmaDuAdjType = 3; } } up = 0; @@ -9145,7 +9101,7 @@ u32 BTDM_BtTxRxCounterL(struct rtw_adapter *padapter) u32 counters = 0; counters = pHalData->bt_coexist.halCoex8723.lowPriorityTx+ - pHalData->bt_coexist.halCoex8723.lowPriorityRx ; + pHalData->bt_coexist.halCoex8723.lowPriorityRx; return counters; } diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c index 88e91cd8ebb9..19dc5e3b2e2e 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c @@ -698,7 +698,7 @@ storePwrIndexDiffRateOffset(struct rtw_adapter *Adapter, u32 RegAddr, * 11/10/2008 tynli Modify to mew files. *---------------------------------------------------------------------------*/ static int -phy_ConfigBBWithPgHeaderFile(struct rtw_adapter *Adapter, u8 ConfigType) +phy_ConfigBBWithPgHeaderFile(struct rtw_adapter *Adapter) { int i; u32 *Rtl819XPHY_REGArray_Table_PG; @@ -707,17 +707,15 @@ phy_ConfigBBWithPgHeaderFile(struct rtw_adapter *Adapter, u8 ConfigType) PHY_REGArrayPGLen = Rtl8723_PHY_REG_Array_PGLength; Rtl819XPHY_REGArray_Table_PG = (u32 *)Rtl8723_PHY_REG_Array_PG; - if (ConfigType == BaseBand_Config_PHY_REG) { - for (i = 0; i < PHY_REGArrayPGLen; i = i + 3) { - storePwrIndexDiffRateOffset(Adapter, - Rtl819XPHY_REGArray_Table_PG[i], - Rtl819XPHY_REGArray_Table_PG[i+1], - Rtl819XPHY_REGArray_Table_PG[i+2]); - } + for (i = 0; i < PHY_REGArrayPGLen; i = i + 3) { + storePwrIndexDiffRateOffset(Adapter, + Rtl819XPHY_REGArray_Table_PG[i], + Rtl819XPHY_REGArray_Table_PG[i+1], + Rtl819XPHY_REGArray_Table_PG[i+2]); } return _SUCCESS; -} /* phy_ConfigBBWithPgHeaderFile */ +} static void phy_BB8192C_Config_1T(struct rtw_adapter *Adapter) @@ -768,8 +766,7 @@ phy_BB8723a_Config_ParaFile(struct rtw_adapter *Adapter) if (pEEPROM->bautoload_fail_flag == false) { pHalData->pwrGroupCnt = 0; - rtStatus = phy_ConfigBBWithPgHeaderFile(Adapter, - BaseBand_Config_PHY_REG); + rtStatus = phy_ConfigBBWithPgHeaderFile(Adapter); } if (rtStatus != _SUCCESS) @@ -923,9 +920,6 @@ _PHY_SetBWMode23a92C(struct rtw_adapter *Adapter) u8 regBwOpMode; u8 regRRSR_RSC; - if (pHalData->rf_chip == RF_PSEUDO_11N) - return; - /* There is no 40MHz mode in RF_8225. */ if (pHalData->rf_chip == RF_8225) return; @@ -1021,10 +1015,6 @@ _PHY_SetBWMode23a92C(struct rtw_adapter *Adapter) /* PHY_SetRF8258Bandwidth(); */ break; - case RF_PSEUDO_11N: - /* Do Nothing */ - break; - case RF_6052: rtl8723a_phy_rf6052set_bw(Adapter, pHalData->CurrentChannelBW); break; @@ -1074,7 +1064,7 @@ PHY_SetBWMode23a8723A(struct rtw_adapter *Adapter, static void _PHY_SwChnl8723A(struct rtw_adapter *Adapter, u8 channel) { - u8 eRFPath; + enum RF_RADIO_PATH eRFPath; u32 param1, param2; struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); @@ -1088,7 +1078,7 @@ static void _PHY_SwChnl8723A(struct rtw_adapter *Adapter, u8 channel) for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++) { pHalData->RfRegChnlVal[eRFPath] = (pHalData->RfRegChnlVal[eRFPath] & 0xfffffc00) | param2; - PHY_SetRFReg(Adapter, (enum RF_RADIO_PATH)eRFPath, param1, + PHY_SetRFReg(Adapter, eRFPath, param1, bRFRegOffsetMask, pHalData->RfRegChnlVal[eRFPath]); } @@ -1101,11 +1091,6 @@ void PHY_SwChnl8723A(struct rtw_adapter *Adapter, u8 channel) u8 tmpchannel = pHalData->CurrentChannel; bool result = true; - if (pHalData->rf_chip == RF_PSEUDO_11N) { - /* return immediately if it is peudo-phy */ - return; - } - if (channel == 0) channel = 1; diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c b/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c index 6070510bb470..1759487329ab 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c +++ b/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c @@ -79,7 +79,7 @@ static void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxd } } -static void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw) +static void fill_txdesc_vcs(struct pkt_attrib *pattrib, __le32 *pdw) { /* DBG_8723A("cvs_mode =%d\n", pattrib->vcs_mode); */ @@ -114,7 +114,7 @@ static void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw) } } -static void fill_txdesc_phy(struct pkt_attrib *pattrib, u32 *pdw) +static void fill_txdesc_phy(struct pkt_attrib *pattrib, __le32 *pdw) { if (pattrib->ht_en) { *pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40) ? cpu_to_le32(BIT(25)) : 0; diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index febe5cedef8f..adbf1c2dd383 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -625,10 +625,10 @@ int rtl8723au_hal_init(struct rtw_adapter *Adapter) } /* reducing 80M spur */ - PHY_SetBBReg(Adapter, RF_T_METER, bMaskDWord, 0x0381808d); - PHY_SetBBReg(Adapter, RF_SYN_G4, bMaskDWord, 0xf2ffff83); - PHY_SetBBReg(Adapter, RF_SYN_G4, bMaskDWord, 0xf2ffff82); - PHY_SetBBReg(Adapter, RF_SYN_G4, bMaskDWord, 0xf2ffff83); + PHY_SetBBReg(Adapter, REG_AFE_XTAL_CTRL, bMaskDWord, 0x0381808d); + PHY_SetBBReg(Adapter, REG_AFE_PLL_CTRL, bMaskDWord, 0xf0ffff83); + PHY_SetBBReg(Adapter, REG_AFE_PLL_CTRL, bMaskDWord, 0xf0ffff82); + PHY_SetBBReg(Adapter, REG_AFE_PLL_CTRL, bMaskDWord, 0xf0ffff83); /* RFSW Control */ PHY_SetBBReg(Adapter, rFPGA0_TxInfo, bMaskDWord, 0x00000003); /* 0x804[14]= 0 */ @@ -640,8 +640,10 @@ int rtl8723au_hal_init(struct rtw_adapter *Adapter) /* */ /* Joseph Note: Keep RfRegChnlVal for later use. */ /* */ - pHalData->RfRegChnlVal[0] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)0, RF_CHNLBW, bRFRegOffsetMask); - pHalData->RfRegChnlVal[1] = PHY_QueryRFReg(Adapter, (enum RF_RADIO_PATH)1, RF_CHNLBW, bRFRegOffsetMask); + pHalData->RfRegChnlVal[0] = PHY_QueryRFReg(Adapter, RF_PATH_A, + RF_CHNLBW, bRFRegOffsetMask); + pHalData->RfRegChnlVal[1] = PHY_QueryRFReg(Adapter, RF_PATH_B, + RF_CHNLBW, bRFRegOffsetMask); if (!mac_on) { _InitQueueReservedPage(Adapter); diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h index 688f20412bca..2247d9874719 100644 --- a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h +++ b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h @@ -17,46 +17,9 @@ #define __INC_HAL8723PHYCFG_H__ /*--------------------------Define Parameters-------------------------------*/ -#define LOOP_LIMIT 5 -#define MAX_STALL_TIME 50 /* us */ -#define AntennaDiversityValue 0x80 -#define MAX_TXPWR_IDX_NMODE_92S 63 -#define Reset_Cnt_Limit 3 - - #define MAX_AGGR_NUM 0x0909 -/*--------------------------Define Parameters-------------------------------*/ - - /*------------------------------Define structure----------------------------*/ -enum swchnlcmdid { - CmdID_End, - CmdID_SetTxPowerLevel, - CmdID_BBRegWrite10, - CmdID_WritePortUlong, - CmdID_WritePortUshort, - CmdID_WritePortUchar, - CmdID_RF_WriteReg, -}; - - -/* 1. Switch channel related */ -struct swchnlcmd { - enum swchnlcmdid CmdID; - u32 Para1; - u32 Para2; - u32 msDelay; -}; - -enum HW90_BLOCK { - HW90_BLOCK_MAC = 0, - HW90_BLOCK_PHY0 = 1, - HW90_BLOCK_PHY1 = 2, - HW90_BLOCK_RF = 3, - HW90_BLOCK_MAXIMUM = 4, /* Never use this */ -}; - enum RF_RADIO_PATH { RF_PATH_A = 0, /* Radio Path A */ RF_PATH_B = 1, /* Radio Path B */ @@ -64,7 +27,6 @@ enum RF_RADIO_PATH { }; #define CHANNEL_MAX_NUMBER 14 /* 14 is the max channel number */ -#define CHANNEL_GROUP_MAX 3 /* ch1~3, ch4~9, ch10~14 total three groups */ enum WIRELESS_MODE { WIRELESS_MODE_UNKNOWN = 0x00, @@ -77,22 +39,6 @@ enum WIRELESS_MODE { WIRELESS_MODE_AC = BIT(6) }; -enum baseband_config_type { - BaseBand_Config_PHY_REG = 0, /* Radio Path A */ - BaseBand_Config_AGC_TAB = 1, /* Radio Path B */ -}; - -enum ra_offset_area { - RA_OFFSET_LEGACY_OFDM1, - RA_OFFSET_LEGACY_OFDM2, - RA_OFFSET_HT_OFDM1, - RA_OFFSET_HT_OFDM2, - RA_OFFSET_HT_OFDM3, - RA_OFFSET_HT_OFDM4, - RA_OFFSET_HT_CCK, -}; - - /* BB/RF related */ enum rf_type_8190p { RF_TYPE_MIN, /* 0 */ @@ -100,7 +46,6 @@ enum rf_type_8190p { RF_8256 = 2, /* 2 11b/g/n */ RF_8258 = 3, /* 3 11a/b/g/n RF */ RF_6052 = 4, /* 4 11b/g/n RF */ - RF_PSEUDO_11N = 5, /* 5, It is a temporality RF. */ }; struct bb_reg_define { diff --git a/drivers/staging/rtl8723au/include/Hal8723PwrSeq.h b/drivers/staging/rtl8723au/include/Hal8723PwrSeq.h index 4a1f58f2982c..3771d6bb5774 100644 --- a/drivers/staging/rtl8723au/include/Hal8723PwrSeq.h +++ b/drivers/staging/rtl8723au/include/Hal8723PwrSeq.h @@ -39,10 +39,10 @@ * { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here */ #define RTL8723A_TRANS_CARDEMU_TO_ACT \ - {0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), BIT(0)}, /*0x20[0] = 1b'1 enable LDOA12 MACRO block for all interface*/ \ - {0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0}, /*0x67[0] = 0 to disable BT_GPS_SEL pins*/ \ - {0x0001, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_DELAY, 1, PWRSEQ_DELAY_MS},/*Delay 1ms*/ \ - {0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(5), 0}, /*0x00[5] = 1b'0 release analog Ips to digital , 1:isolation*/ \ + {0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), BIT(0)}, /*0x20[0] = 1b'1 enable LDOA12 MACRO block for all interface*/ \ + {0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0}, /*0x67[0] = 0 to disable BT_GPS_SEL pins*/ \ + {0x0001, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_DELAY, 1, PWRSEQ_DELAY_MS},/*Delay 1ms*/ \ + {0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(5), 0}, /*0x00[5] = 1b'0 release anal |