> -----Original Message----- > From: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx> > Sent: Wednesday, April 19, 2023 6:02 PM > To: linux-wireless@xxxxxxxxxxxxxxx > Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Kalle Valo <kvalo@xxxxxxxxxx>; Ping-Ke Shih > <pkshih@xxxxxxxxxxx>; Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>; Sebastian Andrzej Siewior > <bigeasy@xxxxxxxxxxxxx> > Subject: [PATCH v2 03/18] wifi: rtl8xxxu: Add beacon functions > > Add a workqueue to update the beacon contents asynchronously and > implement downloading the beacon to the HW and starting beacon tx like > the vendor driver. > > Signed-off-by: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx> [...] > @@ -4885,6 +4903,22 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, > dev_dbg(dev, "Changed BASIC_RATES!\n"); > rtl8xxxu_set_basic_rates(priv, bss_conf->basic_rates); > } > + > + if (changed & BSS_CHANGED_BEACON || > + (changed & BSS_CHANGED_BEACON_ENABLED && > + bss_conf->enable_beacon)) { > + if (!priv->beacon_enabled) { Is it possible to rely on bss_conf->enable_beacon only? Then, we don't need priv->beacon_enabled. Like if (changed & BSS_CHANGED_BEACON_ENABLED && bss_conf->enable_beacon) rtl8xxxu_start_tx_beacon(priv); if (changed & BSS_CHANGED_BEACON) schedule_work(&priv->update_beacon_work); if (changed & BSS_CHANGED_BEACON_ENABLED && !bss_conf->enable_beacon) rtl8xxxu_stop_tx_beacon(priv); > + dev_dbg(dev, "BSS_CHANGED_BEACON_ENABLED\n"); > + rtl8xxxu_start_tx_beacon(priv); > + } > + schedule_work(&priv->update_beacon_work); > + } > + > + if (changed & BSS_CHANGED_BEACON_ENABLED && !bss_conf->enable_beacon) { > + if (priv->beacon_enabled) > + rtl8xxxu_stop_tx_beacon(priv); > + } > + > error: > return; > } [...]