[PATCH] ath10k: Hold tx-lock while detaching htt.

Michal Kazior michal.kazior at tieto.com
Wed Apr 16 23:12:06 PDT 2014


On 17 April 2014 02:42,  <greearb at candelatech.com> wrote:
> From: Ben Greear <greearb at candelatech.com>
>
> And check for null pool in the tx path (which would
> indicate we are detaching).

Shouldn't we just make sure tx is stopped before we try to detach htt?
Stoping mac80211 queues and synchronize_net() should be sufficient I
think.


> @@ -403,6 +412,13 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
>                 goto err;
>
>         spin_lock_bh(&htt->tx_lock);
> +
> +       /* Check if we are detached... */
> +       if (! htt->tx_pool) {
> +               spin_unlock_bh(&htt->tx_lock);

Setting `res` would be nice to indicate an error. And there's a space after !.


Michał



More information about the ath10k mailing list