mbox series

[00/10] wifi: mt76: mt7925: fix connection and throughput issues

Message ID 20231228090749.15191-1-mingyen.hsieh@mediatek.com
Headers show
Series wifi: mt76: mt7925: fix connection and throughput issues | expand

Message

Mingyen Hsieh Dec. 28, 2023, 9:07 a.m. UTC
From: Ming Yen Hsieh <MingYen.Hsieh@mediatek.com>

Hi,

Recently, we have some tests on the mt7925 driver and find a number of
potential connection bugs and throughput issues. This patchset contains
bugfixes and cleanups for these issues.

Thanks,
Yen.

Deren Wu (1):
  wifi: mt76: mt7925: update PCIe DMA settings

Hao Zhang (1):
  wifi: mt76: mt7925: fix mcu query command fail

Ming Yen Hsieh (6):
  wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band
  wifi: mt76: mt7925: fix wmm queue mapping
  wifi: mt76: mt7925: fix fw download fail
  wifi: mt76: mt7925: fix WoW failed in encrypted mode
  wifi: mt76: mt7925: fix the wrong header translation config
  wifi: mt76: mt7925: add support to set ifs time by mcu command

Quan Zhou (1):
  wifi: mt76: mt7925: add flow to avoid chip bt function fail

rong.yan (1):
  wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band

 .../wireless/mediatek/mt76/mt76_connac_mcu.c  |   2 +-
 .../wireless/mediatek/mt76/mt76_connac_mcu.h  |   4 +
 .../net/wireless/mediatek/mt76/mt7925/main.c  |  26 ++-
 .../net/wireless/mediatek/mt76/mt7925/mcu.c   | 176 +++++++++++-------
 .../net/wireless/mediatek/mt76/mt7925/mcu.h   |  92 +++++++--
 .../net/wireless/mediatek/mt76/mt7925/pci.c   |   2 +
 .../net/wireless/mediatek/mt76/mt792x_dma.c   |  13 +-
 .../net/wireless/mediatek/mt76/mt792x_regs.h  |   8 +
 8 files changed, 227 insertions(+), 96 deletions(-)

Comments

Lorenzo Bianconi Dec. 28, 2023, 1:56 p.m. UTC | #1
> From: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> 
> Firmware uses access class index (ACI) for wmm parameters update,
> so convert mac80211 queue to ACI in mt7925_conf_tx().
> 
> Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> ---
>  .../net/wireless/mediatek/mt76/mt7925/main.c  | 21 ++++++++++++++++++-
>  .../net/wireless/mediatek/mt76/mt7925/mcu.c   |  2 +-
>  2 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> index a080df58120f..b832dd8adee5 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
> @@ -1273,6 +1273,25 @@ mt7925_channel_switch_beacon(struct ieee80211_hw *hw,
>  	mt792x_mutex_release(dev);
>  }
>  
> +static int
> +mt7925_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> +	       unsigned int link_id, u16 queue,
> +	       const struct ieee80211_tx_queue_params *params)
> +{
> +	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
> +	const u8 mq_to_aci[] = {

nit: static const here

Regards,
Lorenzo

> +		    [IEEE80211_AC_VO] = 3,
> +		    [IEEE80211_AC_VI] = 2,
> +		    [IEEE80211_AC_BE] = 0,
> +		    [IEEE80211_AC_BK] = 1,
> +	};
> +
> +	/* firmware uses access class index */
> +	mvif->queue_params[mq_to_aci[queue]] = *params;
> +
> +	return 0;
> +}
> +
>  static int
>  mt7925_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>  		struct ieee80211_bss_conf *link_conf)
> @@ -1396,7 +1415,7 @@ const struct ieee80211_ops mt7925_ops = {
>  	.add_interface = mt7925_add_interface,
>  	.remove_interface = mt792x_remove_interface,
>  	.config = mt7925_config,
> -	.conf_tx = mt792x_conf_tx,
> +	.conf_tx = mt7925_conf_tx,
>  	.configure_filter = mt7925_configure_filter,
>  	.bss_info_changed = mt7925_bss_info_changed,
>  	.start_ap = mt7925_start_ap,
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
> index 4811fccbe30e..0299045b4b83 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
> @@ -895,7 +895,7 @@ int mt7925_mcu_set_tx(struct mt792x_dev *dev, struct ieee80211_vif *vif)
>  
>  		e = (struct edca *)tlv;
>  		e->set = WMM_PARAM_SET;
> -		e->queue = ac + mvif->mt76.wmm_idx * MT76_CONNAC_MAX_WMM_SETS;
> +		e->queue = ac;
>  		e->aifs = q->aifs;
>  		e->txop = cpu_to_le16(q->txop);
>  
> -- 
> 2.18.0
>