static int ath10k_htt_tx_inc_pending(struct ath10k_htt *htt, bool limit_mgmt_desc, bool is_probe_resp) { struct ath10k *ar = htt->ar; int ret = 0; spin_lock_bh(&htt->tx_lock); if (htt->num_pending_tx >= htt->max_num_pending_tx) { ret = -EBUSY; goto exit; } if (limit_mgmt_desc) { if (is_probe_resp && (htt->num_pending_mgmt_tx > ar->hw_params.max_probe_resp_desc_thres)) { ret = -EBUSY; goto exit; } htt->num_pending_mgmt_tx++; } htt->num_pending_tx++; if (htt->num_pending_tx == htt->max_num_pending_tx) ath10k_mac_tx_lock(htt->ar, ATH10K_TX_PAUSE_Q_FULL); exit: spin_unlock_bh(&htt->tx_lock); return ret; }
int ath10k_htt_tx_inc_pending(struct ath10k_htt *htt) { lockdep_assert_held(&htt->tx_lock); if (htt->num_pending_tx >= htt->max_num_pending_tx) return -EBUSY; htt->num_pending_tx++; if (htt->num_pending_tx == htt->max_num_pending_tx) ath10k_mac_tx_lock(htt->ar, ATH10K_TX_PAUSE_Q_FULL); return 0; }
static int ath10k_htt_tx_inc_pending(struct ath10k_htt *htt) { int ret = 0; spin_lock_bh(&htt->tx_lock); if (htt->num_pending_tx >= htt->max_num_pending_tx) { ret = -EBUSY; goto exit; } htt->num_pending_tx++; if (htt->num_pending_tx == htt->max_num_pending_tx) ath10k_mac_tx_lock(htt->ar, ATH10K_TX_PAUSE_Q_FULL); exit: spin_unlock_bh(&htt->tx_lock); return ret; }
static int ath10k_htt_tx_inc_pending(struct ath10k_htt *htt) { int ret = 0; ATHP_HTT_TX_LOCK(htt); if (htt->num_pending_tx >= htt->max_num_pending_tx) { ret = -EBUSY; goto exit; } htt->num_pending_tx++; if (htt->num_pending_tx == htt->max_num_pending_tx) ath10k_mac_tx_lock(htt->ar, ATH10K_TX_PAUSE_Q_FULL); exit: ATHP_HTT_TX_UNLOCK(htt); return ret; }