Patchwork [net-next,11/15] be2net: pass proper hdr_size while flashing redboot.

login
register
mail settings
Submitter Ajit Khaparde
Date Feb. 11, 2011, 11:37 p.m.
Message ID <20110211233742.GA18457@akhaparde-VBox>
Download mbox | patch
Permalink /patch/82865/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ajit Khaparde - Feb. 11, 2011, 11:37 p.m.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
 drivers/net/benet/be_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 8975340..824d420 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2461,8 +2461,8 @@  static int be_flash_data(struct be_adapter *adapter,
 			continue;
 		if ((pflashcomp[i].optype == IMG_TYPE_REDBOOT) &&
 			(!be_flash_redboot(adapter, fw->data,
-			 pflashcomp[i].offset, pflashcomp[i].size,
-			 filehdr_size)))
+			pflashcomp[i].offset, pflashcomp[i].size, filehdr_size +
+			(num_of_images * sizeof(struct image_hdr)))))
 			continue;
 		p = fw->data;
 		p += filehdr_size + pflashcomp[i].offset