From: Johannes Berg Date: Tue, 26 Feb 2013 21:52:15 +0100 Subject: [ath9k-devel] [PATCHv2 2/3] mac80211: mesh power save doze scheduling In-Reply-To: <512B37BA.6060605@cozybit.com> (sfid-20130225_110654_178953_AA37B00E) References: <1361203709-16669-1-git-send-email-marco@cozybit.com> <1361203709-16669-2-git-send-email-marco@cozybit.com> (sfid-20130218_170842_350606_DE89DB9F) <1361372480.8629.33.camel@jlt4.sipsolutions.net> <512B37BA.6060605@cozybit.com> (sfid-20130225_110654_178953_AA37B00E) Message-ID: <1361911935.8440.18.camel@jlt4.sipsolutions.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Mon, 2013-02-25 at 11:06 +0100, Marco Porsch wrote: > > This is strange, why bother with the else if there's a continue? > > I don't quite get this comment. The current logic is like this: > > if (unrelated cases) { > continue; > } else if (related and blocking) { > allow = false; > break; > } else if (related, non-blocking and new minimum) { > min = sta->nexttbtt; > } Yeah I guess I don't see why it's not just if (unrelated cases) continue; if (related & blocking) { allow = false; break; } if (...) min = ... but it really doesn't matter much. > >> + } else if (test_sta_flag(sta, WLAN_STA_MPS_WAIT_FOR_CAB) || > >> + test_sta_flag(sta, WLAN_STA_MPSP_OWNER) || > >> + test_sta_flag(sta, WLAN_STA_MPSP_RECIPIENT) || > >> + !timer_pending(&sta->nexttbtt_timer) || > >> + time_after(jiffies, sta->nexttbtt_jiffies)) { > > > > Are you sure jiffies are good enough? Some systems have HZ=33 or so I > > think, which makes a jiffy like 30ms. > > Hm, jiffies is what I have available easily. Using the TSF would be > obvious but may suffer from delay when obtaining it. Umm... hrtimers again? I really don't care about your messed up timing stuff here, just saying :) johannes