From patchwork Tue Mar 20 23:52:09 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: 10298173 X-Patchwork-Delegate: johannes@sipsolutions.net 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 4660C602C2 for ; Tue, 20 Mar 2018 23:52:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D3C8296CD for ; Tue, 20 Mar 2018 23:52:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21E6D296E2; Tue, 20 Mar 2018 23:52:27 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 A2E4A296CD for ; Tue, 20 Mar 2018 23:52:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbeCTXwY (ORCPT ); Tue, 20 Mar 2018 19:52:24 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:29534 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbeCTXwX (ORCPT ); Tue, 20 Mar 2018 19:52:23 -0400 X-IronPort-AV: E=Sophos;i="5.48,337,1517904000"; d="scan'208";a="125114301" Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by sabertooth01.qualcomm.com with ESMTP; 20 Mar 2018 16:52:23 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8838"; a="122315351" Received: from pradeepc-linux.qualcomm.com ([10.234.220.147]) by ironmsg03-sd.qualcomm.com with ESMTP; 20 Mar 2018 16:52:22 -0700 Received: by pradeepc-linux.qualcomm.com (Postfix, from userid 204078) id 980AF206F; Tue, 20 Mar 2018 16:52:22 -0700 (PDT) From: Pradeep Kumar Chitrapu To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu Subject: [PATCH] mac80211: notify driver for change in multicast rates Date: Tue, 20 Mar 2018 16:52:09 -0700 Message-Id: <1521589929-13997-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 It is required to pass the rate information to driver/firmware when rate control is offloaded to firmware. This helps in changing multicast traffic rates thereby improving the network performance. Signed-off-by: Pradeep Kumar Chitrapu --- include/net/mac80211.h | 1 + net/mac80211/cfg.c | 2 ++ net/mac80211/util.c | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 4c99c13..4360765 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -336,6 +336,7 @@ enum ieee80211_bss_change { BSS_CHANGED_OCB = 1<<22, BSS_CHANGED_MU_GROUPS = 1<<23, BSS_CHANGED_KEEP_ALIVE = 1<<24, + BSS_CHANGED_MCAST_RATE = 1<<25, /* when adding here, make sure to change ieee80211_reconfig */ }; diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 0763792..22bb82e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2313,6 +2313,8 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev, memcpy(sdata->vif.bss_conf.mcast_rate, rate, sizeof(int) * NUM_NL80211_BANDS); + ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_MCAST_RATE); + return 0; } diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 6aef679..6594df0 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1971,7 +1971,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) BSS_CHANGED_CQM | BSS_CHANGED_QOS | BSS_CHANGED_IDLE | - BSS_CHANGED_TXPOWER; + BSS_CHANGED_TXPOWER | + BSS_CHANGED_MCAST_RATE; if (sdata->vif.mu_mimo_owner) changed |= BSS_CHANGED_MU_GROUPS;