From patchwork Thu Apr 12 04:04:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pradeep Kumar Chitrapu X-Patchwork-Id: 10337869 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 62A25603B5 for ; Thu, 12 Apr 2018 04:04:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 551E8285AB for ; Thu, 12 Apr 2018 04:04:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49728285B0; Thu, 12 Apr 2018 04:04:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C727B285AB for ; Thu, 12 Apr 2018 04:04:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750959AbeDLEEv (ORCPT ); Thu, 12 Apr 2018 00:04:51 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39860 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbeDLEEv (ORCPT ); Thu, 12 Apr 2018 00:04:51 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8784660F74; Thu, 12 Apr 2018 04:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523505890; bh=0uqq4eLa1pE536lflb5GDBzmSqFDXNhJcJCFT1r4aGU=; h=From:To:Cc:Subject:Date:From; b=NF7LFiwi6ZOTFIUbfBST2RrWnOXWq7ZLNZdcs8hm59fE2qJRPrj75W881CU6A2+K9 S3GIBV1tvLeSrXoIhQoI41g5wj1JiOJJXVhh423CvS0ZNcm9RLEp6VUHxVQE/dftyB YV1OOWWLggVNqifkn55NdXOCShgPjRHpMU1Wedxk= Received: from pradeepc-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pradeepc@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 021CB6079B; Thu, 12 Apr 2018 04:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523505890; bh=0uqq4eLa1pE536lflb5GDBzmSqFDXNhJcJCFT1r4aGU=; h=From:To:Cc:Subject:Date:From; b=NF7LFiwi6ZOTFIUbfBST2RrWnOXWq7ZLNZdcs8hm59fE2qJRPrj75W881CU6A2+K9 S3GIBV1tvLeSrXoIhQoI41g5wj1JiOJJXVhh423CvS0ZNcm9RLEp6VUHxVQE/dftyB YV1OOWWLggVNqifkn55NdXOCShgPjRHpMU1Wedxk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 021CB6079B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pradeepc@codeaurora.org From: Pradeep Kumar Chitrapu To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu Subject: [PATCH] ath10k:add support for multicast rate control Date: Wed, 11 Apr 2018 21:04:46 -0700 Message-Id: <1523505886-14695-1-git-send-email-pradeepc@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Issues wmi command to firmware when multicast rate change is received with the new BSS_CHANGED_MCAST_RATE flag. Signed-off-by: Pradeep Kumar Chitrapu --- drivers/net/wireless/ath/ath10k/mac.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index bf05a36..63af46f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5419,8 +5419,12 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, { struct ath10k *ar = hw->priv; struct ath10k_vif *arvif = (void *)vif->drv_priv; - int ret = 0; + struct ieee80211_supported_band *sband; + struct cfg80211_chan_def def; u32 vdev_param, pdev_param, slottime, preamble; + int rate_index, ret = 0; + u8 rate; + enum nl80211_band band; mutex_lock(&ar->conf_mutex); @@ -5588,6 +5592,25 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, arvif->vdev_id, ret); } + if (changed & BSS_CHANGED_MCAST_RATE && + !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) { + band = def.chan->band; + sband = &ar->mac.sbands[band]; + vdev_param = ar->wmi.vdev_param->mcast_data_rate; + rate_index = vif->bss_conf.mcast_rate[band] - 1; + rate = ATH10K_HW_MCS_RATE(sband->bitrates[rate_index].hw_value); + ath10k_dbg(ar, ATH10K_DBG_MAC, + "mac vdev %d mcast_rate %d\n", + arvif->vdev_id, rate); + + ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, + vdev_param, rate); + if (ret) + ath10k_warn(ar, + "failed to set mcast rate on vdev" + " %i: %d\n", arvif->vdev_id, ret); + } + mutex_unlock(&ar->conf_mutex); }