[OpenWrt-Devel] [PATCH v3] kernel: ath10k-ct: provide a build variant for small RAM devices

Bjørn Mork bjorn at mork.no
Mon Dec 23 04:17:11 EST 2019


Paul Fertser <fercerpav at gmail.com> writes:

> --- /dev/null
> +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
> @@ -0,0 +1,100 @@
> +--- a/ath10k-4.19/pci.c
> ++++ b/ath10k-4.19/pci.c
> +@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> ++#ifndef CONFIG_ATH10K_SMALLBUFFERS
> + 		.dest_nentries = 512,
> ++#else
> ++		.dest_nentries = 128,
> ++#endif
> + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
> + 	},
> + 

Why not replace the magic numbers with a macro?  Then you could get away
with *one* "if configx then this else that"?  And preferably put it in a
header file.

Or maybe these things even could be made runtime configurable?  Buffers
of this size really should be IMHO, as there is no way to make one size
fit all.  As demonstrated...


Bjørn

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list