Search Linux Wireless

Re: [PATCH v4] ath10k: move mgmt descriptor limit handle under mgmt_tx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8 March 2016 at 18:25, Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx> wrote:
[...]
> +int ath10k_htt_tx_mgmt_inc_pending(struct ath10k_htt *htt, bool is_mgmt,
> +                                  bool is_presp)
> +{
> +       struct ath10k *ar = htt->ar;
> +
> +       lockdep_assert_held(&htt->tx_lock);
> +
> +       if (!is_mgmt || !ar->hw_params.max_probe_resp_desc_thres)
> +               return 0;
> +
> +       if (is_presp &&
> +           ar->hw_params.max_probe_resp_desc_thres < htt->num_pending_mgmt_tx)
> +               return -EBUSY;
> +
> +       htt->num_pending_mgmt_tx++;
> +
> +       return 0;
> +}
> +
> +void ath10k_htt_tx_mgmt_dec_pending(struct ath10k_htt *htt)
> +{
> +       lockdep_assert_held(&htt->tx_lock);
> +
> +       htt->num_pending_mgmt_tx--;
> +}

Oh, and this looks unbalanced. You increment only when
`ar->hw_params.max_probe_resp_desc_thres` but always decrement.


Michał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux