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

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
...@@ -779,7 +779,7 @@ int ath10k_core_start(struct ath10k *ar) ...@@ -779,7 +779,7 @@ int ath10k_core_start(struct ath10k *ar)
if (status <= 0) { if (status <= 0) {
ath10k_warn("wmi service ready event not received"); ath10k_warn("wmi service ready event not received");
status = -ETIMEDOUT; status = -ETIMEDOUT;
goto err_htc_stop; goto err_hif_stop;
} }
ath10k_dbg(ATH10K_DBG_BOOT, "firmware %s booted\n", ath10k_dbg(ATH10K_DBG_BOOT, "firmware %s booted\n",
...@@ -788,25 +788,25 @@ int ath10k_core_start(struct ath10k *ar) ...@@ -788,25 +788,25 @@ int ath10k_core_start(struct ath10k *ar)
status = ath10k_wmi_cmd_init(ar); status = ath10k_wmi_cmd_init(ar);
if (status) { if (status) {
ath10k_err("could not send WMI init command (%d)\n", 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); status = ath10k_wmi_wait_for_unified_ready(ar);
if (status <= 0) { if (status <= 0) {
ath10k_err("wmi unified ready event not received\n"); ath10k_err("wmi unified ready event not received\n");
status = -ETIMEDOUT; status = -ETIMEDOUT;
goto err_htc_stop; goto err_hif_stop;
} }
status = ath10k_htt_setup(&ar->htt); status = ath10k_htt_setup(&ar->htt);
if (status) { if (status) {
ath10k_err("failed to setup htt: %d\n", status); ath10k_err("failed to setup htt: %d\n", status);
goto err_htc_stop; goto err_hif_stop;
} }
status = ath10k_debug_start(ar); status = ath10k_debug_start(ar);
if (status) if (status)
goto err_htc_stop; goto err_hif_stop;
if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features))
ar->free_vdev_map = (1 << TARGET_10X_NUM_VDEVS) - 1; ar->free_vdev_map = (1 << TARGET_10X_NUM_VDEVS) - 1;
...@@ -835,8 +835,6 @@ int ath10k_core_start(struct ath10k *ar) ...@@ -835,8 +835,6 @@ int ath10k_core_start(struct ath10k *ar)
return 0; return 0;
err_htc_stop:
ath10k_htc_stop(&ar->htc);
err_hif_stop: err_hif_stop:
ath10k_hif_stop(ar); ath10k_hif_stop(ar);
err_htt_rx_detach: err_htt_rx_detach:
...@@ -881,7 +879,6 @@ void ath10k_core_stop(struct ath10k *ar) ...@@ -881,7 +879,6 @@ void ath10k_core_stop(struct ath10k *ar)
ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR); ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
ath10k_debug_stop(ar); ath10k_debug_stop(ar);
ath10k_htc_stop(&ar->htc);
ath10k_hif_stop(ar); ath10k_hif_stop(ar);
ath10k_htt_tx_free(&ar->htt); ath10k_htt_tx_free(&ar->htt);
ath10k_htt_rx_free(&ar->htt); ath10k_htt_rx_free(&ar->htt);
......
...@@ -138,14 +138,6 @@ int ath10k_htc_send(struct ath10k_htc *htc, ...@@ -138,14 +138,6 @@ int ath10k_htc_send(struct ath10k_htc *htc,
return -ENOENT; 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)); skb_push(skb, sizeof(struct ath10k_htc_hdr));
if (ep->tx_credit_flow_enabled) { if (ep->tx_credit_flow_enabled) {
...@@ -846,13 +838,6 @@ int ath10k_htc_start(struct ath10k_htc *htc) ...@@ -846,13 +838,6 @@ int ath10k_htc_start(struct ath10k_htc *htc)
return 0; 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 */ /* registered target arrival callback from the HIF layer */
int ath10k_htc_init(struct ath10k *ar) int ath10k_htc_init(struct ath10k *ar)
{ {
...@@ -862,7 +847,6 @@ int ath10k_htc_init(struct ath10k *ar) ...@@ -862,7 +847,6 @@ int ath10k_htc_init(struct ath10k *ar)
spin_lock_init(&htc->tx_lock); spin_lock_init(&htc->tx_lock);
htc->stopped = false;
ath10k_htc_reset_endpoint_states(htc); ath10k_htc_reset_endpoint_states(htc);
/* setup HIF layer callbacks */ /* setup HIF layer callbacks */
......
...@@ -332,7 +332,7 @@ struct ath10k_htc { ...@@ -332,7 +332,7 @@ struct ath10k_htc {
struct ath10k *ar; struct ath10k *ar;
struct ath10k_htc_ep endpoint[ATH10K_HTC_EP_COUNT]; struct ath10k_htc_ep endpoint[ATH10K_HTC_EP_COUNT];
/* protects endpoint and stopped fields */ /* protects endpoints */
spinlock_t tx_lock; spinlock_t tx_lock;
struct ath10k_htc_ops htc_ops; struct ath10k_htc_ops htc_ops;
...@@ -345,8 +345,6 @@ struct ath10k_htc { ...@@ -345,8 +345,6 @@ struct ath10k_htc {
int total_transmit_credits; int total_transmit_credits;
struct ath10k_htc_svc_tx_credits service_tx_alloc[ATH10K_HTC_EP_COUNT]; struct ath10k_htc_svc_tx_credits service_tx_alloc[ATH10K_HTC_EP_COUNT];
int target_credit_size; int target_credit_size;
bool stopped;
}; };
int ath10k_htc_init(struct ath10k *ar); int ath10k_htc_init(struct ath10k *ar);
...@@ -357,7 +355,6 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc, ...@@ -357,7 +355,6 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc,
struct ath10k_htc_svc_conn_resp *conn_resp); struct ath10k_htc_svc_conn_resp *conn_resp);
int ath10k_htc_send(struct ath10k_htc *htc, enum ath10k_htc_ep_id eid, int ath10k_htc_send(struct ath10k_htc *htc, enum ath10k_htc_ep_id eid,
struct sk_buff *packet); struct sk_buff *packet);
void ath10k_htc_stop(struct ath10k_htc *htc);
struct sk_buff *ath10k_htc_alloc_skb(int size); struct sk_buff *ath10k_htc_alloc_skb(int size);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment