Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2836111ybc; Mon, 25 Nov 2019 05:05:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzAxHi+fQjKTbMOG0M2bkdqtMp+bYZfPRTnxY13DEndcx+WGY63oiwheXi+TMNj/e3LcsGP X-Received: by 2002:a17:906:a28d:: with SMTP id i13mr20412505ejz.154.1574687129297; Mon, 25 Nov 2019 05:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574687129; cv=none; d=google.com; s=arc-20160816; b=K0NgvyvJv9dkqkmUqazWBMo89dTL4hUSQ7nMmW/jUPTH1o5MQdkyPqdXC6Afof1vPn Tv3j5LEDJXst5gU/ay29DPhSyTMeaVGp/xm0IvSusqvfX/MByqXEKWRF2SK4tyGoVTTW 4Ua8Z3+Nu2ODJVSHC+510zH26zk/+oaoFBkLYI4yDG4O1i9zSwxN7XevloNey/urt6hG 6eOY5RDtOYkeP4npp9Jl91JxJ3m7lHfF75XezVv6ZWD+kSmQQGS1JD5A3Z56D0j6jt7R BABjlIrrR8C2EXw0hiqqxwavEY/l9XvDMrPQeFIRZd2TRx8VsnANq6KPKplJzp2zQEw3 462w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ei2CrnbESd5GSxM6GttcVO/Q52SW6tsUqi7p6nfmnqM=; b=S6GKI3Nf8jtndWbLxJWqTj9vgBelM9oWV8xbMv7UEEta4HXb9Ww3VaKqFUjy9EM6up EmV4WLsFj5OsBujhWa2OueEoHS+5dyfEJJ6KjlFcX480OTlyBK1X/NhTAXMvuOZk1bgS ccFuPYFIq60l12LQcMgko3ngnWCQIxQY17CppOJIWCbfKu1qfWFuZsmg1/t7FTi6Oo01 DYjA5TqSEA4CzgUWlXBGYB9YX/Tl99Zn0LcFmwZXZtoPpe09LHh3SDwjvJJefzeIYKHX kgN3/8eTkyDRiMQPdigrV2fzNazlz65+6eqTOWTie94e+nYDHxjzXFIKEvilRRsbC7t+ 5USg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NXm3Ea7N; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z41si4872748edb.166.2019.11.25.05.04.50; Mon, 25 Nov 2019 05:05:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NXm3Ea7N; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727422AbfKYNAx (ORCPT + 99 others); Mon, 25 Nov 2019 08:00:53 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:32263 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727193AbfKYNAx (ORCPT ); Mon, 25 Nov 2019 08:00:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ei2CrnbESd5GSxM6GttcVO/Q52SW6tsUqi7p6nfmnqM=; b=NXm3Ea7Nw1QB5L7tES+Cr2Ut7CgvWMrLBHYPQwrQRwStNMxK6SIwu8u3TjW2JdXyDP0BHW zb5sJUAdg1L6jItEcf9/HcL6A1VPUsdSeUh6p9SEwG/EV3qWK62ez22SsBsiWQbEkJBt9s VbjHNclnBuoDCnmmuZrNCqj0Izv9uyw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-ym38DaT6PHW1usoSAWY3IQ-1; Mon, 25 Nov 2019 08:00:49 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 414AE184CAD7; Mon, 25 Nov 2019 13:00:48 +0000 (UTC) Received: from localhost (unknown [10.43.2.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2C22608D2; Mon, 25 Nov 2019 13:00:16 +0000 (UTC) Date: Mon, 25 Nov 2019 14:00:15 +0100 From: Stanislaw Gruszka To: Markus Theil Cc: nbd@nbd.name, linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com Subject: Re: [PATCH v8 2/6] mt76: mt76x02: split beaconing Message-ID: <20191125130014.GB28102@redhat.com> References: <20191121180001.22451-1-markus.theil@tu-ilmenau.de> <20191121180001.22451-3-markus.theil@tu-ilmenau.de> MIME-Version: 1.0 In-Reply-To: <20191121180001.22451-3-markus.theil@tu-ilmenau.de> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: ym38DaT6PHW1usoSAWY3IQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, Nov 21, 2019 at 06:59:57PM +0100, Markus Theil wrote: > +void mt76x02_mac_set_beacon_finish(struct mt76x02_dev *dev) > +{ > +=09mt76_wr(dev, MT_BCN_BYPASS_MASK, > +=09=090xff00 | ~bitrev8(dev->beacon_data_mask)); Since you arrange beacon slots continues starting from 0 (i.e. 0,1,2 instead of "random" vif_idx values like 0,4,6), I think it would make sense to keep MT_MAC_BSSID_DW1_MBEACON_N =3D bcn_idx - 1 and set mask unchanged. But no strong opinion here, code with bitrev8 looks fine too. > static void mt76x02u_beacon_enable(struct mt76x02_dev *dev, bool en) > { > -=09int i; > - > =09if (WARN_ON_ONCE(!dev->mt76.beacon_int)) > =09=09return; > =20 > =09if (en) { > =09=09mt76x02u_start_pre_tbtt_timer(dev); > -=09} else { > -=09=09/* Timer is already stopped, only clean up > -=09=09 * PS buffered frames if any. > -=09=09 */ Please keep comment that timer is already disabled and nothing else is needed. Stanislaw