It replaces struct semaphore sem with struct mutex mutex
Signed-off-by: Chaehyun Lim
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 30 +++---
drivers/net/wireless/ath/ath6kl/core.c | 2 +-
drivers/net/wireless/ath/ath6kl/core.h | 2 +-
drivers/net/wireless/ath/ath6kl/debug.c| 12 ++--
drivers/net/wireless/ath/ath6kl/init.c | 6 +++---
5 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c
b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index f6b5390..d4eb066 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -480,14 +480,14 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
return -EINVAL;
}
- if (down_interruptible(&ar->sem)) {
+ if (mutex_lock_interruptible(&ar->mutex)) {
ath6kl_err("busy, couldn't get access\n");
return -ERESTARTSYS;
}
if (test_bit(DESTROY_IN_PROGRESS, &ar->flag)) {
ath6kl_err("busy, destroy in progress\n");
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return -EBUSY;
}
@@ -500,14 +500,14 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
WMI_TIMEOUT);
if (signal_pending(current)) {
ath6kl_err("cmd queue drain timeout\n");
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return -EINTR;
}
}
status = ath6kl_set_assoc_req_ies(vif, sme->ie, sme->ie_len);
if (status) {
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return status;
}
@@ -522,7 +522,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
vif->req_bssid,
vif->ch_hint);
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
if (status) {
ath6kl_err("wmi_reconnect_cmd failed\n");
return -EIO;
@@ -548,7 +548,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
status = ath6kl_set_auth_type(vif, sme->auth_type);
if (status) {
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return status;
}
@@ -570,7 +570,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
if (sme->key_idx > WMI_MAX_KEY_INDEX) {
ath6kl_err("key index %d out of bounds\n",
sme->key_idx);
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return -ENOENT;
}
@@ -594,7 +594,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
if (ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx,
ALL_BSS_FILTER, 0) != 0) {
ath6kl_err("couldn't set bss filtering\n");
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return -EIO;
}
}
@@ -626,7 +626,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
0);
if (status) {
ath6kl_err("couldn't set listen intervel\n");
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
return status;
}
}
@@ -651,7 +651,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy,
struct net_device *dev,
ath6kl_wmi_scanparams_cmd(ar->wmi, vif->fw_vif_idx, 0, 0,
sme->bg_scan_period, 0, 0, 0, 3, 0, 0, 0);
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
if (status == -EINVAL) {
memset(vif->ssid, 0, sizeof(vif->ssid));
@@ -832,7 +832,7 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,
return -EBUSY;
}
- if (down_interruptible(&ar->sem)) {
+ if (mutex_lock_interruptible(&ar->mutex)) {
ath6kl_err("busy, couldn't get access\n");
return -ERESTARTSYS;
}
@@ -845,7 +845,7 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,
if (!test_bit(SKIP_SCAN, &ar->flag))
memset(vif->req_bssid, 0, sizeof(vif->req_bssid));
- up(&ar->sem);
+ mutex_unlock(&ar->mutex);
vif->sme_state = SME_DISCONNECTED;
@@ -1775,7 +1775,7 @@ static int ath6kl_get_s