[PATCH 07/13] ath10k: implement host memory chunks
Kalle Valo
kvalo at qca.qualcomm.com
Thu Sep 26 05:04:12 EDT 2013
Bartosz Markowski <bartosz.markowski at tieto.com> writes:
> 10.X firmware can request a memory pool from host to offload
> it's own resources. This is a feature designed especially
> for AP mode where the target has to deal with large number
> of peers.
>
> So we allocate and map a consistent DMA memory which FW can
> use to store e.g. peer rate contol maps.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski at tieto.com>
[...]
> + if (num_unit_info) {
> + if (num_unit_info & NUM_UNITS_IS_NUM_PEERS)
> + /* number of units to allocate is number of
> + * peers, 1 extra for self peer on target */
> + /* this needs to be tied, host and target
> + * can get out of sync */
> + num_units = TARGET_NUM_PEERS + 1;
> + if (num_unit_info & NUM_UNITS_IS_NUM_VDEVS)
> + num_units = TARGET_NUM_VDEVS + 1;
> + }
The outer if test looks useless. I think this can be simplified to just:
if (num_unit_info & NUM_UNITS_IS_NUM_PEERS)
....
else if (num_unit_info & NUM_UNITS_IS_NUM_VDEVS)
...
--
Kalle Valo
More information about the ath10k
mailing list