qcacmn: Modify H/w DBS cap check and fetch NSS

Modify API policy_mgr_is_hw_dbs_2x2_capable() to check H/w DBS
capability and check if downgrading needed while entering DBS.

Define a new API policy_mgr_get_hw_dbs_nss() to get NSS
information of both MAC0 and MAC1.

Change-Id: If24817017f675e45197d060cd75317aa381256de
CRs-Fixed: 2037487
This commit is contained in:
Vikrampal 2017-04-28 17:44:30 +05:30
commit 31eb12c1b2
4 changed files with 92 additions and 53 deletions

View file

@ -1485,7 +1485,7 @@ bool policy_mgr_is_current_hwmode_dbs(struct wlan_objmgr_psoc *psoc);
* policy_mgr_is_hw_dbs_2x2_capable() - if hardware is capable of dbs 2x2
* @psoc: PSOC object information
* This function checks if hw_modes supported are always capable of
* DBS 2x2.
* DBS and there is no need for downgrading while entering DBS.
* true: DBS 2x2 can always be supported
* false: hw_modes support DBS 1x1 as well
*
@ -1859,4 +1859,16 @@ void policy_mgr_update_new_hw_mode_index(struct wlan_objmgr_psoc *psoc,
QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
uint8_t channel, bool *ok);
/**
* policy_mgr_get_hw_dbs_nss() - Computes DBS NSS
* @psoc: PSOC object information
* @nss_dbs: NSS info of both MAC0 and MAC1
* This function computes NSS info of both MAC0 and MAC1
* True: DBS capable
* False: not DBS capable
*
* Return: True or False
*/
bool policy_mgr_get_hw_dbs_nss(struct wlan_objmgr_psoc *psoc,
struct dbs_nss *nss_dbs);
#endif /* __WLAN_POLICY_MGR_API_H */

View file

@ -992,4 +992,14 @@ struct policy_mgr_user_cfg {
uint32_t mcc_to_scc_switch_mode;
bool sub_20_mhz_enabled;
};
/**
* struct dbs_nss - Number of spatial streams in DBS mode
* @mac0_ss: Number of spatial streams on MAC0
* @mac1_ss: Number of spatial streams on MAC1
*/
struct dbs_nss {
enum hw_mode_ss_config mac0_ss;
enum hw_mode_ss_config mac1_ss;
};
#endif /* __WLAN_POLICY_MGR_PUBLIC_STRUCT_H */