diff options
author | Rob Swindell <swindell@broadcom.com> | 2016-09-20 03:36:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-20 03:53:49 -0400 |
commit | 878786d95e07ce2f5fb6e3cd8a6c2ed320339196 (patch) | |
tree | 30198f0017885db64601c0942dd20035b9609cf2 /drivers/net/ethernet/broadcom | |
parent | 5a7a5555a362f60350668cd124df9a396f546c61 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index cbc0b8ad916c..a9f9f3738022 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c | |||
@@ -4323,6 +4323,7 @@ hwrm_ver_get_exit: | |||
4323 | 4323 | ||
4324 | int bnxt_hwrm_fw_set_time(struct bnxt *bp) | 4324 | int bnxt_hwrm_fw_set_time(struct bnxt *bp) |
4325 | { | 4325 | { |
4326 | #if IS_ENABLED(CONFIG_RTC_LIB) | ||
4326 | struct hwrm_fw_set_time_input req = {0}; | 4327 | struct hwrm_fw_set_time_input req = {0}; |
4327 | struct rtc_time tm; | 4328 | struct rtc_time tm; |
4328 | struct timeval tv; | 4329 | struct timeval tv; |
@@ -4340,6 +4341,9 @@ int bnxt_hwrm_fw_set_time(struct bnxt *bp) | |||
4340 | req.minute = tm.tm_min; | 4341 | req.minute = tm.tm_min; |
4341 | req.second = tm.tm_sec; | 4342 | req.second = tm.tm_sec; |
4342 | return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); | 4343 | return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); |
4344 | #else | ||
4345 | return -EOPNOTSUPP; | ||
4346 | #endif | ||
4343 | } | 4347 | } |
4344 | 4348 | ||
4345 | static int bnxt_hwrm_port_qstats(struct bnxt *bp) | 4349 | static int bnxt_hwrm_port_qstats(struct bnxt *bp) |