qcacld-3.0: Replace CSR API with connection mgr API part 2
Replace the CSR API to get connect info with cnx mgr API. Change-Id: Id0ffae005fde5bff69fc486c94c3332872bab786 CRs-Fixed: 2848570
このコミットが含まれているのは:
@@ -592,6 +592,35 @@ void mlme_get_discon_reason_n_from_ap(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id, bool *from_ap,
|
||||
uint32_t *reason_code);
|
||||
|
||||
/**
|
||||
* wlan_get_opmode_from_vdev_id() - Get opmode from vdevid
|
||||
* @psoc: PSOC pointer
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: opmode
|
||||
*/
|
||||
enum QDF_OPMODE wlan_get_opmode_from_vdev_id(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* csr_get_operation_chan_freq() - get operating chan freq of
|
||||
* given vdev
|
||||
* @vdev: vdev
|
||||
*
|
||||
* Return: chan freq of given vdev id
|
||||
*/
|
||||
qdf_freq_t wlan_get_operation_chan_freq(struct wlan_objmgr_vdev *vdev);
|
||||
/**
|
||||
* wlan_get_operation_chan_freq_vdev_id() - get operating chan freq of
|
||||
* given vdev id
|
||||
* @pdev: Pointer to pdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: chan freq of given vdev id
|
||||
*/
|
||||
qdf_freq_t wlan_get_operation_chan_freq_vdev_id(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
/**
|
||||
* mlme_get_supplicant_disabled_roaming() - Get supplicant disabled roaming
|
||||
|
@@ -2678,6 +2678,63 @@ void mlme_get_discon_reason_n_from_ap(struct wlan_objmgr_psoc *psoc,
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
}
|
||||
|
||||
enum QDF_OPMODE wlan_get_opmode_from_vdev_id(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
enum QDF_OPMODE opmode = QDF_MAX_NO_OF_MODE;
|
||||
|
||||
if (!pdev)
|
||||
return opmode;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (!vdev)
|
||||
return opmode;
|
||||
|
||||
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
|
||||
return opmode;
|
||||
}
|
||||
|
||||
qdf_freq_t wlan_get_operation_chan_freq(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
qdf_freq_t chan_freq = 0;
|
||||
struct wlan_channel *chan;
|
||||
|
||||
if (!vdev)
|
||||
return chan_freq;
|
||||
|
||||
if (wlan_vdev_mlme_is_active(vdev) != QDF_STATUS_SUCCESS)
|
||||
return chan_freq;
|
||||
|
||||
chan = wlan_vdev_get_active_channel(vdev);
|
||||
if (chan)
|
||||
chan_freq = chan->ch_freq;
|
||||
|
||||
return chan_freq;
|
||||
}
|
||||
|
||||
qdf_freq_t wlan_get_operation_chan_freq_vdev_id(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
qdf_freq_t chan_freq = 0;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
if (!pdev)
|
||||
return chan_freq;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (!vdev)
|
||||
return chan_freq;
|
||||
chan_freq = wlan_get_operation_chan_freq(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
|
||||
return chan_freq;
|
||||
}
|
||||
|
||||
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
static
|
||||
const char *mlme_roam_state_to_string(enum roam_offload_state state)
|
||||
|
@@ -291,6 +291,7 @@ bool cm_is_vdevid_connected(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
{
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
bool connected;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
|
||||
WLAN_MLME_CM_ID);
|
||||
@@ -298,7 +299,11 @@ bool cm_is_vdevid_connected(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
|
||||
mlme_err("vdev_id: %d: vdev not found", vdev_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
if (opmode != QDF_STA_MODE && opmode != QDF_P2P_CLIENT_MODE) {
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
||||
return false;
|
||||
}
|
||||
connected = cm_is_vdev_connected(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
|
||||
|
||||
|
@@ -190,7 +190,7 @@ QDF_STATUS cm_handle_disconnect_resp(struct scheduler_msg *msg)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct cm_vdev_disconnect_rsp *ind;
|
||||
struct wlan_cm_discon_rsp resp = {0};
|
||||
struct wlan_cm_discon_rsp resp;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
if (!msg || !msg->bodyptr)
|
||||
@@ -205,6 +205,7 @@ QDF_STATUS cm_handle_disconnect_resp(struct scheduler_msg *msg)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
qdf_mem_zero(&resp, sizeof(resp));
|
||||
if (!cm_get_active_disconnect_req(vdev, &resp.req)) {
|
||||
qdf_mem_free(ind);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. 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
|
||||
@@ -83,7 +83,6 @@ typedef enum {
|
||||
* MCC - indicate MCC
|
||||
* P2P - indicate P2P
|
||||
* DOT11AC - indicate 11AC
|
||||
* SLM_SESSIONIZATION - indicate SLM_SESSIONIZATION
|
||||
* DOT11AC_OPMODE - indicate 11ac opmode
|
||||
* SAP32STA - indicate SAP32STA
|
||||
* TDLS - indicate TDLS
|
||||
@@ -108,7 +107,6 @@ enum cap_bitmap {
|
||||
MCC = 0,
|
||||
P2P = 1,
|
||||
DOT11AC = 2,
|
||||
SLM_SESSIONIZATION = 3,
|
||||
DOT11AC_OPMODE = 4,
|
||||
SAP32STA = 5,
|
||||
TDLS = 6,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. 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
|
||||
@@ -1489,9 +1489,9 @@ lim_cm_handle_disconnect_req(struct wlan_cm_vdev_discon_req *req)
|
||||
pe_session = pe_find_session_by_bssid(mac_ctx, req->req.bssid.bytes,
|
||||
&req->req.vdev_id);
|
||||
if (!pe_session) {
|
||||
pe_err("Session not found for vdev_id %d, cm_id %d, bssid",
|
||||
pe_err("vdev_id %d cm_id 0x%x: Session not found for bssid"
|
||||
QDF_MAC_ADDR_FMT, req->cm_id, req->req.vdev_id,
|
||||
req->req.bssid.bytes);
|
||||
QDF_MAC_ADDR_REF(req->req.bssid.bytes));
|
||||
lim_cm_send_disconnect_rsp(mac_ctx, req->req.vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. 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
|
||||
@@ -1069,6 +1069,22 @@ void lim_cm_send_disconnect_rsp(struct mac_context *mac_ctx, uint8_t vdev_id)
|
||||
}
|
||||
}
|
||||
|
||||
static void lim_sap_send_sme_disassoc_deauth_ntf(struct mac_context *mac,
|
||||
QDF_STATUS status,
|
||||
uint32_t *pCtx)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
struct scheduler_msg *pMsg = (struct scheduler_msg *)pCtx;
|
||||
|
||||
mmhMsg.type = pMsg->type;
|
||||
mmhMsg.bodyptr = pMsg;
|
||||
mmhMsg.bodyval = 0;
|
||||
|
||||
MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
|
||||
|
||||
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
|
||||
}
|
||||
|
||||
void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac,
|
||||
QDF_STATUS status, uint32_t *pCtx)
|
||||
{
|
||||
@@ -1077,28 +1093,36 @@ void lim_send_sme_disassoc_deauth_ntf(struct mac_context *mac,
|
||||
struct deauth_rsp *deauth;
|
||||
struct sir_sme_discon_done_ind *discon;
|
||||
uint8_t vdev_id;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
switch (msg->type) {
|
||||
case eWNI_SME_DISASSOC_RSP:
|
||||
disassoc = (struct disassoc_rsp *)msg->bodyptr;
|
||||
disassoc = (struct disassoc_rsp *)pCtx;
|
||||
vdev_id = disassoc->sessionId;
|
||||
break;
|
||||
case eWNI_SME_DEAUTH_RSP:
|
||||
deauth = (struct deauth_rsp *)msg->bodyptr;
|
||||
deauth = (struct deauth_rsp *)pCtx;
|
||||
vdev_id = deauth->sessionId;
|
||||
break;
|
||||
case eWNI_SME_DISCONNECT_DONE_IND:
|
||||
discon = (struct sir_sme_discon_done_ind *)msg->bodyptr;
|
||||
discon = (struct sir_sme_discon_done_ind *)pCtx;
|
||||
vdev_id = discon->session_id;
|
||||
break;
|
||||
default:
|
||||
pe_err("Received invalid disconnect rsp type %d", msg->type);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
qdf_mem_free(pCtx);
|
||||
return;
|
||||
}
|
||||
|
||||
lim_cm_send_disconnect_rsp(mac, vdev_id);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, vdev_id);
|
||||
/* Use connection manager for STA and CLI */
|
||||
if (opmode == QDF_STA_MODE || opmode == QDF_P2P_CLIENT_MODE) {
|
||||
qdf_mem_free(pCtx);
|
||||
lim_cm_send_disconnect_rsp(mac, vdev_id);
|
||||
return;
|
||||
}
|
||||
|
||||
lim_sap_send_sme_disassoc_deauth_ntf(mac, status, pCtx);
|
||||
}
|
||||
#else
|
||||
static void lim_send_sta_disconnect_ind(struct mac_context *mac,
|
||||
@@ -1139,8 +1163,7 @@ void lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
||||
uint16_t i, assoc_id;
|
||||
tpDphHashNode sta_ds = NULL;
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
enum QDF_OPMODE opmode = QDF_MAX_NO_OF_MODE;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
pe_debug("Disassoc Ntf with trigger : %d reasonCode: %d",
|
||||
disassocTrigger, reasonCode);
|
||||
@@ -1264,12 +1287,7 @@ error:
|
||||
if (failure)
|
||||
return;
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, smesessionId,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (vdev) {
|
||||
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
}
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, smesessionId);
|
||||
if ((opmode == QDF_STA_MODE || opmode == QDF_P2P_CLIENT_MODE) &&
|
||||
pSirSmeDisassocInd &&
|
||||
pSirSmeDisassocInd->messageType == eWNI_SME_DISASSOC_IND) {
|
||||
@@ -1560,8 +1578,7 @@ void lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
uint8_t sessionId;
|
||||
uint32_t *pMsg = NULL;
|
||||
QDF_STATUS status;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
enum QDF_OPMODE opmode = QDF_MAX_NO_OF_MODE;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
pe_session = pe_find_session_by_bssid(mac, peerMacAddr, &sessionId);
|
||||
switch (deauthTrigger) {
|
||||
@@ -1637,12 +1654,7 @@ void lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
if (pe_session && LIM_IS_STA_ROLE(pe_session))
|
||||
pe_delete_session(mac, pe_session);
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, smesessionId,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (vdev) {
|
||||
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
}
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, smesessionId);
|
||||
if ((opmode == QDF_STA_MODE || opmode == QDF_P2P_CLIENT_MODE) &&
|
||||
pSirSmeDeauthInd &&
|
||||
pSirSmeDeauthInd->messageType == eWNI_SME_DEAUTH_IND) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. 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
|
||||
@@ -884,12 +884,6 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
|
||||
eSAP_STA_SET_KEY_EVENT,
|
||||
(void *) eSAP_STATUS_FAILURE);
|
||||
break;
|
||||
case eCSR_ROAM_ASSOCIATION_COMPLETION:
|
||||
if (roam_result == eCSR_ROAM_RESULT_FAILURE)
|
||||
sap_signal_hdd_event(sap_ctx, csr_roam_info,
|
||||
eSAP_STA_REASSOC_EVENT,
|
||||
(void *) eSAP_STATUS_FAILURE);
|
||||
break;
|
||||
case eCSR_ROAM_DISASSOCIATED:
|
||||
if (roam_result == eCSR_ROAM_RESULT_MIC_FAILURE)
|
||||
sap_signal_hdd_event(sap_ctx, csr_roam_info,
|
||||
@@ -1092,12 +1086,6 @@ QDF_STATUS wlansap_roam_callback(void *ctx,
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
qdf_ret_status = QDF_STATUS_E_FAILURE;
|
||||
break;
|
||||
case eCSR_ROAM_RESULT_ASSOCIATED:
|
||||
/* Fill in the event structure */
|
||||
sap_signal_hdd_event(sap_ctx, csr_roam_info,
|
||||
eSAP_STA_REASSOC_EVENT,
|
||||
(void *) eSAP_STATUS_SUCCESS);
|
||||
break;
|
||||
case eCSR_ROAM_RESULT_INFRA_STARTED:
|
||||
if (!csr_roam_info) {
|
||||
sap_err("csr_roam_info is NULL");
|
||||
|
@@ -478,8 +478,10 @@ typedef enum {
|
||||
typedef enum {
|
||||
/* Not associated in Infra or participating in an Ad-hoc */
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/* Associated in an Infrastructure network. */
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
|
||||
#endif
|
||||
/* Participating in WDS network in AP/STA mode but not connected yet */
|
||||
eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
|
||||
/* Participating in a WDS network and connected peer to peer */
|
||||
@@ -488,8 +490,6 @@ typedef enum {
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
|
||||
/* Participating in a Infra network and connected to a peer */
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
|
||||
/* Disconnecting with AP or stop connecting process */
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING,
|
||||
/* NAN Data interface not started */
|
||||
eCSR_CONNECT_STATE_TYPE_NDI_NOT_STARTED,
|
||||
/* NAN Data interface started */
|
||||
|
@@ -350,12 +350,6 @@ struct csr_config {
|
||||
uint8_t fAllowMCCGODiffBI;
|
||||
uint8_t bCatRssiOffset; /* to set RSSI difference for each category */
|
||||
bool nRoamScanControl;
|
||||
|
||||
/*
|
||||
* Remove this code once SLM_Sessionization is supported
|
||||
* BMPS_WORKAROUND_NOT_NEEDED
|
||||
*/
|
||||
bool doBMPSWorkaround;
|
||||
uint32_t nVhtChannelWidth;
|
||||
bool send_smps_action;
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
@@ -426,7 +420,9 @@ struct csr_scanstruct {
|
||||
int8_t inScanResultBestAPRssi;
|
||||
bool fcc_constraint;
|
||||
bool pending_channel_list_req;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
wlan_scan_requester requester_id;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -597,8 +593,10 @@ struct csr_roam_session {
|
||||
struct pmkid_mode_bits pmkid_modes;
|
||||
#endif
|
||||
tftSMEContext ftSmeContext;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/* This count represents the number of bssid's we try to join. */
|
||||
uint8_t join_bssid_count;
|
||||
#endif
|
||||
struct csr_roam_stored_profile stored_roam_profile;
|
||||
bool ch_switch_in_progress;
|
||||
bool supported_nss_1x1;
|
||||
@@ -612,8 +610,10 @@ struct csr_roam_session {
|
||||
uint8_t uapsd_mask;
|
||||
struct scan_cmd_info scan_info;
|
||||
qdf_mc_timer_t roaming_offload_timer;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
bool is_fils_connection;
|
||||
uint16_t fils_seq_num;
|
||||
#endif
|
||||
bool discon_in_progress;
|
||||
bool is_adaptive_11r_connection;
|
||||
struct csr_disconnect_stats disconnect_stats;
|
||||
@@ -851,7 +851,7 @@ QDF_STATUS csr_get_modify_profile_fields(struct mac_context *mac,
|
||||
void csr_set_global_cfgs(struct mac_context *mac);
|
||||
void csr_set_default_dot11_mode(struct mac_context *mac);
|
||||
bool csr_is_conn_state_disconnected(struct mac_context *mac,
|
||||
uint32_t sessionId);
|
||||
uint8_t vdev_id);
|
||||
bool csr_is_conn_state_connected(struct mac_context *mac,
|
||||
uint32_t sessionId);
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
@@ -900,19 +900,6 @@ void csr_set_cfg_privacy(struct mac_context *mac,
|
||||
struct csr_roam_profile *pProfile,
|
||||
bool fPrivacy);
|
||||
|
||||
/**
|
||||
* csr_get_operation_chan_freq() - get operating chan freq of
|
||||
* given vdev id
|
||||
* @mac_ctx: Pointer to mac context
|
||||
* @vdev: vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: chan freq of given vdev id
|
||||
*/
|
||||
qdf_freq_t csr_get_operation_chan_freq(struct mac_context *mac,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* csr_get_concurrent_operation_freq() - To get concurrent operating freq
|
||||
* @mac_ctx: Pointer to mac context
|
||||
@@ -948,7 +935,6 @@ uint16_t csr_check_concurrent_channel_overlap(
|
||||
#endif
|
||||
QDF_STATUS csr_roam_copy_connect_profile(struct mac_context *mac,
|
||||
uint32_t sessionId, tCsrRoamConnectedProfile *pProfile);
|
||||
bool csr_is_set_key_allowed(struct mac_context *mac, uint32_t sessionId);
|
||||
|
||||
/* Returns whether the current association is a 11r assoc or not */
|
||||
bool csr_roam_is11r_assoc(struct mac_context *mac, uint8_t sessionId);
|
||||
@@ -964,8 +950,7 @@ QDF_STATUS csr_get_tsm_stats(struct mac_context *mac,
|
||||
#endif
|
||||
|
||||
/* Returns whether "Legacy Fast Roaming" is enabled...or not */
|
||||
bool csr_roam_is_fast_roam_enabled(struct mac_context *mac,
|
||||
uint32_t sessionId);
|
||||
bool csr_roam_is_fast_roam_enabled(struct mac_context *mac, uint8_t vdev_id);
|
||||
bool csr_roam_is_roam_offload_scan_enabled(
|
||||
struct mac_context *mac);
|
||||
bool csr_is_channel_present_in_list(uint32_t *pChannelList,
|
||||
@@ -986,7 +971,7 @@ static inline QDF_STATUS csr_roam_offload_scan_rsp_hdlr(
|
||||
QDF_STATUS csr_handoff_request(struct mac_context *mac, uint8_t sessionId,
|
||||
tCsrHandoffRequest
|
||||
*pHandoffInfo);
|
||||
bool csr_roam_is_sta_mode(struct mac_context *mac, uint32_t sessionId);
|
||||
bool csr_roam_is_sta_mode(struct mac_context *mac, uint8_t vdev_id);
|
||||
|
||||
/* Post Channel Change Indication */
|
||||
QDF_STATUS csr_roam_channel_change_req(struct mac_context *mac,
|
||||
@@ -1097,8 +1082,7 @@ void csr_purge_pdev_all_ser_cmd_list(struct mac_context *mac_ctx);
|
||||
|
||||
bool csr_wait_for_connection_update(struct mac_context *mac,
|
||||
bool do_release_reacquire_lock);
|
||||
enum QDF_OPMODE csr_get_session_persona(struct mac_context *pmac,
|
||||
uint32_t session_id);
|
||||
|
||||
void csr_roam_substate_change(
|
||||
struct mac_context *mac, enum csr_roam_substate
|
||||
NewSubstate, uint32_t sessionId);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021 The Linux Foundation. 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
|
||||
@@ -160,6 +160,16 @@ typedef struct sCsrNeighborRoamControlInfo {
|
||||
/* All the necessary Function declarations are here */
|
||||
QDF_STATUS csr_neighbor_roam_indicate_connect(struct mac_context *mac,
|
||||
uint8_t sessionId, QDF_STATUS status);
|
||||
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
void csr_roam_restore_default_config(struct mac_context *mac_ctx,
|
||||
uint8_t vdev_id);
|
||||
#else
|
||||
static inline void csr_roam_restore_default_config(struct mac_context *mac_ctx,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
|
||||
uint8_t sessionId);
|
||||
QDF_STATUS csr_neighbor_roam_init(struct mac_context *mac, uint8_t sessionId);
|
||||
|
@@ -1226,10 +1226,12 @@ QDF_STATUS sme_del_periodic_tx_ptrn(mac_handle_t mac_handle,
|
||||
tSirDelPeriodicTxPtrn *delPeriodicTxPtrnParams);
|
||||
QDF_STATUS sme_send_rate_update_ind(mac_handle_t mac_handle,
|
||||
tSirRateUpdateInd *rateUpdateParams);
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS sme_roam_del_pmkid_from_cache(mac_handle_t mac_handle,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_crypto_pmksa *pmksa,
|
||||
bool set_pmk);
|
||||
#endif
|
||||
|
||||
void sme_get_command_q_status(mac_handle_t mac_handle);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2019, 2021 The Linux Foundation. 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
|
||||
@@ -88,7 +88,6 @@ struct ps_params {
|
||||
*/
|
||||
struct ps_global_info {
|
||||
struct ps_params ps_params[WLAN_MAX_VDEVS];
|
||||
bool remain_in_power_active_till_dhcp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -157,7 +157,9 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
|
||||
policy_mgr_pdev_set_hw_mode_cback callback = NULL;
|
||||
struct sir_set_hw_mode_resp *param;
|
||||
enum policy_mgr_conn_update_reason reason;
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
struct csr_roam_session *session;
|
||||
#endif
|
||||
uint32_t session_id;
|
||||
uint32_t request_id;
|
||||
|
||||
@@ -223,6 +225,8 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
|
||||
sme_err("session %d is invalid", session_id);
|
||||
goto end;
|
||||
}
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
session = CSR_GET_SESSION(mac, session_id);
|
||||
if (reason == POLICY_MGR_UPDATE_REASON_HIDDEN_STA) {
|
||||
/* In the case of hidden SSID, connection update
|
||||
@@ -243,6 +247,7 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
|
||||
}
|
||||
csr_saved_scan_cmd_free_fields(mac, session);
|
||||
}
|
||||
#endif
|
||||
if (reason == POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_STA) {
|
||||
sme_debug("Continue channel switch for STA on vdev %d",
|
||||
session_id);
|
||||
@@ -672,12 +677,17 @@ static uint32_t sme_get_sessionid_from_activelist(struct mac_context *mac)
|
||||
*/
|
||||
static void sme_state_info_dump(char **buf_ptr, uint16_t *size)
|
||||
{
|
||||
uint32_t session_id, active_session_id;
|
||||
uint8_t vdev_id, active_session_id;
|
||||
mac_handle_t mac_handle;
|
||||
struct mac_context *mac;
|
||||
uint16_t len = 0;
|
||||
char *buf = *buf_ptr;
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
eCsrConnectState connect_state;
|
||||
#else
|
||||
enum QDF_OPMODE op_mode;
|
||||
#endif
|
||||
|
||||
mac_handle = cds_get_context(QDF_MODULE_ID_SME);
|
||||
if (!mac_handle) {
|
||||
@@ -693,28 +703,40 @@ static void sme_state_info_dump(char **buf_ptr, uint16_t *size)
|
||||
"\n active command sessionid %d", active_session_id);
|
||||
}
|
||||
|
||||
for (session_id = 0; session_id < WLAN_MAX_VDEVS; session_id++) {
|
||||
if (CSR_IS_SESSION_VALID(mac, session_id)) {
|
||||
for (vdev_id = 0; vdev_id < WLAN_MAX_VDEVS; vdev_id++) {
|
||||
if (CSR_IS_SESSION_VALID(mac, vdev_id)) {
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
op_mode = wlan_get_opmode_from_vdev_id(mac->pdev,
|
||||
vdev_id);
|
||||
if (op_mode != QDF_STA_MODE &&
|
||||
op_mode != QDF_P2P_CLIENT_MODE)
|
||||
continue;
|
||||
if (cm_is_vdevid_connected(mac->pdev, vdev_id)) {
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
"\n RoamState: %d", mac->roam.curState[vdev_id]);
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
"\n RoamSubState: %d", mac->roam.curSubState[vdev_id]);
|
||||
}
|
||||
#else
|
||||
connect_state =
|
||||
mac->roam.roamSession[session_id].connectState;
|
||||
mac->roam.roamSession[vdev_id].connectState;
|
||||
if ((eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED ==
|
||||
connect_state)
|
||||
|| (eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED ==
|
||||
connect_state)) {
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
"\n NeighborRoamState: %d",
|
||||
mac->roam.neighborRoamInfo[session_id].
|
||||
neighborRoamState);
|
||||
mac->roam.neighborRoamInfo[vdev_id].neighborRoamState);
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
"\n RoamState: %d", mac->roam.
|
||||
curState[session_id]);
|
||||
"\n RoamState: %d", mac->roam.curState[vdev_id]);
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
"\n RoamSubState: %d", mac->roam.
|
||||
curSubState[session_id]);
|
||||
"\n RoamSubState: %d", mac->roam.curSubState[vdev_id]);
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
"\n ConnectState: %d",
|
||||
connect_state);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3244,6 +3266,7 @@ void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile)
|
||||
csr_roam_free_connect_profile(profile);
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS sme_roam_del_pmkid_from_cache(mac_handle_t mac_handle,
|
||||
uint8_t vdev_id,
|
||||
struct wlan_crypto_pmksa *pmksa,
|
||||
@@ -3271,6 +3294,7 @@ QDF_STATUS sme_roam_del_pmkid_from_cache(mac_handle_t mac_handle,
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
void sme_get_pmk_info(mac_handle_t mac_handle, uint8_t session_id,
|
||||
@@ -5452,23 +5476,17 @@ static void sme_disconnect_connected_sessions(struct mac_context *mac_ctx,
|
||||
{
|
||||
uint8_t vdev_id, found = false;
|
||||
qdf_freq_t chan_freq;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
enum QDF_OPMODE op_mode;
|
||||
|
||||
for (vdev_id = 0; vdev_id < WLAN_MAX_VDEVS; vdev_id++) {
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev,
|
||||
vdev_id,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (!vdev)
|
||||
continue;
|
||||
op_mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
op_mode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, vdev_id);
|
||||
/* check only for STA and CLI */
|
||||
if (op_mode != QDF_STA_MODE && op_mode != QDF_P2P_CLIENT_MODE) {
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
if (op_mode != QDF_STA_MODE && op_mode != QDF_P2P_CLIENT_MODE)
|
||||
continue;
|
||||
}
|
||||
chan_freq = csr_get_operation_chan_freq(mac_ctx, vdev, vdev_id);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
|
||||
chan_freq =
|
||||
wlan_get_operation_chan_freq_vdev_id(mac_ctx->pdev,
|
||||
vdev_id);
|
||||
if (!chan_freq)
|
||||
continue;
|
||||
found = false;
|
||||
@@ -15203,7 +15221,7 @@ int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev)
|
||||
|
||||
session = CSR_GET_SESSION(mac_ctx, vdev_id);
|
||||
|
||||
return csr_get_operation_chan_freq(mac_ctx, vdev, vdev_id);
|
||||
return wlan_get_operation_chan_freq(vdev);
|
||||
}
|
||||
|
||||
enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev)
|
||||
@@ -15261,6 +15279,7 @@ QDF_STATUS sme_handle_sae_msg(mac_handle_t mac_handle,
|
||||
struct scheduler_msg sch_msg = {0};
|
||||
struct wmi_roam_auth_status_params *params;
|
||||
struct csr_roam_session *csr_session;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
qdf_status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
@@ -15280,9 +15299,8 @@ QDF_STATUS sme_handle_sae_msg(mac_handle_t mac_handle,
|
||||
* If the device is in joined state, send the status to WMA which
|
||||
* is meant for roaming.
|
||||
*/
|
||||
if ((csr_session->pCurRoamProfile &&
|
||||
csr_session->pCurRoamProfile->csrPersona == QDF_SAP_MODE) ||
|
||||
!CSR_IS_ROAM_JOINED(mac, session_id)) {
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, session_id);
|
||||
if ((opmode == QDF_SAP_MODE) || !CSR_IS_ROAM_JOINED(mac, session_id)) {
|
||||
sae_msg = qdf_mem_malloc(sizeof(*sae_msg));
|
||||
if (!sae_msg) {
|
||||
qdf_status = QDF_STATUS_E_NOMEM;
|
||||
|
ファイル差分が大きすぎるため省略します
差分を読み込み
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021 The Linux Foundation. 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
|
||||
@@ -66,9 +66,10 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
|
||||
static void csr_purge_channel_power(struct mac_context *mac,
|
||||
tDblLinkList *pChannelList);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
static bool csr_roam_is_valid_channel(struct mac_context *mac,
|
||||
uint32_t ch_freq);
|
||||
|
||||
#endif
|
||||
/* pResult is invalid calling this function. */
|
||||
void csr_free_scan_result_entry(struct mac_context *mac,
|
||||
struct tag_csrscan_result *pResult)
|
||||
@@ -114,6 +115,7 @@ QDF_STATUS csr_scan_close(struct mac_context *mac)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid(struct mac_context *mac_ctx,
|
||||
uint32_t session_id)
|
||||
{
|
||||
@@ -172,12 +174,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid(struct mac_context *mac_ctx,
|
||||
qdf_mem_free(filter);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
break;
|
||||
if (mac_ctx->roam.roamSession[session_id].connectState ==
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING) {
|
||||
sme_err("upper layer issued disconnetion");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
break;
|
||||
}
|
||||
|
||||
status = csr_roam_issue_connect(mac_ctx, session_id, profile,
|
||||
hBSSList, eCsrHddIssued,
|
||||
session->scan_info.roam_id,
|
||||
@@ -301,6 +298,7 @@ roam_completion:
|
||||
false);
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS csr_scan_result_purge(struct mac_context *mac,
|
||||
tScanResultHandle hScanList)
|
||||
@@ -905,6 +903,7 @@ free_ie:
|
||||
return fRet;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
static enum csr_scancomplete_nextcommand
|
||||
csr_scan_get_next_command_state(struct mac_context *mac_ctx,
|
||||
uint32_t session_id,
|
||||
@@ -1230,6 +1229,7 @@ void csr_scan_callback(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
sme_release_global_lock(&mac_ctx->sme);
|
||||
}
|
||||
#endif
|
||||
|
||||
tCsrScanResultInfo *csr_scan_result_get_first(struct mac_context *mac,
|
||||
tScanResultHandle hScanResult)
|
||||
@@ -1281,6 +1281,7 @@ tCsrScanResultInfo *csr_scan_result_get_next(struct mac_context *mac,
|
||||
return pRet;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* csr_scan_for_ssid() - Function usually used for BSSs that suppresses SSID
|
||||
* @mac_ctx: Pointer to Global Mac structure
|
||||
@@ -1429,6 +1430,7 @@ error:
|
||||
}
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void csr_set_cfg_valid_channel_list(struct mac_context *mac,
|
||||
uint32_t *pchan_freq_list,
|
||||
@@ -1614,6 +1616,7 @@ QDF_STATUS csr_scan_abort_mac_scan(struct mac_context *mac_ctx,
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
bool csr_roam_is_valid_channel(struct mac_context *mac, uint32_t ch_freq)
|
||||
{
|
||||
bool fValid = false;
|
||||
@@ -1628,6 +1631,7 @@ bool csr_roam_is_valid_channel(struct mac_context *mac, uint32_t ch_freq)
|
||||
}
|
||||
return fValid;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS csr_scan_create_entry_in_scan_cache(struct mac_context *mac,
|
||||
uint32_t sessionId,
|
||||
@@ -1796,6 +1800,7 @@ csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle,
|
||||
return bss_descr;
|
||||
}
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
uint32_t
|
||||
csr_get_channel_for_hw_mode_change(struct mac_context *mac_ctx,
|
||||
tScanResultHandle result_handle,
|
||||
@@ -1917,6 +1922,7 @@ csr_scan_get_channel_for_hw_mode_change(struct mac_context *mac_ctx,
|
||||
|
||||
return candidate_ch_freq;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void csr_fill_rsn_auth_type(enum csr_akm_type *auth_type, uint32_t akm)
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. 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
|
||||
@@ -43,9 +43,12 @@ QDF_STATUS csr_roam_issue_reassociate(struct mac_context *mac, uint32_t vdev_id,
|
||||
/* Set the roaming substate to 'join attempt'... */
|
||||
csr_roam_substate_change(mac, eCSR_ROAM_SUBSTATE_REASSOC_REQ, vdev_id);
|
||||
sme_debug("calling csr_send_join_req_msg (eWNI_SME_REASSOC_REQ)");
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/* attempt to Join this BSS... */
|
||||
return csr_send_join_req_msg(mac, vdev_id, bss_desc, roam_profile, ies,
|
||||
eWNI_SME_REASSOC_REQ);
|
||||
#endif
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021 The Linux Foundation. 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
|
||||
@@ -46,15 +46,19 @@
|
||||
extern uint8_t csr_wpa_oui[][CSR_WPA_OUI_SIZE];
|
||||
bool csr_is_supported_channel(struct mac_context *mac, uint32_t chan_freq);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
enum csr_scancomplete_nextcommand {
|
||||
eCsrNextScanNothing,
|
||||
eCsrNexteScanForSsidSuccess,
|
||||
eCsrNexteScanForSsidFailure,
|
||||
eCsrNextCheckAllowConc,
|
||||
};
|
||||
#endif
|
||||
|
||||
enum csr_roamcomplete_result {
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
eCsrJoinSuccess,
|
||||
#endif
|
||||
eCsrJoinFailure,
|
||||
eCsrReassocSuccess,
|
||||
eCsrReassocFailure,
|
||||
@@ -131,8 +135,11 @@ enum csr_roam_state csr_roam_state_change(struct mac_context *mac,
|
||||
void csr_roaming_state_msg_processor(struct mac_context *mac, void *msg_buf);
|
||||
void csr_roam_joined_state_msg_processor(struct mac_context *mac,
|
||||
void *msg_buf);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
void csr_scan_callback(struct wlan_objmgr_vdev *vdev,
|
||||
struct scan_event *event, void *arg);
|
||||
#endif
|
||||
void csr_release_command_roam(struct mac_context *mac, tSmeCmd *pCommand);
|
||||
void csr_release_command_wm_status_change(struct mac_context *mac,
|
||||
tSmeCmd *pCommand);
|
||||
@@ -155,9 +162,11 @@ bool
|
||||
csr_scan_append_bss_description(struct mac_context *mac,
|
||||
struct bss_description *pSirBssDescription);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_scan_for_ssid(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roam_profile *pProfile, uint32_t roamId,
|
||||
bool notify);
|
||||
#endif
|
||||
/**
|
||||
* csr_scan_abort_mac_scan() - Generic API to abort scan request
|
||||
* @mac: pointer to pmac
|
||||
@@ -260,10 +269,12 @@ void csr_roam_remove_duplicate_command(struct mac_context *mac, uint32_t session
|
||||
tSmeCmd *pCommand,
|
||||
enum csr_roam_reason eRoamReason);
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
||||
struct bss_description *pBssDescription,
|
||||
struct csr_roam_profile *pProfile,
|
||||
tDot11fBeaconIEs *pIes, uint16_t messageType);
|
||||
#endif
|
||||
QDF_STATUS csr_send_mb_disassoc_req_msg(struct mac_context *mac, uint32_t sessionId,
|
||||
tSirMacAddr bssId, uint16_t reasonCode);
|
||||
QDF_STATUS csr_send_mb_deauth_req_msg(struct mac_context *mac, uint32_t sessionId,
|
||||
@@ -676,6 +687,7 @@ QDF_STATUS csr_scan_result_purge(struct mac_context *mac,
|
||||
|
||||
/* /////////////////////////////////////////Common Scan ends */
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/*
|
||||
* csr_connect_security_valid_for_6ghz() - check if profile is vlid fro 6Ghz
|
||||
* @psoc: psoc pointer
|
||||
@@ -697,7 +709,7 @@ csr_connect_security_valid_for_6ghz(struct wlan_objmgr_psoc *psoc,
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*
|
||||
* csr_roam_connect() -
|
||||
* To inititiate an association
|
||||
@@ -970,12 +982,15 @@ QDF_STATUS csr_sta_continue_csa(struct mac_context *mac_ctx,
|
||||
QDF_STATUS csr_set_ht2040_mode(struct mac_context *mac, uint32_t sessionId,
|
||||
ePhyChanBondState cbMode, bool obssEnabled);
|
||||
#endif
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid(struct mac_context *mac_ctx,
|
||||
uint32_t session_id);
|
||||
QDF_STATUS csr_scan_handle_search_for_ssid_failure(struct mac_context *mac,
|
||||
uint32_t session_id);
|
||||
void csr_saved_scan_cmd_free_fields(struct mac_context *mac_ctx,
|
||||
struct csr_roam_session *session);
|
||||
#endif
|
||||
|
||||
struct bss_description*
|
||||
csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle);
|
||||
|
||||
@@ -1084,6 +1099,8 @@ static inline void csr_update_session_he_cap(struct mac_context *mac_ctx,
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
/**
|
||||
* csr_get_channel_for_hw_mode_change() - This function to find
|
||||
* out if HW mode change
|
||||
@@ -1127,6 +1144,8 @@ uint32_t
|
||||
csr_scan_get_channel_for_hw_mode_change(
|
||||
struct mac_context *mac_ctx, uint32_t session_id,
|
||||
struct csr_roam_profile *profile);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* csr_setup_vdev_session() - API to setup vdev mac session
|
||||
* @vdev_mlme: vdev mlme private object
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021 The Linux Foundation. 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
|
||||
@@ -607,8 +607,8 @@ void csr_roam_reset_roam_params(struct mac_context *mac_ctx)
|
||||
}
|
||||
|
||||
#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
static void csr_roam_restore_default_config(struct mac_context *mac_ctx,
|
||||
uint8_t vdev_id)
|
||||
void csr_roam_restore_default_config(struct mac_context *mac_ctx,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct wlan_roam_triggers triggers;
|
||||
|
||||
@@ -621,11 +621,6 @@ static void csr_roam_restore_default_config(struct mac_context *mac_ctx,
|
||||
sme_roam_control_restore_default_config(MAC_HANDLE(mac_ctx),
|
||||
vdev_id);
|
||||
}
|
||||
#else
|
||||
static void csr_roam_restore_default_config(struct mac_context *mac_ctx,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -648,7 +643,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
|
||||
tCsrRoamConnectedProfile *pPrevProfile =
|
||||
&pNeighborRoamInfo->prevConnProfile;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
|
||||
struct csr_roam_session *roam_session = NULL;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
if (!pSession) {
|
||||
sme_err("pSession is NULL");
|
||||
@@ -667,12 +662,10 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
|
||||
csr_roam_copy_connect_profile(mac, sessionId, pPrevProfile);
|
||||
|
||||
if (pSession) {
|
||||
roam_session = &mac->roam.roamSession[sessionId];
|
||||
if (pSession->pCurRoamProfile && (QDF_STA_MODE !=
|
||||
roam_session->pCurRoamProfile->csrPersona)) {
|
||||
sme_err("Ignore disconn ind rcvd from nonSTA persona sessionId: %d csrPersonna %d",
|
||||
sessionId,
|
||||
(int)roam_session->pCurRoamProfile->csrPersona);
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, sessionId);
|
||||
if (opmode != QDF_STA_MODE) {
|
||||
sme_err("Ignore disconn ind rcvd from nonSTA persona vdev: %d opmode %d",
|
||||
sessionId, opmode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
@@ -904,10 +897,11 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
|
||||
{
|
||||
tpCsrNeighborRoamControlInfo ngbr_roam_info =
|
||||
&mac->roam.neighborRoamInfo[session_id];
|
||||
struct csr_roam_session *session = &mac->roam.roamSession[session_id];
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
struct csr_roam_session *session = &mac->roam.roamSession[session_id];
|
||||
struct csr_roam_info *roam_info;
|
||||
#endif
|
||||
enum QDF_OPMODE opmode;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
/* if session id invalid then we need return failure */
|
||||
@@ -919,13 +913,12 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
|
||||
sme_debug("Connect ind, vdev id %d in state %s",
|
||||
session_id, mac_trace_get_neighbour_roam_state(
|
||||
ngbr_roam_info->neighborRoamState));
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, session_id);
|
||||
|
||||
/* Bail out if this is NOT a STA persona */
|
||||
if (mac->roam.roamSession[session_id].pCurRoamProfile->csrPersona !=
|
||||
QDF_STA_MODE) {
|
||||
sme_debug("Ignoring Connect ind received from a non STA. session_id: %d, csrPersonna %d",
|
||||
session_id,
|
||||
(int)session->pCurRoamProfile->csrPersona);
|
||||
/* Bail out if this is NOT a STA opmode */
|
||||
if (opmode != QDF_STA_MODE) {
|
||||
sme_debug("Ignoring Connect ind received from a non STA. vdev: %d, opmode %d",
|
||||
session_id, opmode);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
/* if a concurrent session is running */
|
||||
@@ -1394,10 +1387,13 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
|
||||
if (roamable_ap_count) {
|
||||
csr_neighbor_roam_trigger_handoff(mac_ctx, session_id);
|
||||
} else {
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifndef FEATURE_CM_ENABLE
|
||||
status = csr_scan_for_ssid(mac_ctx, session_id, profile,
|
||||
roam_id, false);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
sme_err("SSID scan failed");
|
||||
#endif
|
||||
}
|
||||
|
||||
end:
|
||||
|
@@ -699,48 +699,20 @@ bool csr_is_any_session_in_connect_state(struct mac_context *mac)
|
||||
return false;
|
||||
}
|
||||
|
||||
qdf_freq_t csr_get_operation_chan_freq(struct mac_context *mac,
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
qdf_freq_t chan_freq = 0;
|
||||
struct wlan_channel *chan;
|
||||
|
||||
if (!CSR_IS_SESSION_VALID(mac, vdev_id))
|
||||
return chan_freq;
|
||||
|
||||
if (wlan_vdev_mlme_is_active(vdev) != QDF_STATUS_SUCCESS)
|
||||
return chan_freq;
|
||||
|
||||
chan = wlan_vdev_get_active_channel(vdev);
|
||||
if (chan)
|
||||
chan_freq = chan->ch_freq;
|
||||
|
||||
return chan_freq;
|
||||
}
|
||||
|
||||
qdf_freq_t csr_get_concurrent_operation_freq(struct mac_context *mac_ctx)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
qdf_freq_t freq;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
enum QDF_OPMODE op_mode;
|
||||
|
||||
for (i = 0; i < WLAN_MAX_VDEVS; i++) {
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev,
|
||||
i,
|
||||
WLAN_LEGACY_MAC_ID);
|
||||
if (!vdev)
|
||||
continue;
|
||||
op_mode = wlan_vdev_mlme_get_opmode(vdev);
|
||||
op_mode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, i);
|
||||
/* check only for STA, CLI, GO and SAP */
|
||||
if (op_mode != QDF_STA_MODE && op_mode != QDF_P2P_CLIENT_MODE &&
|
||||
op_mode != QDF_P2P_GO_MODE && op_mode != QDF_SAP_MODE) {
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
op_mode != QDF_P2P_GO_MODE && op_mode != QDF_SAP_MODE)
|
||||
continue;
|
||||
}
|
||||
freq = csr_get_operation_chan_freq(mac_ctx, vdev, i);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
|
||||
freq = wlan_get_operation_chan_freq_vdev_id(mac_ctx->pdev, i);
|
||||
if (!freq)
|
||||
continue;
|
||||
|
||||
@@ -763,9 +735,7 @@ uint32_t csr_get_beaconing_concurrent_channel(struct mac_context *mac_ctx,
|
||||
if (!CSR_IS_SESSION_VALID(mac_ctx, i))
|
||||
continue;
|
||||
session = CSR_GET_SESSION(mac_ctx, i);
|
||||
if (!session->pCurRoamProfile)
|
||||
continue;
|
||||
persona = session->pCurRoamProfile->csrPersona;
|
||||
persona = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, i);
|
||||
if (((persona == QDF_P2P_GO_MODE) ||
|
||||
(persona == QDF_SAP_MODE)) &&
|
||||
(session->connectState !=
|
||||
@@ -950,6 +920,7 @@ static void csr_calc_chb_for_sap_phymode(struct mac_context *mac_ctx,
|
||||
* @intf_ch_freq: concurrent SAP/GO operating channel frequency
|
||||
* @intf_hbw: concurrent SAP/GO half bw
|
||||
* @intf_cfreq: concurrent SAP/GO channel frequency
|
||||
* @op_mode: opmode
|
||||
*
|
||||
* This routine is called to check if one SAP/GO channel is overlapping with
|
||||
* other SAP/GO channel
|
||||
@@ -961,11 +932,12 @@ static void csr_handle_conc_chnl_overlap_for_sap_go(
|
||||
struct csr_roam_session *session,
|
||||
uint32_t *sap_ch_freq, uint32_t *sap_hbw, uint32_t *sap_cfreq,
|
||||
uint32_t *intf_ch_freq, uint32_t *intf_hbw,
|
||||
uint32_t *intf_cfreq)
|
||||
uint32_t *intf_cfreq, enum QDF_OPMODE op_mode)
|
||||
{
|
||||
uint32_t op_chan_freq;
|
||||
|
||||
op_chan_freq = session->connectedProfile.op_freq;
|
||||
op_chan_freq = wlan_get_operation_chan_freq_vdev_id(mac_ctx->pdev,
|
||||
session->vdev_id);
|
||||
/*
|
||||
* if conc_custom_rule1 is defined then we don't
|
||||
* want p2pgo to follow SAP's channel or SAP to
|
||||
@@ -984,9 +956,7 @@ static void csr_handle_conc_chnl_overlap_for_sap_go(
|
||||
&session->connectedProfile.ht_profile,
|
||||
*intf_ch_freq, intf_cfreq, intf_hbw);
|
||||
}
|
||||
} else if (*sap_ch_freq == 0 &&
|
||||
(session->pCurRoamProfile->csrPersona ==
|
||||
QDF_SAP_MODE)) {
|
||||
} else if (*sap_ch_freq == 0 && op_mode == QDF_SAP_MODE) {
|
||||
*sap_ch_freq = op_chan_freq;
|
||||
csr_get_ch_from_ht_profile(mac_ctx,
|
||||
&session->connectedProfile.ht_profile,
|
||||
@@ -1016,6 +986,7 @@ uint16_t csr_check_concurrent_channel_overlap(struct mac_context *mac_ctx,
|
||||
uint32_t sap_cfreq = 0;
|
||||
uint32_t sap_lfreq, sap_hfreq, intf_lfreq, intf_hfreq;
|
||||
QDF_STATUS status;
|
||||
enum QDF_OPMODE op_mode;
|
||||
|
||||
if (mac_ctx->roam.configParam.cc_switch_mode ==
|
||||
QDF_MCC_TO_SCC_SWITCH_DISABLE)
|
||||
@@ -1044,32 +1015,37 @@ uint16_t csr_check_concurrent_channel_overlap(struct mac_context *mac_ctx,
|
||||
continue;
|
||||
|
||||
session = CSR_GET_SESSION(mac_ctx, i);
|
||||
if (!session->pCurRoamProfile)
|
||||
continue;
|
||||
if (((session->pCurRoamProfile->csrPersona == QDF_STA_MODE) ||
|
||||
(session->pCurRoamProfile->csrPersona ==
|
||||
QDF_P2P_CLIENT_MODE)) &&
|
||||
(session->connectState ==
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED)) {
|
||||
intf_ch_freq = session->connectedProfile.op_freq;
|
||||
op_mode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, i);
|
||||
if ((op_mode == QDF_STA_MODE ||
|
||||
op_mode == QDF_P2P_CLIENT_MODE) &&
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
cm_is_vdevid_connected(mac_ctx->pdev, i)
|
||||
#else
|
||||
(session->connectState ==
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED)
|
||||
#endif
|
||||
) {
|
||||
intf_ch_freq =
|
||||
wlan_get_operation_chan_freq_vdev_id(mac_ctx->pdev,
|
||||
i);
|
||||
csr_get_ch_from_ht_profile(mac_ctx,
|
||||
&session->connectedProfile.ht_profile,
|
||||
intf_ch_freq, &intf_cfreq, &intf_hbw);
|
||||
sme_debug("%d: intf_ch:%d intf_cfreq:%d intf_hbw:%d",
|
||||
i, intf_ch_freq, intf_cfreq, intf_hbw);
|
||||
} else if (((session->pCurRoamProfile->csrPersona ==
|
||||
QDF_P2P_GO_MODE) ||
|
||||
(session->pCurRoamProfile->csrPersona ==
|
||||
QDF_SAP_MODE)) &&
|
||||
(session->connectState !=
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)) {
|
||||
} else if ((op_mode == QDF_P2P_GO_MODE ||
|
||||
op_mode == QDF_SAP_MODE) &&
|
||||
(session->connectState !=
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)) {
|
||||
|
||||
if (session->ch_switch_in_progress)
|
||||
continue;
|
||||
|
||||
csr_handle_conc_chnl_overlap_for_sap_go(mac_ctx,
|
||||
session, &sap_ch_freq, &sap_hbw,
|
||||
&sap_cfreq, &intf_ch_freq, &intf_hbw,
|
||||
&intf_cfreq);
|
||||
&intf_cfreq, op_mode);
|
||||
}
|
||||
if (intf_ch_freq &&
|
||||
((intf_ch_freq <= wlan_reg_ch_to_freq(CHAN_ENUM_2484) &&
|
||||
@@ -1157,24 +1133,21 @@ bool csr_is_all_session_disconnected(struct mac_context *mac)
|
||||
|
||||
bool csr_is_concurrent_session_running(struct mac_context *mac)
|
||||
{
|
||||
uint32_t sessionId, noOfCocurrentSession = 0;
|
||||
eCsrConnectState connectState;
|
||||
|
||||
uint8_t vdev_id, noOfCocurrentSession = 0;
|
||||
bool fRc = false;
|
||||
|
||||
for (sessionId = 0; sessionId < WLAN_MAX_VDEVS; sessionId++) {
|
||||
if (CSR_IS_SESSION_VALID(mac, sessionId)) {
|
||||
connectState =
|
||||
mac->roam.roamSession[sessionId].connectState;
|
||||
if ((eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED ==
|
||||
connectState)
|
||||
|| (eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED ==
|
||||
connectState)
|
||||
|| (eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED ==
|
||||
connectState)) {
|
||||
++noOfCocurrentSession;
|
||||
}
|
||||
}
|
||||
for (vdev_id = 0; vdev_id < WLAN_MAX_VDEVS; vdev_id++) {
|
||||
if (!CSR_IS_SESSION_VALID(mac, vdev_id))
|
||||
continue;
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
if (csr_is_conn_state_connected_infra_ap(mac, vdev_id) ||
|
||||
cm_is_vdevid_connected(mac->pdev, vdev_id))
|
||||
#else
|
||||
if (csr_is_conn_state_connected_infra_ap(mac, vdev_id) ||
|
||||
csr_is_conn_state_connected_infra(mac, vdev_id))
|
||||
#endif
|
||||
++noOfCocurrentSession;
|
||||
}
|
||||
|
||||
/* More than one session is Up and Running */
|
||||
@@ -1201,11 +1174,26 @@ bool csr_is_infra_ap_started(struct mac_context *mac)
|
||||
|
||||
}
|
||||
|
||||
bool csr_is_conn_state_disconnected(struct mac_context *mac, uint32_t sessionId)
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
bool csr_is_conn_state_disconnected(struct mac_context *mac, uint8_t vdev_id)
|
||||
{
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, vdev_id);
|
||||
|
||||
if (opmode == QDF_STA_MODE || opmode == QDF_P2P_CLIENT_MODE)
|
||||
return !cm_is_vdevid_connected(mac->pdev, vdev_id);
|
||||
|
||||
return eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED ==
|
||||
mac->roam.roamSession[vdev_id].connectState;
|
||||
}
|
||||
#else
|
||||
bool csr_is_conn_state_disconnected(struct mac_context *mac, uint8_t vdev_id)
|
||||
{
|
||||
return eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED ==
|
||||
mac->roam.roamSession[sessionId].connectState;
|
||||
mac->roam.roamSession[vdev_id].connectState;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* csr_is_valid_mc_concurrent_session() - To check concurren session is valid
|
||||
@@ -1222,6 +1210,7 @@ bool csr_is_valid_mc_concurrent_session(struct mac_context *mac_ctx,
|
||||
struct bss_description *bss_descr)
|
||||
{
|
||||
struct csr_roam_session *pSession = NULL;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
/* Check for MCC support */
|
||||
if (!mac_ctx->roam.configParam.fenableMCCMode)
|
||||
@@ -1230,13 +1219,12 @@ bool csr_is_valid_mc_concurrent_session(struct mac_context *mac_ctx,
|
||||
return false;
|
||||
/* Validate BeaconInterval */
|
||||
pSession = CSR_GET_SESSION(mac_ctx, session_id);
|
||||
if (!pSession->pCurRoamProfile)
|
||||
return false;
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, session_id);
|
||||
if (QDF_STATUS_SUCCESS == csr_validate_mcc_beacon_interval(
|
||||
mac_ctx,
|
||||
bss_descr->chan_freq,
|
||||
&bss_descr->beaconInterval, session_id,
|
||||
pSession->pCurRoamProfile->csrPersona))
|
||||
opmode))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -2310,14 +2298,14 @@ static bool csr_validate_p2pcli_bcn_intrvl(struct mac_context *mac_ctx,
|
||||
QDF_STATUS *status)
|
||||
{
|
||||
struct csr_roam_session *roamsession;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, session_id);
|
||||
roamsession = &mac_ctx->roam.roamSession[session_id];
|
||||
if (roamsession->pCurRoamProfile &&
|
||||
(roamsession->pCurRoamProfile->csrPersona ==
|
||||
QDF_STA_MODE)) {
|
||||
if (opmode == QDF_STA_MODE) {
|
||||
/* check for P2P client mode */
|
||||
sme_debug("Ignore Beacon Interval Validation...");
|
||||
} else if (roamsession->bssParams.bssPersona == QDF_P2P_GO_MODE) {
|
||||
} else if (opmode == QDF_P2P_GO_MODE) {
|
||||
/* Check for P2P go scenario */
|
||||
if (roamsession->bssParams.operation_chan_freq != ch_freq &&
|
||||
roamsession->bssParams.beaconInterval != *bcn_interval) {
|
||||
@@ -2350,15 +2338,13 @@ static bool csr_validate_p2pgo_bcn_intrvl(struct mac_context *mac_ctx,
|
||||
struct csr_config *cfg_param;
|
||||
tCsrRoamConnectedProfile *conn_profile;
|
||||
uint16_t new_bcn_interval;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
roamsession = &mac_ctx->roam.roamSession[session_id];
|
||||
cfg_param = &mac_ctx->roam.configParam;
|
||||
conn_profile = &roamsession->connectedProfile;
|
||||
if (roamsession->pCurRoamProfile &&
|
||||
((roamsession->pCurRoamProfile->csrPersona ==
|
||||
QDF_P2P_CLIENT_MODE) ||
|
||||
(roamsession->pCurRoamProfile->csrPersona ==
|
||||
QDF_STA_MODE))) {
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, session_id);
|
||||
if (opmode == QDF_P2P_CLIENT_MODE || opmode == QDF_STA_MODE) {
|
||||
/* check for P2P_client scenario */
|
||||
if ((conn_profile->op_freq == 0) &&
|
||||
(conn_profile->beaconInterval == 0))
|
||||
@@ -2418,18 +2404,18 @@ static bool csr_validate_sta_bcn_intrvl(struct mac_context *mac_ctx,
|
||||
struct csr_roam_session *roamsession;
|
||||
struct csr_config *cfg_param;
|
||||
uint16_t new_bcn_interval;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
roamsession = &mac_ctx->roam.roamSession[session_id];
|
||||
cfg_param = &mac_ctx->roam.configParam;
|
||||
|
||||
if (roamsession->pCurRoamProfile &&
|
||||
(roamsession->pCurRoamProfile->csrPersona ==
|
||||
QDF_P2P_CLIENT_MODE)) {
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac_ctx->pdev, session_id);
|
||||
if (opmode == QDF_P2P_CLIENT_MODE) {
|
||||
/* check for P2P client mode */
|
||||
sme_debug("Bcn Intrvl validation not require for STA/CLIENT");
|
||||
return false;
|
||||
}
|
||||
if (roamsession->bssParams.bssPersona == QDF_SAP_MODE &&
|
||||
if (opmode == QDF_SAP_MODE &&
|
||||
roamsession->bssParams.operation_chan_freq != ch_freq) {
|
||||
/*
|
||||
* IF SAP has started and STA wants to connect
|
||||
@@ -2447,7 +2433,7 @@ static bool csr_validate_sta_bcn_intrvl(struct mac_context *mac_ctx,
|
||||
* beacon interval,
|
||||
* change the BI of the P2P-GO
|
||||
*/
|
||||
if (roamsession->bssParams.bssPersona == QDF_P2P_GO_MODE &&
|
||||
if (opmode == QDF_P2P_GO_MODE &&
|
||||
roamsession->bssParams.operation_chan_freq != ch_freq &&
|
||||
roamsession->bssParams.beaconInterval != *bcn_interval) {
|
||||
/* if GO in MCC support diff beacon interval, return success */
|
||||
@@ -3803,35 +3789,6 @@ QDF_STATUS csr_set_modify_profile_fields(struct mac_context *mac,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
bool csr_is_set_key_allowed(struct mac_context *mac, uint32_t sessionId)
|
||||
{
|
||||
bool fRet = true;
|
||||
struct csr_roam_session *pSession;
|
||||
|
||||
pSession = CSR_GET_SESSION(mac, sessionId);
|
||||
|
||||
/*
|
||||
* This condition is not working for infra state. When infra is in
|
||||
* not-connected state the pSession->pCurRoamProfile is NULL, this
|
||||
* function returns true, that is incorrect.
|
||||
* Since SAP requires to set key without any BSS started, it needs
|
||||
* this condition to be met. In other words, this function is useless.
|
||||
* The current work-around is to process setcontext_rsp no matter
|
||||
* what the state is.
|
||||
*/
|
||||
sme_debug("is not what it intends to. Must be revisit or removed");
|
||||
if ((!pSession)
|
||||
|| (csr_is_conn_state_disconnected(mac, sessionId)
|
||||
&& (pSession->pCurRoamProfile)
|
||||
&& (!(CSR_IS_INFRA_AP(pSession->pCurRoamProfile))))
|
||||
) {
|
||||
fRet = false;
|
||||
}
|
||||
|
||||
return fRet;
|
||||
}
|
||||
|
||||
/* no need to acquire lock for this basic function */
|
||||
uint16_t sme_chn_to_freq(uint8_t chanNum)
|
||||
{
|
||||
@@ -3974,27 +3931,6 @@ bool csr_wait_for_connection_update(struct mac_context *mac,
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_get_session_persona() - get persona of a session
|
||||
* @pmac: pointer to global MAC context
|
||||
* @session_id: session id
|
||||
*
|
||||
* This function is to return the persona of a session
|
||||
*
|
||||
* Reture: enum QDF_OPMODE persona
|
||||
*/
|
||||
enum QDF_OPMODE csr_get_session_persona(struct mac_context *pmac,
|
||||
uint32_t session_id)
|
||||
{
|
||||
struct csr_roam_session *session = NULL;
|
||||
|
||||
session = CSR_GET_SESSION(pmac, session_id);
|
||||
if (!session || !session->pCurRoamProfile)
|
||||
return QDF_MAX_NO_OF_MODE;
|
||||
|
||||
return session->pCurRoamProfile->csrPersona;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_is_ndi_started() - function to check if NDI is started
|
||||
* @mac_ctx: handle to mac context
|
||||
@@ -4017,37 +3953,46 @@ bool csr_is_mcc_channel(struct mac_context *mac_ctx, uint32_t chan_freq)
|
||||
struct csr_roam_session *session;
|
||||
enum QDF_OPMODE oper_mode;
|
||||
uint32_t oper_chan_freq = 0;
|
||||
uint8_t session_id;
|
||||
uint8_t vdev_id;
|
||||
bool hw_dbs_capable, same_band_freqs;
|
||||
|
||||
if (chan_freq == 0)
|
||||
return false;
|
||||
|
||||
hw_dbs_capable = policy_mgr_is_hw_dbs_capable(mac_ctx->psoc);
|
||||
for (session_id = 0; session_id < WLAN_MAX_VDEVS; session_id++) {
|
||||
if (CSR_IS_SESSION_VALID(mac_ctx, session_id)) {
|
||||
session = CSR_GET_SESSION(mac_ctx, session_id);
|
||||
if (!session->pCurRoamProfile)
|
||||
continue;
|
||||
oper_mode = session->pCurRoamProfile->csrPersona;
|
||||
if ((((oper_mode == QDF_STA_MODE) ||
|
||||
(oper_mode == QDF_P2P_CLIENT_MODE)) &&
|
||||
(session->connectState ==
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED)) ||
|
||||
(((oper_mode == QDF_P2P_GO_MODE) ||
|
||||
(oper_mode == QDF_SAP_MODE))
|
||||
&& (session->connectState !=
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)))
|
||||
oper_chan_freq =
|
||||
session->connectedProfile.op_freq;
|
||||
for (vdev_id = 0; vdev_id < WLAN_MAX_VDEVS; vdev_id++) {
|
||||
if (!CSR_IS_SESSION_VALID(mac_ctx, vdev_id))
|
||||
continue;
|
||||
|
||||
same_band_freqs = WLAN_REG_IS_SAME_BAND_FREQS(
|
||||
chan_freq, oper_chan_freq);
|
||||
session = CSR_GET_SESSION(mac_ctx, vdev_id);
|
||||
oper_mode =
|
||||
wlan_get_opmode_from_vdev_id(mac_ctx->pdev, vdev_id);
|
||||
if ((((oper_mode == QDF_STA_MODE) ||
|
||||
(oper_mode == QDF_P2P_CLIENT_MODE)) &&
|
||||
/* This is temp ifdef will be removed in near future */
|
||||
#ifdef FEATURE_CM_ENABLE
|
||||
cm_is_vdevid_connected(mac_ctx->pdev, vdev_id)
|
||||
#else
|
||||
(session->connectState ==
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED)
|
||||
#endif
|
||||
) ||
|
||||
(((oper_mode == QDF_P2P_GO_MODE) ||
|
||||
(oper_mode == QDF_SAP_MODE)) &&
|
||||
(session->connectState !=
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)))
|
||||
oper_chan_freq =
|
||||
wlan_get_operation_chan_freq_vdev_id(mac_ctx->pdev,
|
||||
vdev_id);
|
||||
|
||||
if (oper_chan_freq && chan_freq != oper_chan_freq &&
|
||||
(!hw_dbs_capable || same_band_freqs))
|
||||
return true;
|
||||
}
|
||||
if (!oper_chan_freq)
|
||||
continue;
|
||||
same_band_freqs = WLAN_REG_IS_SAME_BAND_FREQS(
|
||||
chan_freq, oper_chan_freq);
|
||||
|
||||
if (oper_chan_freq && chan_freq != oper_chan_freq &&
|
||||
(!hw_dbs_capable || same_band_freqs))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. 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
|
||||
@@ -5353,9 +5353,9 @@ static QDF_STATUS sme_qos_process_add_ts_success_rsp(struct mac_context *mac,
|
||||
enum qca_wlan_ac_type ac, ac_index;
|
||||
struct sme_qos_searchinfo search_key;
|
||||
struct sme_qos_searchinfo search_key1;
|
||||
struct csr_roam_session *csr_session;
|
||||
uint8_t tspec_pending;
|
||||
tListElem *pEntry = NULL;
|
||||
enum QDF_OPMODE opmode;
|
||||
struct sme_qos_flowinfoentry *flow_info = NULL;
|
||||
enum sme_qos_wmmuptype up =
|
||||
(enum sme_qos_wmmuptype) pRsp->tspec.tsinfo.traffic.userPrio;
|
||||
@@ -5578,9 +5578,8 @@ static QDF_STATUS sme_qos_process_add_ts_success_rsp(struct mac_context *mac,
|
||||
sme_qos_state_transition(sessionId, ac, SME_QOS_QOS_ON);
|
||||
|
||||
/* Inform this TSPEC IE change to FW */
|
||||
csr_session = CSR_GET_SESSION(mac, sessionId);
|
||||
if ((csr_session) && (csr_session->pCurRoamProfile) &&
|
||||
(csr_session->pCurRoamProfile->csrPersona == QDF_STA_MODE))
|
||||
opmode = wlan_get_opmode_from_vdev_id(mac->pdev, sessionId);
|
||||
if (opmode == QDF_STA_MODE)
|
||||
csr_roam_update_cfg(mac, sessionId,
|
||||
REASON_CONNECT_IES_CHANGED);
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする