Return-path: Received: from mail-it0-f65.google.com ([209.85.214.65]:35891 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbdBOTDk (ORCPT ); Wed, 15 Feb 2017 14:03:40 -0500 Received: by mail-it0-f65.google.com with SMTP id f200so11124743itf.3 for ; Wed, 15 Feb 2017 11:03:40 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <87r32z968n.fsf@purkki.adurom.net> References: <1487100985-4194-1-git-send-email-gucea.doru@gmail.com> <87r32z968n.fsf@purkki.adurom.net> From: Gucea Doru Date: Wed, 15 Feb 2017 21:03:39 +0200 Message-ID: (sfid-20170215_200343_090964_47F7D8F4) Subject: Re: [RFC-PATCH] ath9k_htc: Adjust beacon timers for Power Save To: Kalle Valo Cc: linux-wireless , ath9k_htc_fw@lists.infradead.org, Andra Paraschiv , Costin Raiciu , Dragos N Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, Feb 15, 2017 at 11:02 AM, Kalle Valo wrote: > Doru writes: > >> From: Doru Gucea >> >> Each time we receive a beacon we need to adjust the hardware >> timers for next DTIM and next TBTT. >> >> Before this commit, the Power Save behaviour was incorrect. >> The scenario was: >> - STA receives a beacon from AP with TIM unset; >> - mac80211 layers puts the chip to sleep; >> - chip is woken up by mac80211's software timer reponsible for >> beacon miss after 7 * beacon_interval period. >> >> Normally the chip should sleep at most DTIM period. This commit >> configures hardware timers for waking up the chip correctly. >> >> More details on the wiki: >> https://github.com/doru91/linux-stable/wiki/Single-Interface-Power-Save >> >> Signed-off-by: Doru Gucea >> --- >> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 4 ++++ >> net/mac80211/mlme.c | 6 ++++++ >> 2 files changed, 10 insertions(+) > > [...] > >> --- a/net/mac80211/mlme.c >> +++ b/net/mac80211/mlme.c >> @@ -3536,6 +3536,12 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, >> sdata->vif.bss_conf.sync_dtim_count = 0; >> } >> >> + /* trigger hardware timers adjustment >> + * this needs to be done before beacon filtering >> + */ >> + changed |= BSS_CHANGED_BEACON_INFO; >> + ieee80211_bss_info_change_notify(sdata, changed); > > You shouldn't mix driver and mac80211 changes in the same patch, I > suspect Johannes didn't even notice this change because of that. Create > a new patchset with two patches, one for ath9k and another for mac80211. Thanks, I've just sent two patches as you suggested. > > -- > Kalle Valo