Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp533817pxa; Wed, 12 Aug 2020 08:02:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGgtcytJxGkA3IYyDeh4J828xH0bZLeR1eFaBhfRimB3UmHgzfqDepj9D0UDzif9LFXghg X-Received: by 2002:a05:6402:3102:: with SMTP id dc2mr340184edb.152.1597244540712; Wed, 12 Aug 2020 08:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597244540; cv=none; d=google.com; s=arc-20160816; b=DeCWgckb9fgroIl3a6C5cjb426NW3KbaMD8y1IOm604ry/c3i3skDIaEBnCh++eFMA 7rRruWRVK3XAR7DO6nC4UydJefPYbRZatUEhqhSjMAWl4t2NiLuoadPZ7Qs5gMNkPu22 hfagA00Kc1o2TpGzO9zmF2NoWLJx6wdv2zDc9R3xsWtyoS6p5aAvtTAsMsgT4JBWQ3qA iR5JDEFiH94YmfhNpvmQwSB/n+aREoAT771muDp/TQIcZabnrt2Bo54fDo2FfSVE+i0c EzozkPwl/BHnJrtKayfwtYHsuHLm3uyoY+MxtKEYzRr7KmZGL29O8McHecn/n46RUOHh K60A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bb1GiANgurewq/zTmUw1WZzl1nDNNCW9NOMLChXNjmE=; b=pSrbHMiQuHo7pwF+hJSuTGEQ7bvHRFppYm2pBs+3KcPnvcqv1BEnAn/CS/2lzVHsPy lvBcrTwfldQIB7jQm9rYtxBWLu+mOyvJPp9fECAFH4tKMWsXyVqmHXmSNd5wIYIQgRVa UwCGHMIPC9JrhGLwuFU5XZatc3fC4jSB0EiMTP4IYHqR8cI1J9if/V5Itwa26GhlTJ4U 6yRvv/ANp4PL6AEXp8zl9MF9d/ySDQUD/WG5Md+xfEh4knCiG2GJZcdtsMnJjvel1YF7 Ds8gSfy3GEOBkiX7SerQwTtTjEViTaSh/ZowceDzO/pMFDePmIMCc2XDunrT6SZ2d5P8 Ycfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si1494637edi.123.2020.08.12.08.01.54; Wed, 12 Aug 2020 08:02:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726673AbgHLPBW (ORCPT + 99 others); Wed, 12 Aug 2020 11:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbgHLPBI (ORCPT ); Wed, 12 Aug 2020 11:01:08 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF149C06138A for ; Wed, 12 Aug 2020 08:01:02 -0700 (PDT) Received: from [149.224.82.90] (helo=localhost.localdomain) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1k5sFO-0002OP-QU; Wed, 12 Aug 2020 17:00:59 +0200 From: John Crispin To: Johannes Berg Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Subject: [PATCH V3 8/9] ath11k: add EMA beacon support Date: Wed, 12 Aug 2020 17:00:49 +0200 Message-Id: <20200812150050.2683396-9-john@phrozen.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200812150050.2683396-1-john@phrozen.org> References: <20200812150050.2683396-1-john@phrozen.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org We need to update the beacon in multiple bssid mode after each completion event to get the next EMA beacon. Signed-off-by: John Crispin --- drivers/net/wireless/ath/ath11k/mac.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 08e7f4ac8a26..306f123c09a7 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -791,7 +791,10 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) if (arvif->vdev_type != WMI_VDEV_TYPE_AP) return 0; - bcn = ieee80211_beacon_get_template(hw, vif, &offs); + if (arvif->vif->multiple_bssid.non_transmitted) + return 0; + + bcn = ieee80211_beacon_get_template_ema(hw, vif, &offs); if (!bcn) { ath11k_warn(ab, "failed to get beacon template from mac80211\n"); return -EPERM; @@ -822,16 +825,23 @@ static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif) { struct ieee80211_vif *vif = arvif->vif; + int multiple_bssid = 0; - if (!vif->cca_active) + if (!vif->multiple_bssid.non_transmitted && + !list_empty(&vif->multiple_bssid.list)) + multiple_bssid = 1; + + if (!multiple_bssid && !vif->cca_active) return; - if (ieee80211_beacon_cntdwn_is_complete(vif)) { + if (vif->cca_active && ieee80211_beacon_cntdwn_is_complete(vif)) { ieee80211_cca_finish(vif); return; } - ieee80211_beacon_update_cntdwn(vif); + if (vif->cca_active) + ieee80211_beacon_update_cntdwn(vif); + ath11k_mac_setup_bcn_tmpl(arvif); } -- 2.25.1