tg3: Cleanup firmware parsing code
authorNithin Sujir <nsujir@broadcom.com>
Wed, 6 Mar 2013 17:02:32 +0000 (17:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Mar 2013 20:31:32 +0000 (15:31 -0500)
The current firmware header parsing is complicated due to interpreting it as a
u32 array and accessing header members via array offsets. Add tg3_firmware_hdr
structure to access the firmware fields instead of hardcoding offsets. The same
header format will be used for individual firmware fragments in the 57766.

The fw_hdr and tg3 structures have all the information required for
loading the fw. Remove the redundant fw_info structure and pass fw_hdr
instead.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found