diff options
author | Vaishali Thakkar | 2015-03-11 07:11:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-03-16 16:04:55 +0100 |
commit | 4d4efe3e95805982b1d8f3f54203c67ba6687338 (patch) | |
tree | 7f982abd8c4852f6acae5774e014256e7b660912 /drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | |
parent | drivers: staging: rtl8188eu: core: rtw_security: Fix misspelled word (diff) | |
download | kernel-qcow2-linux-4d4efe3e95805982b1d8f3f54203c67ba6687338.tar.gz kernel-qcow2-linux-4d4efe3e95805982b1d8f3f54203c67ba6687338.tar.xz kernel-qcow2-linux-4d4efe3e95805982b1d8f3f54203c67ba6687338.zip |
Staging: rtl8188eu: Eliminate use of _set_timer
This patch introduces the use of API function mod_timer
instead of driver specific function _set_timer as it is
a more efficient and standard way to update the expire
field of an active timer. Also, definition of function
_set_timer is removed as it is no longer needed after
this change.
Here, these cases are handled using Coccinelle and
semantic patch used for this is as follows:
@@ expression x; expression y;@@
- _set_timer (&x, y);
+ mod_timer (&x, jiffies + msecs_to_jiffies (y));
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_mlme_ext.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index cd12dd70dd88..e496276eb1e8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -3972,8 +3972,8 @@ void start_clnt_join(struct adapter *padapter) /* and enable a timer */ beacon_timeout = decide_wait_for_beacon_timeout(pmlmeinfo->bcn_interval); set_link_timer(pmlmeext, beacon_timeout); - _set_timer(&padapter->mlmepriv.assoc_timer, - (REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO*REASSOC_LIMIT) + beacon_timeout); + mod_timer(&padapter->mlmepriv.assoc_timer, jiffies + + msecs_to_jiffies((REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO * REASSOC_LIMIT) + beacon_timeout)); pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; } else if (caps&cap_IBSS) { /* adhoc client */ @@ -5406,7 +5406,8 @@ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf) if (((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && (pmlmeinfo->HT_enable)) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)) { issue_action_BA(padapter, pparm->addr, RTW_WLAN_ACTION_ADDBA_REQ, (u16)pparm->tid); - _set_timer(&psta->addba_retry_timer, ADDBA_TO); + mod_timer(&psta->addba_retry_timer, + jiffies + msecs_to_jiffies(ADDBA_TO)); } else { psta->htpriv.candidate_tid_bitmap &= ~BIT(pparm->tid); } |