Skip to contentSkip to conversation

Staging: rtl8712: Use mod_timer

PATCH Superseded Vaishali Thakkar 2 participants 7 messages Feb 23, 2015 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: rtl8712: Use mod_timer

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +4 -3
index 9bb364f..0ce8e9d 100644
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct sta_info *psta,
 		memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
 			key[24]), 8);
 		padapter->securitypriv. busetkipkey = false;
-		_set_timer(&padapter->securitypriv.tkip_timer, 50);
+		mod_timer(&padapter->securitypriv.tkip_timer,
+			  jiffies + msecs_to_jiffies(50));
 	}
 	r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct ieee_param *param,
 		if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE) {
 			if (padapter->registrypriv.power_mgnt != padapter->
 			    pwrctrlpriv.pwr_mode)
-				_set_timer(&(padapter->mlmepriv.dhcp_timer),
-					   60000);
+				mod_timer(&(padapter->mlmepriv.dhcp_timer),
+					  jiffies + msecs_to_jiffies(60000));
 		}
 	}
 }
Signature · 1 line
1.9.1
#1 lore raw
Quoted 13 lines · Vaishali Thakkar

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

Quoted 2 lines
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

I like this patch!

However if you start getting rid of _set_timer() from a driver like this, you should try and remove all instances, and then get rid of all uses of _set_timer().

In addition you are still leaving some unnecessary parenthesis in place
- see below.

Cheers,
Jes

Quoted 15 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +2 -1
index 9bb364f..0ce8e9d 100644
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct sta_info *psta,
 		memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
 			key[24]), 8);
 		padapter->securitypriv. busetkipkey = false;
-		_set_timer(&padapter->securitypriv.tkip_timer, 50);
+		mod_timer(&padapter->securitypriv.tkip_timer,
+			  jiffies + msecs_to_jiffies(50));
 	}
 	r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct ieee_param *param, · line 157

Quoted 6 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -2
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct ieee_param *param,
 		if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE) {
 			if (padapter->registrypriv.power_mgnt != padapter->
 			    pwrctrlpriv.pwr_mode)
-				_set_timer(&(padapter->mlmepriv.dhcp_timer),
-					   60000);
+				mod_timer(&(padapter->mlmepriv.dhcp_timer),

here ^

Quoted 5 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -0
+					  jiffies + msecs_to_jiffies(60000));
 		}
 	}
 }
#2 lore raw
Quoted 15 lines · Jes Sorensen
Quoted 13 lines · Vaishali Thakkar

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

Quoted 8 lines
Quoted 2 lines
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

I like this patch!

However if you start getting rid of _set_timer() from a driver like this, you should try and remove all instances, and then get rid of all uses of _set_timer().

Yes. Actually I sent this patch for mentors' reviews. I thought if this will be accepted then I will go for sending more patches as there are many instances of _set_timer() in this driver and in other network drivers as well. And then I can remove those definitions once all cases are handled.

Also, network drivers are using driver specific functions where we can use setup_ timer() function. So, I will go for it as well.

Quoted 2 lines

In addition you are still leaving some unnecessary parenthesis in place
- see below.

Oops! yeah. I will remove them in next version.

Quoted 5 lines

Cheers,
Jes

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c

Quoted 4 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_pairwise_key(struct

Quoted 4 lines

index 9bb364f..0ce8e9d 100644

drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct

sta_info *psta,

Quoted 10 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct

Quoted 10 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +2 -1
              memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
                      key[24]), 8);
              padapter->securitypriv. busetkipkey = false;
-             _set_timer(&padapter->securitypriv.tkip_timer, 50);
+             mod_timer(&padapter->securitypriv.tkip_timer,
+                       jiffies + msecs_to_jiffies(50));
      }
      r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct

ieee_param *param,

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 155

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE) {
                      if (padapter->registrypriv.power_mgnt !=

padapter->

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 156

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -1
                          pwrctrlpriv.pwr_mode)
-

_set_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 157

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -1
-                                        60000);
+

mod_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

here ^

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -0
+                                       jiffies +

msecs_to_jiffies(60000));

Quoted 5 lines
Quoted 4 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              }
      }
 }
#3 lore raw
Quoted 25 lines · Vaishali Thakkar
Quoted 15 lines · Jes Sorensen
Quoted 13 lines · Vaishali Thakkar

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

Quoted 8 lines
Quoted 2 lines
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

I like this patch!

However if you start getting rid of _set_timer() from a driver like this, you should try and remove all instances, and then get rid of all uses of _set_timer().

Quoted 7 lines

Yes. Actually I sent this patch for mentors' reviews. I thought if this will be accepted then I will go for sending more patches as there are many instances of _set_timer() in this driver and in other network drivers as well. And then I can remove those definitions once all cases are handled.

Also, network drivers are using driver specific functions where we can use setup_ timer() function. So, I will go for it as well.

Sounds great - I recommend you focus on one change, so start out with one patch that eliminates _set_timer() and then do follow-on patches where you convert other portions of code to use setup_timer().

Cheers,
Jes

Quoted 45 lines
Quoted 2 lines

In addition you are still leaving some unnecessary parenthesis in place
- see below.

Oops! yeah. I will remove them in next version.

Quoted 5 lines

Cheers,
Jes

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c

Quoted 4 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_pairwise_key(struct

Quoted 4 lines

index 9bb364f..0ce8e9d 100644

drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct

sta_info *psta,

Quoted 10 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct

Quoted 10 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +2 -1
              memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
                      key[24]), 8);
              padapter->securitypriv. busetkipkey = false;
-             _set_timer(&padapter->securitypriv.tkip_timer, 50);
+             mod_timer(&padapter->securitypriv.tkip_timer,
+                       jiffies + msecs_to_jiffies(50));
      }
      r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct

ieee_param *param,

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 155

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE) {
                      if (padapter->registrypriv.power_mgnt !=

padapter->

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 156

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -1
                          pwrctrlpriv.pwr_mode)
-

_set_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 157

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -1
-                                        60000);
+

mod_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

here ^

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -0
+                                       jiffies +

msecs_to_jiffies(60000));

Quoted 5 lines
Quoted 4 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              }
      }
 }
#4 lore raw
Quoted 21 lines · Jes Sorensen
Quoted 19 lines · Vaishali Thakkar
Quoted 18 lines · Jes Sorensen
Quoted 15 lines · Vaishali Thakkar

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

I like this patch!

However if you start getting rid of _set_timer() from a driver like this, you should try and remove all instances, and then get rid of all uses of _set_timer().

Yes. Actually I sent this patch for mentors' reviews. I thought if this will be accepted then I will go for sending more patches as there are

many

Quoted 2 lines
Quoted 2 lines

instances of _set_timer() in this driver and in other network drivers as well. And then I can remove those definitions once all cases are

handled.

Quoted 2 lines
Quoted 2 lines

Also, network drivers are using driver specific functions where we can

use

Quoted 5 lines
Quoted 1 line

setup_ timer() function. So, I will go for it as well.

Sounds great - I recommend you focus on one change, so start out with one patch that eliminates _set_timer() and then do follow-on patches where you convert other portions of code to use setup_timer().

Ok. Firstly, I am planning to eliminate use of _set_timer() completly in all network drivers and then I will go for setup_timer(). Is it right strategy?

I am just little confused about sending them in series. Can I send a patch series [ one patch for each driver] for eliminating _set_timer()?? And then one different patch series goes for setup_timer().

Quoted 31 lines

Cheers,
Jes

Quoted 28 lines
Quoted 2 lines

In addition you are still leaving some unnecessary parenthesis in place
- see below.

Oops! yeah. I will remove them in next version.

Quoted 5 lines

Cheers,
Jes

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c

Quoted 4 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_pairwise_key(struct

Quoted 4 lines

index 9bb364f..0ce8e9d 100644

drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct

sta_info *psta,

Quoted 10 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct

Quoted 10 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +2 -1
              memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
                      key[24]), 8);
              padapter->securitypriv. busetkipkey = false;
-             _set_timer(&padapter->securitypriv.tkip_timer, 50);
+             mod_timer(&padapter->securitypriv.tkip_timer,
+                       jiffies + msecs_to_jiffies(50));
      }
      r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct

ieee_param *param,

Quoted 1 line
Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE)

{

Quoted 18 lines
Quoted 17 lines
Quoted 1 line

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 155

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
                      if (padapter->registrypriv.power_mgnt !=

padapter->

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 156

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -1
                          pwrctrlpriv.pwr_mode)
-

_set_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 157

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -1
-                                        60000);
+

mod_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

here ^

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -0
+                                       jiffies +

msecs_to_jiffies(60000));

Quoted 5 lines
Quoted 4 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              }
      }
 }
#5 lore raw
Quoted 43 lines · Vaishali Thakkar
Quoted 21 lines · Jes Sorensen
Quoted 19 lines · Vaishali Thakkar
Quoted 18 lines · Jes Sorensen
Quoted 15 lines · Vaishali Thakkar

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

I like this patch!

However if you start getting rid of _set_timer() from a driver like this, you should try and remove all instances, and then get rid of all uses of _set_timer().

Yes. Actually I sent this patch for mentors' reviews. I thought if this will be accepted then I will go for sending more patches as there are

many

Quoted 2 lines
Quoted 2 lines

instances of _set_timer() in this driver and in other network drivers as well. And then I can remove those definitions once all cases are

handled.

Quoted 2 lines
Quoted 2 lines

Also, network drivers are using driver specific functions where we can

use

Quoted 5 lines
Quoted 1 line

setup_ timer() function. So, I will go for it as well.

Sounds great - I recommend you focus on one change, so start out with one patch that eliminates _set_timer() and then do follow-on patches where you convert other portions of code to use setup_timer().

Quoted 7 lines

Ok. Firstly, I am planning to eliminate use of _set_timer() completly in all network drivers and then I will go for setup_timer(). Is it right strategy?

I am just little confused about sending them in series. Can I send a patch series [ one patch for each driver] for eliminating _set_timer()?? And then one different patch series goes for setup_timer().

I would recommend one patch series per driver, as opposed to one series for all drivers. So for each driver I would do:

1: Patch to eliminate _set_timer()
2: Patch(es) to convert code to setup_timer()

It is better to do one patch set per driver, as it allows individual driver maintainers to apply them without touching code they do not maintainer.

Cheers,
Jes

Quoted 51 lines
Quoted 31 lines

Cheers,
Jes

Quoted 28 lines
Quoted 2 lines

In addition you are still leaving some unnecessary parenthesis in place
- see below.

Oops! yeah. I will remove them in next version.

Quoted 5 lines

Cheers,
Jes

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c

Quoted 4 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_pairwise_key(struct

Quoted 4 lines

index 9bb364f..0ce8e9d 100644

drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct

sta_info *psta,

Quoted 10 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct

Quoted 10 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +2 -1
              memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
                      key[24]), 8);
              padapter->securitypriv. busetkipkey = false;
-             _set_timer(&padapter->securitypriv.tkip_timer, 50);
+             mod_timer(&padapter->securitypriv.tkip_timer,
+                       jiffies + msecs_to_jiffies(50));
      }
      r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct

ieee_param *param,

Quoted 1 line
Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              if (padapter->registrypriv.power_mgnt > PS_MODE_ACTIVE)

{

Quoted 18 lines
Quoted 17 lines
Quoted 1 line

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 155

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
                      if (padapter->registrypriv.power_mgnt !=

padapter->

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 156

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -1
                          pwrctrlpriv.pwr_mode)
-

_set_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 157

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -1
-                                        60000);
+

mod_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

here ^

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -0
+                                       jiffies +

msecs_to_jiffies(60000));

Quoted 5 lines
Quoted 4 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              }
      }
 }
#6 lore raw
Quoted 6 lines · Jes Sorensen
Quoted 4 lines · Vaishali Thakkar
Quoted 3 lines · Jes Sorensen
Quoted 1 line · Vaishali Thakkar

On Feb 24, 2015 1:09 AM, "Jes Sorensen" <[email protected]>

Quoted 15 lines · wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines · Vaishali Thakkar
Quoted 13 lines

This patch introduces the use of API function mod_timer instead of driver specific function as it is a more efficient and standard way to update the expire field of an active timer.

---
Changes since v1:
-Edit commit message
-Remove unnecessory parenthesis
-Align second parameter of function
mod_timer properly

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

I like this patch!

However if you start getting rid of _set_timer() from a driver like this, you should try and remove all instances, and then get rid of

all

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

uses of _set_timer().

Yes. Actually I sent this patch for mentors' reviews. I thought if

this

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

will be accepted then I will go for sending more patches as there are

many

Quoted 1 line
Quoted 1 line

instances of _set_timer() in this driver and in other network drivers

as

Quoted 11 lines
Quoted 11 lines
Quoted 1 line
Quoted 1 line

well. And then I can remove those definitions once all cases are

handled.

Quoted 2 lines
Quoted 2 lines

Also, network drivers are using driver specific functions where we can

use

Quoted 5 lines
Quoted 1 line

setup_ timer() function. So, I will go for it as well.

Sounds great - I recommend you focus on one change, so start out with one patch that eliminates _set_timer() and then do follow-on patches where you convert other portions of code to use setup_timer().

Quoted 5 lines
Quoted 5 lines

Ok. Firstly, I am planning to eliminate use of _set_timer() completly in all network drivers and then I will go for setup_timer(). Is it right strategy?

I am just little confused about sending them in series. Can I send a

patch

Quoted 1 line
Quoted 1 line

series [ one patch for each driver] for eliminating _set_timer()?? And

then

Quoted 11 lines
Quoted 1 line

one different patch series goes for setup_timer().

I would recommend one patch series per driver, as opposed to one series for all drivers. So for each driver I would do:

1: Patch to eliminate _set_timer()
2: Patch(es) to convert code to setup_timer()

It is better to do one patch set per driver, as it allows individual driver maintainers to apply them without touching code they do not maintainer.

Ok. Yes. This makes sense. I will send them as per your recommendation.

Thank You

Quoted 8 lines

Cheers,
Jes

Quoted 4 lines
Quoted 4 lines

Cheers,
Jes

Quoted 1 line
Quoted 1 line

In addition you are still leaving some unnecessary parenthesis in

place

Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 1 line

- see below.

Oops! yeah. I will remove them in next version.

Quoted 5 lines

Cheers,
Jes

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c

Quoted 4 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_pairwise_key(struct

Quoted 4 lines

index 9bb364f..0ce8e9d 100644

drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
@@ -129,7 +129,8 @@ static inline void handle_pairwise_key(struct

sta_info *psta,

Quoted 10 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct

Quoted 10 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +2 -1
              memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
                      key[24]), 8);
              padapter->securitypriv. busetkipkey = false;
-             _set_timer(&padapter->securitypriv.tkip_timer, 50);
+             mod_timer(&padapter->securitypriv.tkip_timer,
+                       jiffies + msecs_to_jiffies(50));
      }
      r8712_setstakey_cmd(padapter, (unsigned char *)psta, true);
 }
@@ -153,8 +154,8 @@ static inline void handle_group_key(struct

ieee_param *param,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 154

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              if (padapter->registrypriv.power_mgnt >

PS_MODE_ACTIVE)

Quoted 21 lines
Quoted 20 lines

{

Quoted 18 lines
Quoted 17 lines
Quoted 1 line

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 155

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
                      if (padapter->registrypriv.power_mgnt !=

padapter->

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 156

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -1
                          pwrctrlpriv.pwr_mode)
-

_set_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

drivers/staging/rtl8712/rtl871x_ioctl_linux.c static inline void handle_group_key(struct · line 157

Quoted 2 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -1
-                                        60000);
+

mod_timer(&(padapter->mlmepriv.dhcp_timer),

Quoted 2 lines

here ^

Quoted 1 line
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -0
+                                       jiffies +

msecs_to_jiffies(60000));

Quoted 5 lines
Quoted 4 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0 -0
              }
      }
 }