linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HT rate warning with openwrt AP using wireless-compat and ath9k
@ 2010-05-01  9:27 Kalle Valo
  2010-05-03 23:10 ` Luis R. Rodriguez
  2010-05-04  8:08 ` Felix Fietkau
  0 siblings, 2 replies; 6+ messages in thread
From: Kalle Valo @ 2010-05-01  9:27 UTC (permalink / raw)
  To: linux-wireless

Hi,

I'm running OpenWrt 10.03 on Netgear WNDR3700 and I'm having stability
issues. The AP reboots few times a week, maybe even daily. I get the
feeling that my wife's windows laptop is related to the reboots
somehow, but I haven't investigated this in detail yet. Also I do not
have access to serial console, so I don't have proper logs.

But today the AP didn't reboot, wireless was just dead. I managed to
find this with ssh:

------------[ cut here ]------------
WARNING: at
/home/openwrt/backfire/build/ar71xx/build_dir/linux-ar71xx/compat-wireless-2010-03-24/net/mac80211/rx.c:2528
0x83115884()
Rate marked as an HT rate but passed status->rate_idx is not an MCS
index [0-76]: 123 (0x7b)
Modules linked in: ip6t_REJECT ip6t_LOG ip6t_rt ip6t_hbh ip6t_mh
ip6t_ipv6header ip6t_frag ip6t_eui64 ip6t_ah ip6table_raw ip6_queue
ip6table_mangle ip6table_filter ip6_tables nf_conntrack_ipv6
nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp
nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK
iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack
pppoe pppox ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multiport
xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp
x_tables sit tunnel4 ppp_async ppp_generic slhc ath9k ath9k_common
ath9k_hw ath mac80211 crc_ccitt cfg80211 compat_firmware_class compat
arc4 aes_generic deflate ecb cbc ipv6 leds_gpio button_hotplug
gpio_buttons input_polldev input_core
Call Trace:[<8007d338>] 0x8007d338
[<800683c4>] 0x800683c4
[<800683c4>] 0x800683c4
[<8007cb6c>] 0x8007cb6c
[<83115884>] 0x83115884
[<8007cbec>] 0x8007cbec
[<800d5ab0>] 0x800d5ab0
[<83115884>] 0x83115884
[<801e1ed8>] 0x801e1ed8
[<83b96c38>] 0x83b96c38
[<830858b0>] 0x830858b0
[<830847d0>] 0x830847d0
[<80081b98>] 0x80081b98
[<800a7968>] 0x800a7968
[<8008238c>] 0x8008238c
[<8008246c>] 0x8008246c
[<8006082c>] 0x8006082c
[<80060a00>] 0x80060a00
[<8006b330>] 0x8006b330
[<8006c7d0>] 0x8006c7d0
[<80060a20>] 0x80060a20
[<802d1a48>] 0x802d1a48
[<802d13a8>] 0x802d13a8

---[ end trace 85c3d4dc1fef0e68 ]---

Some info about the setup:

Linux harkko.valot.fi 2.6.32.10 #20 Tue Apr 6 15:01:26 CEST 2010 mips
GNU/Linux

kmod-ath9k - 2.6.32.10+2010-03-24-5
kmod-mac80211 - 2.6.32.10+2010-03-24-5

DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="10.03"
DISTRIB_CODENAME="backfire"
DISTRIB_DESCRIPTION="OpenWrt Backfire 10.03"

phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=48
phy1: Atheros AR9280 Rev:2 mem=0xb0010000, irq=49

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: HT rate warning with openwrt AP using wireless-compat and ath9k
  2010-05-01  9:27 HT rate warning with openwrt AP using wireless-compat and ath9k Kalle Valo
@ 2010-05-03 23:10 ` Luis R. Rodriguez
  2010-05-03 23:54   ` Luis R. Rodriguez
  2010-05-04 18:39   ` Kalle Valo
  2010-05-04  8:08 ` Felix Fietkau
  1 sibling, 2 replies; 6+ messages in thread
From: Luis R. Rodriguez @ 2010-05-03 23:10 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Sat, May 1, 2010 at 2:27 AM, Kalle Valo <kvalo@adurom.com> wrote:
> Hi,
>
> I'm running OpenWrt 10.03 on Netgear WNDR3700 and I'm having stability
> issues. The AP reboots few times a week, maybe even daily. I get the
> feeling that my wife's windows laptop is related to the reboots
> somehow, but I haven't investigated this in detail yet. Also I do not
> have access to serial console, so I don't have proper logs.
>
> But today the AP didn't reboot, wireless was just dead. I managed to
> find this with ssh:
>
> ------------[ cut here ]------------
> WARNING: at
> /home/openwrt/backfire/build/ar71xx/build_dir/linux-ar71xx/compat-wireless-2010-03-24/net/mac80211/rx.c:2528
> 0x83115884()
> Rate marked as an HT rate but passed status->rate_idx is not an MCS
> index [0-76]: 123 (0x7b)

This happens when the hardware passes up a frame with an invalid rate.
Instead of discarding them we just set the rate as 1 Mbps as the frame
is already processed and marked as OK but I'm starting to think that
is a mistake and we should just consider dropping them altogether.
This will need some more review.

For now lets review your specific case since it might be that you can
reproduce this. ath9k *should not* be passing up frames with a bad
rate index, in fact ath9k will override the rate to 0, the first rate,
which is 1mbps. In ath9k_process_rate() we have:

static u8 ath9k_process_rate(struct ath_common *common,
                             struct ieee80211_hw *hw,
                             struct ath_rx_status *rx_stats,
                             struct ieee80211_rx_status *rxs,
                             struct sk_buff *skb)
{
        struct ieee80211_supported_band *sband;
        enum ieee80211_band band;
        unsigned int i = 0;

        band = hw->conf.channel->band;
        sband = hw->wiphy->bands[band];

        if (rx_stats->rs_rate & 0x80) {
                /* HT rate */
                rxs->flag |= RX_FLAG_HT;
                if (rx_stats->rs_flags & ATH9K_RX_2040)
                        rxs->flag |= RX_FLAG_40MHZ;
                if (rx_stats->rs_flags & ATH9K_RX_GI)
                        rxs->flag |= RX_FLAG_SHORT_GI;
                return rx_stats->rs_rate & 0x7f;
        }

        for (i = 0; i < sband->n_bitrates; i++) {
                if (sband->bitrates[i].hw_value == rx_stats->rs_rate)
                        return i;
                if (sband->bitrates[i].hw_value_short == rx_stats->rs_rate) {
                        rxs->flag |= RX_FLAG_SHORTPRE;
                        return i;
                }
        }

        /* No valid hardware bitrate found -- we should not get here */
        ath_print(common, ATH_DBG_XMIT, "unsupported hw bitrate detected "
                  "0x%02x using 1 Mbit\n", rx_stats->rs_rate);
        if ((common->debug_mask & ATH_DBG_XMIT))
                print_hex_dump_bytes("", DUMP_PREFIX_NONE, skb->data, skb->len);

        return 0;
}

Can you enable ATH_DBG_XMIT on the box and see if this comes up?

        ATH_DBG_XMIT            = 0x00000080,

So just modprobe ath9k debug=0x80. I'll send an RFT patch soon.

  Luis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: HT rate warning with openwrt AP using wireless-compat and ath9k
  2010-05-03 23:10 ` Luis R. Rodriguez
@ 2010-05-03 23:54   ` Luis R. Rodriguez
  2010-05-03 23:56     ` Luis R. Rodriguez
  2010-05-04 18:39   ` Kalle Valo
  1 sibling, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2010-05-03 23:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Mon, May 3, 2010 at 4:10 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> 0x7b

Actually 0x7b fits 0x7f if the rate was marked as an HT rate by
hardware (0x80) so technically it could have been an HT rate marked as
0x7b and that is why you get the warning. So I wonder what hardware
rate 0xfb should be mapping to (0x7b | 0x80).

  Luis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: HT rate warning with openwrt AP using wireless-compat and ath9k
  2010-05-03 23:54   ` Luis R. Rodriguez
@ 2010-05-03 23:56     ` Luis R. Rodriguez
  0 siblings, 0 replies; 6+ messages in thread
From: Luis R. Rodriguez @ 2010-05-03 23:56 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Mon, May 3, 2010 at 4:54 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Mon, May 3, 2010 at 4:10 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
>> 0x7b
>
> Actually 0x7b fits 0x7f if the rate was marked as an HT rate by
> hardware (0x80) so technically it could have been an HT rate marked as
> 0x7b and that is why you get the warning. So I wonder what hardware
> rate 0xfb should be mapping to (0x7b | 0x80).

What I'm saying is I don't think you will hit that debug print I
pointed out, and we need to figure out what 0xfb or 0x7b should map
too as hardware seems to be spewing it out on RX'd frames.

  Luis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: HT rate warning with openwrt AP using wireless-compat and ath9k
  2010-05-01  9:27 HT rate warning with openwrt AP using wireless-compat and ath9k Kalle Valo
  2010-05-03 23:10 ` Luis R. Rodriguez
@ 2010-05-04  8:08 ` Felix Fietkau
  1 sibling, 0 replies; 6+ messages in thread
From: Felix Fietkau @ 2010-05-04  8:08 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On 2010-05-01 11:27 AM, Kalle Valo wrote:
> Hi,
> 
> I'm running OpenWrt 10.03 on Netgear WNDR3700 and I'm having stability
> issues. The AP reboots few times a week, maybe even daily. I get the
> feeling that my wife's windows laptop is related to the reboots
> somehow, but I haven't investigated this in detail yet. Also I do not
> have access to serial console, so I don't have proper logs.
> 
> But today the AP didn't reboot, wireless was just dead. I managed to
> find this with ssh:
> 
> ------------[ cut here ]------------
> WARNING: at
> /home/openwrt/backfire/build/ar71xx/build_dir/linux-ar71xx/compat-wireless-2010-03-24/net/mac80211/rx.c:2528
> 0x83115884()
I just posted the following patch to linux-wireless:
[PATCH] ath9k: fix another source of corrupt frames
It might reduce the frequency of these warnings, or fix them entirely.

- Felix

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: HT rate warning with openwrt AP using wireless-compat and ath9k
  2010-05-03 23:10 ` Luis R. Rodriguez
  2010-05-03 23:54   ` Luis R. Rodriguez
@ 2010-05-04 18:39   ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2010-05-04 18:39 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

"Luis R. Rodriguez" <mcgrof@gmail.com> writes:

>
> Can you enable ATH_DBG_XMIT on the box and see if this comes up?
>
>         ATH_DBG_XMIT            = 0x00000080,
>
> So just modprobe ath9k debug=0x80. I'll send an RFT patch soon.

I'm travelling right now and the AP is at home. I can test it
when I get back home, hopefully in two weeks.

/me prays for the volcano gods

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-04 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-01  9:27 HT rate warning with openwrt AP using wireless-compat and ath9k Kalle Valo
2010-05-03 23:10 ` Luis R. Rodriguez
2010-05-03 23:54   ` Luis R. Rodriguez
2010-05-03 23:56     ` Luis R. Rodriguez
2010-05-04 18:39   ` Kalle Valo
2010-05-04  8:08 ` Felix Fietkau

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).