[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b30cc04676a031db8c36df243160992094b3848d.camel@sipsolutions.net>
Date: Wed, 23 Apr 2025 14:53:53 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Edward Adam Davis <eadavis@...com>,
syzbot+064815c6cd721082a52a@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] wifi: mac80211_hwsim: Prevent tsf from setting if
beacon is disabled
On Sun, 2025-04-13 at 14:11 +0800, Edward Adam Davis wrote:
>
> --- a/drivers/net/wireless/virtual/mac80211_hwsim.c
> +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
> @@ -1226,6 +1226,11 @@ static void mac80211_hwsim_set_tsf(struct ieee80211_hw *hw,
> {
> struct mac80211_hwsim_data *data = hw->priv;
> u64 now = mac80211_hwsim_get_tsf(hw, vif);
> + struct ieee80211_bss_conf *conf = link_conf_dereference_protected(vif,
> + data->link_data[0].link_id);
> +
> + if (conf && !conf->enable_beacon)
> + return;
> /* MLD not supported here */
> u32 bcn_int = data->link_data[0].beacon_int;
> u64 delta = abs(tsf - now);
Please keep kernel coding style - the line break there is awful (but
with "conf = ..." on a line by itself it can be just one line), and you
shouldn't have code before variable declarations.
The comment should probably also move because it's relevant for your new
[0] as well.
johannes
Powered by blists - more mailing lists