qcacld-3.0: Implemented Chainmask NL command

Implemented driver interface for NL command for setting
and getting TX and RX chains. The chains can be set to
either chain 0(1) or chain 1(2) or both(3). This is only valid if
antenna mode is set to 2X2.

Below command can be used to set the chainmask:
iw phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>
Example:
iw phy0 set antenna 1   -- to set both Tx and Rx chain 0.
iw phy0 set antenna all -- to set all/both chains for rx/tx
iw phy0 set antenna 1 2 -- to set chain 0 for tx and chain 1 for rx

Below command can be used to get the chainmask after set:
iw phy <phyname> info

check for "Configured Antennas: TX 0x1 RX 0x1"

Below conditions should be met for setting chainmask:
1. Antenna sharing should be disabled.
2. gEnable2x2 in ini file should be 0
3. enableBTChainSeparation in ini file should be 1
4. DBS should be disabled (gDualMacFeatureDisable = 1)
   or HW should be DBS 2x2 capable
5. set TX/RX chainmask 3 in ini (gSetTxChainmask1x1/gSetRxChainmask1x1)
6. HW should support TX/RX chainmask as 3

Change-Id: I04f6667398eac405a6be61bc039e048090578abf
CRs-Fixed: 2693370
This commit is contained in:
Utkarsh Bhatnagar
2020-05-22 20:06:49 +05:30
committed by nshrivas
parent f31d749e83
commit 0a61d6462b
6 changed files with 211 additions and 30 deletions

View File

@@ -494,6 +494,15 @@ QDF_STATUS wlan_mlme_get_bt_chain_separation_flag(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
uint8_t session_id);
/**
* wlan_mlme_is_chain_mask_supported() - check if configure chainmask can
* be supported
* @psoc: pointer to psoc object
*
* Return: true if supported else false
*/
bool wlan_mlme_is_chain_mask_supported(struct wlan_objmgr_psoc *psoc);
/**
* wlan_mlme_get_listen_interval() - Get listen interval
* @psoc: pointer to psoc object