[PATCH] ath10k:add support for multicast rate control

Sven Eckelmann sven.eckelmann at openmesh.com
Thu Apr 12 01:00:02 PDT 2018


On Mittwoch, 11. April 2018 21:04:46 CEST Pradeep Kumar Chitrapu wrote:
> Issues wmi command to firmware when multicast rate change is received
> with the new BSS_CHANGED_MCAST_RATE flag.
[...]
>  
> +	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);
>  }
>  
> 

I see two major problems here without checking the actual implementation 
details:

* hw_value is incorrect for a couple of devices. Some devices use a different 
  mapping when they receive rates inforamtion (hw_value) then the ones you use
  for the mcast/bcast/beacon rate setting. I've handled in my POC patch like
  this:

    +		if (ath10k_mac_bitrate_is_cck(sband->bitrates[i].bitrate)) {
    +			preamble = WMI_RATE_PREAMBLE_CCK;
    +
    +			/* QCA didn't use the correct rate values for CA99x0
    +			 * and above (ath10k_g_rates_rev2)
    +			 */
    +			switch (sband->bitrates[i].bitrate) {
    +			case 10:
    +				hw_value = ATH10K_HW_RATE_CCK_LP_1M;
    +				break;
    +			case 20:
    +				hw_value = ATH10K_HW_RATE_CCK_LP_2M;
    +				break;
    +			case 55:
    +				hw_value = ATH10K_HW_RATE_CCK_LP_5_5M;
    +				break;
    +			case 110:
    +				hw_value = ATH10K_HW_RATE_CCK_LP_11M;
    +				break;
    +			}
    +		} else {
    +			preamble = WMI_RATE_PREAMBLE_OFDM;
    +		}

* bcast + mcast (+ mgmt) have to be set separately

I have attached my POC patch (which I was using for packet loss based mesh 
metrics) and to work around (using debugfs) the silly mgmt vs. mcast/bcast 
settings of the QCA fw for APs.

Many of the information came from Ben Greears ath10k-ct driver 
https://github.com/greearb/ath10k-ct 

Kind regards,	
	Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9536-ath10k-Allow-to-configure-bcast-mcast-rate.patch
Type: text/x-patch
Size: 9561 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/ath10k/attachments/20180412/5f828ed9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/ath10k/attachments/20180412/5f828ed9/attachment.sig>


More information about the ath10k mailing list