From 79c06a8dc90054dfc1a54f9aabbf164d5f8ffacc Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Sat, 27 Mar 2010 17:38:36 +0000 Subject: ar71xx: update image generation and trx header parsing for the WRT160NL * patch by Bernhard Loos * note: trailing whitespaces has been removed git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20525 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'target/linux/ar71xx/files') diff --git a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c b/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c index da54e0ff49..e42b3d4019 100644 --- a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c +++ b/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c @@ -123,12 +123,7 @@ static int wrt160nl_parse_partitions(struct mtd_info *master, goto free_hdr; } - kernel_len = uheader->ih_size / master->erasesize; - if (uheader->ih_size % master->erasesize) - kernel_len++; - - kernel_len++; - kernel_len *= master->erasesize; + kernel_len = le32_to_cpu(theader->offsets[1]) + sizeof(struct cybertan_header); trx_parts[0].name = "u-boot"; trx_parts[0].offset = 0; -- cgit v1.2.3