aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wimax/i2400m/fw.c')
-rw-r--r--drivers/net/wimax/i2400m/fw.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
index 3d67bcfc7b58..97ea78406725 100644
--- a/drivers/net/wimax/i2400m/fw.c
+++ b/drivers/net/wimax/i2400m/fw.c
@@ -720,14 +720,17 @@ ssize_t i2400m_dnload_bcf(struct i2400m *i2400m,
720 "downloading section #%zu (@%zu %zu B) to 0x%08x\n", 720 "downloading section #%zu (@%zu %zu B) to 0x%08x\n",
721 section, offset, sizeof(*bh) + data_size, 721 section, offset, sizeof(*bh) + data_size,
722 le32_to_cpu(bh->target_addr)); 722 le32_to_cpu(bh->target_addr));
723 if (i2400m_brh_get_opcode(bh) == I2400M_BRH_SIGNED_JUMP) { 723 /*
724 /* Secure boot needs to stop here */ 724 * We look for JUMP cmd from the bootmode header,
725 d_printf(5, dev, "signed jump found @%zu\n", offset); 725 * either I2400M_BRH_SIGNED_JUMP for secure boot
726 * or I2400M_BRH_JUMP for unsecure boot, the last chunk
727 * should be the bootmode header with JUMP cmd.
728 */
729 if (i2400m_brh_get_opcode(bh) == I2400M_BRH_SIGNED_JUMP ||
730 i2400m_brh_get_opcode(bh) == I2400M_BRH_JUMP) {
731 d_printf(5, dev, "jump found @%zu\n", offset);
726 break; 732 break;
727 } 733 }
728 if (offset + section_size == bcf_len)
729 /* Non-secure boot stops here */
730 break;
731 if (offset + section_size > bcf_len) { 734 if (offset + section_size > bcf_len) {
732 dev_err(dev, "fw %s: bad section #%zu, " 735 dev_err(dev, "fw %s: bad section #%zu, "
733 "end (@%zu) beyond EOF (@%zu)\n", 736 "end (@%zu) beyond EOF (@%zu)\n",