projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c61cf9
)
mac80211: avoid useless memory write on each frame RX
author
Johannes Berg
<
[email protected]
>
Thu, 17 Mar 2016 13:41:37 +0000
(15:41 +0200)
committer
Johannes Berg
<
[email protected]
>
Tue, 5 Apr 2016 19:34:21 +0000
(21:34 +0200)
In the likely case that probe_count is 0, don't write to the
memory there.
Also use ifmgd consistently in the function, instead of using
sdata->u.mgd as well.
Signed-off-by: Johannes Berg <
[email protected]
>
Signed-off-by: Emmanuel Grumbach <
[email protected]
>
Signed-off-by: Johannes Berg <
[email protected]
>
net/mac80211/mlme.c
patch
|
blob
|
history
diff --git
a/net/mac80211/mlme.c
b/net/mac80211/mlme.c
index 281b8d6e51097e8160b7243ee32f630faf742ef1..2112df4ffb7b682a42f032d1bc6c0f274cd62ef5 100644
(file)
--- a/
net/mac80211/mlme.c
+++ b/
net/mac80211/mlme.c
@@
-122,15
+122,16
@@
void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- if (unlikely(!
sdata->u.mgd.
associated))
+ if (unlikely(!
ifmgd->
associated))
return;
- ifmgd->probe_send_count = 0;
+ if (ifmgd->probe_send_count)
+ ifmgd->probe_send_count = 0;
if (ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR))
return;
- mod_timer(&
sdata->u.mgd.
conn_mon_timer,
+ mod_timer(&
ifmgd->
conn_mon_timer,
round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME));
}