aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/emulex/benet/be_ethtool.c5
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index e34be1c7ae8a..c0e700653f96 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -910,8 +910,9 @@ static void be_set_fw_log_level(struct be_adapter *adapter, u32 level)
910 if (!status) { 910 if (!status) {
911 cfgs = (struct be_fat_conf_params *)(extfat_cmd.va + 911 cfgs = (struct be_fat_conf_params *)(extfat_cmd.va +
912 sizeof(struct be_cmd_resp_hdr)); 912 sizeof(struct be_cmd_resp_hdr));
913 for (i = 0; i < cfgs->num_modules; i++) { 913 for (i = 0; i < le32_to_cpu(cfgs->num_modules); i++) {
914 for (j = 0; j < cfgs->module[i].num_modes; j++) { 914 u32 num_modes = le32_to_cpu(cfgs->module[i].num_modes);
915 for (j = 0; j < num_modes; j++) {
915 if (cfgs->module[i].trace_lvl[j].mode == 916 if (cfgs->module[i].trace_lvl[j].mode ==
916 MODE_UART) 917 MODE_UART)
917 cfgs->module[i].trace_lvl[j].dbg_lvl = 918 cfgs->module[i].trace_lvl[j].dbg_lvl =
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 4d9677174490..4e81401259f9 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -3579,7 +3579,7 @@ u32 be_get_fw_log_level(struct be_adapter *adapter)
3579 if (!status) { 3579 if (!status) {
3580 cfgs = (struct be_fat_conf_params *)(extfat_cmd.va + 3580 cfgs = (struct be_fat_conf_params *)(extfat_cmd.va +
3581 sizeof(struct be_cmd_resp_hdr)); 3581 sizeof(struct be_cmd_resp_hdr));
3582 for (j = 0; j < cfgs->module[0].num_modes; j++) { 3582 for (j = 0; j < le32_to_cpu(cfgs->module[0].num_modes); j++) {
3583 if (cfgs->module[0].trace_lvl[j].mode == MODE_UART) 3583 if (cfgs->module[0].trace_lvl[j].mode == MODE_UART)
3584 level = cfgs->module[0].trace_lvl[j].dbg_lvl; 3584 level = cfgs->module[0].trace_lvl[j].dbg_lvl;
3585 } 3585 }