Return-path: Received: from cora.hrz.tu-chemnitz.de ([134.109.228.40]:58364 "EHLO cora.hrz.tu-chemnitz.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423541Ab2LGRwC (ORCPT ); Fri, 7 Dec 2012 12:52:02 -0500 Message-ID: <50C22CBB.5060704@etit.tu-chemnitz.de> (sfid-20121207_185208_012851_97822119) Date: Fri, 07 Dec 2012 09:51:55 -0800 From: Marco Porsch MIME-Version: 1.0 To: devel@lists.open80211s.org CC: Thomas Pedersen , johannes@sipsolutions.net, linux-wireless@vger.kernel.org Subject: Re: [RFC] mac80211_hwsim: dont modify TBTT if beacon is already enabled References: <1354680761-32703-1-git-send-email-marco.porsch@etit.tu-chemnitz.de> In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms010406030000090005040507" Sender: linux-wireless-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms010406030000090005040507 Content-Type: multipart/mixed; boundary="------------090001020009010704070206" This is a multi-part message in MIME format. --------------090001020009010704070206 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable On 12/05/2012 12:26 PM, Thomas Pedersen wrote:> On Tue, Dec 4, 2012 at=20 8:12 PM, Marco Porsch > wrote: >> If the beacon is already enabled, do not modify the beacon timer.=20 This causes >> a hard TBTT adjustment and may cause mischief for powersave or=20 synchronization.j > > It might be clearer if you explain this patch actually defers "TBTT" > adjustment until the next beacon. This commit is supposed to not change the TBTT at all, if the beacon is=20 not enabled/disabled. Or do I misunderstand you here? Please clarify. >> Signed-off-by: Marco Porsch >> --- >> drivers/net/wireless/mac80211_hwsim.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/wireless/mac80211_hwsim.c=20 b/drivers/net/wireless/mac80211_hwsim.c >> index bc763d2..abfa7e6 100644 >> --- a/drivers/net/wireless/mac80211_hwsim.c >> +++ b/drivers/net/wireless/mac80211_hwsim.c >> @@ -1174,7 +1174,7 @@ static int mac80211_hwsim_config(struct=20 ieee80211_hw *hw, u32 changed) >> data->power_level =3D conf->power_level; >> if (!data->started || !data->beacon_int) >> del_timer(&data->beacon_timer); >> - else >> + else if (!timer_pending(&data->beacon_timer)) >> mod_timer(&data->beacon_timer, jiffies +=20 data->beacon_int); > > There is an immediate beacon timer adjustment in > mac80211_hwsim_bss_info_changed() as well. But that other one really has to change the TBTT because it changes the=20 beacon interval. --Marco --------------090001020009010704070206 Content-Type: text/x-vcard; charset=utf-8; name="marco_porsch.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="marco_porsch.vcf" begin:vcard fn:Marco Porsch n:Porsch;Marco org:Chemnitz University of Technology;Communication Networks adr;quoted-printable;quoted-printable:Fakult=3DC3=3DA4t f=3DC3=3DBCr Elek= trotechnik und Informationstechnik , Professur=3D Kommunikationsnetze;;Technische Universit=3DC3=3DA4t Chemnitz;Chemnitz;= ;D - 09107;Germany email;internet:marco.porsch@etit.tu-chemnitz.de title:Dipl.-Ing. tel;work:+49 371 531 37523 version:2.1 end:vcard --------------090001020009010704070206-- --------------ms010406030000090005040507 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIPPDCC BCEwggMJoAMCAQICAgDHMA0GCSqGSIb3DQEBBQUAMHExCzAJBgNVBAYTAkRFMRwwGgYDVQQK ExNEZXV0c2NoZSBUZWxla29tIEFHMR8wHQYDVQQLExZULVRlbGVTZWMgVHJ1c3QgQ2VudGVy MSMwIQYDVQQDExpEZXV0c2NoZSBUZWxla29tIFJvb3QgQ0EgMjAeFw0wNjEyMTkxMDI5MDBa Fw0xOTA2MzAyMzU5MDBaMFoxCzAJBgNVBAYTAkRFMRMwEQYDVQQKEwpERk4tVmVy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