Search Linux Wireless

Re: [PATCH 07/13] ath10k: implement host memory chunks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bartosz Markowski <bartosz.markowski@xxxxxxxxx> 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@xxxxxxxxx>

[...]

> +		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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux