mbox series

[V4,00/10] wifi: ath12k: add MU-MIMO and 160 MHz bandwidth support

Message ID 20240508002055.17705-1-quic_pradeepc@quicinc.com
Headers show
Series wifi: ath12k: add MU-MIMO and 160 MHz bandwidth support | expand

Message

Pradeep Kumar Chitrapu May 8, 2024, 12:20 a.m. UTC
Add support for
1. enabling MU-MIMO in HE and EHT modes from hardware
2. setting fixed HE rate/GI/LTF
3. 160 MHz bandwidth in HE mode
4. extended NSS bandwidth support

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

changes in v4:
 - Fix ath12k-check warnings in patch 2/10 and 7/10
 - remove "hostapd" reference in patches 2/10 and 3/10
 - remove redundant prerequisite-patch-id's in cover letter

changes in v3:
 - address review comments for fixing ath12k-check issues.

changes in v2:
 - Amend mac80211 patch description as the patch is not specific
   to AP mode.
 - Amend EHT MU-MIMO patch description to specify future support
   for STA mode.

Pradeep Kumar Chitrapu (10):
  wifi: mac80211: Add EHT UL MU-MIMO flag in ieee80211_bss_conf
  wifi: ath12k: push HE MU-MIMO params to hardware
  wifi: ath12k: push EHT MU-MIMO params to hardware
  wifi: ath12k: move HE MCS mapper to a separate function
  wifi: ath12k: generate rx and tx mcs maps for supported HE mcs
  wifi: ath12k: fix TX and RX MCS rate configurations in HE mode
  wifi: ath12k: add support for setting fixed HE rate/GI/LTF
  wifi: ath12k: clean up 80P80 support
  wifi: ath12k: add support for 160 MHz bandwidth
  wifi: ath12k: add extended NSS bandwidth support for 160 MHz

 drivers/net/wireless/ath/ath12k/core.h |    2 +
 drivers/net/wireless/ath/ath12k/mac.c  | 1052 ++++++++++++++++++++----
 drivers/net/wireless/ath/ath12k/mac.h  |   17 +
 drivers/net/wireless/ath/ath12k/wmi.c  |   24 +-
 drivers/net/wireless/ath/ath12k/wmi.h  |   98 ++-
 include/net/mac80211.h                 |    4 +
 net/mac80211/cfg.c                     |    5 +
 7 files changed, 994 insertions(+), 208 deletions(-)


base-commit: 74893410e635fc9a5c7f1a7cddd262b4a7ae624b

Comments

Jeff Johnson May 13, 2024, 8:49 p.m. UTC | #1
On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
> Add flag for Full Bandwidth UL MU-MIMO for EHT. This is utilized
> to pass EHT MU-MIMO configurations from user space to driver.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
> ---
>  include/net/mac80211.h | 4 ++++
>  net/mac80211/cfg.c     | 5 +++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index cafc664ee531..d7b6f75bc920 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -701,6 +701,9 @@ struct ieee80211_fils_discovery {
>   *	beamformee
>   * @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
>   *	beamformer
> + * @eht_80mhz_full_bw_ul_mumimo: does this BSS support the reception (AP) or transmission

suggest you reformat to fit in 80 columns
(we allow code to exceed 80 columns when it improves readability, but comments
should almost never exceed 80 columns)

> + *	(non-AP STA) of an EHT TB PPDU on an RU that spans the entire PPDU
> + *	bandwidth
>   */
>  struct ieee80211_bss_conf {
>  	struct ieee80211_vif *vif;
> @@ -793,6 +796,7 @@ struct ieee80211_bss_conf {
>  	bool eht_su_beamformer;
>  	bool eht_su_beamformee;
>  	bool eht_mu_beamformer;
> +	bool eht_80mhz_full_bw_ul_mumimo;
>  };
>  
>  /**
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index b08e5d7687e3..96b2f31f0c8a 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1379,6 +1379,11 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
>  				(IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ |
>  				 IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ |
>  				 IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ);
> +		link_conf->eht_80mhz_full_bw_ul_mumimo =
> +			params->eht_cap->fixed.phy_cap_info[7] &
> +				(IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_80MHZ |
> +				 IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_160MHZ |
> +				 IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_320MHZ);
>  	} else {
>  		link_conf->eht_su_beamformer = false;
>  		link_conf->eht_su_beamformee = false;
Jeff Johnson May 13, 2024, 8:51 p.m. UTC | #2
On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
> Generate rx and tx mcs maps in ath12k_mac_set_hemcsmap() based
> on number of supported tx/rx chains and set them in supported
> mcs/nss for HE capabilities.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Co-developed-by: Muna Sinada <quic_msinada@quicinc.com>
> Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson May 13, 2024, 8:52 p.m. UTC | #3
On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
> Currently, the TX and RX MCS rate configurations per peer are
> reversed when sent to the firmware. As a result, RX MCS rates
> are configured for TX, and vice versa. This commit rectifies
> the configuration to match what the firmware expects.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson May 13, 2024, 8:52 p.m. UTC | #4
On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
> Add support to set fixed HE rate/GI/LTF values using nl80211.
> Reuse parts of the existing code path already used for HT/VHT
> to implement the new helpers symmetrically, similar to how
> HT/VHT is handled.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Co-developed-by: Muna Sinada <quic_msinada@quicinc.com>
> Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson May 13, 2024, 8:52 p.m. UTC | #5
On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
> Clean up unused 80P80 references as hardware does not support
> it. This is applicable to both QCN9274 and WCN7850.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson May 13, 2024, 8:56 p.m. UTC | #6
On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
> Currently rx and tx MCS map for 160 MHz under HE capabilities
> are not updating properly, when 160 MHz is configured with NSS
> lesser than max NSS support. Fix this by utilizing
> nss_ratio_enabled and nss_ratio_info fields sent by firmware
> in service ready event.
> 
> However, if firmware advertises EXT NSS BW support in VHT caps
> as 1(1x2) and when nss_ratio_info indicates 1:1, reset the EXT
> NSS BW Support in VHT caps to 0 which indicates 1x1. This is
> to avoid incorrectly chosing 1:2 NSS ratio when using the

s/chosing /choosing /

> default VHT caps advertised by firmware.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Pradeep Kumar Chitrapu May 15, 2024, 4:10 p.m. UTC | #7
On 5/13/2024 1:49 PM, Jeff Johnson wrote:
> On 5/7/2024 5:20 PM, Pradeep Kumar Chitrapu wrote:
>> Add flag for Full Bandwidth UL MU-MIMO for EHT. This is utilized
>> to pass EHT MU-MIMO configurations from user space to driver.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>
>> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
>> ---
>>   include/net/mac80211.h | 4 ++++
>>   net/mac80211/cfg.c     | 5 +++++
>>   2 files changed, 9 insertions(+)
>>
>> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
>> index cafc664ee531..d7b6f75bc920 100644
>> --- a/include/net/mac80211.h
>> +++ b/include/net/mac80211.h
>> @@ -701,6 +701,9 @@ struct ieee80211_fils_discovery {
>>    *	beamformee
>>    * @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
>>    *	beamformer
>> + * @eht_80mhz_full_bw_ul_mumimo: does this BSS support the reception (AP) or transmission
> 
> suggest you reformat to fit in 80 columns
> (we allow code to exceed 80 columns when it improves readability, but comments
> should almost never exceed 80 columns)

Sure..Thanks Jeff, will address in next revision