struct net_device *dev = ieee->dev;
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
- down(&priv->rtllib->ips_sem);
+ mutex_lock(&priv->rtllib->ips_mutex);
rtl92e_ips_leave(dev);
- up(&priv->rtllib->ips_sem);
+ mutex_unlock(&priv->rtllib->ips_mutex);
}
void rtl92e_rtllib_ips_leave_wq(struct net_device *dev)
{
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
- down(&priv->rtllib->ips_sem);
+ mutex_lock(&priv->rtllib->ips_mutex);
rtl92e_ips_leave(dev);
- up(&priv->rtllib->ips_sem);
+ mutex_unlock(&priv->rtllib->ips_mutex);
}
static bool _rtl92e_ps_set_mode(struct net_device *dev, u8 rtPsMode)
netdev_info(dev,
"=========>%s(): rtl92e_ips_leave\n",
__func__);
- down(&priv->rtllib->ips_sem);
+ mutex_lock(&priv->rtllib->ips_mutex);
rtl92e_ips_leave(dev);
- up(&priv->rtllib->ips_sem);
+ mutex_unlock(&priv->rtllib->ips_mutex);
}
}
}
RT_TRACE(COMP_PS,
"=========>%s(): rtl92e_ips_leave\n",
__func__);
- down(&priv->rtllib->ips_sem);
+ mutex_lock(&priv->rtllib->ips_mutex);
rtl92e_ips_leave(dev);
- up(&priv->rtllib->ips_sem);
+ mutex_unlock(&priv->rtllib->ips_mutex);
}
}
rtllib_stop_scan(priv->rtllib);
return -ENETDOWN;
priv->rtllib->wx_set_enc = 1;
- down(&priv->rtllib->ips_sem);
+ mutex_lock(&priv->rtllib->ips_mutex);
rtl92e_ips_leave(dev);
- up(&priv->rtllib->ips_sem);
+ mutex_unlock(&priv->rtllib->ips_mutex);
mutex_lock(&priv->wx_mutex);
RT_TRACE(COMP_SEC, "Setting SW wep key");
mutex_lock(&priv->wx_mutex);
priv->rtllib->wx_set_enc = 1;
- down(&priv->rtllib->ips_sem);
+ mutex_lock(&priv->rtllib->ips_mutex);
rtl92e_ips_leave(dev);
- up(&priv->rtllib->ips_sem);
+ mutex_unlock(&priv->rtllib->ips_mutex);
ret = rtllib_wx_set_encode_ext(ieee, info, wrqu, extra);
{
mutex_init(&ieee->wx_mutex);
mutex_init(&ieee->scan_mutex);
- sema_init(&ieee->ips_sem, 1);
+ mutex_init(&ieee->ips_mutex);
spin_lock_init(&ieee->mgmt_tx_lock);
spin_lock_init(&ieee->beacon_lock);