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@xxxxxxxxxxxxxx> --- 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