1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
17 #include <osdep_service.h>
18 #include <drv_types.h>
21 uint rtw_hal_init(struct adapter *adapt)
23 uint status = _SUCCESS;
25 adapt->hw_init_completed = false;
27 status = rtl8188eu_hal_init(adapt);
29 if (status == _SUCCESS) {
30 adapt->hw_init_completed = true;
32 if (adapt->registrypriv.notch_filter == 1)
33 rtw_hal_notch_filter(adapt, 1);
35 adapt->hw_init_completed = false;
36 DBG_88E("rtw_hal_init: hal__init fail\n");
39 RT_TRACE(_module_hal_init_c_, _drv_err_,
40 ("-rtl871x_hal_init:status=0x%x\n", status));
45 uint rtw_hal_deinit(struct adapter *adapt)
47 uint status = _SUCCESS;
49 status = rtl8188eu_hal_deinit(adapt);
51 if (status == _SUCCESS)
52 adapt->hw_init_completed = false;
54 DBG_88E("\n rtw_hal_deinit: hal_init fail\n");
59 void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
61 struct mlme_priv *pmlmepriv = &(adapt->mlmepriv);
63 if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
64 #ifdef CONFIG_88EU_AP_MODE
65 struct sta_info *psta = NULL;
66 struct sta_priv *pstapriv = &adapt->stapriv;
69 psta = pstapriv->sta_aid[(mac_id-1) - 1];
71 add_RATid(adapt, psta, 0);/* todo: based on rssi_level*/
74 UpdateHalRAMask8188EUsb(adapt, mac_id, rssi_level);