mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Convert spin lock macros
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
9fe0c17a65
commit
8b76b3b701
19 changed files with 324 additions and 487 deletions
|
@ -527,48 +527,38 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
|
|||
*/
|
||||
static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock(&pmlmepriv->lock);
|
||||
if (check_fwstate(pmlmepriv, state) == true)
|
||||
pmlmepriv->fw_state ^= state;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock(&pmlmepriv->lock);
|
||||
_clr_fwstate_(pmlmepriv, state);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned++;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned--;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned = val;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
u16 rtw_get_capability(struct wlan_bssid_ex *bss);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue