From: Felix Fietkau <nbd@nbd.name>
To: Shayne Chen <shayne.chen@mediatek.com>
Cc: linux-mediatek <linux-mediatek@lists.infradead.org>,
Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
Ryder Lee <ryder.lee@mediatek.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
Evelyn Tsai <evelyn.tsai@mediatek.com>
Subject: Re: [PATCH v3 08/10] mt76: mt7915: implement testmode rx support
Date: Wed, 14 Oct 2020 12:23:00 +0200 [thread overview]
Message-ID: <ed34a4ab-91e5-5cb7-1ffa-595d6ac2ef03@nbd.name> (raw)
In-Reply-To: <20201012125403.8608-8-shayne.chen@mediatek.com>
On 2020-10-12 14:54, Shayne Chen wrote:
> Support testmode rx and display rx statistic by parsing RXV packet
> type, which is currently only enabled in testmode.
>
> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
> ---
> v2: change last_snr to u8
> v3: use nla_put_u8 for MT76_TM_RX_ATTR_SNR
> change snr variable type to u8 in mt7915_mac_fill_rx_vector
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
> index 5d95766..acab268 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
> @@ -113,6 +113,31 @@ mt7915_tm_reg_backup_restore(struct mt7915_dev *dev, struct mt7915_phy *phy)
> mt76_clear(dev, MT_TMAC_TCR0(0), MT_TMAC_TCR0_TBTT_STOP_CTRL);
> }
>
> +static int
> +mt7915_tm_config_rx_filter(struct mt7915_dev *dev, bool en)
> +{
> + struct mt7915_tm_cmd req = {
> + .testmode_en = 1,
> + .param_idx = MCU_ATE_SET_RX_FILTER,
> + .param.filter.report_en = en,
> + .param.filter.band = 0, /* TODO: support dbdc */
> + };
> + __le32 mask = RX_FILTER_NOT_OWN_BTIM |
> + RX_FILTER_NOT_OWN_UCAST |
> + RX_FILTER_RTS | RX_FILTER_CTS |
> + RX_FILTER_CTRL_RSV |
> + RX_FILTER_BC_MC_BSSID_A2 |
> + RX_FILTER_BC_MC_BSSID_A3 |
> + RX_FILTER_BC_MC_OMAC_A3 |
> + RX_FILTER_PROTOCOL_VERSION |
> + RX_FILTER_FCS_ERR;
> +
> + req.param.filter.mask = cpu_to_le32(mask);
> +
> + return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_ATE_CTRL, &req,
> + sizeof(req), false);
Why do we need this?
In order to use testmode you have to set up a monitor mode interface,
which should configure the rx filter settings properly already.
- Felix
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-10-14 10:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 12:53 [PATCH v3 01/10] mt76: testmode: switch ib and wb rssi to array type for per-antenna report Shayne Chen
2020-10-12 12:53 ` [PATCH v3 02/10] mt76: testmode: add snr attribute in rx statistics Shayne Chen
2020-10-12 12:53 ` [PATCH v3 03/10] mt76: testmode: add tx_rate_stbc parameter Shayne Chen
2020-10-12 12:53 ` [PATCH v3 04/10] mt76: testmode: add support for LTF and GI combinations for HE mode Shayne Chen
2020-10-12 12:53 ` [PATCH v3 05/10] mt76: mt7915: fix tx rate related fields in tx descriptor Shayne Chen
2020-10-12 12:53 ` [PATCH v3 06/10] mt76: testmode: add support for HE rate modes Shayne Chen
2020-10-12 12:54 ` [PATCH v3 07/10] mt76: mt7915: implement testmode tx support Shayne Chen
2020-10-12 12:54 ` [PATCH v3 08/10] mt76: mt7915: implement testmode rx support Shayne Chen
2020-10-14 10:23 ` Felix Fietkau [this message]
2020-10-12 12:54 ` [PATCH v3 09/10] mt76: mt7915: add support to set txpower in testmode Shayne Chen
2020-10-12 12:54 ` [PATCH v3 10/10] mt76: mt7915: add support to set tx frequency offset " Shayne Chen
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=ed34a4ab-91e5-5cb7-1ffa-595d6ac2ef03@nbd.name \
--to=nbd@nbd.name \
--cc=evelyn.tsai@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=ryder.lee@mediatek.com \
--cc=shayne.chen@mediatek.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