Search Linux Wireless

RE: [RFC PATCH 13/14] wifi: rtl8xxxu: Clean up filter configuration

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

 




> -----Original Message-----
> From: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx>
> Sent: Tuesday, March 28, 2023 10:47 PM
> To: Ping-Ke Shih <pkshih@xxxxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx
> Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Kalle Valo <kvalo@xxxxxxxxxx>; Bitterblue Smith
> <rtl8821cerfe2@xxxxxxxxx>; Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Subject: Re: [RFC PATCH 13/14] wifi: rtl8xxxu: Clean up filter configuration
> 
> Am 27.03.23 um 04:06 schrieb Ping-Ke Shih:
> >
> >
> >> -----Original Message-----
> >> From: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx>
> >> Sent: Thursday, March 23, 2023 1:19 AM
> >> 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: [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@xxxxxxxxxxxxx>
> >> ---
> >>   .../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.
> 

rtl8xxxu support single one vif, so your proposal will be fine. 

Without BIT_CBSSID_DATA, driver will receive unnecessary data frames, so
it will increase traffic of bus, but it will be fine for users. 





[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