Search Linux Wireless

Re: [PATCH v2 03/18] wifi: rtl8xxxu: Add beacon functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 24.04.23 um 04:29 schrieb Ping-Ke Shih:


-----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);

Looking at the the mac80211 code which calls ops->bss_info_changed(), this seems fine to me. I will implement your suggestion and do some testing.


+                       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;
  }

[...]




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux