[PATCH 3/4] mt76: mt7915: add support for continuous tx in testmode

Felix Fietkau nbd at nbd.name
Thu Jan 14 05:23:56 EST 2021


On 2021-01-05 12:30, Shayne Chen wrote:
> Implement continuous tx state for MT7915 NIC testmode.
> 
> Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>
> ---
>  .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   3 +-
>  .../net/wireless/mediatek/mt76/mt7915/mcu.h   |   1 +
>  .../wireless/mediatek/mt76/mt7915/testmode.c  | 160 ++++++++++++++++--
>  .../wireless/mediatek/mt76/mt7915/testmode.h  |  40 +++++
>  4 files changed, 192 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
> index e5af42c70e12..68b170308c4a 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
> @@ -469,15 +475,144 @@ static void
>  mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
>  {
>  	struct mt7915_dev *dev = phy->dev;
> -	if (en) {
> -		mutex_unlock(&dev->mt76.mutex);
> -		mt7915_set_channel(phy);
> -		mutex_lock(&dev->mt76.mutex);
> +	if (en)
> +		mt7915_tm_update_channel(phy);
> +
> +	mt7915_tm_set_trx(phy, TM_MAC_RX_RXV, en);
This leaves dev as an unused variable. I'll fix it up locally.

- Felix



More information about the Linux-mediatek mailing list