linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
To: Kalle Valo <kalle.valo@nokia.com>
Cc: "Hin-Tak Leung" <hintak.leung@gmail.com>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Pavel Roskin" <proski@gnu.org>,
	linux-wireless@vger.kernel.org
Subject: Re: Commit 741b4fbc44 (mac80211: fix TX sequence numbers) breaks rtl8187
Date: Wed, 30 Jul 2008 00:37:49 -0300	[thread overview]
Message-ID: <200807300037.50088.herton@mandriva.com.br> (raw)
In-Reply-To: <87d4kwl7hh.fsf@nokia.com>

Em Tuesday 29 July 2008 18:12:58 Kalle Valo escreveu:
> Herton Ronaldo Krzesinski <herton@mandriva.com.br> writes:
> >> I also wonder how Herton encountered the problem :-). Older
> >> wireless-testing simply say "unimplemented" or something if one
> >> tries to set power-saving. Maybe Herton has a few devices which he
> >> routinely tries out every part of iwconfig?
> >
> > The original sequence of commands:
> > [1] /sbin/ip link set dev wlan0 down
> > [2] /sbin/ip link set dev wlan0 up
> > [3] /sbin/iwconfig wlan0 power on
> > [4] /sbin/iwconfig wlan0 essid any
> > [5] /sbin/iwconfig wlan0 power on
> > [6] /sbin/iwconfig wlan0 essid <my AP>
> > [7] /sbin/iwconfig wlan0 key open <my key>
> >
> > That show the issue on rtl8187b I have to test just is near on what
> > Mandriva 2008.0 ifup-wireless script does, so that's what first made me
> > catch the bug. the '... power on' after '... essid any' is what causes
> > later the association or any scan attempt to fail, if I place a sleep
> > between [4] and [5] I don't get the problem too.
>
> Thanks for the clarification, this kind of information is important
> when reporting a bug.
>
> > The problem is, I couldn't see yet how a power on after essid any
> > could cause this.
>
> I'm guessing that it has something to do ieee80211_ioctl_siwpower()
> calling ieee80211_hw_config(local) which ends up as an extra call to
> rtl8187_config(). I do not know why this is a problem for rtl8187b.

You are right, I was looking at wrong place, indeed the issue is on rtl8187. 
The problem here is that mac80211 can call rtl8187_config while another 
instance of it is still running, and on rtl8187_config this is a critical 
section:

...
        /* Enable TX loopback on MAC level to avoid TX during channel
         * changes, as this has be seen to causes problems and the
         * card will stop work until next reset
         */
        rtl818x_iowrite32(priv, &priv->map->TX_CONF,
                          reg | RTL818X_TX_CONF_LOOPBACK_MAC);
        msleep(10);
        priv->rf->set_chan(dev, conf);
        msleep(10);
        rtl818x_iowrite32(priv, &priv->map->TX_CONF, reg);
...

My sequence of commands trigger this, so there are cases where it disables TX 
loopback while there are another instance that can be still 
inside ->set_chan, that's explain also why card stops to work. This section 
should be lock protected or mac80211 ensure to not call local->ops->config 
while another call is still running.

>
> It would help if you, or someone else seeing the same problem, could
> provide more information by enabling MAC80211_VERBOSE_DEBUG and
> MAC80211_LOWTX_FRAME_DUMP config options, and sending the kernel log
> output here. I don't have a rtl8187b card myself so I cannot test
> this.

-- 
[]'s
Herton

  reply	other threads:[~2008-07-30  3:38 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 15:02 [RFC/RFT] rtl8187: Improve wireless statistics for RTL8187B Larry Finger
2008-07-19  0:42 ` Herton Ronaldo Krzesinski
2008-07-19  4:14   ` Larry Finger
2008-07-20  0:39     ` Hin-Tak Leung
2008-07-20  2:55       ` Larry Finger
2008-07-22 19:13         ` Herton Ronaldo Krzesinski
2008-07-22 22:25           ` Hin-Tak Leung
2008-07-22 22:40             ` Herton Ronaldo Krzesinski
2008-07-23  3:49               ` Larry Finger
2008-07-23  5:43                 ` Commit 741b4fbc44 (mac80211: fix TX sequence numbers) breaks rtl8187 Larry Finger
2008-07-23 12:55                   ` Stefanik Gábor
2008-07-24 14:22                     ` Johannes Berg
2008-07-23 14:55                   ` Johannes Berg
2008-07-23 15:32                     ` Larry Finger
2008-07-23 16:27                       ` Johannes Berg
2008-07-23 18:03                         ` Larry Finger
2008-07-23 19:03                           ` Johannes Berg
2008-07-24  3:28                       ` Hin-Tak Leung
2008-07-24  5:40                         ` Larry Finger
2008-07-24  8:05                           ` Hin-Tak Leung
2008-07-24 11:34                             ` Johannes Berg
2008-07-25  3:42                             ` Hin-Tak Leung
2008-07-24 16:37                           ` Herton Ronaldo Krzesinski
2008-07-25  1:28                             ` Hin-Tak Leung
2008-07-29  2:39                       ` Hin-Tak Leung
2008-07-29  3:15                         ` Larry Finger
2008-07-29  3:29                           ` Herton Ronaldo Krzesinski
2008-07-29  3:40                             ` Larry Finger
2008-07-29  3:21                         ` Herton Ronaldo Krzesinski
2008-07-29  6:53                           ` Johannes Berg
2008-07-29  8:23                             ` Tomas Winkler
2008-07-29  8:28                               ` Johannes Berg
2008-07-29  8:38                                 ` Tomas Winkler
2008-07-29  9:16                                   ` Johannes Berg
2008-07-29  9:26                                     ` Tomas Winkler
2008-07-29  9:29                                       ` Johannes Berg
2008-07-29 11:16                                         ` Tomas Winkler
2008-07-29 11:18                                           ` Johannes Berg
2008-07-29 21:44                                             ` Kalle Valo
2008-07-29 21:40                                     ` Kalle Valo
2008-07-29 21:26                                 ` Kalle Valo
2008-07-29 21:19                               ` Kalle Valo
2008-07-30  1:01                                 ` Hin-Tak Leung
2008-07-29 21:17                             ` Kalle Valo
2008-07-29 21:12                           ` Kalle Valo
2008-07-30  3:37                             ` Herton Ronaldo Krzesinski [this message]
2008-07-30  8:54                               ` Kalle Valo
2008-07-30  9:52                                 ` Johannes Berg

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=200807300037.50088.herton@mandriva.com.br \
    --to=herton@mandriva.com.br \
    --cc=Larry.Finger@lwfinger.net \
    --cc=hintak.leung@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=kalle.valo@nokia.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=proski@gnu.org \
    /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).