From patchwork Fri Dec 6 14:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 11276549 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44510139A for ; Fri, 6 Dec 2019 14:34:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 229322464E for ; Fri, 6 Dec 2019 14:34:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VNxdRBB+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 229322464E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=phrozen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0Lm652oxuVZu83TPcbT3lG+UquR4wdMvF5BeHN+Th58=; b=VNxdRBB+7qjWd3 mqnJhvJHciiwhLJ0U/4Z6tt6Bnd0V4bB1Pad/nB3pUtSzOcN1fjCguk0UHR/q2ldUrmlsHsUvZPs/ gIq6s4C8w2NzSuk0IRNeG9rjyKlEEWQbiNPD6tdRw0mr1R5+8IZFYwXiCP3Rx4qGrWteJF6lEPddb BetgRz7Qlzpx9cZ0Frqfi0mb8eHIZAryAAb9w1gMqgqTCxi1Kp+0Jxy15DvdIZqEBUG2rgtZUb5I2 ms1TObqJBwk6VfePmNKpNqSoF3Mv7/XPZw/3WH98M90hpJ6xFc4zaELV+gkKf6wevvZyO7C7lqtgZ RYm0aPHS+qT9DBdugwsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1idEgS-0006zI-8Q; Fri, 06 Dec 2019 14:34:16 +0000 Received: from nbd.name ([2a01:4f8:221:3d45::2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1idEgM-0006uX-Pn for ath11k@lists.infradead.org; Fri, 06 Dec 2019 14:34:13 +0000 Received: from tmo-101-57.customers.d1-online.com ([80.187.101.57] helo=bertha.datto.lan) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1idEgJ-0004Lm-28; Fri, 06 Dec 2019 15:34:07 +0100 From: John Crispin To: Johannes Berg , Kalle Valo Subject: [PATCH 7/7] ath11k: add handling for BSS color Date: Fri, 6 Dec 2019 15:34:01 +0100 Message-Id: <20191206143401.4080-7-john@phrozen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191206143401.4080-1-john@phrozen.org> References: <20191206143401.4080-1-john@phrozen.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191206_063410_988626_16C4FD3C X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org This patch adds code to handle the BSS_CHANGED_BSS_COLOR flag. IT will trigger the propagation of BSS color settings into the FW. Handling is slightly different between AP and STA interfaces. Signed-off-by: John Crispin --- drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 6a8c1c3b8da2..c692922513b2 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1928,6 +1928,19 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, ath11k_wmi_send_obss_spr_cmd(ar, arvif->vdev_id, &info->he_obss_pd); + if (changed & BSS_CHANGED_HE_BSS_COLOR) { + if (vif->type == NL80211_IFTYPE_AP) { + ath11k_wmi_send_obss_color_collision_cfg_cmd( + ar, arvif->vdev_id, info->he_bss_color.color, + ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS, + !info->he_bss_color.disabled); + } else if (vif->type == NL80211_IFTYPE_STATION) { + ath11k_wmi_send_bss_color_change_enable_cmd(ar, arvif->vdev_id, 1); + ath11k_wmi_send_obss_color_collision_cfg_cmd(ar, arvif->vdev_id, 0, + ATH11K_BSS_COLOR_COLLISION_DETECTION_STA_PERIOD_MS, 1); + } + } + mutex_unlock(&ar->conf_mutex); }