static void sreset_restore_network_station(struct rtw_adapter *padapter) { struct mlme_priv *mlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; u8 threshold; rtw_setopmode_cmd23a(padapter, NL80211_IFTYPE_STATION); /* TH = 1 => means that invalidate usb rx aggregation */ /* TH = 0 => means that validate usb rx aggregation, use init value. */ if (mlmepriv->htpriv.ht_option) { if (padapter->registrypriv.wifi_spec == 1) threshold = 1; else threshold = 0; } else threshold = 1; rtl8723a_set_rxdma_agg_pg_th(padapter, threshold); set_channel_bwmode23a(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress); hw_var_set_mlme_join(padapter, 0); rtl8723a_set_media_status(padapter, pmlmeinfo->state & 0x3); mlmeext_joinbss_event_callback23a(padapter, 1); /* restore Sequence No. */ rtl8723au_write8(padapter, REG_NQOS_SEQ, padapter->xmitpriv.nqos_ssn); sreset_restore_security_station(padapter); }
void sreset_restore_network_station(_adapter *padapter) { struct mlme_priv *mlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); #if 0 { //======================================================= // reset related register of Beacon control //set MSR to nolink Set_MSR(padapter, _HW_STATE_NOLINK_); // reject all data frame rtw_write16(padapter, REG_RXFLTMAP2,0x00); //reset TSF rtw_write8(padapter, REG_DUAL_TSF_RST, (BIT(0)|BIT(1))); // disable update TSF SetBcnCtrlReg(padapter, BIT(4), 0); //======================================================= } #endif rtw_setopmode_cmd(padapter, Ndis802_11Infrastructure); { u8 threshold; #ifdef CONFIG_USB_HCI // TH=1 => means that invalidate usb rx aggregation // TH=0 => means that validate usb rx aggregation, use init value. if(mlmepriv->htpriv.ht_option) { if(padapter->registrypriv.wifi_spec==1) threshold = 1; else threshold = 0; rtw_hal_set_hwreg(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold)); } else { threshold = 1; rtw_hal_set_hwreg(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold)); } #endif } set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); //disable dynamic functions, such as high power, DIG //Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); { u8 join_type = 0; rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); } Set_MSR(padapter, (pmlmeinfo->state & 0x3)); mlmeext_joinbss_event_callback(padapter, 1); //restore Sequence No. rtw_write8(padapter,0x4dc,padapter->xmitpriv.nqos_ssn); sreset_restore_security_station(padapter); }