mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-15 01:19:36 +00:00
77d786b6e8
This version takes advantage of all the cleanups to the code. It has been modified to build on older kernels. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright(c) 2007 - 2012 Realtek Corporation. */
|
|
|
|
#define _HAL_INTF_C_
|
|
#include "../include/osdep_service.h"
|
|
#include "../include/drv_types.h"
|
|
#include "../include/hal_intf.h"
|
|
|
|
uint rtw_hal_init(struct adapter *adapt)
|
|
{
|
|
uint status = _SUCCESS;
|
|
|
|
adapt->hw_init_completed = false;
|
|
|
|
status = rtl8188eu_hal_init(adapt);
|
|
|
|
if (status == _SUCCESS) {
|
|
adapt->hw_init_completed = true;
|
|
|
|
if (adapt->registrypriv.notch_filter == 1)
|
|
hal_notch_filter_8188e(adapt, 1);
|
|
} else {
|
|
adapt->hw_init_completed = false;
|
|
}
|
|
|
|
return status;
|
|
}
|
|
|
|
uint rtw_hal_deinit(struct adapter *adapt)
|
|
{
|
|
uint status = _SUCCESS;
|
|
|
|
status = rtl8188eu_hal_deinit(adapt);
|
|
|
|
if (status == _SUCCESS)
|
|
adapt->hw_init_completed = false;
|
|
|
|
return status;
|
|
}
|
|
|
|
void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
|
|
{
|
|
struct mlme_priv *pmlmepriv = &adapt->mlmepriv;
|
|
|
|
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
|
|
struct sta_info *psta = NULL;
|
|
struct sta_priv *pstapriv = &adapt->stapriv;
|
|
if (mac_id >= 2)
|
|
psta = pstapriv->sta_aid[(mac_id - 1) - 1];
|
|
if (psta)
|
|
add_RATid(adapt, psta, 0);/* todo: based on rssi_level*/
|
|
} else {
|
|
UpdateHalRAMask8188EUsb(adapt, mac_id, rssi_level);
|
|
}
|
|
}
|