From patchwork Fri Mar 25 05:59:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 12791301 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E721FC433FE for ; Fri, 25 Mar 2022 06:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358387AbiCYGBv (ORCPT ); Fri, 25 Mar 2022 02:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238643AbiCYGBu (ORCPT ); Fri, 25 Mar 2022 02:01:50 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C99C681C for ; Thu, 24 Mar 2022 23:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648188016; x=1679724016; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qlkNo0rlME38fjoU/3oXKjNCucC8om9fe5w4NImMYFQ=; b=YFYA9vOtzkxBJVDk4v5rsLqMWzZuPtJy1nq/v7PTeehZ8JlEn2Ci5B4u aFfUx7VgMv/Yeb0nEw5+BAlmWBS7OBMLFBsasKW9tEwgvFFjeHKRMcafL LKwdRUlJ3WN0W769tY0HgCI7IFH7A3hjo0elEVG4kIyIfSZ0VNt5IS0Ib k=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 24 Mar 2022 23:00:16 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2022 23:00:16 -0700 Received: from che-siroccolnx03.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 24 Mar 2022 23:00:14 -0700 From: Maharaja Kennadyrajan To: , CC: Maharaja Kennadyrajan Subject: [PATCH v6 3/3] ath11k: Add support for beacon tx mode Date: Fri, 25 Mar 2022 11:29:49 +0530 Message-ID: <20220325055949.3035053-4-quic_mkenna@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220325055949.3035053-1-quic_mkenna@quicinc.com> References: <20220325055949.3035053-1-quic_mkenna@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Add support to configure the beacon tx mode in the driver. Beacons can be sent out in burst(continuously in a single shot one after another) or staggered (equally spread out over beacon interval) mode. Use the below configuration in the hostapd/wpa_supplicant for AP/MESH mode to configure the beacon tx mode. "beacon_tx_mode=N", where N = 1 for STAGGERED beacon mode and N = 2 for BURST beacon mode. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-00480-QCAHKSWPL_SILICONZ-1 Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/mac.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 34a62933ccd2..46b8220a4e80 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3125,7 +3125,10 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, if (changed & BSS_CHANGED_BEACON) { param_id = WMI_PDEV_PARAM_BEACON_TX_MODE; - param_value = WMI_BEACON_STAGGERED_MODE; + if (info->beacon_tx_mode == NL80211_BEACON_BURST_MODE) + param_value = WMI_BEACON_BURST_MODE; + else + param_value = WMI_BEACON_STAGGERED_MODE; ret = ath11k_wmi_pdev_set_param(ar, param_id, param_value, ar->pdev->pdev_id); if (ret) @@ -3133,8 +3136,9 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, arvif->vdev_id); else ath11k_dbg(ar->ab, ATH11K_DBG_MAC, - "Set staggered beacon mode for VDEV: %d\n", - arvif->vdev_id); + "Set %s beacon mode for VDEV: %d mode: %d\n", + (param_value == WMI_BEACON_BURST_MODE) ? "burst" : "staggered", + arvif->vdev_id, param_value); if (!arvif->do_not_send_tmpl || !arvif->bcca_zero_sent) { ret = ath11k_mac_setup_bcn_tmpl(arvif);