[OpenWrt-Devel] [PATCH] mac80211: fix WARN_ON_ONCE() caused by inbalanced set/clear of beacon enable bit.
John Crispin
blogic at openwrt.org
Mon Aug 25 03:59:12 EDT 2014
On 25/08/2014 09:55, Yousong Zhou wrote:
> As I deem myself not yet equipped with the necessary knowledge of all
> three interface types of rt2x00 device, I should at this point say
> "no, I am not sure". It's based on the following observation.
same here, i don't know the 3 modes that well either. lets wait for
roman and daniel to comment and then try to fix it the next days so it
can be part of BB-final
John
> In previous patch I only changed that condition into
>
> if (!rt2x00_is_pci(rt2x00dev))
>
> to exclude mt7620a from this "pci" group and it did silence the
> WARNING initially reported in #17032.
>
> Later I found that wasn't enough, the WARNING could still be triggered
> randomly by command like `iw dev wlan0 scan`. Then I found
> rt2x00queue_update_beacon() was called unconditionally by
> rt2800mmio_tbtt_tasklet() which was registered as callback function
> for both rt2800soc and rt2800pci. If the comment that "PCI devices
> fetch beacons periodically" refers to tasklet serving interrupts, then
> the same mechanism also applies to SoC devices.
>
> ENTRY_BCN_ENABLED is set by rt2x00queue_update_beacon() and cleared by
> rt2x00queue_clear_beacon(). The number of entries with bit
> ENTRY_BCN_ENABLED set will be test against intf_beaconing. If they do
> not match, WARN_ON_ONCE will be triggered. So I think race condition
> can occur with that if() clause, that's why it is removed altogether
> in this patch.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list