From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Bruno Randolf <br1@einfach.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtl8xxxu: Enable data frame reception in rtl8xxxu_start
Date: Wed, 21 Oct 2015 19:13:19 -0400 [thread overview]
Message-ID: <wrfjoafrrf1s.fsf@redhat.com> (raw)
In-Reply-To: <1445462932-23679-1-git-send-email-br1@einfach.org> (Bruno Randolf's message of "Wed, 21 Oct 2015 22:28:52 +0100")
Bruno Randolf <br1@einfach.org> writes:
> mac80211 documentation says, the ieee80211_ops.start callback "must turn on
> frame reception (for possibly enabled monitor interfaces.)". If not a single
> monitor interface does not receive data frames.
>
> Similarly we should not change the data reception based on the association
> state.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
Bruno,
Thanks - I am not 100% convinced about this one. I don't think we should
tell the firmware to pass up data frames before we have negotiated the
connection.
It's true that for monitor mode, we need to enable it if all packets
are requested. Looking at iw there is an option where it only requests
control packets, and one for all, etc. However for non monitor mode, we
shouldn't pass all data packets up to the stack, resulting and have
mac80211 parse them all.
Cheers,
Jes
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> index 0399b1e..ae490e7 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> @@ -4475,9 +4475,6 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>
> rtl8xxxu_update_rate_mask(priv, ramask, sgi);
>
> - /* Enable RX of data frames */
> - rtl8xxxu_write16(priv, REG_RXFLTMAP2, 0xffff);
> -
> rtl8xxxu_write8(priv, REG_BCN_MAX_ERR, 0xff);
>
> rtl8723a_stop_tx_beacon(priv);
> @@ -4492,8 +4489,6 @@ rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> val8 |= BEACON_DISABLE_TSF_UPDATE;
> rtl8xxxu_write8(priv, REG_BEACON_CTRL, val8);
>
> - /* Disable RX of data frames */
> - rtl8xxxu_write16(priv, REG_RXFLTMAP2, 0x0000);
> h2c.joinbss.data = H2C_JOIN_BSS_DISCONNECT;
> }
> h2c.joinbss.cmd = H2C_JOIN_BSS_REPORT;
> @@ -5495,12 +5490,9 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)
> }
> exit:
> /*
> - * Disable all data frames
> - */
> - rtl8xxxu_write16(priv, REG_RXFLTMAP2, 0x0000);
> - /*
> - * Accept all mgmt frames
> + * Accept all data and mgmt frames
> */
> + rtl8xxxu_write16(priv, REG_RXFLTMAP2, 0xffff);
> rtl8xxxu_write16(priv, REG_RXFLTMAP0, 0xffff);
>
> rtl8xxxu_write32(priv, REG_OFDM0_XA_AGC_CORE1, 0x6954341e);
next prev parent reply other threads:[~2015-10-21 23:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 21:28 [PATCH] rtl8xxxu: Enable data frame reception in rtl8xxxu_start Bruno Randolf
2015-10-21 23:13 ` Jes Sorensen [this message]
2015-10-22 7:50 ` Bruno Randolf
2015-10-22 13:10 ` Jes Sorensen
2015-10-22 13:22 ` Bruno Randolf
2015-10-22 13:42 ` Jes Sorensen
2015-10-22 13:50 ` Bruno Randolf
2015-10-23 20:31 ` Jes Sorensen
2015-10-23 16:30 ` Larry Finger
2015-10-30 19:32 ` Jes Sorensen
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=wrfjoafrrf1s.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=br1@einfach.org \
--cc=linux-wireless@vger.kernel.org \
/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).