Kalle Valo <kalle.valo@xxxxxxxxx> writes: > Johannes Berg wrote: >> On Sat, 2009-03-14 at 19:14 +0200, Kalle Valo wrote: >> >>> +void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, >>> + struct ieee80211_hdr *hdr) >>> +{ >>> + /* timer triggers only when there is no unicast traffic */ >>> + if (!is_multicast_ether_addr(hdr->addr1)) >>> + mod_timer(&sdata->u.mgd.timer, >>> + jiffies + IEEE80211_MONITORING_INTERVAL); >>> +} >> >> Do we really need the multicast check? The frame will be coming from the >> AP in managed mode in both cases, so why regard the data path as idle >> when we're receiving multicast traffic? > > It seems that I had a good vacation because I can't remember anymore > why I added the check :D Too bad that even the comment I wrote was > next to useless. > > I'll remove the multicast check because I don't see the point for it. > And if in case I finally recall the reason I'll definitely add a > better comment. Now I remember what this test was about. In ieee80211_associated() there are two tests: probe request check after an data idle period (currently 60 secs) and beacon loss check for drivers not supporting filtering (2 secs). The former test has been originally (even before my beacon filter patches) implemented so that the probe request is sent even though we are receiving beacons. mod_timer() is called only for unicast traffic so that the probe request test will trigger when we are still receiving beacons. I'll add a proper comment explaining all this. Also currently ieee80211_associated() is called every two seconds, we need to fix this in future to avoid waking up cpu needlessly. I don't want to make too intrusive changes right now. -- Kalle Valo -- 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