Print this page
XXXX introduce drv_sectohz
*** 2161,2171 ****
cmn_err(CE_WARN, "iwh_load_init_firmware(): "
"failed to write init uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_usectohz(1000000);
/*
* wait loading init_text until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
--- 2161,2171 ----
cmn_err(CE_WARN, "iwh_load_init_firmware(): "
"failed to write init uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_sectohz(1);
/*
* wait loading init_text until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
*** 2191,2201 ****
cmn_err(CE_WARN, "iwh_load_init_firmware(): "
"failed to write init_data uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_usectohz(1000000);
/*
* wait loading init_data until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
--- 2191,2201 ----
cmn_err(CE_WARN, "iwh_load_init_firmware(): "
"failed to write init_data uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_sectohz(1);
/*
* wait loading init_data until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
*** 2232,2242 ****
cmn_err(CE_WARN, "iwh_load_run_firmware(): "
"failed to write run uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_usectohz(1000000);
/*
* wait loading run_text until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
--- 2232,2242 ----
cmn_err(CE_WARN, "iwh_load_run_firmware(): "
"failed to write run uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_sectohz(1);
/*
* wait loading run_text until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
*** 2262,2272 ****
cmn_err(CE_WARN, "iwh_load_run_firmware(): "
"failed to write run_data uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_usectohz(1000000);
/*
* wait loading run_data until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
--- 2262,2272 ----
cmn_err(CE_WARN, "iwh_load_run_firmware(): "
"failed to write run_data uCode.\n");
return (err);
}
! clk = ddi_get_lbolt() + drv_sectohz(1);
/*
* wait loading run_data until completed or timeout
*/
while (!(sc->sc_flags & IWH_F_PUT_SEG)) {
*** 3870,3880 ****
* rate ctl
*/
if (ic->ic_mach &&
(sc->sc_flags & IWH_F_RATE_AUTO_CTL)) {
clk = ddi_get_lbolt();
! if (clk > sc->sc_clk + drv_usectohz(1000000)) {
iwh_amrr_timeout(sc);
}
}
if ((ic->ic_state == IEEE80211_S_RUN) &&
--- 3870,3880 ----
* rate ctl
*/
if (ic->ic_mach &&
(sc->sc_flags & IWH_F_RATE_AUTO_CTL)) {
clk = ddi_get_lbolt();
! if (clk > sc->sc_clk + drv_sectohz(1)) {
iwh_amrr_timeout(sc);
}
}
if ((ic->ic_state == IEEE80211_S_RUN) &&
*** 4827,4837 ****
/*
* now press "execute" start running
*/
IWH_WRITE(sc, CSR_RESET, 0);
! clk = ddi_get_lbolt() + drv_usectohz(1000000);
while (!(sc->sc_flags & IWH_F_FW_INIT)) {
if (cv_timedwait(&sc->sc_ucode_cv,
&sc->sc_glock, clk) < 0) {
break;
}
--- 4827,4837 ----
/*
* now press "execute" start running
*/
IWH_WRITE(sc, CSR_RESET, 0);
! clk = ddi_get_lbolt() + drv_sectohz(1);
while (!(sc->sc_flags & IWH_F_FW_INIT)) {
if (cv_timedwait(&sc->sc_ucode_cv,
&sc->sc_glock, clk) < 0) {
break;
}
*** 4874,4884 ****
/*
* now press "execute" start running
*/
IWH_WRITE(sc, CSR_RESET, 0);
! clk = ddi_get_lbolt() + drv_usectohz(1000000);
while (!(sc->sc_flags & IWH_F_FW_INIT)) {
if (cv_timedwait(&sc->sc_ucode_cv,
&sc->sc_glock, clk) < 0) {
break;
}
--- 4874,4884 ----
/*
* now press "execute" start running
*/
IWH_WRITE(sc, CSR_RESET, 0);
! clk = ddi_get_lbolt() + drv_sectohz(1);
while (!(sc->sc_flags & IWH_F_FW_INIT)) {
if (cv_timedwait(&sc->sc_ucode_cv,
&sc->sc_glock, clk) < 0) {
break;
}