提交 878786d9 编写于 作者: R Rob Swindell 提交者: David S. Miller

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: NRob Swindell <Rob.Swindell@broadcom.com>
Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5a7a5555
......@@ -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;
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册