linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kaistra <martin.kaistra@linutronix.de>
To: Ping-Ke Shih <pkshih@realtek.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Jes Sorensen <Jes.Sorensen@gmail.com>,
	Kalle Valo <kvalo@kernel.org>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH v2 03/18] wifi: rtl8xxxu: Add beacon functions
Date: Mon, 24 Apr 2023 11:17:46 +0200	[thread overview]
Message-ID: <f1e3e2ef-c91e-bfcd-657e-d124e8cc593e@linutronix.de> (raw)
In-Reply-To: <9849321bafb64c4c941955e27f85fa13@realtek.com>

Am 24.04.23 um 04:29 schrieb Ping-Ke Shih:
> 
> 
>> -----Original Message-----
>> From: Martin Kaistra <martin.kaistra@linutronix.de>
>> Sent: Wednesday, April 19, 2023 6:02 PM
>> To: linux-wireless@vger.kernel.org
>> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Kalle Valo <kvalo@kernel.org>; Ping-Ke Shih
>> <pkshih@realtek.com>; Bitterblue Smith <rtl8821cerfe2@gmail.com>; Sebastian Andrzej Siewior
>> <bigeasy@linutronix.de>
>> 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@linutronix.de>
> 
> [...]
> 
>> @@ -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;
>>   }
> 
> [...]
> 

  reply	other threads:[~2023-04-24  9:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 10:01 [PATCH v2 00/18] wifi: rtl8xxxu: Add AP mode support for 8188f Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 01/18] wifi: rtl8xxxu: Add start_ap() callback Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 02/18] wifi: rtl8xxxu: Select correct queue for beacon frames Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 03/18] wifi: rtl8xxxu: Add beacon functions Martin Kaistra
2023-04-24  2:29   ` Ping-Ke Shih
2023-04-24  9:17     ` Martin Kaistra [this message]
2023-04-19 10:01 ` [PATCH v2 04/18] wifi: rtl8xxxu: Add set_tim() callback Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 05/18] wifi: rtl8xxxu: Allow setting rts threshold to -1 Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 06/18] wifi: rtl8xxxu: Allow creating interface in AP mode Martin Kaistra
2023-04-24  2:32   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 07/18] wifi: rtl8xxxu: Actually use macid in rtl8xxxu_gen2_report_connect Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 08/18] wifi: rtl8xxxu: Add parameter role to report_connect Martin Kaistra
2023-04-24  2:40   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 09/18] wifi: rtl8xxxu: Add parameter force to rtl8xxxu_refresh_rate_mask Martin Kaistra
2023-04-24  2:42   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 10/18] wifi: rtl8xxxu: Add sta_add() and sta_remove() callbacks Martin Kaistra
2023-04-24  2:46   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 11/18] wifi: rtl8xxxu: Put the macid in txdesc Martin Kaistra
2023-04-24  3:00   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 12/18] wifi: rtl8xxxu: Add parameter macid to update_rate_mask Martin Kaistra
2023-04-24  3:01   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 13/18] wifi: rtl8xxxu: Enable hw seq for mgmt/non-QoS data frames Martin Kaistra
2023-04-24  3:04   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 14/18] wifi: rtl8xxxu: Clean up filter configuration Martin Kaistra
2023-04-24  3:05   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 15/18] wifi: rtl8xxxu: Remove usage of ieee80211_get_tx_rate() Martin Kaistra
2023-04-24  3:07   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 16/18] wifi: rtl8xxxu: Remove usage of tx_info->control.rates[0].flags Martin Kaistra
2023-04-24  3:10   ` Ping-Ke Shih
2023-04-19 10:01 ` [PATCH v2 17/18] wifi: rtl8xxxu: Declare AP mode support for 8188f Martin Kaistra
2023-04-19 10:01 ` [PATCH v2 18/18] wifi: rtl8xxxu: Set maximum number of supported stations Martin Kaistra
2023-04-24  3:12   ` Ping-Ke Shih
2023-04-24 20:16   ` Bitterblue Smith
2023-04-25  5:53     ` Kalle Valo
2023-04-19 20:35 ` [PATCH v2 00/18] wifi: rtl8xxxu: Add AP mode support for 8188f Bitterblue Smith
2023-04-20  7:44   ` Martin Kaistra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1e3e2ef-c91e-bfcd-657e-d124e8cc593e@linutronix.de \
    --to=martin.kaistra@linutronix.de \
    --cc=Jes.Sorensen@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).