public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: sean.wang@kernel.org
Cc: nbd@nbd.name, lorenzo.bianconi@redhat.com,
	sean.wang@mediatek.com, deren.wu@mediatek.com,
	mingyen.hsieh@mediatek.com, linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org, stable@vger.kernel.org,
	Caleb Jorden <cjorden@gmail.com>
Subject: Re: [PATCH v4 1/6] Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO"
Date: Mon, 3 Mar 2025 15:45:55 +0100	[thread overview]
Message-ID: <20250303154555.1c30150b@gmx.net> (raw)
In-Reply-To: <20250226025647.102904-1-sean.wang@kernel.org>

Hello *,

On Tue, 25 Feb 2025 18:56:42 -0800, sean.wang@kernel.org wrote:

> From: Sean Wang <sean.wang@mediatek.com>
>
> For MLO, mac80211 will send the BA action for each link to
> the driver, so the driver does not need to handle it itself.
> Therefore, revert this patch.
>
> Fixes: e38a82d25b08 ("wifi: mt76: connac: Extend mt76_connac_mcu_uni_add_dev for MLO")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> Tested-by: Caleb Jorden <cjorden@gmail.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Seems there is some interest/testcase for this revert here [1] too...

	https://lore.kernel.org/linux-wireless/b994a256-ee2f-4831-ad61-288ae7bc864b@heusel.eu/t/#u

Regards,
Peter


> ---
> v2:
>   1) generate the patch based on the latest mt76 tree
>   2) update the commit message
> v3:
>   1) fixed the merge conflict
> v4:
>   1) added tested-by tag
> ---
>  .../net/wireless/mediatek/mt76/mt7925/main.c  | 10 ++--
>  .../net/wireless/mediatek/mt76/mt7925/mcu.c   | 50 ++++---------------
>  .../wireless/mediatek/mt76/mt7925/mt7925.h    |  2 -
>  3 files changed, 15 insertions(+), 47 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> index 98daf80ac131..8dba17c8697c 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> @@ -1289,22 +1289,22 @@ mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>  	case IEEE80211_AMPDU_RX_START:
>  		mt76_rx_aggr_start(&dev->mt76, &msta->deflink.wcid, tid, ssn,
>  				   params->buf_size);
> -		mt7925_mcu_uni_rx_ba(dev, vif, params, true);
> +		mt7925_mcu_uni_rx_ba(dev, params, true);
>  		break;
>  	case IEEE80211_AMPDU_RX_STOP:
>  		mt76_rx_aggr_stop(&dev->mt76, &msta->deflink.wcid, tid);
> -		mt7925_mcu_uni_rx_ba(dev, vif, params, false);
> +		mt7925_mcu_uni_rx_ba(dev, params, false);
>  		break;
>  	case IEEE80211_AMPDU_TX_OPERATIONAL:
>  		mtxq->aggr = true;
>  		mtxq->send_bar = false;
> -		mt7925_mcu_uni_tx_ba(dev, vif, params, true);
> +		mt7925_mcu_uni_tx_ba(dev, params, true);
>  		break;
>  	case IEEE80211_AMPDU_TX_STOP_FLUSH:
>  	case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
>  		mtxq->aggr = false;
>  		clear_bit(tid, &msta->deflink.wcid.ampdu_state);
> -		mt7925_mcu_uni_tx_ba(dev, vif, params, false);
> +		mt7925_mcu_uni_tx_ba(dev, params, false);
>  		break;
>  	case IEEE80211_AMPDU_TX_START:
>  		set_bit(tid, &msta->deflink.wcid.ampdu_state);
> @@ -1313,7 +1313,7 @@ mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>  	case IEEE80211_AMPDU_TX_STOP_CONT:
>  		mtxq->aggr = false;
>  		clear_bit(tid, &msta->deflink.wcid.ampdu_state);
> -		mt7925_mcu_uni_tx_ba(dev, vif, params, false);
> +		mt7925_mcu_uni_tx_ba(dev, params, false);
>  		ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
>  		break;
>  	}
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
> index 15815ad84713..4c133200c70b 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
> @@ -607,60 +607,30 @@ mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
>
>  /** starec & wtbl **/
>  int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
> -			 struct ieee80211_vif *vif,
>  			 struct ieee80211_ampdu_params *params,
>  			 bool enable)
>  {
>  	struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
> -	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
> -	struct mt792x_link_sta *mlink;
> -	struct mt792x_bss_conf *mconf;
> -	unsigned long usable_links = ieee80211_vif_usable_links(vif);
> -	struct mt76_wcid *wcid;
> -	u8 link_id, ret;
> -
> -	for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
> -		mconf = mt792x_vif_to_link(mvif, link_id);
> -		mlink = mt792x_sta_to_link(msta, link_id);
> -		wcid = &mlink->wcid;
> -
> -		if (enable && !params->amsdu)
> -			mlink->wcid.amsdu = false;
> +	struct mt792x_vif *mvif = msta->vif;
> +	struct mt76_wcid *wcid = &mvif->sta.deflink.wcid;
>
> -		ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
> -					enable, true);
> -		if (ret < 0)
> -			break;
> -	}
> +	if (enable && !params->amsdu)
> +		msta->deflink.wcid.amsdu = false;
>
> -	return ret;
> +	return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, wcid,
> +				 params, enable, true);
>  }
>
>  int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
> -			 struct ieee80211_vif *vif,
>  			 struct ieee80211_ampdu_params *params,
>  			 bool enable)
>  {
>  	struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv;
> -	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
> -	struct mt792x_link_sta *mlink;
> -	struct mt792x_bss_conf *mconf;
> -	unsigned long usable_links = ieee80211_vif_usable_links(vif);
> -	struct mt76_wcid *wcid;
> -	u8 link_id, ret;
> -
> -	for_each_set_bit(link_id, &usable_links, IEEE80211_MLD_MAX_NUM_LINKS) {
> -		mconf = mt792x_vif_to_link(mvif, link_id);
> -		mlink = mt792x_sta_to_link(msta, link_id);
> -		wcid = &mlink->wcid;
> -
> -		ret = mt7925_mcu_sta_ba(&dev->mt76, &mconf->mt76, wcid, params,
> -					enable, false);
> -		if (ret < 0)
> -			break;
> -	}
> +	struct mt792x_vif *mvif = msta->vif;
> +	struct mt76_wcid *wcid = &mvif->sta.deflink.wcid;
>
> -	return ret;
> +	return mt7925_mcu_sta_ba(&dev->mt76, &mvif->bss_conf.mt76, wcid,
> +				 params, enable, false);
>  }
>
>  static int mt7925_load_clc(struct mt792x_dev *dev, const char *fw_name)
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h b/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
> index 8707b5d04743..fd5f9d4ea4a7 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
> @@ -263,11 +263,9 @@ int mt7925_mcu_set_beacon_filter(struct mt792x_dev *dev,
>  				 struct ieee80211_vif *vif,
>  				 bool enable);
>  int mt7925_mcu_uni_tx_ba(struct mt792x_dev *dev,
> -			 struct ieee80211_vif *vif,
>  			 struct ieee80211_ampdu_params *params,
>  			 bool enable);
>  int mt7925_mcu_uni_rx_ba(struct mt792x_dev *dev,
> -			 struct ieee80211_vif *vif,
>  			 struct ieee80211_ampdu_params *params,
>  			 bool enable);
>  void mt7925_scan_work(struct work_struct *work);


      parent reply	other threads:[~2025-03-03 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26  2:56 [PATCH v4 1/6] Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO" sean.wang
2025-02-26  2:56 ` [PATCH v4 2/6] wifi: mt76: mt7925: fix the wrong link_idx when has p2p_device sean.wang
2025-02-26  2:56 ` [PATCH v4 3/6] wifi: mt76: mt7925: fix the wrong simultaneous cap for MLO sean.wang
2025-02-26  2:56 ` [PATCH v4 4/6] wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure sean.wang
2025-02-26  2:56 ` [PATCH v4 5/6] wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmd sean.wang
2025-02-26  2:56 ` [PATCH v4 6/6] wifi: mt76: mt7925: update the power-saving flow sean.wang
2025-02-26  9:36 ` [PATCH v4 1/6] Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO" Johannes Berg
2025-03-03 14:45 ` Peter Seiderer [this message]

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=20250303154555.1c30150b@gmx.net \
    --to=ps.report@gmx.net \
    --cc=cjorden@gmail.com \
    --cc=deren.wu@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=mingyen.hsieh@mediatek.com \
    --cc=nbd@nbd.name \
    --cc=sean.wang@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=stable@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