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: 10337875 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 BFF2B604D4 for ; Thu, 12 Apr 2018 04:14:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A07BE285C3 for ; Thu, 12 Apr 2018 04:14:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93142285C9; Thu, 12 Apr 2018 04:14:28 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F19EE285C3 for ; Thu, 12 Apr 2018 04:14:27 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=2ypXSWkhErEg3jdZHhNnO3++w1+E7SBqrQuZSA1rpOE=; b=OQH vSvoH9UxCubhtiBYBavGcUftTJQxi/RwxBIrXJuXBe+57TTvyG4KujpHwesXVlOiiMdklhf/ec6BF Xe0msLSl3xh6t7/zvulvz4FRlxt7y+BesLcECHtTK+FfsJL1Z5sKX7zI1TENxySqYxJVy5anKJHDd rKthsJ3PlBPv2OPS6E/I7CxuXXAM9N3qOfQKxmZWnGCyFkKPg2ZNLup1WwR0kPUR2J1+A6jn2jAsl T0G0Pa9DM/6V8RjpzOxSeDecle07hNfx5jXXhn4MPz4vJfH12EqTiPFoSro/huzNb8ouekMJCdQkU RJ0kVHYlxVvrBlFxvb4w938LEx+6qOg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6Tcr-0001tX-1Z; Thu, 12 Apr 2018 04:14:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6Tcp-0001sR-GP for ath10k@bombadil.infradead.org; Thu, 12 Apr 2018 04:14:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aszB9uTxuBIFUMxS4Lfu8mokD7rTv8ZgtTPbS51yR0U=; b=UGOCYRsR+TM+AFMsx1e7eGd4r vYff6N8uUjfKgckiCwniNfaB7yyUwW2gkhughzXq+d6tH2+c9eSZ7YG0Cej+PeYpSrWs1F0JVfnnt VGKJIWtnKwV/ymXEAeeBV53eDFkslq09O6a/3OzigrvQR7RlVavbjh/T4TKlo/IitAuH0hGarknra mJi/EF0+OpYN0ATxM9hCD56nVbC9SFdUs3nsZALP3gWFL6V96KyJ1WzU9+XzPapM9/mwwD/T9LoK7 pU8RIAOT9gnYglGNvXnnAS2gYZuljxsRMUvUYZFGtZdPayhx6l1WY6BLjgPrp+LQ04vWsjTEpAxmh YbwODjmVA==; Received: from smtp.codeaurora.org ([198.145.29.96]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6TTs-0004YN-EH for ath10k@lists.infradead.org; Thu, 12 Apr 2018 04:05:07 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 985D860F5F; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180412_050504_616222_1FA70E73 X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pradeep Kumar Chitrapu , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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); }