From: Kalle Valo <kalle.valo@iki.fi>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH v1 2/3] mac80211: track beacons separately from the rx path activity
Date: Tue, 24 Feb 2009 20:52:51 +0200 [thread overview]
Message-ID: <87bpsry8e4.fsf@litku.valot.fi> (raw)
In-Reply-To: <1235441758.4455.64.camel@johannes.local> (Johannes Berg's message of "Mon\, 23 Feb 2009 18\:15\:58 -0800")
Johannes Berg <johannes@sipsolutions.net> writes:
> On Mon, 2009-02-23 at 18:37 +0200, Kalle Valo wrote:
>
>> @@ -1356,6 +1359,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
>> bss_conf->assoc_capability = capab_info;
>> ieee80211_set_associated(sdata, changed);
>>
>> + ifmgd->last_beacon = jiffies;
>> +
>
> That looks a little misplaced; I think it's actually intended
> anyway?
Yes, it's intended. We need to initialise the variable after a
successful association, otherwise this test in ieee80211_associated()
will trigger immediately:
if (time_after(jiffies,
ifmgd->last_beacon + IEEE80211_MONITORING_INTERVAL)) {
printk(KERN_DEBUG "%s: beacon loss from AP %pM "
"- sending probe request\n",
sdata->dev->name, ifmgd->bssid);
> Maybe add a comment?
I will.
>> - sta->last_rx = jiffies;
>> + if (rx->sdata->vif.type == NL80211_IFTYPE_STATION &&
>> + ieee80211_is_beacon(hdr->frame_control)) {
>> + rx->sdata->u.mgd.last_beacon = jiffies;
>> + } else
>> + sta->last_rx = jiffies;
>
> would it be more appropriate to do that in the function that processes
> the beacon in mlme.c? Or does that not work because of the workqueue and
> timing?
The test is there because I didn't want to include beacons to
sta->last_rx timestamp. That way I can send probe requests only during
data path idle period:
if (time_after(jiffies, sta->last_rx + IEEE80211_PROBE_IDLE_TIME)) {
ifmgd->flags |= IEEE80211_STA_PROBEREQ_POLL;
ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid,
ifmgd->ssid_len, NULL, 0);
}
sta->last_rx is used in master mode as well, so I might have to do
some trickery if I move the code to mlme.c. But I do share your
view of having mlme related code in mlme.c, it makes life a lot
easier. I need to think this a bit more.
--
Kalle Valo
next prev parent reply other threads:[~2009-02-24 18:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 16:37 [RFC PATCH v1 0/3] mac80211: beacon filtering Kalle Valo
2009-02-23 16:37 ` [RFC PATCH v1 1/3] mac80211: decrease execution of the associated timer Kalle Valo
2009-02-24 2:13 ` Johannes Berg
2009-02-24 18:40 ` Kalle Valo
2009-02-23 16:37 ` [RFC PATCH v1 2/3] mac80211: track beacons separately from the rx path activity Kalle Valo
2009-02-24 2:15 ` Johannes Berg
2009-02-24 18:52 ` Kalle Valo [this message]
2009-02-23 16:37 ` [RFC PATCH v1 3/3] mac80211: add beacon filtering support Kalle Valo
2009-02-23 17:47 ` Luis R. Rodriguez
2009-02-23 19:06 ` Kalle Valo
2009-02-23 19:11 ` Luis R. Rodriguez
2009-02-23 19:31 ` Kalle Valo
2009-02-23 19:58 ` Luis R. Rodriguez
2009-02-24 4:46 ` Luis R. Rodriguez
2009-02-24 5:17 ` Johannes Berg
2009-02-24 8:58 ` Jouni Malinen
2009-02-24 2:18 ` Johannes Berg
2009-02-24 20:34 ` Kalle Valo
2009-02-24 2:20 ` Johannes Berg
2009-02-24 9:01 ` Jouni Malinen
2009-02-24 18:36 ` Kalle Valo
2009-02-24 18:43 ` Jouni Malinen
2009-02-24 19:02 ` Kalle Valo
2009-02-24 18:30 ` Kalle Valo
2009-02-23 17:15 ` [PATCH] stlc45xx: " Kalle Valo
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=87bpsry8e4.fsf@litku.valot.fi \
--to=kalle.valo@iki.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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).