Removed checkpatch.pl below warning WARNING: Missing a blank line after declarations Signed-off-by: Pushpendra Singh <pushpendra.singh@xxxxxxxxxxxxxxx> --- .../staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 1 + drivers/staging/rtl8188eu/hal/hal_intf.c | 2 ++ drivers/staging/rtl8188eu/hal/odm.c | 3 +++ drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 1 + drivers/staging/rtl8188eu/hal/phy.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 ++ drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 3 ++- drivers/staging/rtl8188eu/hal/usb_halinit.c | 22 +++++++++++++++++++--- 9 files changed, 32 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c index b5e5c93..4a0504d 100644 --- a/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c +++ b/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c @@ -538,6 +538,7 @@ int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u8 macid) struct odm_ra_info *pRaInfo = &dm_odm->RAInfo[macid]; u8 WirelessMode = 0xFF; /* invalid value */ u8 max_rate_idx = 0x13; /* MCS7 */ + if (dm_odm->pWirelessMode != NULL) WirelessMode = *(dm_odm->pWirelessMode); diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 4bdbed2..5edb5c4 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -202,6 +202,7 @@ s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe) s32 rtw_hal_mgnt_xmit(struct adapter *adapt, struct xmit_frame *pmgntframe) { s32 ret = _FAIL; + if (adapt->HalFunc.mgnt_xmit) ret = adapt->HalFunc.mgnt_xmit(adapt, pmgntframe); return ret; @@ -236,6 +237,7 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) #ifdef CONFIG_88EU_AP_MODE struct sta_info *psta = NULL; struct sta_priv *pstapriv = &adapt->stapriv; + if ((mac_id-1) > 0) psta = pstapriv->sta_aid[(mac_id-1) - 1]; if (psta) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index d12eac4..25a4043 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -1042,6 +1042,7 @@ void odm_RefreshRateAdaptiveMaskCE(struct odm_dm_struct *pDM_Odm) for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { struct sta_info *pstat = pDM_Odm->pODM_StaInfo[i]; + if (IS_STA_VALID(pstat)) { if (ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, @@ -1107,6 +1108,7 @@ void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm) struct adapter *Adapter = pDM_Odm->Adapter; struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; + pdmpriv->bDynamicTxPowerEnable = false; pdmpriv->LastDTPLvl = TxHighPwrLevel_Normal; pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; @@ -1269,6 +1271,7 @@ void odm_HwAntDiv(struct odm_dm_struct *pDM_Odm) void ODM_EdcaTurboInit(struct odm_dm_struct *pDM_Odm) { struct adapter *Adapter = pDM_Odm->Adapter; + pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false; pDM_Odm->DM_EDCA_Table.bIsCurRDLState = false; Adapter->recvpriv.bIsAnyNonBEPkts = false; diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index fd7930f..57657aa 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -252,6 +252,7 @@ void rtl88eu_dm_ant_sel_statistics(struct odm_dm_struct *dm_odm, u8 antsel_tr_mux, u32 mac_id, u8 rx_pwdb_all) { struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable; + if (dm_odm->AntDivType == CG_TRX_HW_ANTDIV) { if (antsel_tr_mux == MAIN_ANT_CG_TRX) { dm_fat_tbl->MainAnt_Sum[mac_id] += rx_pwdb_all; diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 0a1a7d6..40aa0ab 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -1187,6 +1187,7 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], rFPGA0_XB_RFInterfaceOE, rFPGA0_RFMOD}; u32 retry_count = 9; + if (*(dm_odm->mp_mode) == 1) retry_count = 9; else diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index cf2609f..e8015ae 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -234,6 +234,7 @@ void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt) { u8 opmode, macid; u16 mst_rpt = le16_to_cpu(mstatus_rpt); + opmode = (u8)mst_rpt; macid = (u8)(mst_rpt >> 8); diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index c727a78..9318eb8 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -75,6 +75,7 @@ s32 iol_execute(struct adapter *padapter, u8 control) static s32 iol_InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy) { s32 rst = _SUCCESS; + iol_mode_enable(padapter, 1); usb_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy); rst = iol_execute(padapter, CMD_INIT_LLT); @@ -178,6 +179,7 @@ static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable { struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct odm_dm_struct *podmpriv = &pHalData->odmpriv; + switch (eVariable) { case HAL_ODM_STA_INFO: { diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index 594c1da..9defac8 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -39,8 +39,8 @@ static u8 urb_zero_packet_chk(struct adapter *adapt, int sz) { u8 set_tx_desc_offset; struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); - set_tx_desc_offset = (((sz + TXDESC_SIZE) % haldata->UsbBulkOutSize) == 0) ? 1 : 0; + set_tx_desc_offset = (((sz + TXDESC_SIZE) % haldata->UsbBulkOutSize) == 0) ? 1 : 0; return set_tx_desc_offset; } @@ -356,6 +356,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe) struct pkt_attrib *pattrib = &pxmitframe->attrib; struct xmit_priv *pxmitpriv = &adapt->xmitpriv; struct security_priv *psecuritypriv = &adapt->securitypriv; + if ((pxmitframe->frame_tag == DATA_FRAMETAG) && (pxmitframe->attrib.ether_type != 0x0806) && (pxmitframe->attrib.ether_type != 0x888e) && diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 5665a7d..78ebc77 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -104,6 +104,7 @@ static u32 rtl8188eu_InitPowerOn(struct adapter *adapt) u16 value16; /* HW Power on sequence */ struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); + if (haldata->bMacPwrCtrlOn) return _SUCCESS; @@ -232,8 +233,8 @@ static void _InitNormalChipRegPriority(struct adapter *Adapter, u16 beQ, static void _InitNormalChipOneOutEpPriority(struct adapter *Adapter) { struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter); - u16 value = 0; + switch (haldata->OutEpQueueSel) { case TX_SELE_HQ: value = QUEUE_HIGH; @@ -350,8 +351,8 @@ static void _InitNetworkType(struct adapter *Adapter) static void _InitTransferPageSize(struct adapter *Adapter) { /* Tx page size is always 128. */ - u8 value8; + value8 = _PSRX(PBP_128) | _PSTX(PBP_128); usb_write8(Adapter, REG_PBP, value8); } @@ -1416,6 +1417,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) if (*((u8 *)val)) { /* under sitesurvey */ /* config RCR to receive different BSSID & not to receive data frame */ u32 v = usb_read32(Adapter, REG_RCR); + v &= ~(RCR_CBSSID_BCN); usb_write32(Adapter, REG_RCR, v); /* reject all data frame */ @@ -1444,6 +1446,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) } else { if (Adapter->in_cta_test) { u32 v = usb_read32(Adapter, REG_RCR); + v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/* RCR_ADF */ usb_write32(Adapter, REG_RCR, v); } else { @@ -1464,6 +1467,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) if (Adapter->in_cta_test) { u32 v = usb_read32(Adapter, REG_RCR); + v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/* RCR_ADF */ usb_write32(Adapter, REG_RCR, v); } else { @@ -1588,8 +1592,8 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) { u32 cmd; u32 *cam_val = (u32 *)val; - usb_write32(Adapter, WCAMI, cam_val[0]); + usb_write32(Adapter, WCAMI, cam_val[0]); cmd = CAM_POLLINIG | CAM_WRITE | cam_val[1]; usb_write32(Adapter, RWCAM, cmd); } @@ -1691,6 +1695,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) case HW_VAR_RXDMA_AGG_PG_TH: { u8 threshold = *((u8 *)val); + if (threshold == 0) threshold = haldata->UsbRxAggPageCount; usb_write8(Adapter, REG_RXDMA_AGG_PG_TH, threshold); @@ -1712,6 +1717,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) case HW_VAR_H2C_FW_JOINBSSRPT: { u8 mstatus = (*(u8 *)val); + rtl8188e_set_FwJoinBssReport_cmd(Adapter, mstatus); } break; @@ -1734,6 +1740,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) case HW_VAR_RPT_TIMER_SETTING: { u16 min_rpt_time = (*(u16 *)val); + ODM_RA_Set_TxRPT_Time(podmpriv, min_rpt_time); } break; @@ -1790,6 +1797,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) case HW_VAR_TX_RPT_MAX_MACID: { u8 maxMacid = *val; + DBG_88E("### MacID(%d),Set Max Tx RPT MID(%d)\n", maxMacid, maxMacid+1); usb_write8(Adapter, REG_TX_RPT_CTRL+1, maxMacid+1); } @@ -1836,6 +1844,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) val[0] = true; } else { u32 valRCR; + valRCR = usb_read32(Adapter, REG_RCR); valRCR &= 0x00070000; if (valRCR) @@ -1883,6 +1892,7 @@ GetHalDefVar8188EUsb( struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; struct sta_priv *pstapriv = &Adapter->stapriv; struct sta_info *psta; + psta = rtw_get_stainfo(pstapriv, pmlmepriv->cur_network.network.MacAddress); if (psta) *((int *)pValue) = psta->rssi_stat.UndecoratedSmoothedPWDB; @@ -1930,6 +1940,7 @@ GetHalDefVar8188EUsb( case HW_DEF_RA_INFO_DUMP: { u8 entry_id = *((u8 *)pValue); + if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)) { DBG_88E("============ RA status check ===================\n"); DBG_88E("Mac_id:%d , RateID = %d, RAUseRate = 0x%08x, RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n", @@ -1945,6 +1956,7 @@ GetHalDefVar8188EUsb( case HW_DEF_ODM_DBG_FLAG: { struct odm_dm_struct *dm_ocm = &(haldata->odmpriv); + pr_info("dm_ocm->DebugComponents = 0x%llx\n", dm_ocm->DebugComponents); } break; @@ -1982,6 +1994,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV DBG_88E("==> Disable all dynamic function...\n"); } else if (dm_func == 1) {/* disable DIG */ podmpriv->SupportAbility &= (~DYNAMIC_BB_DIG); + DBG_88E("==> Disable DIG...\n"); } else if (dm_func == 2) {/* disable High power */ podmpriv->SupportAbility &= (~DYNAMIC_BB_DYNAMIC_TXPWR); @@ -1993,6 +2006,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV } else if (dm_func == 6) {/* turn on all dynamic func */ if (!(podmpriv->SupportAbility & DYNAMIC_BB_DIG)) { struct rtw_dig *pDigTable = &podmpriv->DM_DigTable; + pDigTable->CurIGValue = usb_read8(Adapter, 0xc50); } podmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE; @@ -2010,6 +2024,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV { u8 bRSSIDump = *((u8 *)pValue); struct odm_dm_struct *dm_ocm = &(haldata->odmpriv); + if (bRSSIDump) dm_ocm->DebugComponents = ODM_COMP_DIG|ODM_COMP_FA_CNT; else @@ -2020,6 +2035,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV { u64 DebugComponents = *((u64 *)pValue); struct odm_dm_struct *dm_ocm = &(haldata->odmpriv); + dm_ocm->DebugComponents = DebugComponents; } break; -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel