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

Commit b7967dc7 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: remove htc->stopped



This is not necessary anymore. There are no more
uncontrolled htc tx entry points.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 2986e3ef
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -779,7 +779,7 @@ int ath10k_core_start(struct ath10k *ar)
	if (status <= 0) {
		ath10k_warn("wmi service ready event not received");
		status = -ETIMEDOUT;
		goto err_htc_stop;
		goto err_hif_stop;
	}

	ath10k_dbg(ATH10K_DBG_BOOT, "firmware %s booted\n",
@@ -788,25 +788,25 @@ int ath10k_core_start(struct ath10k *ar)
	status = ath10k_wmi_cmd_init(ar);
	if (status) {
		ath10k_err("could not send WMI init command (%d)\n", status);
		goto err_htc_stop;
		goto err_hif_stop;
	}

	status = ath10k_wmi_wait_for_unified_ready(ar);
	if (status <= 0) {
		ath10k_err("wmi unified ready event not received\n");
		status = -ETIMEDOUT;
		goto err_htc_stop;
		goto err_hif_stop;
	}

	status = ath10k_htt_setup(&ar->htt);
	if (status) {
		ath10k_err("failed to setup htt: %d\n", status);
		goto err_htc_stop;
		goto err_hif_stop;
	}

	status = ath10k_debug_start(ar);
	if (status)
		goto err_htc_stop;
		goto err_hif_stop;

	if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
		ar->free_vdev_map = (1 << TARGET_10X_NUM_VDEVS) - 1;
@@ -835,8 +835,6 @@ int ath10k_core_start(struct ath10k *ar)

	return 0;

err_htc_stop:
	ath10k_htc_stop(&ar->htc);
err_hif_stop:
	ath10k_hif_stop(ar);
err_htt_rx_detach:
@@ -881,7 +879,6 @@ void ath10k_core_stop(struct ath10k *ar)
		ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);

	ath10k_debug_stop(ar);
	ath10k_htc_stop(&ar->htc);
	ath10k_hif_stop(ar);
	ath10k_htt_tx_free(&ar->htt);
	ath10k_htt_rx_free(&ar->htt);
+0 −16
Original line number Diff line number Diff line
@@ -138,14 +138,6 @@ int ath10k_htc_send(struct ath10k_htc *htc,
		return -ENOENT;
	}

	/* FIXME: This looks ugly, can we fix it? */
	spin_lock_bh(&htc->tx_lock);
	if (htc->stopped) {
		spin_unlock_bh(&htc->tx_lock);
		return -ESHUTDOWN;
	}
	spin_unlock_bh(&htc->tx_lock);

	skb_push(skb, sizeof(struct ath10k_htc_hdr));

	if (ep->tx_credit_flow_enabled) {
@@ -846,13 +838,6 @@ int ath10k_htc_start(struct ath10k_htc *htc)
	return 0;
}

void ath10k_htc_stop(struct ath10k_htc *htc)
{
	spin_lock_bh(&htc->tx_lock);
	htc->stopped = true;
	spin_unlock_bh(&htc->tx_lock);
}

/* registered target arrival callback from the HIF layer */
int ath10k_htc_init(struct ath10k *ar)
{
@@ -862,7 +847,6 @@ int ath10k_htc_init(struct ath10k *ar)

	spin_lock_init(&htc->tx_lock);

	htc->stopped = false;
	ath10k_htc_reset_endpoint_states(htc);

	/* setup HIF layer callbacks */
+1 −4
Original line number Diff line number Diff line
@@ -332,7 +332,7 @@ struct ath10k_htc {
	struct ath10k *ar;
	struct ath10k_htc_ep endpoint[ATH10K_HTC_EP_COUNT];

	/* protects endpoint and stopped fields */
	/* protects endpoints */
	spinlock_t tx_lock;

	struct ath10k_htc_ops htc_ops;
@@ -345,8 +345,6 @@ struct ath10k_htc {
	int total_transmit_credits;
	struct ath10k_htc_svc_tx_credits service_tx_alloc[ATH10K_HTC_EP_COUNT];
	int target_credit_size;

	bool stopped;
};

int ath10k_htc_init(struct ath10k *ar);
@@ -357,7 +355,6 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc,
			       struct ath10k_htc_svc_conn_resp *conn_resp);
int ath10k_htc_send(struct ath10k_htc *htc, enum ath10k_htc_ep_id eid,
		    struct sk_buff *packet);
void ath10k_htc_stop(struct ath10k_htc *htc);
struct sk_buff *ath10k_htc_alloc_skb(int size);

#endif