Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 221841 Details for
Bug 313381
wpa_supplicant wakes up the cpu
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Slightly more tested fix
wpa_supplicant-poll.diff (text/plain), 2.77 KB, created by
Alan Jenkins
on 2007-10-09 21:17:24 UTC
(
hide
)
Description:
Slightly more tested fix
Filename:
MIME Type:
Creator:
Alan Jenkins
Created:
2007-10-09 21:17:24 UTC
Size:
2.77 KB
patch
obsolete
>diff --git a/eapol_sm.c b/eapol_sm.c >index 285bc5d..a803fa2 100644 >--- a/eapol_sm.c >+++ b/eapol_sm.c >@@ -39,6 +39,7 @@ struct eapol_sm { > unsigned int heldWhile; > unsigned int startWhen; > unsigned int idleWhile; /* for EAP state machine */ >+ unsigned int nextTimer; > > /* Global variables */ > Boolean eapFail; >@@ -193,6 +194,7 @@ static void eapol_sm_txSuppRsp(struct eapol_sm *sm); > static void eapol_sm_abortSupp(struct eapol_sm *sm); > static void eapol_sm_abort_cached(struct eapol_sm *sm); > static void eapol_sm_step_timeout(void *eloop_ctx, void *timeout_ctx); >+static void eapol_port_timers_recalculate(void *eloop_ctx, struct eapol_sm *sm); > > > /* Port Timers state machine - implemented as a function that will be called >@@ -202,30 +204,58 @@ static void eapol_port_timers_tick(void *eloop_ctx, void *timeout_ctx) > struct eapol_sm *sm = timeout_ctx; > > if (sm->authWhile > 0) { >- sm->authWhile--; >+ sm->authWhile -= sm->nextTimer; > if (sm->authWhile == 0) > wpa_printf(MSG_DEBUG, "EAPOL: authWhile --> 0"); > } > if (sm->heldWhile > 0) { >- sm->heldWhile--; >+ sm->heldWhile -= sm->nextTimer; > if (sm->heldWhile == 0) > wpa_printf(MSG_DEBUG, "EAPOL: heldWhile --> 0"); > } > if (sm->startWhen > 0) { >- sm->startWhen--; >+ sm->startWhen -= sm->nextTimer; > if (sm->startWhen == 0) > wpa_printf(MSG_DEBUG, "EAPOL: startWhen --> 0"); > } > if (sm->idleWhile > 0) { >- sm->idleWhile--; >+ sm->idleWhile -= sm->nextTimer; > if (sm->idleWhile == 0) > wpa_printf(MSG_DEBUG, "EAPOL: idleWhile --> 0"); > } > >- eloop_register_timeout(1, 0, eapol_port_timers_tick, eloop_ctx, sm); > eapol_sm_step(sm); >+ eapol_port_timers_recalculate(eloop_ctx, sm); > } > >+static void eapol_port_timers_recalculate(void *eloop_ctx, struct eapol_sm *sm) >+{ >+ sm->nextTimer = (unsigned int) -1; >+ >+ if (sm->authWhile > 0 && sm->authWhile < sm->nextTimer) >+ sm->nextTimer = sm->authWhile; >+ >+ if (sm->heldWhile > 0 && sm->heldWhile < sm->nextTimer) >+ sm->nextTimer = sm->heldWhile; >+ >+ if (sm->startWhen > 0 && sm->startWhen < sm->nextTimer) >+ sm->nextTimer = sm->startWhen; >+ >+ if (sm->idleWhile > 0 && sm->nextTimer > sm->idleWhile) >+ sm->nextTimer = sm->idleWhile; >+ >+ >+ if (sm->nextTimer < (unsigned int) -1) { >+ sm->nextTimer = 1; >+ eloop_cancel_timeout(eapol_sm_step_timeout, NULL, sm); >+ eloop_register_timeout(sm->nextTimer, 0, eapol_port_timers_tick, >+ eloop_ctx, sm); >+ } else { >+ wpa_printf(MSG_DEBUG, "EAPOL: no timers, disabling tick"); >+ } >+} >+ >+ > > SM_STATE(SUPP_PAE, LOGOFF) > { >@@ -1747,7 +1777,8 @@ struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx) > sm->initialize = FALSE; > eapol_sm_step(sm); > >- eloop_register_timeout(1, 0, eapol_port_timers_tick, NULL, sm); >+ sm->nextTimer = 1; >+ eloop_register_timeout(sm->nextTimer, 0, eapol_port_timers_tick, NULL, sm); > > return sm; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 313381
:
221641
| 221841