[PATCH v2 3/5] ath10k: drain tx before restarting hw
Kalle Valo
kvalo at qca.qualcomm.com
Fri May 23 01:27:01 PDT 2014
Michal Kazior <michal.kazior at tieto.com> writes:
> This makes sure no further tx requests are
> submitted to HTT before driver teardown.
>
> This should prevent invalid pointer/NULL
> dereference on htt tx pool in ath10k_htt_tx() in
> some cases of heavy traffic.
>
> Reported-By: Ben Greear <greearb at candelatech.com>
> Signed-off-by: Michal Kazior <michal.kazior at tieto.com>
[...]
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -2289,6 +2289,21 @@ static void ath10k_tx(struct ieee80211_hw *hw,
> /*
> * Initialize various parameters with default vaules.
> */
> +static void ath10k_drain_tx(struct ath10k *ar)
> +{
> + /* workers can hold conf_mutex -- avoid deadlock */
> + WARN_ON(lockdep_is_held(&ar->conf_mutex));
If CONFIG_LOCKDEP is disabled this will fail with:
drivers/net/wireless/ath/ath10k/mac.c:2301:2: error: implicit declaration of function 'lockdep_is_held' [-Werror=implicit-function-declaration]
I wasn't able to come up with any other way than adding '#ifdef
CONFIG_LOCKDEP' which is quite ugly. What should we do?
--
Kalle Valo
More information about the ath10k
mailing list