qcacld-3.0: Add ini to support twt in 11n mode

Currently TWT works only in 11ax. Add enable_twt_in_11n
ini to support TWT in 11n mode.
False: DO not support TWT in 11n mode
True: Support TWT in 11n mode

Change-Id: If1011c9a24b9c285199d7b0e60e5614d6c1f8786
CRs-Fixed: 3185100
This commit is contained in:
Jyoti Kumari
2022-03-19 23:44:39 +05:30
committed by Madan Koyyalamudi
orang tua 090783be72
melakukan abf8be9f56
6 mengubah file dengan 81 tambahan dan 3 penghapusan

Melihat File

@@ -52,6 +52,7 @@ QDF_STATUS wlan_twt_cfg_init(struct wlan_objmgr_psoc *psoc)
twt_cfg->bcast_responder_enabled = CFG_TWT_GET_BCAST_RES(bcast_conf); twt_cfg->bcast_responder_enabled = CFG_TWT_GET_BCAST_RES(bcast_conf);
twt_cfg->enable_twt_24ghz = cfg_get(psoc, CFG_ENABLE_TWT_24GHZ); twt_cfg->enable_twt_24ghz = cfg_get(psoc, CFG_ENABLE_TWT_24GHZ);
twt_cfg->flex_twt_sched = cfg_default(CFG_HE_FLEX_TWT_SCHED); twt_cfg->flex_twt_sched = cfg_default(CFG_HE_FLEX_TWT_SCHED);
twt_cfg->is_twt_enabled_in_11n = cfg_get(psoc, CFG_TWT_ENABLE_IN_11N);
twt_cfg->req_flag = false; twt_cfg->req_flag = false;
twt_cfg->res_flag = false; twt_cfg->res_flag = false;
@@ -317,3 +318,19 @@ wlan_twt_cfg_get_bcast_responder(struct wlan_objmgr_psoc *psoc, bool *val)
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
QDF_STATUS
wlan_twt_cfg_get_support_in_11n_mode(struct wlan_objmgr_psoc *psoc,
bool *val)
{
struct twt_psoc_priv_obj *twt_psoc_obj;
twt_psoc_obj = wlan_twt_psoc_get_comp_private_obj(psoc);
if (!twt_psoc_obj) {
*val = cfg_default(CFG_TWT_ENABLE_IN_11N);
return QDF_STATUS_E_INVAL;
}
*val = twt_psoc_obj->cfg_params.is_twt_enabled_in_11n;
return QDF_STATUS_SUCCESS;
}

Melihat File

@@ -180,5 +180,16 @@ wlan_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
*/ */
QDF_STATUS QDF_STATUS
wlan_twt_cfg_get_bcast_responder(struct wlan_objmgr_psoc *psoc, bool *val); wlan_twt_cfg_get_bcast_responder(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_twt_cfg_get_support_in_11n_mode() - Get TWT support in 11n mode
* @psoc: Pointer to global psoc
* @val: pointer to output variable
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_twt_cfg_get_support_in_11n_mode(struct wlan_objmgr_psoc *psoc,
bool *val);
#endif #endif

Melihat File

@@ -193,13 +193,37 @@
0, \ 0, \
"HE Flex Twt Sched") "HE Flex Twt Sched")
/*
* <ini>
* enable_twt_in_11n - Enable TWT support in 11n mode
* @MIN: 0
* @MAX: 1
* @Default: 0
*
* This ini is used to enable/disable TWT support 11n mode.
* Generally by default TWT support present from HE capable
* devices but if this ini is enabled then it will support
* partially from 11n mode itself.
*
* Related: NA
*
* Usage: External
*
* </ini>
*/
#define CFG_TWT_ENABLE_IN_11N CFG_INI_BOOL( \
"enable_twt_in_11n", \
false, \
"enable twt support in 11n mode")
#define CFG_TWT_ALL \ #define CFG_TWT_ALL \
CFG(CFG_ENABLE_TWT) \ CFG(CFG_ENABLE_TWT) \
CFG(CFG_TWT_REQUESTOR) \ CFG(CFG_TWT_REQUESTOR) \
CFG(CFG_TWT_RESPONDER) \ CFG(CFG_TWT_RESPONDER) \
CFG(CFG_TWT_CONGESTION_TIMEOUT) \ CFG(CFG_TWT_CONGESTION_TIMEOUT) \
CFG(CFG_BCAST_TWT_REQ_RESP) \ CFG(CFG_BCAST_TWT_REQ_RESP) \
CFG(CFG_ENABLE_TWT_24GHZ) CFG(CFG_ENABLE_TWT_24GHZ) \
CFG(CFG_TWT_ENABLE_IN_11N)
#elif !defined(WLAN_SUPPORT_TWT) && !defined(WLAN_TWT_CONV_SUPPORTED) #elif !defined(WLAN_SUPPORT_TWT) && !defined(WLAN_TWT_CONV_SUPPORTED)
#define CFG_TWT_ALL #define CFG_TWT_ALL
#endif #endif

Melihat File

@@ -41,18 +41,36 @@ wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val);
*/ */
QDF_STATUS QDF_STATUS
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val); wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_twt_cfg_get_support_in_11n() - Get TWT support on HT cap
* @psoc: Pointer to global psoc object
* @val: pointer to output variable
*
* Return: QDF_STATUS_SUCCESS
*/
QDF_STATUS
wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc,
bool *val);
#else #else
static inline static inline QDF_STATUS
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val) wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
static inline static inline QDF_STATUS
wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val) wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
static inline QDF_STATUS
wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc,
bool *val)
{
return QDF_STATUS_SUCCESS;
}
#endif #endif
#endif #endif

Melihat File

@@ -39,6 +39,7 @@
* @flex_twt_sched: flex twt scheduling enable/disable * @flex_twt_sched: flex twt scheduling enable/disable
* @req_flag: requestor flag enable/disable * @req_flag: requestor flag enable/disable
* @res_flag: responder flag enable/disable * @res_flag: responder flag enable/disable
* @is_twt_enabled_in_11n: Enable TWT support in 11n mode
*/ */
struct twt_mc_cfg_params { struct twt_mc_cfg_params {
bool enable_twt; bool enable_twt;
@@ -51,6 +52,7 @@ struct twt_mc_cfg_params {
bool flex_twt_sched; bool flex_twt_sched;
bool req_flag; bool req_flag;
bool res_flag; bool res_flag;
bool is_twt_enabled_in_11n;
}; };
#endif /* __WLAN_TWT_EXT_DEFS_H__ */ #endif /* __WLAN_TWT_EXT_DEFS_H__ */

Melihat File

@@ -29,3 +29,9 @@ wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val)
{ {
return wlan_twt_cfg_get_responder_flag(psoc, val); return wlan_twt_cfg_get_responder_flag(psoc, val);
} }
QDF_STATUS
wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_twt_cfg_get_support_in_11n_mode(psoc, val);
}