|
@@ -7054,6 +7054,8 @@ static void csr_roam_process_join_res(struct mac_context *mac_ctx,
|
|
|
acm_mask = sme_qos_get_acm_mask(mac_ctx, bss_desc, NULL);
|
|
|
#endif
|
|
|
conn_profile->acm_mask = acm_mask;
|
|
|
+ conn_profile->modifyProfileFields.uapsd_mask =
|
|
|
+ join_rsp->uapsd_mask;
|
|
|
/*
|
|
|
* start UAPSD if uapsd_mask is not 0 because HDD will
|
|
|
* configure for trigger frame It may be better to let QoS do
|
|
@@ -14301,51 +14303,24 @@ csr_check_vendor_ap_3_present(struct mac_context *mac_ctx, uint8_t *ie,
|
|
|
* csr_enable_twt() - Check if its allowed to enable twt for this session
|
|
|
* @ie: pointer to beacon/probe resp ie's
|
|
|
*
|
|
|
- * TWT is allowed only if device is in 11ax mode or if QCN ie present.
|
|
|
+ * TWT is allowed only if device is in 11ax mode and peer supports
|
|
|
+ * TWT responder or if QCN ie present.
|
|
|
*
|
|
|
* Return: true or flase
|
|
|
*/
|
|
|
-static bool csr_enable_twt(tDot11fBeaconIEs *ie)
|
|
|
+static bool csr_enable_twt(struct mac_context *mac_ctx, tDot11fBeaconIEs *ie)
|
|
|
{
|
|
|
- if (IS_FEATURE_SUPPORTED_BY_FW(DOT11AX))
|
|
|
- return true;
|
|
|
-
|
|
|
- if (!ie) {
|
|
|
- sme_debug("Beacon ie buffer is null");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- return ie->QCN_IE.present;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * csr_enable_uapsd() - Used to disable uapsd if both twt and uapsd is enabled
|
|
|
- * @mac_ctx: pointer to global mac structure
|
|
|
- * @ie: pointer to beacon/probe resp ie's
|
|
|
- *
|
|
|
- * Return: true or flase
|
|
|
- */
|
|
|
-static bool csr_enable_uapsd(struct mac_context *mac_ctx, tDot11fBeaconIEs *ie)
|
|
|
-{
|
|
|
- /* In non-HE case, TWT is enabled only for Q2Q.
|
|
|
- * So keed uAPSD enabled for non-Q2Q in this non-HE case.
|
|
|
- */
|
|
|
- if (!csr_enable_twt(ie))
|
|
|
- return true;
|
|
|
|
|
|
- if (!ie) {
|
|
|
- sme_debug("Beacon ie buffer is null");
|
|
|
+ if ((IS_FEATURE_SUPPORTED_BY_FW(DOT11AX) ||
|
|
|
+ mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled) && ie &&
|
|
|
+ (ie->QCN_IE.present || ie->he_cap.twt_responder)) {
|
|
|
+ sme_debug("TWT is supported, hence disable UAPSD; twt req supp: %d,twt respon supp: %d, QCN_IE: %d",
|
|
|
+ mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled,
|
|
|
+ ie->he_cap.twt_responder,
|
|
|
+ ie->QCN_IE.present);
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
- if ((mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled ||
|
|
|
- IS_FEATURE_SUPPORTED_BY_FW(DOT11AX)) &&
|
|
|
- ie->he_cap.twt_responder) {
|
|
|
- sme_debug("twt supported, disable uapsd");
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- return true;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -14633,8 +14608,8 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|
|
(eCsrPhyMode) pProfile->phyMode,
|
|
|
pBssDescription, pIes, &OpRateSet,
|
|
|
&ExRateSet);
|
|
|
- ps_param->uapsd_per_ac_bit_mask =
|
|
|
- pProfile->uapsd_mask;
|
|
|
+ if (!csr_enable_twt(mac, pIes))
|
|
|
+ ps_param->uapsd_per_ac_bit_mask = pProfile->uapsd_mask;
|
|
|
if (QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
/* OperationalRateSet */
|
|
|
if (OpRateSet.numRates) {
|
|
@@ -15148,8 +15123,8 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|
|
csr_join_req->supportedChannels.channelList,
|
|
|
&csr_join_req->supportedChannels.numChnl,
|
|
|
false);
|
|
|
-
|
|
|
- if (csr_enable_uapsd(mac, pIes))
|
|
|
+ /* Enable UAPSD only if TWT is not supported */
|
|
|
+ if (!csr_enable_twt(mac, pIes))
|
|
|
csr_join_req->uapsdPerAcBitmask = pProfile->uapsd_mask;
|
|
|
/* Move the entire BssDescription into the join request. */
|
|
|
qdf_mem_copy(&csr_join_req->bssDescription, pBssDescription,
|
|
@@ -15204,7 +15179,8 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|
|
csr_join_req->enable_bcast_probe_rsp =
|
|
|
mac->mlme_cfg->oce.enable_bcast_probe_rsp;
|
|
|
|
|
|
- csr_join_req->enable_session_twt_support = csr_enable_twt(pIes);
|
|
|
+ csr_join_req->enable_session_twt_support = csr_enable_twt(mac,
|
|
|
+ pIes);
|
|
|
status = umac_send_mb_message_to_mac(csr_join_req);
|
|
|
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
/*
|