Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ac2f839 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

iwlagn: priv->mutex moves to iwl_shared



Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 10b15e6f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -778,7 +778,7 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
	u8 scan_tx_antennas = hw_params(priv).valid_tx_ant;
	int ret;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	if (vif)
		ctx = iwl_rxon_ctx_from_vif(vif);
@@ -1165,7 +1165,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)

void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
{
	mutex_lock(&priv->mutex);
	mutex_lock(&priv->shrd->mutex);
	ieee80211_stop_queues(priv->hw);
	if (iwlagn_txfifo_flush(priv, IWL_DROP_ALL)) {
		IWL_ERR(priv, "flush request fail\n");
@@ -1175,7 +1175,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
	iwlagn_wait_tx_queue_empty(priv);
done:
	ieee80211_wake_queues(priv->hw);
	mutex_unlock(&priv->mutex);
	mutex_unlock(&priv->shrd->mutex);
}

/*
@@ -1372,7 +1372,7 @@ void iwlagn_bt_adjust_rssi_monitor(struct iwl_priv *priv, bool rssi_ena)
	struct iwl_rxon_context *ctx, *found_ctx = NULL;
	bool found_ap = false;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	/* Check whether AP or GO mode is active. */
	if (rssi_ena) {
@@ -1485,7 +1485,7 @@ static void iwlagn_bt_traffic_change_work(struct work_struct *work)
		break;
	}

	mutex_lock(&priv->mutex);
	mutex_lock(&priv->shrd->mutex);

	/*
	 * We can not send command to firmware while scanning. When the scan
@@ -1513,7 +1513,7 @@ static void iwlagn_bt_traffic_change_work(struct work_struct *work)
	 */
	iwlagn_bt_coex_rssi_monitor(priv);
out:
	mutex_unlock(&priv->mutex);
	mutex_unlock(&priv->shrd->mutex);
}

/*
+10 −10
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv,
static int iwlagn_update_beacon(struct iwl_priv *priv,
				struct ieee80211_vif *vif)
{
	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	dev_kfree_skb(priv->beacon_skb);
	priv->beacon_skb = ieee80211_beacon_get(priv->hw, vif);
@@ -316,7 +316,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv)

	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	ctx_bss = &priv->contexts[IWL_RXON_CTX_BSS];
	ctx_pan = &priv->contexts[IWL_RXON_CTX_PAN];
@@ -421,7 +421,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
	bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK);
	int ret;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
		return -EINVAL;
@@ -537,7 +537,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)

	IWL_DEBUG_MAC80211(priv, "changed %#x", changed);

	mutex_lock(&priv->mutex);
	mutex_lock(&priv->shrd->mutex);

	if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) {
		IWL_DEBUG_MAC80211(priv, "leave - scanning\n");
@@ -652,7 +652,7 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
		iwlagn_commit_rxon(priv, ctx);
	}
 out:
	mutex_unlock(&priv->mutex);
	mutex_unlock(&priv->shrd->mutex);
	return ret;
}

@@ -667,7 +667,7 @@ static void iwlagn_check_needed_chains(struct iwl_priv *priv,
	struct ieee80211_sta_ht_cap *ht_cap;
	bool need_multiple;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	switch (vif->type) {
	case NL80211_IFTYPE_STATION:
@@ -792,17 +792,17 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
	int ret;
	bool force = false;

	mutex_lock(&priv->mutex);
	mutex_lock(&priv->shrd->mutex);

	if (unlikely(!iwl_is_ready(priv))) {
		IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
		mutex_unlock(&priv->mutex);
		mutex_unlock(&priv->shrd->mutex);
		return;
        }

	if (unlikely(!ctx->vif)) {
		IWL_DEBUG_MAC80211(priv, "leave - vif is NULL\n");
		mutex_unlock(&priv->mutex);
		mutex_unlock(&priv->shrd->mutex);
		return;
	}

@@ -913,7 +913,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
			IWL_ERR(priv, "Error sending IBSS beacon\n");
	}

	mutex_unlock(&priv->mutex);
	mutex_unlock(&priv->shrd->mutex);
}

void iwlagn_post_scan(struct iwl_priv *priv)
+9 −9
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ iwl_sta_alloc_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, u8 sta_id)
		return NULL;
	}

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	/* Set up the rate scaling to start at selected rate, fall back
	 * all the way down to 1M in IEEE order, and then spin on 1M */
@@ -197,7 +197,7 @@ static int iwl_send_static_wepkey_cmd(struct iwl_priv *priv,
int iwl_restore_default_wep_keys(struct iwl_priv *priv,
				 struct iwl_rxon_context *ctx)
{
	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	return iwl_send_static_wepkey_cmd(priv, ctx, false);
}
@@ -208,7 +208,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
{
	int ret;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	IWL_DEBUG_WEP(priv, "Removing default WEP key: idx=%d\n",
		      keyconf->keyidx);
@@ -232,7 +232,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
{
	int ret;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	if (keyconf->keylen != WEP_KEY_LEN_128 &&
	    keyconf->keylen != WEP_KEY_LEN_64) {
@@ -397,7 +397,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
	if (sta_id == IWL_INVALID_STATION)
		return 0;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	ctx->key_mapping_keys--;

@@ -430,7 +430,7 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
	if (sta_id == IWL_INVALID_STATION)
		return -EINVAL;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	keyconf->hw_key_idx = iwl_get_free_ucode_key_offset(priv);
	if (keyconf->hw_key_idx == WEP_INVALID_OFFSET)
@@ -572,7 +572,7 @@ int iwl_sta_tx_modify_enable_tid(struct iwl_priv *priv, int sta_id, int tid)
	unsigned long flags;
	struct iwl_addsta_cmd sta_cmd;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	/* Remove "disable" flag, to enable Tx for this TID */
	spin_lock_irqsave(&priv->sta_lock, flags);
@@ -592,7 +592,7 @@ int iwl_sta_rx_agg_start(struct iwl_priv *priv, struct ieee80211_sta *sta,
	int sta_id;
	struct iwl_addsta_cmd sta_cmd;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	sta_id = iwl_sta_id(sta);
	if (sta_id == IWL_INVALID_STATION)
@@ -617,7 +617,7 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta,
	int sta_id;
	struct iwl_addsta_cmd sta_cmd;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	sta_id = iwl_sta_id(sta);
	if (sta_id == IWL_INVALID_STATION) {
+4 −4
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
			tt->tt_power_mode = IWL_POWER_INDEX_5;
			break;
		}
		mutex_lock(&priv->mutex);
		mutex_lock(&priv->shrd->mutex);
		if (old_state == IWL_TI_CT_KILL)
			clear_bit(STATUS_CT_KILL, &priv->shrd->status);
		if (tt->state != IWL_TI_CT_KILL &&
@@ -344,7 +344,7 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
			IWL_DEBUG_TEMP(priv, "Power Index change to %u\n",
					tt->tt_power_mode);
		}
		mutex_unlock(&priv->mutex);
		mutex_unlock(&priv->shrd->mutex);
	}
}

@@ -454,7 +454,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
			 * in case get disabled before */
			iwl_set_rxon_ht(priv, &priv->current_ht_config);
		}
		mutex_lock(&priv->mutex);
		mutex_lock(&priv->shrd->mutex);
		if (old_state == IWL_TI_CT_KILL)
			clear_bit(STATUS_CT_KILL, &priv->shrd->status);
		if (tt->state != IWL_TI_CT_KILL &&
@@ -489,7 +489,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
				iwl_perform_ct_kill_task(priv, false);
			}
		}
		mutex_unlock(&priv->mutex);
		mutex_unlock(&priv->shrd->mutex);
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -545,7 +545,7 @@ int iwlagn_run_init_ucode(struct iwl_priv *priv)
	struct iwl_notification_wait calib_wait;
	int ret;

	lockdep_assert_held(&priv->mutex);
	lockdep_assert_held(&priv->shrd->mutex);

	/* No init ucode required? Curious, but maybe ok */
	if (!priv->ucode_init.code.len)
Loading