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: [RFC PATCH 13/14] wifi: rtl8xxxu: Clean up filter configuration
Date: Tue, 28 Mar 2023 16:47:05 +0200 [thread overview]
Message-ID: <7e1c9cd8-cb1e-197a-16b4-379647589ff4@linutronix.de> (raw)
In-Reply-To: <ab74ec9f73b741f7b0dd3b8a498d7e32@realtek.com>
Am 27.03.23 um 04:06 schrieb Ping-Ke Shih:
>
>
>> -----Original Message-----
>> From: Martin Kaistra <martin.kaistra@linutronix.de>
>> Sent: Thursday, March 23, 2023 1:19 AM
>> 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: [RFC PATCH 13/14] wifi: rtl8xxxu: Clean up filter configuration
>>
>> In AP mode, RCR_CHECK_BSSID_MATCH should not be set. Rearrange RCR bits
>> to filter flags to match other realtek drivers and don't set
>> RCR_CHECK_BSSID_BEACON and RCR_CHECK_BSSID_MATCH in AP mode.
>>
>> Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
>> ---
>> .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 19 ++++++++++---------
>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> index 82fbe778fc5ec..b6f811ad01333 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> @@ -6597,23 +6597,24 @@ static void rtl8xxxu_configure_filter(struct ieee80211_hw *hw,
>> * FIF_PLCPFAIL not supported?
>> */
>>
>> - if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
>> - rcr &= ~RCR_CHECK_BSSID_BEACON;
>> - else
>> - rcr |= RCR_CHECK_BSSID_BEACON;
>> + if (priv->vif->type != NL80211_IFTYPE_AP) {
>
> I think mac80211 configure filters depends on operating conditions, so it would
> be possible to avoid checking vif->type.
It should be possible to remove the vif->type check from
FIF_BCN_PRBRESP_PROMISC check, but I would still need it to remove the
CHECK_BSSID_MATCH bit in the AP mode case. Otherwise I seem to receive
no data frames.
if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
rcr &= ~(RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH);
else
rcr |= RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH;
if (priv->vif && priv->vif->type == NL80211_IFTYPE_AP)
rcr &= ~RCR_CHECK_BSSID_MATCH;
Another way would be like in the rtw88 driver, where the BIT_CBSSID_DATA
is not set again in the else case, but I am not sure, that is the right way.
>
>> + if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
>> + rcr &= ~(RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH);
>> + else
>> + rcr |= RCR_CHECK_BSSID_BEACON | RCR_CHECK_BSSID_MATCH;
>> + } else {
>> + rcr &= ~RCR_CHECK_BSSID_MATCH;
>> + }
>>
>> if (*total_flags & FIF_CONTROL)
>> rcr |= RCR_ACCEPT_CTRL_FRAME;
>> else
>> rcr &= ~RCR_ACCEPT_CTRL_FRAME;
>>
>> - if (*total_flags & FIF_OTHER_BSS) {
>> + if (*total_flags & FIF_OTHER_BSS)
>> rcr |= RCR_ACCEPT_AP;
>> - rcr &= ~RCR_CHECK_BSSID_MATCH;
>> - } else {
>> + else
>> rcr &= ~RCR_ACCEPT_AP;
>> - rcr |= RCR_CHECK_BSSID_MATCH;
>> - }
>>
>> if (*total_flags & FIF_PSPOLL)
>> rcr |= RCR_ACCEPT_PM;
>> --
>> 2.30.2
>
next prev parent reply other threads:[~2023-03-28 14:47 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 17:18 [RFC PATCH 00/14] wifi: rtl8xxxu: Add AP mode support for 8188f Martin Kaistra
2023-03-22 17:18 ` [RFC PATCH 01/14] wifi: rtl8xxxu: Add start_ap() callback Martin Kaistra
2023-03-27 0:46 ` Ping-Ke Shih
2023-03-27 13:10 ` Bitterblue Smith
2023-03-27 16:08 ` Martin Kaistra
2023-03-27 18:29 ` Bitterblue Smith
2023-03-29 0:18 ` Ping-Ke Shih
2023-03-22 17:18 ` [RFC PATCH 02/14] wifi: rtl8xxxu: Select correct queue for beacon frames Martin Kaistra
2023-03-27 0:51 ` Ping-Ke Shih
2023-03-22 17:18 ` [RFC PATCH 03/14] wifi: rtl8xxxu: Add beacon functions Martin Kaistra
2023-03-27 1:19 ` Ping-Ke Shih
2023-03-27 13:10 ` Bitterblue Smith
2023-03-22 17:18 ` [RFC PATCH 04/14] wifi: rtl8xxxu: Add set_tim() callback Martin Kaistra
2023-03-27 1:20 ` Ping-Ke Shih
2023-03-22 17:18 ` [RFC PATCH 05/14] wifi: rtl8xxxu: Allow setting rts threshold to -1 Martin Kaistra
2023-03-27 1:21 ` Ping-Ke Shih
2023-03-22 17:18 ` [RFC PATCH 06/14] wifi: rtl8xxxu: Allow creating interface in AP mode Martin Kaistra
2023-03-27 1:39 ` Ping-Ke Shih
2023-03-27 13:15 ` Martin Kaistra
2023-03-22 17:18 ` [RFC PATCH 07/14] wifi: rtl8xxxu: Add parameter macid to update_rate_mask Martin Kaistra
2023-03-27 1:48 ` Ping-Ke Shih
2023-03-27 8:41 ` Kalle Valo
2023-03-27 9:19 ` Ping-Ke Shih
2023-03-27 13:12 ` Bitterblue Smith
2023-03-22 17:18 ` [RFC PATCH 08/14] wifi: rtl8xxxu: Actually use macid in rtl8xxxu_gen2_report_connect Martin Kaistra
2023-03-27 1:48 ` Ping-Ke Shih
2023-03-22 17:19 ` [RFC PATCH 09/14] wifi: rtl8xxxu: Add parameter role to report_connect Martin Kaistra
2023-03-27 1:54 ` Ping-Ke Shih
2023-03-27 13:11 ` Bitterblue Smith
2023-03-22 17:19 ` [RFC PATCH 10/14] wifi: rtl8xxxu: Add sta_add() callback Martin Kaistra
2023-03-27 1:56 ` Ping-Ke Shih
2023-03-22 17:19 ` [RFC PATCH 11/14] wifi: rtl8xxxu: Put the macid in txdesc Martin Kaistra
2023-03-27 1:58 ` Ping-Ke Shih
2023-03-27 13:11 ` Bitterblue Smith
2023-03-22 17:19 ` [RFC PATCH 12/14] wifi: rtl8xxxu: Enable hw seq for all non-qos frames Martin Kaistra
2023-03-27 2:01 ` Ping-Ke Shih
2023-03-22 17:19 ` [RFC PATCH 13/14] wifi: rtl8xxxu: Clean up filter configuration Martin Kaistra
2023-03-27 2:06 ` Ping-Ke Shih
2023-03-28 14:47 ` Martin Kaistra [this message]
2023-03-29 0:27 ` Ping-Ke Shih
2023-03-22 17:19 ` [RFC PATCH 14/14] wifi: rtl8xxxu: Declare AP mode support for 8188f Martin Kaistra
2023-03-27 2:06 ` Ping-Ke Shih
2023-03-23 17:12 ` [RFC PATCH 00/14] wifi: rtl8xxxu: Add " Bitterblue Smith
2023-03-27 7:58 ` Martin Kaistra
2023-04-05 15:31 ` Martin Kaistra
2023-04-06 0:42 ` Ping-Ke Shih
2023-04-06 15:09 ` Martin Kaistra
2023-04-09 12:41 ` Bitterblue Smith
2023-04-12 10:02 ` Martin Kaistra
2023-04-14 21:49 ` Bitterblue Smith
2023-04-07 1:18 ` Ping-Ke Shih
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=7e1c9cd8-cb1e-197a-16b4-379647589ff4@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).