static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{
- struct drvextra_cmd_parm *pdrvextra_cmd_parm;
/* set to true to allow enqueuing cmd when hw_init_completed is false */
u8 bAllow = false;
- /* To decide allow or not */
- if (pcmdpriv->padapter->pwrctrlpriv.bHWPwrPindetect &&
- !pcmdpriv->padapter->registrypriv.usbss_enable) {
- if (cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra)) {
- pdrvextra_cmd_parm =
- (struct drvextra_cmd_parm *)cmd_obj->parmbuf;
- if (pdrvextra_cmd_parm->ec_id ==
- POWER_SAVING_CTRL_WK_CID)
- bAllow = true;
- }
- }
-
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
bAllow = true;
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- enum rt_rf_power_state rfpwrstate;
pwrpriv->ps_processing = true;
if (pwrpriv->bips_processing == true)
goto exit;
- if (padapter->pwrctrlpriv.bHWPwrPindetect) {
- rfpwrstate = RfOnOffDetect23a(padapter);
- DBG_8723A("@@@@- #2 %s ==> rfstate:%s\n", __func__,
- (rfpwrstate == rf_on)?"rf_on":"rf_off");
-
- if (rfpwrstate!= pwrpriv->rf_pwrstate) {
- if (rfpwrstate == rf_off) {
- pwrpriv->change_rfpwrstate = rf_off;
- padapter->bCardDisableWOHSM = true;
- rtw_hw_suspend23a(padapter);
- } else {
- pwrpriv->change_rfpwrstate = rf_on;
- rtw_hw_resume23a(padapter);
- }
- DBG_8723A("current rf_pwrstate(%s)\n",
- (pwrpriv->rf_pwrstate == rf_off) ?
- "rf_off":"rf_on");
- }
- pwrpriv->pwr_state_check_cnts ++;
- }
-
if (pwrpriv->ips_mode_req == IPS_NONE)
goto exit;
u8 antdiv_cfg;
u8 antdiv_type;
- u8 usbss_enable;/* 0:disable,1:enable */
u8 hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
u8 hwpwrp_detect;/* 0:disable,1:enable */