diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-27 17:38:36 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-27 17:38:36 +0000 |
commit | 82992995248a80b24b854ec8f2edd4496f92b84b (patch) | |
tree | 81cb463a8c8d13b1f52ad668c26bdf043d0be785 /target/linux/ar71xx/files/drivers | |
parent | 07f362a34dee5a659a57b9a6e332322706d58f13 (diff) |
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
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c b/target/linux/ar71xx/files/drivers/mtd/wrt160nl_part.c index da54e0ff4..e42b3d401 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; |