return 0;
if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
return 0;
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
err = rtlpriv->intf_ops->adapter_start(hw);
if (err)
goto out;
rtl_watch_dog_timer_callback((unsigned long)hw);
out:
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
return err;
}
mdelay(1);
}
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
mac->link_state = MAC80211_NOLINK;
memset(mac->bssid, 0, 6);
rtl_deinit_deferred_work(hw);
rtlpriv->intf_ops->adapter_stop(hw);
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
}
static int rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
rtl_ips_nic_on(hw);
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
switch (vif->type) {
case NL80211_IFTYPE_STATION:
if (mac->beacon_enabled == 1) {
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr);
out:
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
return err;
}
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
/* Free beacon resources */
if ((mac->opmode == NL80211_IFTYPE_AP) ||
mac->opmode = NL80211_IFTYPE_UNSPECIFIED;
rtlpriv->cfg->ops->set_network_type(hw, mac->opmode);
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
}
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
struct ieee80211_conf *conf = &hw->conf;
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) { /*BIT(2)*/
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
("IEEE80211_CONF_CHANGE_LISTEN_INTERVAL\n"));
hw->conf.channel_type);
}
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
return 0;
}
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
if ((vif->type == NL80211_IFTYPE_ADHOC) ||
(vif->type == NL80211_IFTYPE_AP) ||
}
out:
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
}
static u64 rtl_op_get_tsf(struct ieee80211_hw *hw)
sta ? sta->addr : bcast_addr));
rtlpriv->sec.being_setkey = true;
rtl_ips_nic_on(hw);
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
/* <1> get encryption alg */
switch (key->cipher) {
case WLAN_CIPHER_SUITE_WEP40:
("cmd_err:%x!!!!:\n", cmd));
}
out_unlock:
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
rtlpriv->sec.being_setkey = false;
return err;
}
if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
return;
- down(&rtlpriv->locks.conf_sem);
+ mutex_lock(&rtlpriv->locks.conf_mutex);
/*if Radio On return true here */
radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid);
}
}
- up(&rtlpriv->locks.conf_sem);
+ mutex_unlock(&rtlpriv->locks.conf_mutex);
}
const struct ieee80211_ops rtl_ops = {