qcacld-3.0: Add fixed FDD mode to btc_chain_mode

Previously when chains of BT and WLAN 2.4 GHz are separated,
hybrid mode will be used for BTC. Now adding fixed FDD mode
to fulfill different BTC scenarios.

Change-Id: I3a4d6919319f0f66e6b816566f24f4ac11b2c669
CRs-Fixed: 3244045
このコミットが含まれているのは:
Xiaoning Ma
2022-07-14 21:19:32 +08:00
committed by Madan Koyyalamudi
コミット a7fcc140bb
11個のファイルの変更96行の追加44行の削除

ファイルの表示

@@ -55,7 +55,7 @@ struct wlan_coex_callback {
* @cb: structure to dbam callback
*/
struct coex_psoc_obj {
uint8_t btc_chain_mode;
enum coex_btc_chain_mode btc_chain_mode;
update_coex_cb coex_config_updated[COEX_CONFIG_TYPE_MAX];
#ifdef WLAN_FEATURE_DBAM_CONFIG
struct wlan_coex_callback cb;
@@ -161,7 +161,8 @@ QDF_STATUS wlan_coex_psoc_destroyed_notification(struct wlan_objmgr_psoc *psoc,
* Return : status of operation
*/
QDF_STATUS
wlan_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val);
wlan_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode val);
/**
* wlan_coex_psoc_get_btc_chain_mode() - private API to get BT coex chain mode
@@ -172,7 +173,8 @@ wlan_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val);
* Return : status of operation
*/
QDF_STATUS
wlan_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val);
wlan_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode *val);
#endif
#ifdef WLAN_FEATURE_DBAM_CONFIG

ファイルの表示

@@ -129,7 +129,8 @@ wlan_coex_config_updated(struct wlan_objmgr_vdev *vdev, uint8_t type)
}
QDF_STATUS
wlan_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val)
wlan_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode val)
{
struct coex_psoc_obj *coex_obj;
@@ -143,7 +144,8 @@ wlan_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val)
}
QDF_STATUS
wlan_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val)
wlan_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode *val)
{
struct coex_psoc_obj *coex_obj;

ファイルの表示

@@ -25,12 +25,23 @@
#include "qdf_status.h"
#include <wlan_objmgr_vdev_obj.h>
#include <wlan_objmgr_psoc_obj.h>
#include "qca_vendor.h"
#include "wlan_coex_public_structs.h"
#define WLAN_COEX_BTC_CHAIN_MODE_SHARED QCA_BTC_CHAIN_SHARED
#define WLAN_COEX_BTC_CHAIN_MODE_SEPARATED QCA_BTC_CHAIN_SEPARATED
#define WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED 0xFF
/**
* enum coex_btc_chain_mode - btc chain mode definitions
* @WLAN_COEX_BTC_CHAIN_MODE_SHARED: chains of BT and WLAN 2.4 GHz are shared.
* @WLAN_COEX_BTC_CHAIN_MODE_FDD: chains of BT and WLAN 2.4 GHz are
* separated, FDD mode.
* @WLAN_COEX_BTC_CHAIN_MODE_HYBRID: chains of BT and WLAN 2.4 GHz are
* separated, hybrid mode.
* @WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED: chain mode is not set.
*/
enum coex_btc_chain_mode {
WLAN_COEX_BTC_CHAIN_MODE_SHARED = 0,
WLAN_COEX_BTC_CHAIN_MODE_FDD,
WLAN_COEX_BTC_CHAIN_MODE_HYBRID,
WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED = 0xFF,
};
/**
* enum coex_config_type - coex config type definitions
@@ -74,7 +85,8 @@ ucfg_coex_register_cfg_updated_handler(struct wlan_objmgr_psoc *psoc,
* Return : status of operation
*/
QDF_STATUS
ucfg_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val);
ucfg_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode val);
/**
* ucfg_coex_psoc_get_btc_chain_mode() - API to get BT coex chain mode from psoc
@@ -84,7 +96,8 @@ ucfg_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val);
* Return : status of operation
*/
QDF_STATUS
ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val);
ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode *val);
/**
* ucfg_coex_send_btc_chain_mode() - API to send BT coex config to target if
@@ -94,7 +107,8 @@ ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val);
* Return: status of operation
*/
QDF_STATUS
ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev, uint8_t mode);
ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev,
enum coex_btc_chain_mode mode);
#else
static inline QDF_STATUS
ucfg_coex_register_cfg_updated_handler(struct wlan_objmgr_psoc *psoc,
@@ -105,7 +119,8 @@ ucfg_coex_register_cfg_updated_handler(struct wlan_objmgr_psoc *psoc,
}
static inline QDF_STATUS
ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val)
ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode *val)
{
if (val)
*val = WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED;
@@ -114,7 +129,8 @@ ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val)
}
static inline QDF_STATUS
ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev, uint8_t mode)
ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev,
enum coex_btc_chain_mode mode)
{
return QDF_STATUS_SUCCESS;
}

ファイルの表示

@@ -46,24 +46,26 @@ ucfg_coex_register_cfg_updated_handler(struct wlan_objmgr_psoc *psoc,
}
QDF_STATUS
ucfg_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t val)
ucfg_coex_psoc_set_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode val)
{
return wlan_coex_psoc_set_btc_chain_mode(psoc, val);
}
QDF_STATUS
ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc, uint8_t *val)
ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
enum coex_btc_chain_mode *val)
{
return wlan_coex_psoc_get_btc_chain_mode(psoc, val);
}
QDF_STATUS
ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev, uint8_t mode)
ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev,
enum coex_btc_chain_mode mode)
{
struct coex_config_params param = {0};
if (mode != WLAN_COEX_BTC_CHAIN_MODE_SHARED &&
mode != WLAN_COEX_BTC_CHAIN_MODE_SEPARATED)
if (mode > WLAN_COEX_BTC_CHAIN_MODE_HYBRID)
return QDF_STATUS_E_INVAL;
param.vdev_id = wlan_vdev_get_id(vdev);

ファイルの表示

@@ -90,7 +90,7 @@ QDF_STATUS wlan_coex_deinit(void)
static void
wlan_coex_set_btc_chain_mode_with_ini(struct wlan_objmgr_psoc *psoc)
{
uint8_t btc_chain_mode;
enum coex_btc_chain_mode btc_chain_mode;
QDF_STATUS status;
status = wlan_coex_psoc_get_btc_chain_mode(psoc, &btc_chain_mode);
@@ -101,8 +101,7 @@ wlan_coex_set_btc_chain_mode_with_ini(struct wlan_objmgr_psoc *psoc)
if (btc_chain_mode == WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED) {
btc_chain_mode = cfg_get(psoc, CFG_SET_INIT_CHAIN_MODE_FOR_BTC);
if (btc_chain_mode != WLAN_COEX_BTC_CHAIN_MODE_SHARED &&
btc_chain_mode != WLAN_COEX_BTC_CHAIN_MODE_SEPARATED &&
if (btc_chain_mode > WLAN_COEX_BTC_CHAIN_MODE_HYBRID &&
btc_chain_mode != WLAN_COEX_BTC_CHAIN_MODE_UNSETTLED) {
coex_err("invalid ini config %d for btc chain mode",
btc_chain_mode);

ファイルの表示

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012 - 2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -349,7 +350,10 @@
* only below values can be set:
* 0 - init WLAN 2.4G to support 2x2.
* It means chains of BT and WLAN 2.4G are shared, or BT is OFF.
* 1 - init WLAN 2.4G as 1x1, chains of BT and WLAN 2.4G are separated.
* 1 - init WLAN 2.4G as 1x1, chains of BT and WLAN 2.4G are separated,
* fixed FDD.
* 2 - init WLAN 2.4G as 1x1, chains of BT and WLAN 2.4G are separated,
* hybrid mode
* 0xFF - no need to send init chain mode for BTC to firmware.
*
* Supported Feature: init chain mode for BTC