From: Helmut Schaa <helmut.schaa@googlemail.com>
To: Senthil Balasubramanian <senthilkumar@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] ath9k: Fix kernel panic caused by invalid rate index access.
Date: Wed, 23 Mar 2011 23:22:02 +0100 [thread overview]
Message-ID: <201103232322.02763.helmut.schaa@googlemail.com> (raw)
In-Reply-To: <1300901842-3350-1-git-send-email-senthilkumar@atheros.com>
Hi,
Am Mittwoch, 23. März 2011 schrieb Senthil Balasubramanian:
> With the recent tx status optimization in mac80211, we bail out as
> and and when invalid rate index is found. So the behavior of resetting
> rate idx to -1 and count to 0 has changed for the rate indexes that
> were not part of the driver's retry series.
>
> This has resulted in ath9k using incorrect rate table index which
> caused the system to panic. Ideally ath9k need to loop only for the
> indexes that were part of the retry series and so simply use hw->max_rates
> as the loop counter.
Sorry for the trouble. I didn't consider rc algorithms
outside of net/mac80211/ ...
> ---
> drivers/net/wireless/ath/ath9k/rc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
> index 960d717..a3241cd 100644
> --- a/drivers/net/wireless/ath/ath9k/rc.c
> +++ b/drivers/net/wireless/ath/ath9k/rc.c
> @@ -1328,7 +1328,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
>
> hdr = (struct ieee80211_hdr *)skb->data;
> fc = hdr->frame_control;
> - for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
> + for (i = 0; i < sc->hw->max_rates; i++) {
> struct ieee80211_tx_rate *rate = &tx_info->status.rates[i];
> if (!rate->count)
> break;
You could also just change that check to
if (rate->idx < 0)
break;
instead as mac80211 already assumes the tx status rates array is terminated
by the driver by setting the idx to -1.
Helmut
prev parent reply other threads:[~2011-03-23 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 17:37 [PATCH 1/2] ath9k: Fix kernel panic caused by invalid rate index access Senthil Balasubramanian
2011-03-23 17:37 ` [PATCH 2/2] ath9k: Fix TX queue stuck issue Senthil Balasubramanian
2011-03-23 22:22 ` Helmut Schaa [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=201103232322.02763.helmut.schaa@googlemail.com \
--to=helmut.schaa@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=senthilkumar@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;
as well as URLs for NNTP newsgroup(s).