qcacld-3.0: Move get qos related API to LIM from CSR
Move get qos related API to LIM from CSR. Change-Id: I44f32ea6588bebd2205bccf62d2267958884f260 CRs-Fixed: 3017623
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e39f095832
commit
d790174870
@@ -79,6 +79,13 @@ enum medium_access_type {
|
|||||||
MEDIUM_ACCESS_WMM_EDCF_DSCP,
|
MEDIUM_ACCESS_WMM_EDCF_DSCP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum wmm_user_mode {
|
||||||
|
WMM_USER_MODE_AUTO = 0,
|
||||||
|
WMM_USER_MODE_QBSS_ONLY = 1,
|
||||||
|
WMM_USER_MODE_NO_QOS = 2,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
struct pwr_channel_info {
|
struct pwr_channel_info {
|
||||||
uint32_t first_freq;
|
uint32_t first_freq;
|
||||||
uint8_t num_chan;
|
uint8_t num_chan;
|
||||||
@@ -320,7 +327,6 @@ struct ft_context {
|
|||||||
* derived from JOIN_REQ and REASSOC_REQ. If a particular AC bit is set, it
|
* derived from JOIN_REQ and REASSOC_REQ. If a particular AC bit is set, it
|
||||||
* means the AC is both trigger enabled and delivery enabled.
|
* means the AC is both trigger enabled and delivery enabled.
|
||||||
* @qos_enabled: is qos enabled
|
* @qos_enabled: is qos enabled
|
||||||
* @qos_type: qos type calculated from bss
|
|
||||||
* @ft_info: ft related info
|
* @ft_info: ft related info
|
||||||
* @hlp_ie: hldp ie
|
* @hlp_ie: hldp ie
|
||||||
* @hlp_ie_len: hlp ie length
|
* @hlp_ie_len: hlp ie length
|
||||||
@@ -338,7 +344,6 @@ struct mlme_connect_info {
|
|||||||
#endif
|
#endif
|
||||||
uint8_t uapsd_per_ac_bitmask;
|
uint8_t uapsd_per_ac_bitmask;
|
||||||
bool qos_enabled;
|
bool qos_enabled;
|
||||||
enum medium_access_type qos_type;
|
|
||||||
struct ft_context ft_info;
|
struct ft_context ft_info;
|
||||||
#ifdef WLAN_FEATURE_FILS_SK
|
#ifdef WLAN_FEATURE_FILS_SK
|
||||||
uint8_t *hlp_ie;
|
uint8_t *hlp_ie;
|
||||||
|
@@ -276,7 +276,7 @@ struct hdd_config {
|
|||||||
*
|
*
|
||||||
* Return: CSR WMM mode
|
* Return: CSR WMM mode
|
||||||
*/
|
*/
|
||||||
eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(uint8_t mode);
|
enum wmm_user_mode hdd_to_csr_wmm_mode(uint8_t mode);
|
||||||
|
|
||||||
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx);
|
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx);
|
||||||
QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx);
|
QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx);
|
||||||
|
@@ -752,16 +752,16 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(uint8_t mode)
|
enum wmm_user_mode hdd_to_csr_wmm_mode(uint8_t mode)
|
||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case HDD_WMM_USER_MODE_QBSS_ONLY:
|
case HDD_WMM_USER_MODE_QBSS_ONLY:
|
||||||
return eCsrRoamWmmQbssOnly;
|
return WMM_USER_MODE_QBSS_ONLY;
|
||||||
case HDD_WMM_USER_MODE_NO_QOS:
|
case HDD_WMM_USER_MODE_NO_QOS:
|
||||||
return eCsrRoamWmmNoQos;
|
return WMM_USER_MODE_NO_QOS;
|
||||||
case HDD_WMM_USER_MODE_AUTO:
|
case HDD_WMM_USER_MODE_AUTO:
|
||||||
default:
|
default:
|
||||||
return eCsrRoamWmmAuto;
|
return WMM_USER_MODE_AUTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5791,13 +5791,13 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
|||||||
* may not be good with non QOS 11N AP
|
* may not be good with non QOS 11N AP
|
||||||
* Default: enable QOS for SAP unless WMM IE not present for 11bga
|
* Default: enable QOS for SAP unless WMM IE not present for 11bga
|
||||||
*/
|
*/
|
||||||
sme_config->csr_config.WMMSupportMode = eCsrRoamWmmAuto;
|
sme_config->csr_config.WMMSupportMode = WMM_USER_MODE_AUTO;
|
||||||
ie = wlan_get_vendor_ie_ptr_from_oui(WMM_OUI_TYPE, WMM_OUI_TYPE_SIZE,
|
ie = wlan_get_vendor_ie_ptr_from_oui(WMM_OUI_TYPE, WMM_OUI_TYPE_SIZE,
|
||||||
beacon->tail, beacon->tail_len);
|
beacon->tail, beacon->tail_len);
|
||||||
if (!ie && (config->SapHw_mode == eCSR_DOT11_MODE_11a ||
|
if (!ie && (config->SapHw_mode == eCSR_DOT11_MODE_11a ||
|
||||||
config->SapHw_mode == eCSR_DOT11_MODE_11g ||
|
config->SapHw_mode == eCSR_DOT11_MODE_11g ||
|
||||||
config->SapHw_mode == eCSR_DOT11_MODE_11b))
|
config->SapHw_mode == eCSR_DOT11_MODE_11b))
|
||||||
sme_config->csr_config.WMMSupportMode = eCsrRoamWmmNoQos;
|
sme_config->csr_config.WMMSupportMode = WMM_USER_MODE_NO_QOS;
|
||||||
sme_update_config(mac_handle, sme_config);
|
sme_update_config(mac_handle, sme_config);
|
||||||
|
|
||||||
if (!((adapter->device_mode == QDF_SAP_MODE) &&
|
if (!((adapter->device_mode == QDF_SAP_MODE) &&
|
||||||
|
@@ -2680,6 +2680,46 @@ static QDF_STATUS lim_iterate_triplets(tDot11fIECountry country_ie)
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool lim_is_bss_description_wme(struct mac_context *mac,
|
||||||
|
tDot11fBeaconIEs *ie_struct)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!(ie_struct->WMMParams.present || ie_struct->WMMInfoAp.present))
|
||||||
|
return false;
|
||||||
|
if (mac->roam.configParam.WMMSupportMode == WMM_USER_MODE_NO_QOS &&
|
||||||
|
!ie_struct->HTCaps.present)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static enum medium_access_type
|
||||||
|
lim_get_qos_from_bss_desc(struct mac_context *mac_ctx,
|
||||||
|
struct bss_description *bss_desc,
|
||||||
|
tDot11fBeaconIEs *ie_struct)
|
||||||
|
{
|
||||||
|
enum medium_access_type qos_type = MEDIUM_ACCESS_DCF;
|
||||||
|
tSirMacCapabilityInfo *ap_cap_info;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we find WMM in the Bss Description, then we let this
|
||||||
|
* override and use WMM.
|
||||||
|
*/
|
||||||
|
if (lim_is_bss_description_wme(mac_ctx, ie_struct))
|
||||||
|
return MEDIUM_ACCESS_WMM_EDCF_DSCP;
|
||||||
|
|
||||||
|
ap_cap_info = (tSirMacCapabilityInfo *)&bss_desc->capabilityInfo;
|
||||||
|
/* If the QoS bit is on, then the AP is advertising 11E QoS. */
|
||||||
|
if (ap_cap_info->qos)
|
||||||
|
qos_type = MEDIUM_ACCESS_11E_EDCF;
|
||||||
|
|
||||||
|
if (qos_type == MEDIUM_ACCESS_11E_EDCF &&
|
||||||
|
!mac_ctx->roam.configParam.Is11eSupportEnabled)
|
||||||
|
qos_type = MEDIUM_ACCESS_DCF;
|
||||||
|
|
||||||
|
return qos_type;
|
||||||
|
}
|
||||||
|
|
||||||
static void lim_set_qos_to_cfg(struct pe_session *session,
|
static void lim_set_qos_to_cfg(struct pe_session *session,
|
||||||
enum medium_access_type qos_type)
|
enum medium_access_type qos_type)
|
||||||
{
|
{
|
||||||
@@ -2707,40 +2747,44 @@ static void lim_set_qos_to_cfg(struct pe_session *session,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void lim_update_qos(struct mac_context *mac_ctx,
|
static void lim_update_qos(struct mac_context *mac_ctx,
|
||||||
struct pe_session *session)
|
struct pe_session *session,
|
||||||
|
struct bss_description *bss_desc,
|
||||||
|
tDot11fBeaconIEs *ie_struct)
|
||||||
{
|
{
|
||||||
struct mlme_legacy_priv *mlme_priv;
|
struct mlme_legacy_priv *mlme_priv;
|
||||||
|
enum medium_access_type qos_type;
|
||||||
|
|
||||||
mlme_priv = wlan_vdev_mlme_get_ext_hdl(session->vdev);
|
mlme_priv = wlan_vdev_mlme_get_ext_hdl(session->vdev);
|
||||||
if (!mlme_priv)
|
if (!mlme_priv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
qos_type = lim_get_qos_from_bss_desc(mac_ctx, bss_desc, ie_struct);
|
||||||
|
|
||||||
if ((session->dot11mode != MLME_DOT11_MODE_11N) &&
|
if ((session->dot11mode != MLME_DOT11_MODE_11N) &&
|
||||||
(mac_ctx->roam.configParam.WMMSupportMode == eCsrRoamWmmNoQos)) {
|
(mac_ctx->roam.configParam.WMMSupportMode ==
|
||||||
|
WMM_USER_MODE_NO_QOS)) {
|
||||||
/*
|
/*
|
||||||
* Joining BSS is not 11n capable and WMM is disabled on client.
|
* Joining BSS is not 11n capable and WMM is disabled on client.
|
||||||
* Disable QoS and WMM
|
* Disable QoS and WMM
|
||||||
*/
|
*/
|
||||||
mlme_priv->connect_info.qos_type = MEDIUM_ACCESS_DCF;
|
qos_type = MEDIUM_ACCESS_DCF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((session->dot11mode == MLME_DOT11_MODE_11N ||
|
if ((session->dot11mode == MLME_DOT11_MODE_11N ||
|
||||||
session->dot11mode == MLME_DOT11_MODE_11AC) &&
|
session->dot11mode == MLME_DOT11_MODE_11AC) &&
|
||||||
(mlme_priv->connect_info.qos_type !=
|
(qos_type != MEDIUM_ACCESS_WMM_EDCF_DSCP &&
|
||||||
MEDIUM_ACCESS_WMM_EDCF_DSCP &&
|
qos_type != MEDIUM_ACCESS_11E_EDCF)) {
|
||||||
mlme_priv->connect_info.qos_type !=
|
|
||||||
MEDIUM_ACCESS_11E_EDCF)) {
|
|
||||||
/*
|
/*
|
||||||
* Joining BSS is 11n capable and WMM is disabled on AP.
|
* Joining BSS is 11n capable and WMM is disabled on AP.
|
||||||
* Assume all HT AP's are QOS AP's and enable WMM
|
* Assume all HT AP's are QOS AP's and enable WMM
|
||||||
*/
|
*/
|
||||||
mlme_priv->connect_info.qos_type =
|
qos_type = MEDIUM_ACCESS_WMM_EDCF_DSCP;
|
||||||
MEDIUM_ACCESS_WMM_EDCF_DSCP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lim_set_qos_to_cfg(session, mlme_priv->connect_info.qos_type);
|
lim_set_qos_to_cfg(session, qos_type);
|
||||||
mlme_priv->connect_info.qos_enabled = session->limWmeEnabled;
|
mlme_priv->connect_info.qos_enabled = session->limWmeEnabled;
|
||||||
pe_debug("QOS %d WMM %d", session->limQosEnabled,
|
pe_debug("qos_type %d QOS %d WMM %d", qos_type,
|
||||||
|
session->limQosEnabled,
|
||||||
session->limWmeEnabled);
|
session->limWmeEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2883,15 +2927,15 @@ lim_fill_pe_session(struct mac_context *mac_ctx, struct pe_session *session,
|
|||||||
lim_check_oui_and_update_session(mac_ctx, session, ie_struct);
|
lim_check_oui_and_update_session(mac_ctx, session, ie_struct);
|
||||||
ese_ver_present = ie_struct->ESEVersion.present;
|
ese_ver_present = ie_struct->ESEVersion.present;
|
||||||
|
|
||||||
qdf_mem_free(ie_struct);
|
|
||||||
|
|
||||||
/* Copying of bssId is already done, while creating session */
|
/* Copying of bssId is already done, while creating session */
|
||||||
sir_copy_mac_addr(session->self_mac_addr,
|
sir_copy_mac_addr(session->self_mac_addr,
|
||||||
wlan_vdev_mlme_get_macaddr(session->vdev));
|
wlan_vdev_mlme_get_macaddr(session->vdev));
|
||||||
|
|
||||||
session->statypeForBss = STA_ENTRY_PEER;
|
session->statypeForBss = STA_ENTRY_PEER;
|
||||||
|
|
||||||
lim_update_qos(mac_ctx, session);
|
lim_update_qos(mac_ctx, session, bss_desc, ie_struct);
|
||||||
|
qdf_mem_free(ie_struct);
|
||||||
|
ie_struct = NULL;
|
||||||
|
|
||||||
if (session->lim_join_req->bssDescription.adaptive_11r_ap)
|
if (session->lim_join_req->bssDescription.adaptive_11r_ap)
|
||||||
session->is_adaptive_11r_connection =
|
session->is_adaptive_11r_connection =
|
||||||
@@ -3000,10 +3044,8 @@ lim_fill_pe_session(struct mac_context *mac_ctx, struct pe_session *session,
|
|||||||
session->limCurrentBssCaps = bss_desc->capabilityInfo;
|
session->limCurrentBssCaps = bss_desc->capabilityInfo;
|
||||||
|
|
||||||
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(session->vdev);
|
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(session->vdev);
|
||||||
if (!mlme_obj) {
|
if (!mlme_obj)
|
||||||
qdf_mem_free(ie_struct);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
|
||||||
|
|
||||||
lim_extract_ap_capability(mac_ctx,
|
lim_extract_ap_capability(mac_ctx,
|
||||||
(uint8_t *)bss_desc->ieFields,
|
(uint8_t *)bss_desc->ieFields,
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "csr_link_list.h"
|
#include "csr_link_list.h"
|
||||||
#include "wlan_scan_public_structs.h"
|
#include "wlan_scan_public_structs.h"
|
||||||
#include "wlan_mlme_public_struct.h"
|
#include "wlan_mlme_public_struct.h"
|
||||||
|
#include "wlan_mlme_main.h"
|
||||||
|
|
||||||
#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
|
#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
|
||||||
|
|
||||||
@@ -408,13 +409,6 @@ typedef enum {
|
|||||||
|
|
||||||
} eCsrRoamReasonCodes;
|
} eCsrRoamReasonCodes;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
eCsrRoamWmmAuto = 0,
|
|
||||||
eCsrRoamWmmQbssOnly = 1,
|
|
||||||
eCsrRoamWmmNoQos = 2,
|
|
||||||
|
|
||||||
} eCsrRoamWmmUserModeType;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Following fields might need modification dynamically once STA is up
|
* Following fields might need modification dynamically once STA is up
|
||||||
* & running & this'd trigger reassoc.
|
* & running & this'd trigger reassoc.
|
||||||
@@ -475,7 +469,7 @@ struct csr_config_params {
|
|||||||
uint32_t channelBondingMode5GHz;
|
uint32_t channelBondingMode5GHz;
|
||||||
eCsrPhyMode phyMode;
|
eCsrPhyMode phyMode;
|
||||||
uint32_t HeartbeatThresh50;
|
uint32_t HeartbeatThresh50;
|
||||||
eCsrRoamWmmUserModeType WMMSupportMode;
|
enum wmm_user_mode WMMSupportMode;
|
||||||
bool Is11eSupportEnabled;
|
bool Is11eSupportEnabled;
|
||||||
bool ProprietaryRatesEnabled;
|
bool ProprietaryRatesEnabled;
|
||||||
/* to set MCC Enable/Disable mode */
|
/* to set MCC Enable/Disable mode */
|
||||||
|
@@ -190,7 +190,7 @@ struct csr_config {
|
|||||||
eCsrPhyMode phyMode;
|
eCsrPhyMode phyMode;
|
||||||
enum csr_cfgdot11mode uCfgDot11Mode;
|
enum csr_cfgdot11mode uCfgDot11Mode;
|
||||||
uint32_t HeartbeatThresh50;
|
uint32_t HeartbeatThresh50;
|
||||||
eCsrRoamWmmUserModeType WMMSupportMode;
|
enum wmm_user_mode WMMSupportMode;
|
||||||
bool Is11eSupportEnabled;
|
bool Is11eSupportEnabled;
|
||||||
bool ProprietaryRatesEnabled;
|
bool ProprietaryRatesEnabled;
|
||||||
bool fenableMCCMode;
|
bool fenableMCCMode;
|
||||||
|
@@ -53,11 +53,6 @@ struct csr_timer_info {
|
|||||||
#define CSR_IS_QOS_BSS(pIes) \
|
#define CSR_IS_QOS_BSS(pIes) \
|
||||||
((pIes)->WMMParams.present || (pIes)->WMMInfoAp.present)
|
((pIes)->WMMParams.present || (pIes)->WMMInfoAp.present)
|
||||||
|
|
||||||
enum medium_access_type
|
|
||||||
csr_get_qos_from_bss_desc(struct mac_context *mac_ctx,
|
|
||||||
struct bss_description *pSirBssDesc,
|
|
||||||
tDot11fBeaconIEs *pIes);
|
|
||||||
|
|
||||||
uint32_t csr_get_frag_thresh(struct mac_context *mac_ctx);
|
uint32_t csr_get_frag_thresh(struct mac_context *mac_ctx);
|
||||||
uint32_t csr_get_rts_thresh(struct mac_context *mac_ctx);
|
uint32_t csr_get_rts_thresh(struct mac_context *mac_ctx);
|
||||||
|
|
||||||
|
@@ -1242,7 +1242,7 @@ static void init_config_param(struct mac_context *mac)
|
|||||||
mac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO;
|
mac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO;
|
||||||
mac->roam.configParam.HeartbeatThresh50 = 40;
|
mac->roam.configParam.HeartbeatThresh50 = 40;
|
||||||
mac->roam.configParam.Is11eSupportEnabled = true;
|
mac->roam.configParam.Is11eSupportEnabled = true;
|
||||||
mac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto;
|
mac->roam.configParam.WMMSupportMode = WMM_USER_MODE_AUTO;
|
||||||
mac->roam.configParam.ProprietaryRatesEnabled = true;
|
mac->roam.configParam.ProprietaryRatesEnabled = true;
|
||||||
|
|
||||||
mac->roam.configParam.nVhtChannelWidth =
|
mac->roam.configParam.nVhtChannelWidth =
|
||||||
@@ -1644,7 +1644,7 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
|
|||||||
pParam->is_force_1x1;
|
pParam->is_force_1x1;
|
||||||
mac->roam.configParam.WMMSupportMode = pParam->WMMSupportMode;
|
mac->roam.configParam.WMMSupportMode = pParam->WMMSupportMode;
|
||||||
mac->mlme_cfg->wmm_params.wme_enabled =
|
mac->mlme_cfg->wmm_params.wme_enabled =
|
||||||
(pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1;
|
(pParam->WMMSupportMode == WMM_USER_MODE_NO_QOS) ? 0 : 1;
|
||||||
mac->roam.configParam.Is11eSupportEnabled =
|
mac->roam.configParam.Is11eSupportEnabled =
|
||||||
pParam->Is11eSupportEnabled;
|
pParam->Is11eSupportEnabled;
|
||||||
|
|
||||||
@@ -5904,7 +5904,6 @@ QDF_STATUS cm_csr_handle_join_req(struct wlan_objmgr_vdev *vdev,
|
|||||||
tDot11fBeaconIEs *ie_struct;
|
tDot11fBeaconIEs *ie_struct;
|
||||||
struct bss_description *bss_desc;
|
struct bss_description *bss_desc;
|
||||||
uint32_t ie_len, bss_len;
|
uint32_t ie_len, bss_len;
|
||||||
struct mlme_legacy_priv *mlme_priv;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This API is to update legacy struct and should be removed once
|
* This API is to update legacy struct and should be removed once
|
||||||
@@ -5953,11 +5952,6 @@ QDF_STATUS cm_csr_handle_join_req(struct wlan_objmgr_vdev *vdev,
|
|||||||
SME_QOS_CSR_JOIN_REQ, NULL);
|
SME_QOS_CSR_JOIN_REQ, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
|
|
||||||
if (mlme_priv)
|
|
||||||
mlme_priv->connect_info.qos_type =
|
|
||||||
csr_get_qos_from_bss_desc(mac_ctx, bss_desc, ie_struct);
|
|
||||||
|
|
||||||
if ((wlan_reg_11d_enabled_on_host(mac_ctx->psoc)) &&
|
if ((wlan_reg_11d_enabled_on_host(mac_ctx->psoc)) &&
|
||||||
!ie_struct->Country.present)
|
!ie_struct->Country.present)
|
||||||
csr_apply_channel_power_info_wrapper(mac_ctx);
|
csr_apply_channel_power_info_wrapper(mac_ctx);
|
||||||
|
@@ -266,7 +266,6 @@ tCsrScanResultInfo *csr_scan_result_get_next(struct mac_context *mac,
|
|||||||
|
|
||||||
/* some support functions */
|
/* some support functions */
|
||||||
bool csr_is11h_supported(struct mac_context *mac);
|
bool csr_is11h_supported(struct mac_context *mac);
|
||||||
bool csr_is11e_supported(struct mac_context *mac);
|
|
||||||
bool csr_is_wmm_supported(struct mac_context *mac);
|
bool csr_is_wmm_supported(struct mac_context *mac);
|
||||||
|
|
||||||
/* Return SUCCESS is the command is queued, failed */
|
/* Return SUCCESS is the command is queued, failed */
|
||||||
|
@@ -270,18 +270,6 @@ bool csr_is_conn_state_connected(struct mac_context *mac, uint32_t sessionId)
|
|||||||
csr_is_conn_state_connected_wds(mac, sessionId);
|
csr_is_conn_state_connected_wds(mac, sessionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static tSirMacCapabilityInfo csr_get_bss_capabilities(struct bss_description *
|
|
||||||
pSirBssDesc)
|
|
||||||
{
|
|
||||||
tSirMacCapabilityInfo dot11Caps;
|
|
||||||
|
|
||||||
/* tSirMacCapabilityInfo is 16-bit */
|
|
||||||
qdf_get_u16((uint8_t *) &pSirBssDesc->capabilityInfo,
|
|
||||||
(uint16_t *) &dot11Caps);
|
|
||||||
|
|
||||||
return dot11Caps;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool csr_is_conn_state_connected_wds(struct mac_context *mac_ctx,
|
bool csr_is_conn_state_connected_wds(struct mac_context *mac_ctx,
|
||||||
uint32_t session_id)
|
uint32_t session_id)
|
||||||
{
|
{
|
||||||
@@ -809,106 +797,19 @@ bool csr_is_conn_state_disconnected(struct mac_context *mac, uint8_t vdev_id)
|
|||||||
mac->roam.roamSession[vdev_id].connectState;
|
mac->roam.roamSession[vdev_id].connectState;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool csr_is_qos_bss_desc(struct bss_description *pSirBssDesc)
|
|
||||||
{
|
|
||||||
tSirMacCapabilityInfo dot11Caps = csr_get_bss_capabilities(pSirBssDesc);
|
|
||||||
|
|
||||||
return (bool) dot11Caps.qos;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool csr_is11h_supported(struct mac_context *mac)
|
bool csr_is11h_supported(struct mac_context *mac)
|
||||||
{
|
{
|
||||||
return mac->mlme_cfg->gen.enabled_11h;
|
return mac->mlme_cfg->gen.enabled_11h;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool csr_is11e_supported(struct mac_context *mac)
|
|
||||||
{
|
|
||||||
return mac->roam.configParam.Is11eSupportEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool csr_is_wmm_supported(struct mac_context *mac)
|
bool csr_is_wmm_supported(struct mac_context *mac)
|
||||||
{
|
{
|
||||||
if (eCsrRoamWmmNoQos == mac->roam.configParam.WMMSupportMode)
|
if (WMM_USER_MODE_NO_QOS == mac->roam.configParam.WMMSupportMode)
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pIes can be passed in as NULL if the caller doesn't have one prepared */
|
|
||||||
static bool csr_is_bss_description_wme(struct mac_context *mac,
|
|
||||||
struct bss_description *pSirBssDesc,
|
|
||||||
tDot11fBeaconIEs *pIes)
|
|
||||||
{
|
|
||||||
/* Assume that WME is found... */
|
|
||||||
bool fWme = true;
|
|
||||||
tDot11fBeaconIEs *pIesTemp = pIes;
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (!pIesTemp) {
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS
|
|
||||||
(csr_get_parsed_bss_description_ies
|
|
||||||
(mac, pSirBssDesc, &pIesTemp))) {
|
|
||||||
fWme = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* if the Wme Info IE is found, then WME is supported... */
|
|
||||||
if (CSR_IS_QOS_BSS(pIesTemp))
|
|
||||||
break;
|
|
||||||
/* if none of these are found, then WME is NOT supported... */
|
|
||||||
fWme = false;
|
|
||||||
} while (0);
|
|
||||||
if (!csr_is_wmm_supported(mac) && fWme)
|
|
||||||
if (!pIesTemp->HTCaps.present)
|
|
||||||
fWme = false;
|
|
||||||
|
|
||||||
if ((!pIes) && (pIesTemp))
|
|
||||||
/* we allocate memory here so free it before returning */
|
|
||||||
qdf_mem_free(pIesTemp);
|
|
||||||
|
|
||||||
return fWme;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum medium_access_type
|
|
||||||
csr_get_qos_from_bss_desc(struct mac_context *mac_ctx,
|
|
||||||
struct bss_description *pSirBssDesc,
|
|
||||||
tDot11fBeaconIEs *pIes)
|
|
||||||
{
|
|
||||||
enum medium_access_type qosType = MEDIUM_ACCESS_DCF;
|
|
||||||
|
|
||||||
if (!pIes) {
|
|
||||||
QDF_ASSERT(pIes);
|
|
||||||
return qosType;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
/* If we find WMM in the Bss Description, then we let this
|
|
||||||
* override and use WMM.
|
|
||||||
*/
|
|
||||||
if (csr_is_bss_description_wme(mac_ctx, pSirBssDesc, pIes))
|
|
||||||
qosType = MEDIUM_ACCESS_WMM_EDCF_DSCP;
|
|
||||||
else {
|
|
||||||
/* If the QoS bit is on, then the AP is
|
|
||||||
* advertising 11E QoS.
|
|
||||||
*/
|
|
||||||
if (csr_is_qos_bss_desc(pSirBssDesc))
|
|
||||||
qosType = MEDIUM_ACCESS_11E_EDCF;
|
|
||||||
else
|
|
||||||
qosType = MEDIUM_ACCESS_DCF;
|
|
||||||
|
|
||||||
/* Scale back based on the types turned on
|
|
||||||
* for the adapter.
|
|
||||||
*/
|
|
||||||
if (qosType == MEDIUM_ACCESS_11E_EDCF
|
|
||||||
&& !csr_is11e_supported(mac_ctx))
|
|
||||||
qosType = MEDIUM_ACCESS_DCF;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
return qosType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This function will allocate memory for the parsed IEs to the caller.
|
/* This function will allocate memory for the parsed IEs to the caller.
|
||||||
* Caller must free the memory after it is done with the data only if
|
* Caller must free the memory after it is done with the data only if
|
||||||
* this function succeeds
|
* this function succeeds
|
||||||
|
@@ -40,8 +40,9 @@ QDF_STATUS csr_roam_start_ndi(struct mac_context *mac_ctx, uint32_t session,
|
|||||||
struct csr_roam_profile *profile)
|
struct csr_roam_profile *profile)
|
||||||
{
|
{
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
struct bss_config_param bss_cfg = {0};
|
struct bss_config_param bss_cfg;
|
||||||
|
|
||||||
|
qdf_mem_zero(&bss_cfg, sizeof(struct bss_config_param));
|
||||||
/* Build BSS configuration from profile */
|
/* Build BSS configuration from profile */
|
||||||
status = csr_roam_prepare_bss_config_from_profile(mac_ctx, profile,
|
status = csr_roam_prepare_bss_config_from_profile(mac_ctx, profile,
|
||||||
session,
|
session,
|
||||||
|
Reference in New Issue
Block a user