mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2026-04-05 08:59:35 +00:00
Remove wrappers for atomic operations
These wrappers were useful when this driver had the hooks for Windows, but are no longer needed. Link: https://lore.kernel.org/r/20210802192721.23110-4-Larry.Finger@lwfinger.net
This commit is contained in:
committed by
Carlos Garcés
parent
e8b235e056
commit
d7c3737cd5
@@ -2489,7 +2489,7 @@ void rtw_mbid_cam_init(struct dvobj_priv *dvobj)
|
||||
|
||||
_rtw_spinlock_init(&mbid_cam_ctl->lock);
|
||||
mbid_cam_ctl->bitmap = 0;
|
||||
ATOMIC_SET(&mbid_cam_ctl->mbid_entry_num, 0);
|
||||
atomic_set(&mbid_cam_ctl->mbid_entry_num, 0);
|
||||
_rtw_memset(&dvobj->mbid_cam_cache, 0, sizeof(dvobj->mbid_cam_cache));
|
||||
}
|
||||
|
||||
@@ -2511,7 +2511,7 @@ void rtw_mbid_cam_reset(_adapter *adapter)
|
||||
_rtw_memset(&dvobj->mbid_cam_cache, 0, sizeof(dvobj->mbid_cam_cache));
|
||||
_exit_critical_bh(&mbid_cam_ctl->lock, &irqL);
|
||||
|
||||
ATOMIC_SET(&mbid_cam_ctl->mbid_entry_num, 0);
|
||||
atomic_set(&mbid_cam_ctl->mbid_entry_num, 0);
|
||||
}
|
||||
static u8 _rtw_mbid_cam_search_by_macaddr(_adapter *adapter, u8 *mac_addr)
|
||||
{
|
||||
@@ -2601,7 +2601,7 @@ inline u8 rtw_get_mbid_cam_entry_num(_adapter *adapter)
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl;
|
||||
|
||||
return ATOMIC_READ(&mbid_cam_ctl->mbid_entry_num);
|
||||
return atomic_read(&mbid_cam_ctl->mbid_entry_num);
|
||||
}
|
||||
|
||||
static inline void mbid_cam_cache_init(_adapter *adapter, struct mbid_cam_cache *pmbid_cam, u8 *mac_addr)
|
||||
@@ -2625,7 +2625,7 @@ u8 rtw_mbid_camid_alloc(_adapter *adapter, u8 *mac_addr)
|
||||
u8 cam_id = INVALID_CAM_ID, i;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl;
|
||||
u8 entry_num = ATOMIC_READ(&mbid_cam_ctl->mbid_entry_num);
|
||||
u8 entry_num = atomic_read(&mbid_cam_ctl->mbid_entry_num);
|
||||
|
||||
if (INVALID_CAM_ID != rtw_mbid_cam_search_by_macaddr(adapter, mac_addr))
|
||||
goto exit;
|
||||
@@ -2648,7 +2648,7 @@ u8 rtw_mbid_camid_alloc(_adapter *adapter, u8 *mac_addr)
|
||||
_exit_critical_bh(&mbid_cam_ctl->lock, &irqL);
|
||||
|
||||
if (cam_id != INVALID_CAM_ID) {
|
||||
ATOMIC_INC(&mbid_cam_ctl->mbid_entry_num);
|
||||
atomic_inc(&mbid_cam_ctl->mbid_entry_num);
|
||||
RTW_INFO("%s mac:"MAC_FMT" - cam_id:%d\n", __func__, MAC_ARG(mac_addr), cam_id);
|
||||
#ifdef DBG_MBID_CAM_DUMP
|
||||
rtw_mbid_cam_cache_dump(RTW_DBGDUMP, __func__, adapter);
|
||||
@@ -2701,7 +2701,7 @@ u8 rtw_mbid_cam_assign(_adapter *adapter, u8 *mac_addr, u8 camid)
|
||||
_exit_critical_bh(&mbid_cam_ctl->lock, &irqL);
|
||||
|
||||
if (ret == _TRUE) {
|
||||
ATOMIC_INC(&mbid_cam_ctl->mbid_entry_num);
|
||||
atomic_inc(&mbid_cam_ctl->mbid_entry_num);
|
||||
RTW_INFO("%s mac:"MAC_FMT" - cam_id:%d\n", __func__, MAC_ARG(mac_addr), camid);
|
||||
#ifdef DBG_MBID_CAM_DUMP
|
||||
rtw_mbid_cam_cache_dump(RTW_DBGDUMP, __func__, adapter);
|
||||
@@ -2727,7 +2727,7 @@ void rtw_mbid_camid_clean(_adapter *adapter, u8 mbss_canid)
|
||||
mbid_cam_cache_clr(&dvobj->mbid_cam_cache[mbss_canid]);
|
||||
mbid_cam_ctl->bitmap &= (~BIT(mbss_canid));
|
||||
_exit_critical_bh(&mbid_cam_ctl->lock, &irqL);
|
||||
ATOMIC_DEC(&mbid_cam_ctl->mbid_entry_num);
|
||||
atomic_dec(&mbid_cam_ctl->mbid_entry_num);
|
||||
RTW_INFO("%s - cam_id:%d\n", __func__, mbss_canid);
|
||||
}
|
||||
int rtw_mbid_cam_cache_dump(void *sel, const char *fun_name, _adapter *adapter)
|
||||
@@ -2738,7 +2738,7 @@ int rtw_mbid_cam_cache_dump(void *sel, const char *fun_name, _adapter *adapter)
|
||||
u8 iface_id;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl;
|
||||
u8 entry_num = ATOMIC_READ(&mbid_cam_ctl->mbid_entry_num);
|
||||
u8 entry_num = atomic_read(&mbid_cam_ctl->mbid_entry_num);
|
||||
u8 max_cam_id = rtw_get_max_mbid_cam_id(adapter);
|
||||
|
||||
RTW_PRINT_SEL(sel, "== MBSSID CAM DUMP (%s)==\n", fun_name);
|
||||
|
||||
Reference in New Issue
Block a user