Skip to content

Commit

Permalink
bnxt_en: Fix build error for kernesl without RTC-LIB
Browse files Browse the repository at this point in the history
bnxt_hwrm_fw_set_time() now returns -EOPNOTSUPP when built for kernel
without RTC_LIB.  Setting the firmware time is not critical to the
successful completion of the firmware update process.

Signed-off-by: Rob Swindell <Rob.Swindell@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rob Swindell authored and David S. Miller committed Sep 20, 2016
1 parent 5a7a555 commit 878786d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -4323,6 +4323,7 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)

int bnxt_hwrm_fw_set_time(struct bnxt *bp)
{
#if IS_ENABLED(CONFIG_RTC_LIB)
struct hwrm_fw_set_time_input req = {0};
struct rtc_time tm;
struct timeval tv;
Expand All @@ -4340,6 +4341,9 @@ int bnxt_hwrm_fw_set_time(struct bnxt *bp)
req.minute = tm.tm_min;
req.second = tm.tm_sec;
return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
#else
return -EOPNOTSUPP;
#endif
}

static int bnxt_hwrm_port_qstats(struct bnxt *bp)
Expand Down

0 comments on commit 878786d

Please sign in to comment.