diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index a1b6d202d57c0b77b4bd510ada832124486eeceb..9dd9e64c2b0b1a69f11a6d40a5e0e2cbc84d8b22 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -1429,7 +1429,7 @@ int iwlagn_manage_ibss_station(struct iwl_priv *priv, void iwl_free_tfds_in_queue(struct iwl_priv *priv, int sta_id, int tid, int freed) { - WARN_ON(!spin_is_locked(&priv->sta_lock)); + lockdep_assert_held(&priv->sta_lock); if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index ecb953f28068808010eb1a1065612afe90899bf9..d04502d54df3c48b0d869c5169bf79ee397ecf1e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -1117,7 +1117,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv, u8 *addr = priv->stations[sta_id].sta.sta.addr; struct iwl_tid_data *tid_data = &priv->stations[sta_id].tid[tid]; - WARN_ON(!spin_is_locked(&priv->sta_lock)); + lockdep_assert_held(&priv->sta_lock); switch (priv->stations[sta_id].tid[tid].agg.state) { case IWL_EMPTYING_HW_QUEUE_DELBA: diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index b0c6b04739013afec3ab7dcaa015bfeeb5e81b99..a4b3663a262fb40857c521126d8d1df73f8f72be 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c @@ -298,7 +298,7 @@ EXPORT_SYMBOL(iwl_init_scan_params); static int iwl_scan_initiate(struct iwl_priv *priv, struct ieee80211_vif *vif) { - WARN_ON(!mutex_is_locked(&priv->mutex)); + lockdep_assert_held(&priv->mutex); IWL_DEBUG_INFO(priv, "Starting scan...\n"); set_bit(STATUS_SCANNING, &priv->status); diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 9511f03f07e053b93af68c83bd534ddfab98122d..7e0829be5e783a0e49957a89414d61a413a79407 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -773,7 +773,7 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty) int iwl_restore_default_wep_keys(struct iwl_priv *priv) { - WARN_ON(!mutex_is_locked(&priv->mutex)); + lockdep_assert_held(&priv->mutex); return iwl_send_static_wepkey_cmd(priv, 0); } @@ -784,7 +784,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, { int ret; - WARN_ON(!mutex_is_locked(&priv->mutex)); + lockdep_assert_held(&priv->mutex); IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n", keyconf->keyidx); @@ -808,7 +808,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, { int ret; - WARN_ON(!mutex_is_locked(&priv->mutex)); + lockdep_assert_held(&priv->mutex); if (keyconf->keylen != WEP_KEY_LEN_128 && keyconf->keylen != WEP_KEY_LEN_64) {