mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2025-10-13 12:26:02 +01:00
rtl8723ds: Clean up some Coverity and Smatch warnings
The includes turning CONGIG_MP_INCLUDED off. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
a638cc8639
commit
1a8f8b1557
2
Makefile
2
Makefile
@ -44,7 +44,7 @@ CONFIG_USB_HCI = n
|
||||
CONFIG_SDIO_HCI = y
|
||||
CONFIG_GSPI_HCI = n
|
||||
########################## Features ###########################
|
||||
CONFIG_MP_INCLUDED = y
|
||||
CONFIG_MP_INCLUDED = n
|
||||
CONFIG_POWER_SAVING = y
|
||||
CONFIG_USB_AUTOSUSPEND = n
|
||||
CONFIG_HW_PWRP_DETECTION = n
|
||||
|
@ -1929,12 +1929,12 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
|
||||
if(pbss_network->Configuration.DSConfig <= 14 && padapter->registrypriv.wifi_spec == 1) {
|
||||
uint len = 0;
|
||||
uint lena = 0;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
SET_EXT_CAPABILITY_ELE_BSS_COEXIST(pmlmepriv->ext_capab_ie_data, 1);
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
pmlmepriv->ext_capab_ie_len = 10;
|
||||
rtw_set_ie(pbss_network->IEs + pbss_network->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &len);
|
||||
rtw_set_ie(pbss_network->IEs + pbss_network->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &lena);
|
||||
pbss_network->IELength += pmlmepriv->ext_capab_ie_len;
|
||||
}
|
||||
|
||||
@ -3904,7 +3904,9 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse
|
||||
if (rtw_chset_is_ch_non_ocp(mlmeext->channel_set, dec_ch, dec_bw, dec_offset) == _FALSE)
|
||||
goto update_bss_chbw;
|
||||
|
||||
#if defined(CONFIG_DFS_MASTER)
|
||||
choose_chbw:
|
||||
#endif
|
||||
if (req_bw < 0)
|
||||
req_bw = cur_ie_bw;
|
||||
|
||||
|
@ -2311,10 +2311,7 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
|
||||
|
||||
pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL) {
|
||||
res = _FAIL;
|
||||
@ -2336,12 +2333,8 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
|
||||
init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS));
|
||||
res = rtw_enqueue_cmd(pcmdpriv, pcmdobj);
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -4565,7 +4558,6 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
|
||||
|
||||
createbss_cmd_fail:
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
exit:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2131,6 +2131,7 @@ int proc_get_rx_signal(struct seq_file *m, void *v)
|
||||
/* RTW_PRINT_SEL(m, "rxpwdb:%d\n", padapter->recvpriv.rxpwdb); */
|
||||
RTW_PRINT_SEL(m, "signal_strength:%u\n", padapter->recvpriv.signal_strength);
|
||||
RTW_PRINT_SEL(m, "signal_qual:%u\n", padapter->recvpriv.signal_qual);
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1) {
|
||||
if (padapter->mppriv.antenna_rx == ANTENNA_A)
|
||||
RTW_PRINT_SEL(m, "Antenna: A\n");
|
||||
@ -2150,6 +2151,7 @@ int proc_get_rx_signal(struct seq_file *m, void *v)
|
||||
RTW_PRINT_SEL(m, "Antenna: __\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_get_noise(padapter);
|
||||
RTW_PRINT_SEL(m, "noise:%d\n", padapter->recvpriv.noise);
|
||||
@ -2389,10 +2391,9 @@ ssize_t proc_set_rx_ampdu(struct file *file, const char __user *buffer, size_t c
|
||||
|
||||
rtw_rx_ampdu_apply(padapter);
|
||||
}
|
||||
|
||||
exit:
|
||||
return count;
|
||||
}
|
||||
|
||||
int proc_get_rx_ampdu_factor(struct seq_file *m, void *v)
|
||||
{
|
||||
struct net_device *dev = m->private;
|
||||
|
@ -1380,9 +1380,9 @@ extern char *rtw_initmac;
|
||||
void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr)
|
||||
{
|
||||
#define DEFAULT_RANDOM_MACADDR 1
|
||||
u8 mac[ETH_ALEN];
|
||||
u8 mac[ETH_ALEN] = {0};
|
||||
|
||||
if (out == NULL) {
|
||||
if (!out) {
|
||||
rtw_warn_on(1);
|
||||
return;
|
||||
}
|
||||
|
@ -718,7 +718,6 @@ struct wlan_network *_rtw_find_same_network(_queue *scanned_queue, struct wlan_n
|
||||
|
||||
if (plist == phead)
|
||||
found = NULL;
|
||||
exit:
|
||||
return found;
|
||||
}
|
||||
|
||||
@ -2441,7 +2440,7 @@ static void rtw_sta_mstatus_disc_rpt(_adapter *adapter, u8 mac_id)
|
||||
|
||||
RTW_INFO("%s "ADPT_FMT" - mac_id=%d\n", __func__, ADPT_ARG(adapter), mac_id);
|
||||
|
||||
if (mac_id >= 0 && mac_id < macid_ctl->num) {
|
||||
if (mac_id < macid_ctl->num) {
|
||||
rtw_hal_set_FwMediaStatusRpt_single_cmd(adapter, 0, 0, 0, 0, mac_id);
|
||||
/*
|
||||
* For safety, prevent from keeping macid sleep.
|
||||
@ -2784,7 +2783,6 @@ void rtw_mlme_reset_auto_scan_int(_adapter *adapter, u8 *reason)
|
||||
*reason |= RTW_AUTO_SCAN_REASON_2040_BSS;
|
||||
}
|
||||
|
||||
exit:
|
||||
if (interval_ms == 0xffffffff)
|
||||
interval_ms = 0;
|
||||
|
||||
|
@ -1465,7 +1465,9 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
|
||||
ptable->func = &OnAuth;
|
||||
else
|
||||
ptable->func = &OnAuthClient;
|
||||
{
|
||||
__attribute__ ((__fallthrough__));/* FALL THRU */
|
||||
}
|
||||
case WIFI_ASSOCREQ:
|
||||
case WIFI_REASSOCREQ:
|
||||
_mgt_dispatcher(padapter, ptable, precv_frame);
|
||||
@ -13977,7 +13979,9 @@ void survey_done_set_ch_bw(_adapter *padapter)
|
||||
FUNC_ADPT_ARG(padapter), cur_channel, cur_bwmode, cur_ch_offset);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
exit:
|
||||
#endif
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
}
|
||||
|
||||
|
@ -2388,13 +2388,13 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
if (num_of_secdev_type == 0)
|
||||
psta->num_of_secdev_type = 0;
|
||||
else {
|
||||
u32 len;
|
||||
u32 lena;
|
||||
|
||||
psta->num_of_secdev_type = num_of_secdev_type;
|
||||
|
||||
len = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
|
||||
lena = (sizeof(psta->secdev_types_list) < (num_of_secdev_type * 8)) ? (sizeof(psta->secdev_types_list)) : (num_of_secdev_type * 8);
|
||||
|
||||
_rtw_memcpy(psta->secdev_types_list, pattr_content, len);
|
||||
_rtw_memcpy(psta->secdev_types_list, pattr_content, lena);
|
||||
|
||||
pattr_content += (num_of_secdev_type * 8);
|
||||
}
|
||||
|
@ -3106,8 +3106,6 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||
|
||||
return retval;
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
@ -3124,15 +3122,7 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
RTW_INFO("DBG_RX_DROP_FRAME %s check_indicate_seq fail\n", __FUNCTION__);
|
||||
#endif
|
||||
#if 0
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
goto _success_exit;
|
||||
#else
|
||||
goto _err_exit;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -3170,14 +3160,9 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
}
|
||||
|
||||
|
||||
_success_exit:
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
_err_exit:
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
return _FAIL;
|
||||
@ -4078,7 +4063,9 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
_exit_recv_func:
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
_recv_data_drop:
|
||||
|
@ -951,7 +951,9 @@ const struct country_chplan *rtw_get_chplan_from_country(const char *country_cod
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_CUSTOMIZED_COUNTRY_CHPLAN_MAP) && RTW_DEF_MODULE_REGULATORY_CERT
|
||||
exit:
|
||||
#endif
|
||||
#if RTW_DEF_MODULE_REGULATORY_CERT
|
||||
if (ent && !(COUNTRY_CHPLAN_DEF_MODULE_FALGS(ent) & RTW_DEF_MODULE_REGULATORY_CERT))
|
||||
ent = NULL;
|
||||
|
@ -463,9 +463,6 @@ void rtw_get_adapter_tx_rate_bmp_by_bw(_adapter *adapter, u8 bw, u16 *r_bmp_cck_
|
||||
bmp_ht |= (macid_ctl->rate_bmp0[i] >> 12) | (macid_ctl->rate_bmp1[i] << 20);
|
||||
}
|
||||
|
||||
/* TODO: mlmeext->tx_rate*/
|
||||
|
||||
exit:
|
||||
if (r_bmp_cck_ofdm)
|
||||
*r_bmp_cck_ofdm = bmp_cck_ofdm;
|
||||
if (r_bmp_ht)
|
||||
@ -2722,9 +2719,6 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpriv,
|
||||
} else
|
||||
RTW_INFO("%s fail, no xmitbuf available !!!\n", __func__);
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return pxmitbuf;
|
||||
}
|
||||
|
||||
@ -4407,9 +4401,6 @@ void stop_sta_xmit(_adapter *padapter, struct sta_info *psta)
|
||||
if (!(psta->tdls_sta_state & TDLS_LINKED_STATE))
|
||||
#endif /* CONFIG_TDLS */
|
||||
pstapriv->sta_dz_bitmap |= BIT(psta->aid);
|
||||
|
||||
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
|
||||
@ -4698,7 +4689,9 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
exit:
|
||||
#endif
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
|
@ -396,8 +396,8 @@ s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
||||
RTW_INFO("encrypt=%d, bswenc=%d\n", pmgntframe->attrib.encrypt, pmgntframe->attrib.bswenc);
|
||||
rtw_mgmt_xmitframe_coalesce(padapter, pmgntframe->pkt, pmgntframe);
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
no_mgmt_coalesce:
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
ret = padapter->HalFunc.mgnt_xmit(padapter, pmgntframe);
|
||||
return ret;
|
||||
}
|
||||
@ -811,7 +811,7 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
|
||||
|
||||
case C2H_EXTEND:
|
||||
sub_id = payload[0];
|
||||
__attribute__((__fallthrough__));
|
||||
{__attribute__((__fallthrough__));}
|
||||
/* no handle, goto default */
|
||||
|
||||
default:
|
||||
@ -820,7 +820,6 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
|
||||
break;
|
||||
}
|
||||
|
||||
exit:
|
||||
if (ret != _SUCCESS) {
|
||||
if (id == C2H_EXTEND)
|
||||
RTW_WARN("%s: unknown C2H(0x%02x, 0x%02x)\n", __func__, id, sub_id);
|
||||
|
@ -101,13 +101,9 @@ SwLedBlink(
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL);
|
||||
break;
|
||||
|
||||
case LED_BLINK_WPS: {
|
||||
if (pLed->BlinkingLedState == RTW_LED_ON)
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LONG_INTERVAL);
|
||||
else
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LONG_INTERVAL);
|
||||
}
|
||||
break;
|
||||
case LED_BLINK_WPS:
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_LONG_INTERVAL);
|
||||
break;
|
||||
|
||||
default:
|
||||
_set_timer(&(pLed->BlinkTimer), LED_BLINK_SLOWLY_INTERVAL);
|
||||
|
@ -1413,7 +1413,7 @@ phy_PathA_IQK_8192C(
|
||||
|
||||
// delay x ms
|
||||
RTPRINT(FINIT, INIT_IQK, ("Delay %d ms for One shot, path A LOK & IQK.\n", IQK_DELAY_TIME));
|
||||
PlatformStallExecution(IQK_DELAY_TIME*1000);
|
||||
rtw_udelay_os(IQK_DELAY_TIME*1000);
|
||||
|
||||
// Check failed
|
||||
regEAC = PHY_QueryBBReg(pAdapter, rRx_Power_After_IQK_A_2, bMaskDWord);
|
||||
@ -1460,7 +1460,7 @@ phy_PathB_IQK_8192C(
|
||||
|
||||
// delay x ms
|
||||
RTPRINT(FINIT, INIT_IQK, ("Delay %d ms for One shot, path B LOK & IQK.\n", IQK_DELAY_TIME));
|
||||
PlatformStallExecution(IQK_DELAY_TIME*1000);
|
||||
rtw_udelay_os(IQK_DELAY_TIME*1000);
|
||||
|
||||
// Check failed
|
||||
regEAC = PHY_QueryBBReg(pAdapter, rRx_Power_After_IQK_A_2, bMaskDWord);
|
||||
|
@ -595,7 +595,7 @@ odm_CommonInfoSelfUpdate(
|
||||
{
|
||||
u1Byte EntryCnt = 0, num_active_client = 0;
|
||||
u4Byte i, OneEntry_MACID = 0, ma_rx_tp = 0;
|
||||
PSTA_INFO_T pEntry;
|
||||
PSTA_INFO_T pEntry;
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
|
||||
|
||||
@ -795,7 +795,7 @@ phydm_supportability_Init(
|
||||
/*---------------N Series--------------------*/
|
||||
case ODM_RTL8188E:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_DYNAMIC_TXPWR |
|
||||
ODM_BB_FA_CNT |
|
||||
@ -813,7 +813,7 @@ phydm_supportability_Init(
|
||||
|
||||
case ODM_RTL8192E:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_RF_TX_PWR_TRACK |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_FA_CNT |
|
||||
@ -827,7 +827,7 @@ phydm_supportability_Init(
|
||||
|
||||
case ODM_RTL8723B:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_FA_CNT |
|
||||
ODM_BB_RSSI_MONITOR |
|
||||
@ -843,7 +843,7 @@ phydm_supportability_Init(
|
||||
|
||||
case ODM_RTL8703B:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_FA_CNT |
|
||||
ODM_BB_RSSI_MONITOR |
|
||||
@ -862,9 +862,9 @@ phydm_supportability_Init(
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_FA_CNT |
|
||||
ODM_BB_RSSI_MONITOR |
|
||||
ODM_BB_RSSI_MONITOR |
|
||||
ODM_BB_CCK_PD |
|
||||
ODM_BB_CFO_TRACKING |
|
||||
ODM_BB_CFO_TRACKING |
|
||||
//ODM_BB_PWR_TRAIN |
|
||||
ODM_BB_NHM_CNT |
|
||||
ODM_RF_TX_PWR_TRACK |
|
||||
@ -875,7 +875,7 @@ phydm_supportability_Init(
|
||||
|
||||
case ODM_RTL8188F:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_FA_CNT |
|
||||
ODM_BB_RSSI_MONITOR |
|
||||
@ -891,7 +891,7 @@ phydm_supportability_Init(
|
||||
case ODM_RTL8812:
|
||||
case ODM_RTL8821:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_FA_CNT |
|
||||
ODM_BB_RSSI_MONITOR |
|
||||
ODM_BB_RA_MASK |
|
||||
@ -932,7 +932,7 @@ phydm_supportability_Init(
|
||||
|
||||
case ODM_RTL8821C:
|
||||
support_ability |=
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_DIG |
|
||||
ODM_BB_RA_MASK |
|
||||
ODM_BB_CCK_PD |
|
||||
ODM_BB_FA_CNT |
|
||||
@ -1374,13 +1374,13 @@ ODM_CmnInfoInit(
|
||||
case ODM_CMNINFO_EXT_LNA_GAIN:
|
||||
pDM_Odm->ExtLNAGain = (u1Byte)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_PATCH_ID:
|
||||
case ODM_CMNINFO_PATCH_ID:
|
||||
pDM_Odm->PatchID = (u1Byte)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_BINHCT_TEST:
|
||||
case ODM_CMNINFO_BINHCT_TEST:
|
||||
pDM_Odm->bInHctTest = (BOOLEAN)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_BWIFI_TEST:
|
||||
case ODM_CMNINFO_BWIFI_TEST:
|
||||
pDM_Odm->WIFITest = (u1Byte)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_SMART_CONCURRENT:
|
||||
@ -1520,7 +1520,7 @@ ODM_CmnInfoHook(
|
||||
pDM_Odm->pbNet_closed = (BOOLEAN *)pValue;
|
||||
break;
|
||||
|
||||
case ODM_CMNINFO_FORCED_RATE:
|
||||
case ODM_CMNINFO_FORCED_RATE:
|
||||
pDM_Odm->pForcedDataRate = (pu2Byte)pValue;
|
||||
break;
|
||||
case ODM_CMNINFO_ANT_DIV:
|
||||
@ -1537,11 +1537,11 @@ ODM_CmnInfoHook(
|
||||
pDM_Odm->DM_DigTable.bP2PInProcess = (u1Byte *)pValue;
|
||||
break;
|
||||
|
||||
case ODM_CMNINFO_IS1ANTENNA:
|
||||
case ODM_CMNINFO_IS1ANTENNA:
|
||||
pDM_Odm->pIs1Antenna = (BOOLEAN *)pValue;
|
||||
break;
|
||||
|
||||
case ODM_CMNINFO_RFDEFAULTPATH:
|
||||
case ODM_CMNINFO_RFDEFAULTPATH:
|
||||
pDM_Odm->pRFDefaultPath= (u1Byte *)pValue;
|
||||
break;
|
||||
|
||||
@ -2244,7 +2244,7 @@ ODM_CheckPowerStatus(
|
||||
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
|
||||
RT_RF_POWER_STATE rtState;
|
||||
RT_RF_POWER_STATE rtState;
|
||||
PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo);
|
||||
|
||||
// 2011/07/27 MH We are not testing ready~~!! We may fail to get correct value when init sequence.
|
||||
@ -2274,7 +2274,7 @@ ODM_CheckPowerStatus(
|
||||
/*
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
|
||||
RT_RF_POWER_STATE rtState;
|
||||
RT_RF_POWER_STATE rtState;
|
||||
PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo);
|
||||
|
||||
// 2011/07/27 MH We are not testing ready~~!! We may fail to get correct value when init sequence.
|
||||
@ -2306,7 +2306,7 @@ ODM_CheckPowerStatus(
|
||||
u4Byte
|
||||
GetPSDData(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
unsigned int point,
|
||||
unsigned int point,
|
||||
u1Byte initial_gain_psd)
|
||||
{
|
||||
//unsigned int val, rfval;
|
||||
@ -2343,7 +2343,7 @@ GetPSDData(
|
||||
|
||||
u4Byte
|
||||
odm_ConvertTo_dB(
|
||||
u4Byte Value)
|
||||
u4Byte Value)
|
||||
{
|
||||
u1Byte i;
|
||||
u1Byte j;
|
||||
@ -2379,7 +2379,7 @@ odm_ConvertTo_dB(
|
||||
|
||||
u4Byte
|
||||
odm_ConvertTo_linear(
|
||||
u4Byte Value)
|
||||
u4Byte Value)
|
||||
{
|
||||
u1Byte i;
|
||||
u1Byte j;
|
||||
@ -2540,7 +2540,7 @@ odm_UpdatePowerTrainingState(
|
||||
)
|
||||
{
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE))
|
||||
PFALSE_ALARM_STATISTICS FalseAlmCnt = (PFALSE_ALARM_STATISTICS)PhyDM_Get_Structure( pDM_Odm , PHYDM_FALSEALMCNT);
|
||||
PFALSE_ALARM_STATISTICS FalseAlmCnt = (PFALSE_ALARM_STATISTICS)PhyDM_Get_Structure( pDM_Odm , PHYDM_FALSEALMCNT);
|
||||
pDIG_T pDM_DigTable = &pDM_Odm->DM_DigTable;
|
||||
u4Byte score = 0;
|
||||
|
||||
@ -3090,9 +3090,7 @@ phydm_calculate_fc(
|
||||
}
|
||||
/*5G*/
|
||||
else if (channel >= 36 && channel <= 177) {
|
||||
|
||||
if (bw != 20) {
|
||||
|
||||
if (bw == 40) {
|
||||
num_start_channel = NUM_START_CH_40M;
|
||||
p_start_ch = &(start_ch_per_40m[0]);
|
||||
@ -3102,24 +3100,19 @@ phydm_calculate_fc(
|
||||
p_start_ch = &(start_ch_per_80m[0]);
|
||||
channel_offset = CH_OFFSET_80M;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_start_channel; i++) {
|
||||
|
||||
if (channel < p_start_ch[i+1]) {
|
||||
if ((i < num_start_channel - 1) && channel < p_start_ch[i+1]) {
|
||||
channel = p_start_ch[i] + channel_offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_API, ODM_DBG_LOUD, ("Mod_CH = ((%d))\n", channel));
|
||||
}
|
||||
|
||||
fc = 5180 + (channel-36)*5;
|
||||
|
||||
fc = 5180 + (channel - 36) * 5;
|
||||
} else {
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_API, ODM_DBG_LOUD, ("CH = ((%d)) Error Setting\n", channel));
|
||||
return SET_ERROR;
|
||||
}
|
||||
|
||||
*fc_in = fc;
|
||||
|
||||
return SET_SUCCESS;
|
||||
@ -3332,5 +3325,3 @@ phydm_api_debug(
|
||||
PHYDM_SNPRINTF((output+used, out_len-used, "[CSI MASK set result: %s]\n", (set_result == SET_SUCCESS) ? "Success" : ((set_result == SET_NO_NEED) ? "No need" : "Error")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -605,7 +605,6 @@ phydm_BB_Debug_Info(
|
||||
|
||||
value32 = ODM_GetBBReg(pDM_Odm, 0xf2c , bMaskDWord); /*HT SIG*/
|
||||
if (RX_HT == 1) {
|
||||
|
||||
HMCSS = (u1Byte)(value32 & 0x7F);
|
||||
HRX_BW = (u1Byte)(value32 & 0x80);
|
||||
HLength = (u2Byte)((value32 >> 8) & 0xffff);
|
||||
@ -1740,7 +1739,7 @@ phydm_cmd_parser(
|
||||
u4Byte used = 0;
|
||||
u1Byte id = 0;
|
||||
int var1[10] = {0};
|
||||
int i, input_idx = 0, phydm_ary_size;
|
||||
int i, input_idx = 0, phydm_ary_size = 0;
|
||||
char help[] = "-h";
|
||||
|
||||
if (flag == 0) {
|
||||
@ -1802,12 +1801,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_RA:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output + used, out_len - used, "new SET, RA_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output + used, out_len - used, "new SET, RA_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -1825,12 +1822,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_ANTDIV:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -1845,12 +1840,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_PATHDIV:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -1865,12 +1858,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_DEBUG:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, Debug_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, Debug_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -1884,10 +1875,8 @@ phydm_cmd_parser(
|
||||
case PHYDM_FW_DEBUG:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1)
|
||||
@ -1898,12 +1887,10 @@ phydm_cmd_parser(
|
||||
case PHYDM_SUPPORT_ABILITY:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i , var1[i]));*/
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -1916,10 +1903,8 @@ phydm_cmd_parser(
|
||||
case PHYDM_SMART_ANT:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -1939,10 +1924,8 @@ phydm_cmd_parser(
|
||||
BOOLEAN bEnableDbgMode;
|
||||
u1Byte central_ch, primary_ch_idx, bandwidth;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (input[i + 1])
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
bEnableDbgMode = (BOOLEAN)var1[0];
|
||||
central_ch = (u1Byte) var1[1];
|
||||
@ -1979,10 +1962,8 @@ phydm_cmd_parser(
|
||||
BOOLEAN bEnableDbgMode;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if ((strcmp(input[1], help) == 0)) {
|
||||
@ -2007,8 +1988,7 @@ phydm_cmd_parser(
|
||||
case PHYDM_TRX_PATH:
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (input[i + 1])
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
}
|
||||
#if (RTL8822B_SUPPORT == 1 || RTL8197F_SUPPORT == 1)
|
||||
if (pDM_Odm->SupportICType & (ODM_RTL8822B|ODM_RTL8197F)) {
|
||||
@ -2045,10 +2025,8 @@ phydm_cmd_parser(
|
||||
u4Byte DbgPort, TriggerTime_mu_sec;
|
||||
u1Byte sampling_rate = 0;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (input[i + 1])
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
}
|
||||
for (i = 0; i < 6; i++)
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
|
||||
bEnableLaMode = (BOOLEAN)var1[0];
|
||||
DbgPrint("echo cmd input_num = %d\n", input_num);
|
||||
@ -2073,22 +2051,8 @@ phydm_cmd_parser(
|
||||
bTriggerEdge = (BOOLEAN) var1[7];
|
||||
sampling_rate = var1[8] & 0x7;
|
||||
|
||||
#if 1
|
||||
TriggerTime_unit_num = phydm_la_mode_mac_setting(pDM_Odm, TriggerTime_mu_sec);
|
||||
phydm_la_mode_bb_setting(pDM_Odm, DbgPort, bTriggerEdge, sampling_rate);
|
||||
#else
|
||||
if (pDM_Odm->SupportICType & ODM_IC_11AC_SERIES) {
|
||||
ODM_SetBBReg(pDM_Odm, 0x198C , BIT2|BIT1|BIT0, 7); /*disable dbg clk gating*/
|
||||
ODM_SetBBReg(pDM_Odm, 0x8FC, bMaskDWord, DbgPort);
|
||||
ODM_SetBBReg(pDM_Odm, 0x95C , BIT31, bTriggerEdge); /*0: posedge, 1: negedge*/
|
||||
ODM_SetBBReg(pDM_Odm, 0x95c, 0xe0, sampling_rate);
|
||||
} else {
|
||||
ODM_SetBBReg(pDM_Odm, 0x908, bMaskDWord, DbgPort);
|
||||
ODM_SetBBReg(pDM_Odm, 0x9A0 , BIT31, bTriggerEdge); /*0: posedge, 1: negedge*/
|
||||
ODM_SetBBReg(pDM_Odm, 0x9A0, 0xe0, sampling_rate);
|
||||
}
|
||||
#endif
|
||||
|
||||
pDM_Odm->ADCSmp_dbg_port = DbgPort;
|
||||
pDM_Odm->ADCSmp_trigger_edge = bTriggerEdge;
|
||||
pDM_Odm->ADCsmp_smp_rate = sampling_rate;
|
||||
@ -2114,18 +2078,14 @@ phydm_cmd_parser(
|
||||
{
|
||||
u1Byte type = 0;
|
||||
|
||||
if (input[1]) {
|
||||
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
|
||||
type = (u1Byte)var1[0];
|
||||
}
|
||||
|
||||
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
|
||||
type = (u1Byte)var1[0];
|
||||
if (type == 0)
|
||||
phydm_DumpBbReg(pDM_Odm, &used, output, &out_len);
|
||||
else if (type == 1)
|
||||
phydm_DumpAllReg(pDM_Odm, &used, output, &out_len);
|
||||
}
|
||||
break;
|
||||
|
||||
case PHYDM_MU_MIMO:
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
|
||||
@ -2236,12 +2196,9 @@ phydm_cmd_parser(
|
||||
break;
|
||||
|
||||
case PHYDM_NBI_EN:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -2249,17 +2206,11 @@ phydm_cmd_parser(
|
||||
phydm_api_debug(pDM_Odm, PHYDM_API_NBI, (u4Byte *)var1, &used, output, &out_len);
|
||||
/**/
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case PHYDM_CSI_MASK_EN:
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -2277,10 +2228,8 @@ phydm_cmd_parser(
|
||||
u4Byte var[6] = {0};
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1)
|
||||
@ -2352,7 +2301,6 @@ phydm_cmd_parser(
|
||||
phydm_NHMsetting(pDM_Odm, SET_NHM_SETTING);
|
||||
|
||||
for(i = 0; i <= 10; i ++) {
|
||||
|
||||
if (i == 5) {
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "\r\n NHM_th[%d] = 0x%x, echo_IGI = 0x%x", i, CCX_INFO->NHM_th[i], CCX_INFO->echo_IGI));
|
||||
}
|
||||
@ -2364,12 +2312,10 @@ phydm_cmd_parser(
|
||||
|
||||
//4 4. Trigger NHM
|
||||
phydm_NHMtrigger(pDM_Odm);
|
||||
|
||||
}
|
||||
|
||||
/*Get NHM results*/
|
||||
else if (var1[0] == 3) {
|
||||
|
||||
IGI = (u1Byte)ODM_GetBBReg(pDM_Odm, 0xC50, bMaskByte0);
|
||||
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "\r\n Cur_IGI = 0x%x", IGI));
|
||||
@ -2380,7 +2326,6 @@ phydm_cmd_parser(
|
||||
phydm_NHMsetting(pDM_Odm, RESTORE_NHM_SETTING);
|
||||
|
||||
for(i = 0; i <= 11; i++) {
|
||||
|
||||
if (i == 5)
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "\r\n nhm_result[%d] = %d, echo_IGI = 0x%x", i, CCX_INFO->NHM_result[i], CCX_INFO->echo_IGI));
|
||||
else if (i == 11)
|
||||
@ -2453,7 +2398,7 @@ phydm_cmd_parser(
|
||||
|
||||
phydm_BB_Debug_Info(pDM_Odm, &used, output, &out_len);
|
||||
|
||||
if (pDM_Odm->SupportICType & ODM_RTL8822B && input[1]) {
|
||||
if (pDM_Odm->SupportICType & ODM_RTL8822B) {
|
||||
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
|
||||
ODM_SetBBReg(pDM_Odm, 0x1988, 0x003fff00, var1[0]);
|
||||
value32 = ODM_GetBBReg(pDM_Odm, 0xf84, bMaskDWord);
|
||||
@ -2487,15 +2432,10 @@ phydm_cmd_parser(
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case PHYDM_PAUSE_DIG_EN:
|
||||
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -2508,16 +2448,11 @@ phydm_cmd_parser(
|
||||
} else
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "echo (1:pause, 2resume) (IGI_value)\n"));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PHYDM_H2C:
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1)
|
||||
@ -2525,14 +2460,10 @@ phydm_cmd_parser(
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case PHYDM_ANT_SWITCH:
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (input[i + 1]) {
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
|
||||
input_idx++;
|
||||
}
|
||||
|
||||
if (input_idx >= 1) {
|
||||
@ -2543,18 +2474,13 @@ phydm_cmd_parser(
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "Not Support IC"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
PHYDM_SNPRINTF((output + used, out_len - used, "SET, unknown command!\n"));
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
phydm_la_mode_bb_setting(
|
||||
IN PVOID pDM_VOID,
|
||||
|
@ -805,16 +805,8 @@ odm_DIGInit(
|
||||
pDM_DigTable->pause_cckpd_level = 0;
|
||||
#endif
|
||||
|
||||
if(pDM_Odm->BoardType & (ODM_BOARD_EXT_PA|ODM_BOARD_EXT_LNA))
|
||||
{
|
||||
pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC;
|
||||
pDM_DigTable->rx_gain_range_min = DM_DIG_MIN_NIC;
|
||||
}
|
||||
else
|
||||
{
|
||||
pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC;
|
||||
pDM_DigTable->rx_gain_range_min = DM_DIG_MIN_NIC;
|
||||
}
|
||||
pDM_DigTable->rx_gain_range_max = DM_DIG_MAX_NIC;
|
||||
pDM_DigTable->rx_gain_range_min = DM_DIG_MIN_NIC;
|
||||
|
||||
#if (RTL8822B_SUPPORT == 1 || RTL8197F_SUPPORT == 1)
|
||||
pDM_DigTable->enableAdjustBigJump = 1;
|
||||
|
@ -256,7 +256,7 @@ ODM_TxPwrTrackSetPwr_8723D(
|
||||
TxRate = (u1Byte) pMgntInfo->ForcedDataRate;
|
||||
}
|
||||
#endif
|
||||
#elif (DM_ODM_SUPPORT_TYPE & (ODM_CE))
|
||||
#elif (DM_ODM_SUPPORT_TYPE & (ODM_CE) && MP_DRIVER == 1)
|
||||
if (pDM_Odm->mp_mode == TRUE) { /*CE MP*/
|
||||
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.MptCtx);
|
||||
|
||||
@ -691,7 +691,7 @@ GetDeltaSwingTable_8723D(
|
||||
|
||||
TxRate = MptToMgntRate(pMptCtx->MptRateIndex);
|
||||
#endif
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE && MP_DRIVER == 1)
|
||||
PMPT_CONTEXT pMptCtx = &(Adapter->mppriv.MptCtx);
|
||||
|
||||
TxRate = MptToMgntRate(pMptCtx->MptRateIndex);
|
||||
@ -1937,7 +1937,7 @@ _PHY_PathADDAOn_8723D(
|
||||
#endif
|
||||
|
||||
|
||||
pathOn = isPathAOn ? 0x03c00016 : 0x03c00016;
|
||||
pathOn = 0x03c00016;
|
||||
|
||||
if (FALSE == is2T) {
|
||||
pathOn = 0x03c00016;
|
||||
@ -3150,6 +3150,7 @@ PHY_IQCalibrate_8723D(
|
||||
|
||||
/*Check & wait if BT is doing IQK*/
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (pDM_Odm->mp_mode == FALSE) {
|
||||
#if MP_DRIVER != 1
|
||||
SetFwWiFiCalibrationCmd_8723D(pAdapter, 1);
|
||||
@ -3158,7 +3159,7 @@ PHY_IQCalibrate_8723D(
|
||||
count = 0;
|
||||
u1bTmp = PlatformEFIORead1Byte(pAdapter, 0x1e6);
|
||||
while (u1bTmp != 0x1 && count < 1000) {
|
||||
PlatformStallExecution(10);
|
||||
rtw_udelay_os(10);
|
||||
u1bTmp = PlatformEFIORead1Byte(pAdapter, 0x1e6);
|
||||
count++;
|
||||
}
|
||||
@ -3169,13 +3170,13 @@ PHY_IQCalibrate_8723D(
|
||||
|
||||
u1bTmp = PlatformEFIORead1Byte(pAdapter, 0x1e7);
|
||||
while ((!(u1bTmp&BIT0)) && count < 6000) {
|
||||
PlatformStallExecution(50);
|
||||
rtw_udelay_os(50);
|
||||
u1bTmp = PlatformEFIORead1Byte(pAdapter, 0x1e7);
|
||||
count++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQK:Start!!!\n"));
|
||||
ODM_AcquireSpinLock(pDM_Odm, RT_IQK_SPINLOCK);
|
||||
@ -3359,6 +3360,7 @@ PHY_IQCalibrate_8723D(
|
||||
_PHY_SaveADDARegisters_8723D(pDM_Odm, IQK_BB_REG_92C, pDM_Odm->RFCalibrateInfo.IQK_BB_backup_recover, IQK_BB_REG_NUM);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (pDM_Odm->mp_mode == FALSE) {
|
||||
#if MP_DRIVER != 1
|
||||
SetFwWiFiCalibrationCmd_8723D(pAdapter, 0);
|
||||
@ -3367,7 +3369,7 @@ PHY_IQCalibrate_8723D(
|
||||
count = 0;
|
||||
u1bTmp = PlatformEFIORead1Byte(pAdapter, 0x1e6);
|
||||
while (u1bTmp != 0 && count < 1000) {
|
||||
PlatformStallExecution(10);
|
||||
rtw_udelay_os(10);
|
||||
u1bTmp = PlatformEFIORead1Byte(pAdapter, 0x1e6);
|
||||
count++;
|
||||
}
|
||||
@ -3377,6 +3379,7 @@ PHY_IQCalibrate_8723D(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
ODM_AcquireSpinLock(pDM_Odm, RT_IQK_SPINLOCK);
|
||||
pDM_Odm->RFCalibrateInfo.bIQKInProgress = FALSE;
|
||||
@ -3476,27 +3479,7 @@ PHY_APCalibrate_8723D(
|
||||
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
|
||||
#endif
|
||||
#endif
|
||||
#if DISABLE_BB_RF
|
||||
return;
|
||||
#endif
|
||||
|
||||
return;
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION)) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FOR_BRAZIL_PRETEST != 1
|
||||
if (pDM_Odm->RFCalibrateInfo.bAPKdone)
|
||||
#endif
|
||||
return;
|
||||
|
||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
phy_APCalibrate_8723D(pAdapter, delta, FALSE);
|
||||
#else
|
||||
phy_APCalibrate_8723D(pDM_Odm, delta, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static VOID phy_SetRFPathSwitch_8723D(
|
||||
|
@ -5103,33 +5103,33 @@ static void hw_var_set_mlme_join(PADAPTER padapter, u8 variable, u8 *val)
|
||||
val16 = (RetryLimit << RETRY_LIMIT_SHORT_SHIFT) | (RetryLimit << RETRY_LIMIT_LONG_SHIFT);
|
||||
rtw_write16(padapter, REG_RL, val16);
|
||||
#else /* !CONFIG_CONCURRENT_MODE */
|
||||
if (type == 0) { /* prepare to join */
|
||||
/* enable to rx data frame.Accept all data frame */
|
||||
/* rtw_write32(padapter, REG_RCR, rtw_read32(padapter, REG_RCR)|RCR_ADF); */
|
||||
rtw_write16(padapter, REG_RXFLTMAP2, 0xFFFF);
|
||||
if (type == 0) { /* prepare to join */
|
||||
/* enable to rx data frame.Accept all data frame */
|
||||
/* rtw_write32(padapter, REG_RCR, rtw_read32(padapter, REG_RCR)|RCR_ADF); */
|
||||
rtw_write16(padapter, REG_RXFLTMAP2, 0xFFFF);
|
||||
|
||||
val32 = rtw_read32(padapter, REG_RCR);
|
||||
if (padapter->in_cta_test)
|
||||
val32 &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/* | RCR_ADF */
|
||||
else
|
||||
val32 |= RCR_CBSSID_DATA | RCR_CBSSID_BCN;
|
||||
rtw_write32(padapter, REG_RCR, val32);
|
||||
val32 = rtw_read32(padapter, REG_RCR);
|
||||
if (padapter->in_cta_test)
|
||||
val32 &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/* | RCR_ADF */
|
||||
else
|
||||
val32 |= RCR_CBSSID_DATA | RCR_CBSSID_BCN;
|
||||
rtw_write32(padapter, REG_RCR, val32);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
|
||||
else /* Ad-hoc Mode */
|
||||
RetryLimit = 0x7;
|
||||
} else if (type == 1) /* joinbss_event call back when join res < 0 */
|
||||
rtw_write16(padapter, REG_RXFLTMAP2, 0x00);
|
||||
else if (type == 2) { /* sta add event call back */
|
||||
/* enable update TSF */
|
||||
val8 = rtw_read8(padapter, REG_BCN_CTRL);
|
||||
val8 &= ~DIS_TSF_UDT;
|
||||
rtw_write8(padapter, REG_BCN_CTRL, val8);
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
|
||||
else /* Ad-hoc Mode */
|
||||
RetryLimit = 0x7;
|
||||
} else if (type == 1) /* joinbss_event call back when join res < 0 */
|
||||
rtw_write16(padapter, REG_RXFLTMAP2, 0x00);
|
||||
else if (type == 2) { /* sta add event call back */
|
||||
/* enable update TSF */
|
||||
val8 = rtw_read8(padapter, REG_BCN_CTRL);
|
||||
val8 &= ~DIS_TSF_UDT;
|
||||
rtw_write8(padapter, REG_BCN_CTRL, val8);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE))
|
||||
RetryLimit = 0x7;
|
||||
}
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE))
|
||||
RetryLimit = 0x7;
|
||||
}
|
||||
|
||||
val16 = (RetryLimit << RETRY_LIMIT_SHORT_SHIFT) | (RetryLimit << RETRY_LIMIT_LONG_SHIFT);
|
||||
rtw_write16(padapter, REG_RL, val16);
|
||||
@ -5175,7 +5175,6 @@ s32 c2h_handler_8723d(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
|
||||
break;
|
||||
}
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -5395,14 +5394,14 @@ void SetHwReg8723D(PADAPTER padapter, u8 variable, u8 *val)
|
||||
if (ctrl != 0) {
|
||||
hwctrl |= AcmHw_HwEn;
|
||||
|
||||
if (ctrl & BIT(1)) /* BE */
|
||||
hwctrl |= AcmHw_BeqEn;
|
||||
if (ctrl & BIT(1)) /* BE */
|
||||
hwctrl |= AcmHw_BeqEn;
|
||||
|
||||
if (ctrl & BIT(2)) /* VI */
|
||||
hwctrl |= AcmHw_ViqEn;
|
||||
if (ctrl & BIT(2)) /* VI */
|
||||
hwctrl |= AcmHw_ViqEn;
|
||||
|
||||
if (ctrl & BIT(3)) /* VO */
|
||||
hwctrl |= AcmHw_VoqEn;
|
||||
if (ctrl & BIT(3)) /* VO */
|
||||
hwctrl |= AcmHw_VoqEn;
|
||||
}
|
||||
|
||||
RTW_INFO("[HW_VAR_ACM_CTRL] Write 0x%02X\n", hwctrl);
|
||||
|
@ -868,10 +868,7 @@ PHY_SetTxPowerLevel8723D(
|
||||
#endif
|
||||
RFPath = pHalData->ant_path;
|
||||
|
||||
|
||||
|
||||
PHY_SetTxPowerLevelByPath(Adapter, Channel, RFPath);
|
||||
|
||||
PHY_SetTxPowerLevelByPath(Adapter, Channel, RFPath);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -465,7 +465,6 @@ s32 rtl8723ds_xmit_handler(PADAPTER padapter)
|
||||
|
||||
pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
wait:
|
||||
ret = _rtw_down_sema(&pxmitpriv->SdioXmitSema);
|
||||
if (_FAIL == ret) {
|
||||
RTW_ERR("%s: down sema fail!\n", __func__);
|
||||
|
@ -621,6 +621,10 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
|
||||
WLAN_BSSID_EX *pnetwork = &(padapter->mlmeextpriv.mlmext_info.network);
|
||||
struct wlan_network *scanned = pmlmepriv->cur_network_scanned;
|
||||
|
||||
if (!scanned) {
|
||||
rtw_warn_on(1);
|
||||
return;
|
||||
}
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
|
||||
_rtw_memcpy(&cur_network->network, pnetwork, sizeof(WLAN_BSSID_EX));
|
||||
@ -634,17 +638,10 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
|
||||
return ;
|
||||
}
|
||||
} else {
|
||||
if (scanned == NULL)
|
||||
rtw_warn_on(1);
|
||||
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE
|
||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE
|
||||
) {
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE &&
|
||||
_rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE) {
|
||||
if (!rtw_cfg80211_inform_bss(padapter, scanned))
|
||||
RTW_INFO(FUNC_ADPT_FMT" inform fail !!\n", FUNC_ADPT_ARG(padapter));
|
||||
else {
|
||||
/* RTW_INFO(FUNC_ADPT_FMT" inform success !!\n", FUNC_ADPT_ARG(padapter)); */
|
||||
}
|
||||
} else {
|
||||
RTW_INFO("scanned & pnetwork compare fail\n");
|
||||
rtw_warn_on(1);
|
||||
@ -1824,7 +1821,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||
#if defined(CONFIG_P2P) && ((LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE))
|
||||
case NL80211_IFTYPE_P2P_CLIENT:
|
||||
is_p2p = _TRUE;
|
||||
__attribute__((__fallthrough__));
|
||||
{__attribute__((__fallthrough__));}
|
||||
#endif
|
||||
case NL80211_IFTYPE_STATION:
|
||||
networkType = Ndis802_11Infrastructure;
|
||||
@ -1849,7 +1846,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||
#if defined(CONFIG_P2P) && ((LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE))
|
||||
case NL80211_IFTYPE_P2P_GO:
|
||||
is_p2p = _TRUE;
|
||||
__attribute__((__fallthrough__));
|
||||
{__attribute__((__fallthrough__));}
|
||||
#endif
|
||||
case NL80211_IFTYPE_AP:
|
||||
networkType = Ndis802_11APMode;
|
||||
@ -2362,10 +2359,8 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (pwdinfo->driver_interface == DRIVER_CFG80211) {
|
||||
if (ssids->ssid != NULL
|
||||
&& _rtw_memcmp(ssids->ssid, "DIRECT-", 7)
|
||||
&& rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL)
|
||||
) {
|
||||
if (_rtw_memcmp(ssids->ssid, "DIRECT-", 7) &&
|
||||
rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL)) {
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||
else {
|
||||
@ -2514,7 +2509,6 @@ check_need_indicate_scan_done:
|
||||
#endif
|
||||
}
|
||||
|
||||
cancel_ps_deny:
|
||||
if (ps_denied == _TRUE)
|
||||
rtw_ps_deny_cancel(padapter, PS_DENY_SCAN);
|
||||
|
||||
@ -3644,6 +3638,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
||||
|
||||
if (skb)
|
||||
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
||||
else
|
||||
goto fail;
|
||||
|
||||
if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header)))
|
||||
goto fail;
|
||||
@ -4283,9 +4279,9 @@ static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
exit:
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -5716,7 +5712,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
|
||||
u32 dump_cnt = 0;
|
||||
bool ack = _TRUE;
|
||||
u8 tx_ch;
|
||||
u8 category, action;
|
||||
u8 category, action = 0;
|
||||
u8 frame_styp;
|
||||
int type = (-1);
|
||||
u32 start = rtw_get_current_time();
|
||||
@ -7169,7 +7165,9 @@ int rtw_cfg80211_dev_res_alloc(struct dvobj_priv *dvobj)
|
||||
|
||||
ret = _SUCCESS;
|
||||
|
||||
#if defined(RTW_SINGLE_WIPHY)
|
||||
exit:
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -7192,7 +7190,9 @@ int rtw_cfg80211_dev_res_register(struct dvobj_priv *dvobj)
|
||||
|
||||
ret = _SUCCESS;
|
||||
|
||||
#if defined(RTW_SINGLE_WIPHY)
|
||||
exit:
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2209,16 +2209,6 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(padapter->adapter_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_mi_buddy_check_fwstate(padapter, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) == _TRUE) {
|
||||
RTW_INFO("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
@ -2301,7 +2291,9 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||
cancel_ps_deny:
|
||||
rtw_ps_deny_cancel(padapter, PS_DENY_JOIN);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
exit:
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -5358,7 +5350,6 @@ static int rtw_p2p_connect(struct net_device *dev,
|
||||
#endif /* CONFIG_INTEL_WIDI */
|
||||
ret = -1;
|
||||
}
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -5587,10 +5578,7 @@ static int rtw_p2p_set_persistent(struct net_device *dev,
|
||||
}
|
||||
printk("[%s] persistent_supported = %d\n", __FUNCTION__, pwdinfo->persistent_supported);
|
||||
|
||||
exit:
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static int hexstr2bin(const char *hex, u8 *buf, size_t len)
|
||||
@ -5776,10 +5764,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
||||
} else
|
||||
RTW_INFO("[%s] NOT Found in the Scanning Queue!\n", __FUNCTION__);
|
||||
|
||||
exit:
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static int rtw_p2p_set_wfd_device_type(struct net_device *dev,
|
||||
@ -5805,10 +5790,7 @@ static int rtw_p2p_set_wfd_device_type(struct net_device *dev,
|
||||
else /* Set to Miracast sink device. */
|
||||
pwfd_info->wfd_device_type = WFD_DEVINFO_PSINK;
|
||||
|
||||
exit:
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static int rtw_p2p_set_wfd_enable(struct net_device *dev,
|
||||
@ -5882,8 +5864,6 @@ static int rtw_p2p_set_sa(struct net_device *dev,
|
||||
}
|
||||
printk("[%s] session available = %d\n", __FUNCTION__, pwdinfo->session_available);
|
||||
|
||||
exit:
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -9586,8 +9566,11 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
pEfuseHal = &pHalData->EfuseHal;
|
||||
pHalFunc = &padapter->HalFunc;
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
pmp_priv = &padapter->mppriv;
|
||||
|
||||
#else
|
||||
pmp_priv = NULL;
|
||||
#endif
|
||||
err = 0;
|
||||
|
||||
if (copy_from_user(extra, wrqu->pointer, wrqu->length))
|
||||
@ -10784,7 +10767,7 @@ static int rtw_priv_get(struct net_device *dev,
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_RTL8723B) || defined(CONFIG_SDIO_INDIRECT_ACCESS) || defined(CONFIG_APPEND_VENDOR_IE_ENABLE)
|
||||
switch (subcmd) {
|
||||
#if defined(CONFIG_RTL8723B)
|
||||
case MP_SetBT:
|
||||
@ -10809,6 +10792,7 @@ static int rtw_priv_get(struct net_device *dev,
|
||||
default:
|
||||
return -EIO;
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_msleep_os(10); /* delay 5ms for sending pkt before exit adb shell operation */
|
||||
return 0;
|
||||
@ -11510,8 +11494,8 @@ static int rtw_tdls_getsta(struct net_device *dev,
|
||||
}
|
||||
wrqu->data.length = strlen(extra);
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
exit:
|
||||
#endif /* CONFIG_TDLS */
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
@ -4312,7 +4312,7 @@ int rtw_resume_common(_adapter *padapter)
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
|
||||
if (pwrpriv->bInSuspend == _FALSE)
|
||||
if (!pwrpriv || pwrpriv->bInSuspend == _FALSE)
|
||||
return 0;
|
||||
|
||||
RTW_PRINT("resume start\n");
|
||||
@ -4334,12 +4334,10 @@ int rtw_resume_common(_adapter *padapter)
|
||||
#endif /* CONFIG_AP_WOWLAN */
|
||||
}
|
||||
|
||||
if (pwrpriv) {
|
||||
pwrpriv->bInSuspend = _FALSE;
|
||||
pwrpriv->bInSuspend = _FALSE;
|
||||
#ifdef CONFIG_WOWLAN
|
||||
pwrpriv->wowlan_in_resume = _FALSE;
|
||||
pwrpriv->wowlan_in_resume = _FALSE;
|
||||
#endif
|
||||
}
|
||||
RTW_PRINT("%s:%d in %d ms\n", __FUNCTION__ , ret,
|
||||
rtw_get_passing_time_ms(start_time));
|
||||
|
||||
|
@ -761,21 +761,11 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame)
|
||||
RTW_PRINT("recv eapol packet\n");
|
||||
|
||||
#ifdef CONFIG_AUTO_AP_MODE
|
||||
#if 1 /* for testing */
|
||||
#if 1
|
||||
if (0x8899 == pattrib->eth_type) {
|
||||
rtw_os_ksocket_send(padapter, precv_frame);
|
||||
|
||||
/* goto _recv_indicatepkt_drop; */
|
||||
}
|
||||
#else
|
||||
if (0x8899 == pattrib->eth_type) {
|
||||
rtw_auto_ap_mode_rx(padapter, precv_frame);
|
||||
|
||||
goto _recv_indicatepkt_end;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* CONFIG_AUTO_AP_MODE */
|
||||
|
||||
/* TODO: move to core */
|
||||
@ -826,8 +816,6 @@ bypass_session_tracker:
|
||||
|
||||
rtw_os_recv_indicate_pkt(padapter, skb, pattrib);
|
||||
|
||||
_recv_indicatepkt_end:
|
||||
|
||||
precv_frame->u.hdr.pkt = NULL; /* pointers to NULL before rtw_free_recvframe() */
|
||||
|
||||
rtw_free_recvframe(precv_frame, pfree_recv_queue);
|
||||
|
@ -899,10 +899,7 @@ ssize_t proc_set_macaddr_acl(struct file *file, const char __user *buffer, size_
|
||||
|
||||
c = strsep(&next, " \t");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exit:
|
||||
return count;
|
||||
}
|
||||
#endif /* CONFIG_RTW_MACADDR_ACL */
|
||||
|
@ -304,8 +304,6 @@ static u32 sdio_init(struct dvobj_priv *dvobj)
|
||||
release:
|
||||
sdio_release_host(func);
|
||||
|
||||
exit:
|
||||
|
||||
if (err)
|
||||
return _FAIL;
|
||||
return _SUCCESS;
|
||||
@ -817,13 +815,8 @@ static int rtw_drv_init(
|
||||
rtw_signal_process(ui_pid[1], SIGUSR2);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
status = _SUCCESS;
|
||||
|
||||
os_ndevs_deinit:
|
||||
if (status != _SUCCESS)
|
||||
rtw_os_ndevs_deinit(dvobj);
|
||||
free_if_vir:
|
||||
if (status != _SUCCESS) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
@ -914,7 +907,7 @@ static int rtw_sdio_suspend(struct device *dev)
|
||||
int ret = 0;
|
||||
u8 ch, bw, offset;
|
||||
|
||||
if (psdpriv == NULL)
|
||||
if (!func || !psdpriv)
|
||||
goto exit;
|
||||
|
||||
if (psdpriv->processing_dev_remove == _TRUE) {
|
||||
@ -946,20 +939,20 @@ exit:
|
||||
/* this is sprd's bug in Android 4.0, but sprd don't */
|
||||
/* want to fix it. */
|
||||
/* we have test power under 8723as, power consumption is ok */
|
||||
if (func) {
|
||||
mmc_pm_flag_t pm_flag = 0;
|
||||
pm_flag = sdio_get_host_pm_caps(func);
|
||||
RTW_INFO("cmd: %s: suspend: PM flag = 0x%x\n", sdio_func_id(func), pm_flag);
|
||||
if (!(pm_flag & MMC_PM_KEEP_POWER)) {
|
||||
RTW_INFO("%s: cannot remain alive while host is suspended\n", sdio_func_id(func));
|
||||
if (pdbgpriv)
|
||||
pdbgpriv->dbg_suspend_error_cnt++;
|
||||
return -ENOSYS;
|
||||
} else {
|
||||
RTW_INFO("cmd: suspend with MMC_PM_KEEP_POWER\n");
|
||||
sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
|
||||
}
|
||||
{
|
||||
unsigned pm_flag = 0;
|
||||
pm_flag = sdio_get_host_pm_caps(func);
|
||||
RTW_INFO("cmd: %s: suspend: PM flag = 0x%x\n", sdio_func_id(func), pm_flag);
|
||||
if (!(pm_flag & MMC_PM_KEEP_POWER)) {
|
||||
RTW_INFO("%s: cannot remain alive while host is suspended\n", sdio_func_id(func));
|
||||
if (pdbgpriv)
|
||||
pdbgpriv->dbg_suspend_error_cnt++;
|
||||
return -ENOSYS;
|
||||
} else {
|
||||
RTW_INFO("cmd: suspend with MMC_PM_KEEP_POWER\n");
|
||||
sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return ret;
|
||||
|
@ -904,9 +904,7 @@ void rtw_sleep_schedulable(int ms)
|
||||
delta = 1;/* 1 ms */
|
||||
}
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
if (schedule_timeout(delta) != 0)
|
||||
return ;
|
||||
return;
|
||||
schedule_timeout(delta);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user