mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 07:40:55 +07:00
mac80211: avoid useless memory write on each frame RX
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 <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2c61cf9c56
commit
b100e5d622
@ -122,15 +122,16 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
|
|||||||
{
|
{
|
||||||
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
|
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
|
||||||
|
|
||||||
if (unlikely(!sdata->u.mgd.associated))
|
if (unlikely(!ifmgd->associated))
|
||||||
return;
|
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))
|
if (ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mod_timer(&sdata->u.mgd.conn_mon_timer,
|
mod_timer(&ifmgd->conn_mon_timer,
|
||||||
round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME));
|
round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user