From: Sujith <m.sujith@gmail.com>
To: Rajkumar Manoharan <rmanoharan@atheros.com>
Cc: <linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>,
m.sujith@gmail.com
Subject: [PATCH 2/2] ath9k_htc: Fix unnecessary warnings on card removal
Date: Sun, 19 Dec 2010 08:44:39 +0530 [thread overview]
Message-ID: <19725.30879.711426.630171@gargle.gargle.HOWL> (raw)
In-Reply-To: <1292664547-5474-1-git-send-email-rmanoharan@atheros.com>
Rajkumar Manoharan wrote:
> diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
> index fdf9d5f..d90838a 100644
> --- a/drivers/net/wireless/ath/ath9k/htc.h
> +++ b/drivers/net/wireless/ath/ath9k/htc.h
> @@ -339,7 +339,6 @@ void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv);
> #define OP_ASSOCIATED BIT(7)
> #define OP_ENABLE_BEACON BIT(8)
> #define OP_LED_DEINIT BIT(9)
> -#define OP_UNPLUGGED BIT(10)
> #define OP_BT_PRIORITY_DETECTED BIT(11)
> #define OP_BT_SCAN BIT(12)
You are leaving a hole here.
> @@ -1231,6 +1236,12 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
> cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
> ath9k_led_stop_brightness(priv);
>
> + if (ah->ah_flags & AH_UNPLUGGED) {
> + ath_dbg(common, ATH_DBG_ANY, "Device not present\n");
> + mutex_unlock(&priv->mutex);
> + return;
> + }
> +
This doesn't take of purging the TX queues in both the driver layer and HIF.
Also, in case of BT combo devices, the workqueue instances aren't canceled.
Instead of adding such checks throughout the driver and increasing code size,
we can just fix the warning to handle the unplugged case. It doesn't matter
if a few extra hardware calls are made, the device is no longer present anyway. :)
Sujith
prev parent reply other threads:[~2010-12-19 3:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 9:29 [PATCH 2/2] ath9k_htc: Fix unnecessary warnings on card removal Rajkumar Manoharan
2010-12-19 3:14 ` Sujith [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19725.30879.711426.630171@gargle.gargle.HOWL \
--to=m.sujith@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rmanoharan@atheros.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox