From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> Subject: [PATCH] ath10k:add support for multicast rate control Date: Wed, 11 Apr 2018 21:04:46 -0700 [thread overview] Message-ID: <1523505886-14695-1-git-send-email-pradeepc@codeaurora.org> (raw) 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 <pradeepc@codeaurora.org> --- 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); } -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> To: ath10k@lists.infradead.org Cc: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>, linux-wireless@vger.kernel.org Subject: [PATCH] ath10k:add support for multicast rate control Date: Wed, 11 Apr 2018 21:04:46 -0700 [thread overview] Message-ID: <1523505886-14695-1-git-send-email-pradeepc@codeaurora.org> (raw) 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 <pradeepc@codeaurora.org> --- 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); } -- 1.9.1 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next reply other threads:[~2018-04-12 4:04 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-12 4:04 Pradeep Kumar Chitrapu [this message] 2018-04-12 4:04 ` [PATCH] ath10k:add support for multicast rate control Pradeep Kumar Chitrapu 2018-04-12 8:00 ` Sven Eckelmann 2018-04-12 8:00 ` Sven Eckelmann 2020-12-21 17:23 ` Kalle Valo 2020-12-21 17:23 ` Kalle Valo 2018-04-17 5:10 pradeepc 2018-04-17 5:10 ` pradeepc 2018-04-17 6:33 ` Sven Eckelmann 2018-04-17 6:33 ` Sven Eckelmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1523505886-14695-1-git-send-email-pradeepc@codeaurora.org \ --to=pradeepc@codeaurora.org \ --cc=ath10k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.