ltq-adsl-mei: improve memory allocation
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 30 Mar 2014 09:16:39 +0000 (09:16 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 30 Mar 2014 09:16:39 +0000 (09:16 +0000)
commit1fc6b2b02bf3aaa2349134253727ed8d12a23fe8
tree7b6bfb58dfa2134a174176c128ade027c118961f
parent40fbbd43f61f513e29dc21d421bc582da930be50
ltq-adsl-mei: improve memory allocation

The ltq-adsl-mei driver allocates memory for the ADSL firmware in a
rather stupid way, leading to several 128k allocations, which fail when
many services are enabled. This patch tries to allocate 64 kiB chunks,
and only falls back to larger allocations if the returned pointers are
not correctly aligned. Fixes out-of-memory errors on Danube boards with
32 MiB RAM.

Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40325 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/kernel/lantiq/ltq-adsl-mei/src/lantiq_mei.c