Skip to content

Commit 878786d

Browse files
Rob Swindelldavem330
authored andcommitted
bnxt_en: Fix build error for kernesl without RTC-LIB
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>
1 parent 5a7a555 commit 878786d

File tree

1 file changed

+4
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+4
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4323,6 +4323,7 @@ static int bnxt_hwrm_ver_get(struct bnxt *bp)
43234323

43244324
int bnxt_hwrm_fw_set_time(struct bnxt *bp)
43254325
{
4326+
#if IS_ENABLED(CONFIG_RTC_LIB)
43264327
struct hwrm_fw_set_time_input req = {0};
43274328
struct rtc_time tm;
43284329
struct timeval tv;
@@ -4340,6 +4341,9 @@ int bnxt_hwrm_fw_set_time(struct bnxt *bp)
43404341
req.minute = tm.tm_min;
43414342
req.second = tm.tm_sec;
43424343
return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
4344+
#else
4345+
return -EOPNOTSUPP;
4346+
#endif
43434347
}
43444348

43454349
static int bnxt_hwrm_port_qstats(struct bnxt *bp)

0 commit comments

Comments
 (0)