Em Tuesday 29 July 2008 18:12:58 Kalle Valo escreveu: > Herton Ronaldo Krzesinski <herton@xxxxxxxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html