qcacld-3.0: Cleanup unused params from csr structs

Cleanup unused params from csr structures.

Change-Id: I8384ad5e8c6a9d7f33ffe9bc1ed5508776f39607
CRs-Fixed: 2980067
This commit is contained in:
Abhishek Singh
2021-06-29 15:24:18 +05:30
committed by Madan Koyyalamudi
parent 89c41b9256
commit a2c4145a3c
14 changed files with 101 additions and 549 deletions

View File

@@ -96,14 +96,10 @@ struct wlan_mlme_psoc_ext_obj {
* originated from driver * originated from driver
* @peer_discon_ies: Disconnect IEs received in deauth/disassoc frames * @peer_discon_ies: Disconnect IEs received in deauth/disassoc frames
* from peer * from peer
* @discon_reason: Disconnect reason as per enum wlan_reason_code
* @from_ap: True if the disconnection is initiated from AP
*/ */
struct wlan_disconnect_info { struct wlan_disconnect_info {
struct element_info self_discon_ies; struct element_info self_discon_ies;
struct element_info peer_discon_ies; struct element_info peer_discon_ies;
uint32_t discon_reason;
bool from_ap;
}; };
/** /**
@@ -675,39 +671,6 @@ void mlme_set_peer_pmf_status(struct wlan_objmgr_peer *peer,
*/ */
bool mlme_get_peer_pmf_status(struct wlan_objmgr_peer *peer); bool mlme_get_peer_pmf_status(struct wlan_objmgr_peer *peer);
/**
* mlme_set_discon_reason_n_from_ap() - set disconnect reason and from ap flag
* @psoc: PSOC pointer
* @vdev_id: vdev id
* @from_ap: True if the disconnect is initiated from peer.
* False otherwise.
* @reason_code: The disconnect code received from peer or internally generated.
*
* Set the reason code and from_ap.
*
* Return: void
*/
void mlme_set_discon_reason_n_from_ap(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, bool from_ap,
uint32_t reason_code);
/**
* mlme_get_discon_reason_n_from_ap() - Get disconnect reason and from ap flag
* @psoc: PSOC pointer
* @vdev_id: vdev id
* @from_ap: Get the from_ap cached through mlme_set_discon_reason_n_from_ap
* and copy to this buffer.
* @reason_code: Get the reason_code cached through
* mlme_set_discon_reason_n_from_ap and copy to this buffer.
*
* Copy the contents of from_ap and reason_code to given buffers.
*
* Return: void
*/
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 * wlan_get_opmode_from_vdev_id() - Get opmode from vdevid
* @psoc: PSOC pointer * @psoc: PSOC pointer

View File

@@ -2756,60 +2756,6 @@ bool mlme_get_peer_pmf_status(struct wlan_objmgr_peer *peer)
return peer_priv->is_pmf_enabled; return peer_priv->is_pmf_enabled;
} }
void mlme_set_discon_reason_n_from_ap(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, bool from_ap,
uint32_t reason_code)
{
struct wlan_objmgr_vdev *vdev;
struct mlme_legacy_priv *mlme_priv;
if (!psoc)
return;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_LEGACY_MAC_ID);
if (!vdev)
return;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
return;
}
mlme_priv->disconnect_info.from_ap = from_ap;
mlme_priv->disconnect_info.discon_reason = reason_code;
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
}
void mlme_get_discon_reason_n_from_ap(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, bool *from_ap,
uint32_t *reason_code)
{
struct wlan_objmgr_vdev *vdev;
struct mlme_legacy_priv *mlme_priv;
if (!psoc)
return;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_LEGACY_MAC_ID);
if (!vdev)
return;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
return;
}
*from_ap = mlme_priv->disconnect_info.from_ap;
*reason_code = mlme_priv->disconnect_info.discon_reason;
mlme_priv->disconnect_info.from_ap = false;
mlme_priv->disconnect_info.discon_reason = 0;
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
}
enum QDF_OPMODE wlan_get_opmode_from_vdev_id(struct wlan_objmgr_pdev *pdev, enum QDF_OPMODE wlan_get_opmode_from_vdev_id(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id) uint8_t vdev_id)
{ {

View File

@@ -4165,27 +4165,6 @@ QDF_STATUS ucfg_mlme_get_peer_unmap_conf(struct wlan_objmgr_psoc *psoc)
return wlan_mlme_get_peer_unmap_conf(psoc); return wlan_mlme_get_peer_unmap_conf(psoc);
} }
/**
* ucfg_mlme_get_discon_reason_n_from_ap() - Get disconnect reason and from ap
* @psoc: PSOC pointer
* @vdev_id: vdev id
* @from_ap: Get the from_ap cached through mlme_set_discon_reason_n_from_ap
* and copy to this buffer.
* @reason_code: Get the reason_code cached through
* mlme_set_discon_reason_n_from_ap and copy to this buffer.
*
* Fetch the contents of from_ap and reason_codes.
*
* Return: void
*/
static inline void
ucfg_mlme_get_discon_reason_n_from_ap(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, bool *from_ap,
uint32_t *reason_code)
{
mlme_get_discon_reason_n_from_ap(psoc, vdev_id, from_ap, reason_code);
}
#ifdef WLAN_FEATURE_ROAM_OFFLOAD #ifdef WLAN_FEATURE_ROAM_OFFLOAD
/** /**
* ucfg_mlme_get_roam_reason_vsie_status() - Get roam reason vsie is * ucfg_mlme_get_roam_reason_vsie_status() - Get roam reason vsie is

View File

@@ -241,8 +241,19 @@ void cm_csr_set_ss_none(uint8_t vdev_id);
void cm_csr_set_joining(uint8_t vdev_id); void cm_csr_set_joining(uint8_t vdev_id);
void cm_csr_set_joined(uint8_t vdev_id); void cm_csr_set_joined(uint8_t vdev_id);
void cm_csr_set_idle(uint8_t vdev_id); void cm_csr_set_idle(uint8_t vdev_id);
int8_t cm_get_rssi_by_bssid(struct wlan_objmgr_pdev *pdev,
struct qdf_mac_addr *bssid); /**
* cm_get_rssi_snr_by_bssid() - get rssi and snr by bssid
* @pdev: Pointer to pdev
* @bssid: bssid to get rssi and snr
* @rssi: pointer to fill rssi
* @snr: poiter to fill snr
*
* Return: none
*/
QDF_STATUS cm_get_rssi_snr_by_bssid(struct wlan_objmgr_pdev *pdev,
struct qdf_mac_addr *bssid,
int8_t *rssi, int8_t *snr);
static inline QDF_STATUS static inline QDF_STATUS
cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev, cm_ext_t **ext_cm_ptr) cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev, cm_ext_t **ext_cm_ptr)

View File

@@ -241,17 +241,22 @@ end:
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID); wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
} }
int8_t cm_get_rssi_by_bssid(struct wlan_objmgr_pdev *pdev, QDF_STATUS cm_get_rssi_snr_by_bssid(struct wlan_objmgr_pdev *pdev,
struct qdf_mac_addr *bssid) struct qdf_mac_addr *bssid,
int8_t *rssi, int8_t *snr)
{ {
struct scan_filter *scan_filter; struct scan_filter *scan_filter;
int8_t rssi = 0;
qdf_list_t *list = NULL; qdf_list_t *list = NULL;
struct scan_cache_node *first_node = NULL; struct scan_cache_node *first_node = NULL;
QDF_STATUS status = QDF_STATUS_SUCCESS;
if (snr)
*snr = 0;
if (rssi)
*rssi = 0;
scan_filter = qdf_mem_malloc(sizeof(*scan_filter)); scan_filter = qdf_mem_malloc(sizeof(*scan_filter));
if (!scan_filter) if (!scan_filter)
return rssi; return QDF_STATUS_E_NOMEM;
scan_filter->num_of_bssid = 1; scan_filter->num_of_bssid = 1;
qdf_mem_copy(scan_filter->bssid_list[0].bytes, qdf_mem_copy(scan_filter->bssid_list[0].bytes,
@@ -262,17 +267,23 @@ int8_t cm_get_rssi_by_bssid(struct wlan_objmgr_pdev *pdev,
if (!list || (list && !qdf_list_size(list))) { if (!list || (list && !qdf_list_size(list))) {
mlme_debug("scan list empty"); mlme_debug("scan list empty");
status = QDF_STATUS_E_NULL_VALUE;
goto error; goto error;
} }
qdf_list_peek_front(list, (qdf_list_node_t **) &first_node); qdf_list_peek_front(list, (qdf_list_node_t **) &first_node);
if (first_node && first_node->entry) if (first_node && first_node->entry) {
rssi = first_node->entry->rssi_raw; if (rssi)
*rssi = first_node->entry->rssi_raw;
if (snr)
*snr = first_node->entry->snr;
}
error: error:
if (list) if (list)
wlan_scan_purge_results(list); wlan_scan_purge_results(list);
return rssi; return status;
} }
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
@@ -688,7 +699,7 @@ void cm_connect_info(struct wlan_objmgr_vdev *vdev, bool connect_success,
conn_stats.ssid_len = WLAN_SSID_MAX_LEN; conn_stats.ssid_len = WLAN_SSID_MAX_LEN;
qdf_mem_copy(conn_stats.ssid, ssid->ssid, conn_stats.ssid_len); qdf_mem_copy(conn_stats.ssid, ssid->ssid, conn_stats.ssid_len);
conn_stats.rssi = cm_get_rssi_by_bssid(pdev, bssid); cm_get_rssi_snr_by_bssid(pdev, bssid, &conn_stats.rssi, NULL);
conn_stats.est_link_speed = 0; conn_stats.est_link_speed = 0;
des_chan = wlan_vdev_mlme_get_des_chan(vdev); des_chan = wlan_vdev_mlme_get_des_chan(vdev);
@@ -885,7 +896,7 @@ void cm_get_sta_cxn_info(struct wlan_objmgr_vdev *vdev,
"\n\tssid: %.*s", ssid.length, "\n\tssid: %.*s", ssid.length,
ssid.ssid); ssid.ssid);
rssi = cm_get_rssi_by_bssid(pdev, &bss_peer_mac); cm_get_rssi_snr_by_bssid(pdev, &bss_peer_mac, &rssi, NULL);
len += qdf_scnprintf(buf + len, buf_sz - len, len += qdf_scnprintf(buf + len, buf_sz - len,
"\n\trssi: %d", rssi); "\n\trssi: %d", rssi);

View File

@@ -230,7 +230,7 @@ static void cm_clear_pmkid_on_ap_off(struct wlan_objmgr_psoc *psoc,
if (!QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE)) if (!QDF_HAS_PARAM(akm, WLAN_CRYPTO_KEY_MGMT_SAE))
return; return;
cache_rssi = cm_get_rssi_by_bssid(pdev, &req->bssid); cm_get_rssi_snr_by_bssid(pdev, &req->bssid, &cache_rssi, NULL);
wlan_cm_roam_cfg_get_value(psoc, req->vdev_id, wlan_cm_roam_cfg_get_value(psoc, req->vdev_id,
NEIGHBOUR_LOOKUP_THRESHOLD, &temp); NEIGHBOUR_LOOKUP_THRESHOLD, &temp);
lookup_threshold = temp.uint_value; lookup_threshold = temp.uint_value;

View File

@@ -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 * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -95,7 +95,7 @@ static int __wlan_hdd_cfg80211_set_ota_test(struct wiphy *wiphy,
current_roam_state = current_roam_state =
sme_get_current_roam_state(mac_handle, adapter->vdev_id); sme_get_current_roam_state(mac_handle, adapter->vdev_id);
status = sme_stop_roaming(mac_handle, adapter->vdev_id, status = sme_stop_roaming(mac_handle, adapter->vdev_id,
eCsrHddIssued, RSO_INVALID_REQUESTOR); REASON_SME_ISSUED, RSO_INVALID_REQUESTOR);
if (status != QDF_STATUS_SUCCESS) { if (status != QDF_STATUS_SUCCESS) {
hdd_err("Enable/Disable roaming failed"); hdd_err("Enable/Disable roaming failed");
return -EINVAL; return -EINVAL;
@@ -110,13 +110,13 @@ static int __wlan_hdd_cfg80211_set_ota_test(struct wiphy *wiphy,
current_roam_state == eCSR_ROAMING_STATE_JOINED) current_roam_state == eCSR_ROAMING_STATE_JOINED)
status = sme_start_roaming(mac_handle, status = sme_start_roaming(mac_handle,
adapter->vdev_id, adapter->vdev_id,
eCsrHddIssued, REASON_SME_ISSUED,
RSO_INVALID_REQUESTOR); RSO_INVALID_REQUESTOR);
else if (current_roam_state == eCSR_ROAMING_STATE_STOP || else if (current_roam_state == eCSR_ROAMING_STATE_STOP ||
current_roam_state == eCSR_ROAMING_STATE_IDLE) current_roam_state == eCSR_ROAMING_STATE_IDLE)
status = sme_stop_roaming(mac_handle, status = sme_stop_roaming(mac_handle,
adapter->vdev_id, adapter->vdev_id,
eCsrHddIssued, REASON_SME_ISSUED,
RSO_INVALID_REQUESTOR); RSO_INVALID_REQUESTOR);
if (status != QDF_STATUS_SUCCESS) if (status != QDF_STATUS_SUCCESS)

View File

@@ -89,15 +89,9 @@ enum csr_cfgdot11mode {
eCSR_CFG_DOT11_MODE_MAX, eCSR_CFG_DOT11_MODE_MAX,
}; };
enum csr_scan_reason {
eCsrScanForSsid,
};
enum csr_roam_reason { enum csr_roam_reason {
/* Roaming because we've not established the initial connection. */
eCsrNoConnection, eCsrNoConnection,
/* roaming because an 802.11 request was issued to the driver. */ eCsrStartBss,
eCsrHddIssued,
eCsrStopBss, eCsrStopBss,
eCsrForcedDisassocSta, eCsrForcedDisassocSta,
eCsrForcedDeauthSta, eCsrForcedDeauthSta,
@@ -189,43 +183,9 @@ struct roam_cmd {
uint32_t roamId; uint32_t roamId;
enum csr_roam_reason roamReason; enum csr_roam_reason roamReason;
struct csr_roam_profile roamProfile; struct csr_roam_profile roamProfile;
tScanResultHandle hBSSList; /* BSS list fits the profile */
/*
* point to the current BSS in the list that is roaming.
* It starts from head to tail
* */
tListElem *pRoamBssEntry;
/* the last BSS we try and failed */
struct bss_description *pLastRoamBss;
bool fReleaseBssList; /* whether to free hBSSList */
bool fReleaseProfile; /* whether to free roamProfile */ bool fReleaseProfile; /* whether to free roamProfile */
bool fReassoc; /* whether this cmd is for reassoc */
/* whether mac->roam.pCurRoamProfile needs to be updated */
bool fUpdateCurRoamProfile;
/*
* this is for CSR internal used only. And it should not be assigned
* when creating the command. This causes the roam cmd not todo anything
*/
bool fReassocToSelfNoCapChange;
bool fStopWds;
tSirMacAddr peerMac; tSirMacAddr peerMac;
enum wlan_reason_code reason; enum wlan_reason_code reason;
enum wlan_reason_code disconnect_reason;
};
struct setkey_cmd {
uint32_t roamId;
eCsrEncryptionType encType;
enum csr_akm_type authType;
tAniKeyDirection keyDirection; /* Tx, Rx or Tx-and-Rx */
struct qdf_mac_addr peermac; /* Peer's MAC address. ALL 1's for group key */
uint8_t paeRole; /* 0 for supplicant */
uint8_t keyId; /* Kye index */
uint8_t keyLength; /* Number of bytes containing the key in pKey */
uint8_t Key[CSR_MAX_KEY_LEN];
uint8_t keyRsc[WLAN_CRYPTO_RSC_SIZE];
}; };
struct wmstatus_changecmd { struct wmstatus_changecmd {
@@ -237,13 +197,6 @@ struct wmstatus_changecmd {
}; };
struct delstafor_sessionCmd {
/* Session self mac addr */
tSirMacAddr self_mac_addr;
csr_session_close_cb session_close_cb;
void *context;
};
struct csr_config { struct csr_config {
uint32_t channelBondingMode24GHz; uint32_t channelBondingMode24GHz;
uint32_t channelBondingMode5GHz; uint32_t channelBondingMode5GHz;
@@ -278,16 +231,6 @@ struct csr_channel_powerinfo {
uint8_t interChannelOffset; uint8_t interChannelOffset;
}; };
struct csr_roam_joinstatus {
tSirResultCodes status_code;
/*
* this is set to unspecified if status_code indicates timeout.
* Or it is the failed reason from the other BSS(per 802.11 spec)
*/
uint32_t reasonCode;
tSirMacAddr bssId;
};
struct csr_scanstruct { struct csr_scanstruct {
struct csr_channel channels11d; struct csr_channel channels11d;
struct channel_power defaultPowerTable[CFG_VALID_CHANNEL_LIST_LEN]; struct channel_power defaultPowerTable[CFG_VALID_CHANNEL_LIST_LEN];
@@ -295,24 +238,14 @@ struct csr_scanstruct {
struct csr_channel base_channels; /* The channel base to work on */ struct csr_channel base_channels; /* The channel base to work on */
tDblLinkList channelPowerInfoList24; tDblLinkList channelPowerInfoList24;
tDblLinkList channelPowerInfoList5G; tDblLinkList channelPowerInfoList5G;
uint32_t nLastAgeTimeOut;
uint32_t nAgingCountDown;
uint8_t countryCodeDefault[REG_ALPHA2_LEN + 1]; uint8_t countryCodeDefault[REG_ALPHA2_LEN + 1];
uint8_t countryCodeCurrent[REG_ALPHA2_LEN + 1]; uint8_t countryCodeCurrent[REG_ALPHA2_LEN + 1];
uint8_t countryCode11d[REG_ALPHA2_LEN + 1];
/*
* in 11d IE from probe rsp or beacons of neighboring APs
* will use the most popular one (max count)
*/
uint8_t countryCodeElected[REG_ALPHA2_LEN + 1];
/* /*
* Customer wants to optimize the scan time. Avoiding scans(passive) * Customer wants to optimize the scan time. Avoiding scans(passive)
* on DFS channels while swipping through both bands can save some time * on DFS channels while swipping through both bands can save some time
* (apprx 1.3 sec) * (apprx 1.3 sec)
*/ */
uint8_t fEnableDFSChnlScan; uint8_t fEnableDFSChnlScan;
bool fDropScanCmd; /* true means we don't accept scan commands */
int8_t inScanResultBestAPRssi;
bool fcc_constraint; bool fcc_constraint;
bool pending_channel_list_req; bool pending_channel_list_req;
}; };
@@ -338,43 +271,6 @@ struct csr_roam_connectedinfo {
uint8_t *pbFrames; uint8_t *pbFrames;
}; };
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
enum csr_roamoffload_authstatus {
/* reassociation is done but couldn't finish security handshake */
eSIR_ROAM_AUTH_STATUS_CONNECTED = 1,
/* roam successfully completed by firmware */
eSIR_ROAM_AUTH_STATUS_AUTHENTICATED = 2,
/* unknown error */
eSIR_ROAM_AUTH_STATUS_UNKNOWN = 0xff
};
#endif
struct csr_roam_stored_profile {
uint32_t session_id;
struct csr_roam_profile profile;
tScanResultHandle bsslist_handle;
enum csr_roam_reason reason;
uint32_t roam_id;
bool imediate_flag;
bool clear_flag;
};
/**
* struct scan_cmd_info - Scan cache entry node
* @scan_id: scan id
* @scan_reason: scan reason
* @profile: roam profile
* @roam_id: Roam id
* @roambssentry: scan entries
*/
struct scan_cmd_info {
wlan_scan_id scan_id;
enum csr_scan_reason scan_reason;
struct csr_roam_profile *profile;
uint32_t roam_id;
tListElem *roambssentry;
};
/** /**
* struct csr_disconnect_stats - Disconnect Stats per session * struct csr_disconnect_stats - Disconnect Stats per session
* @disconnection_cnt: total no. of disconnections * @disconnection_cnt: total no. of disconnections
@@ -398,14 +294,9 @@ struct csr_disconnect_stats {
* @vdev_id: ID of the vdev for which this entry is applicable * @vdev_id: ID of the vdev for which this entry is applicable
* @is_bcn_recv_start: Allow to process bcn recv indication * @is_bcn_recv_start: Allow to process bcn recv indication
* @beacon_report_do_not_resume: Do not resume the beacon reporting after scan * @beacon_report_do_not_resume: Do not resume the beacon reporting after scan
* @wait_for_key_timer: wait for key timer
* @wait_for_key_timer_info: CSR-specific timer info
*/ */
struct csr_roam_session { struct csr_roam_session {
union { uint8_t vdev_id;
uint8_t sessionId;
uint8_t vdev_id;
};
bool sessionActive; /* true if it is used */ bool sessionActive; /* true if it is used */
/* For BT-AMP station, this serve as BSSID for self-BSS. */ /* For BT-AMP station, this serve as BSSID for self-BSS. */
@@ -424,20 +315,11 @@ struct csr_roam_session {
bool is_bcn_recv_start; bool is_bcn_recv_start;
bool beacon_report_do_not_resume; bool beacon_report_do_not_resume;
#endif #endif
/* the roamResult that is used when the roaming timer fires */
eCsrRoamResult roamResult;
/* This is the reason code for join(assoc) failure */
struct csr_roam_joinstatus joinFailStatusCode;
/* status from PE for deauth/disassoc(lostlink) or our own dyn roam */
uint32_t roamingStatusCode;
bool fWMMConnection; bool fWMMConnection;
bool fQOSConnection; bool fQOSConnection;
#ifdef FEATURE_WLAN_ESE #ifdef FEATURE_WLAN_ESE
bool isPrevApInfoValid; bool isPrevApInfoValid;
uint32_t roamTS1; uint32_t roamTS1;
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
struct roam_offload_synch_ind *roam_synch_data;
#endif #endif
bool ch_switch_in_progress; bool ch_switch_in_progress;
uint8_t nss; uint8_t nss;
@@ -456,12 +338,6 @@ struct csr_roamstruct {
*/ */
int32_t sPendingCommands; int32_t sPendingCommands;
struct csr_roam_session *roamSession; struct csr_roam_session *roamSession;
#ifdef FEATURE_WLAN_ESE
uint8_t isEseIniFeatureEnabled;
#endif
uint8_t RoamRssiDiff;
bool isWESModeEnabled;
uint32_t deauthRspStatus;
#if defined(WLAN_LOGGING_SOCK_SVC_ENABLE) && \ #if defined(WLAN_LOGGING_SOCK_SVC_ENABLE) && \
defined(FEATURE_PKTLOG) && !defined(REMOVE_PKT_LOG) defined(FEATURE_PKTLOG) && !defined(REMOVE_PKT_LOG)
qdf_mc_timer_t packetdump_timer; qdf_mc_timer_t packetdump_timer;

View File

@@ -100,7 +100,6 @@ typedef struct tagSmeCmd {
struct roam_cmd roamCmd; struct roam_cmd roamCmd;
struct wmstatus_changecmd wmStatusChangeCmd; struct wmstatus_changecmd wmStatusChangeCmd;
tGenericQosCmd qosCmd; tGenericQosCmd qosCmd;
struct delstafor_sessionCmd delStaSessionCmd;
struct policy_mgr_hw_mode set_hw_mode_cmd; struct policy_mgr_hw_mode set_hw_mode_cmd;
struct s_nss_update_cmd nss_update_cmd; struct s_nss_update_cmd nss_update_cmd;
struct policy_mgr_dual_mac_config set_dual_mac_cmd; struct policy_mgr_dual_mac_config set_dual_mac_cmd;

View File

@@ -3115,7 +3115,7 @@ QDF_STATUS sme_scan_get_result(mac_handle_t mac_handle, uint8_t vdev_id,
0)); 0));
status = sme_acquire_global_lock(&mac->sme); status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) { if (QDF_IS_STATUS_SUCCESS(status)) {
status = csr_scan_get_result(mac, filter, phResult, false); status = csr_scan_get_result(mac, filter, phResult);
sme_release_global_lock(&mac->sme); sme_release_global_lock(&mac->sme);
} }
@@ -13083,52 +13083,16 @@ QDF_STATUS sme_get_rssi_snr_by_bssid(mac_handle_t mac_handle,
const uint8_t *bssid, const uint8_t *bssid,
int8_t *rssi, int8_t *snr) int8_t *rssi, int8_t *snr)
{ {
struct bss_description *bss_descp;
struct scan_filter *scan_filter;
struct scan_result_list *bss_list;
tScanResultHandle result_handle = NULL;
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
struct qdf_mac_addr mac_addr;
scan_filter = qdf_mem_malloc(sizeof(*scan_filter)); qdf_mem_copy(mac_addr.bytes,
if (!scan_filter) {
status = QDF_STATUS_E_NOMEM;
goto exit;
}
/* update filter to get scan result with just target BSSID */
scan_filter->num_of_bssid = 1;
qdf_mem_copy(scan_filter->bssid_list[0].bytes,
bssid, sizeof(struct qdf_mac_addr)); bssid, sizeof(struct qdf_mac_addr));
scan_filter->ignore_auth_enc_type = true; status = cm_get_rssi_snr_by_bssid(mac_ctx->pdev, &mac_addr, rssi, snr);
status = csr_scan_get_result(mac_ctx, scan_filter, &result_handle, sme_debug("status %d snr: %d, rssi: %d", status,
false); snr ? *snr : 0, rssi ? *rssi: 0);
qdf_mem_free(scan_filter);
if (QDF_STATUS_SUCCESS != status) {
sme_debug("parse_scan_result failed");
goto exit;
}
bss_list = (struct scan_result_list *)result_handle;
bss_descp = csr_get_fst_bssdescr_ptr(bss_list);
if (!bss_descp) {
sme_err("unable to fetch bss descriptor");
status = QDF_STATUS_E_FAULT;
goto exit;
}
sme_debug("snr: %d, rssi: %d, raw_rssi: %d",
bss_descp->sinr, bss_descp->rssi, bss_descp->rssi_raw);
if (rssi)
*rssi = bss_descp->rssi;
if (snr)
*snr = bss_descp->sinr;
exit:
if (result_handle)
csr_scan_result_purge(mac_ctx, result_handle);
return status; return status;
} }

View File

@@ -309,8 +309,6 @@ QDF_STATUS csr_init_chan_list(struct mac_context *mac, uint8_t *alpha2)
qdf_mem_copy(mac->scan.countryCodeCurrent, qdf_mem_copy(mac->scan.countryCodeCurrent,
mac->scan.countryCodeDefault, REG_ALPHA2_LEN + 1); mac->scan.countryCodeDefault, REG_ALPHA2_LEN + 1);
qdf_mem_copy(mac->scan.countryCodeElected,
mac->scan.countryCodeDefault, REG_ALPHA2_LEN + 1);
status = csr_get_channel_and_power_list(mac); status = csr_get_channel_and_power_list(mac);
return status; return status;
@@ -1412,7 +1410,7 @@ static void csr_send_ese_adjacent_ap_rep_ind(struct mac_context *mac,
pe_session->eseContext.tsm.tsmMetrics.RoamingDly pe_session->eseContext.tsm.tsmMetrics.RoamingDly
= roam_info->tsmRoamDelay; = roam_info->tsmRoamDelay;
csr_roam_call_callback(mac, pSession->sessionId, roam_info, csr_roam_call_callback(mac, pSession->vdev_id, roam_info,
0, eCSR_ROAM_ESE_ADJ_AP_REPORT_IND, 0); 0, eCSR_ROAM_ESE_ADJ_AP_REPORT_IND, 0);
qdf_mem_free(roam_info); qdf_mem_free(roam_info);
} }
@@ -2831,18 +2829,13 @@ static void csr_roam_assign_default_param(struct mac_context *mac,
* @mac_ctx: Global MAC Context * @mac_ctx: Global MAC Context
* @session_id: SME Session ID * @session_id: SME Session ID
* @cmd: Command * @cmd: Command
* @roam_info_ptr: Pointed to the roaming info for join
* @roam_state: Current roaming state * @roam_state: Current roaming state
* @result: Result of join
* @scan_result: Global scan result
* *
* Return: None * Return: None
*/ */
static void csr_roam_join_handle_profile(struct mac_context *mac_ctx, static void csr_roam_join_handle_profile(struct mac_context *mac_ctx,
uint32_t session_id, tSmeCmd *cmd, uint32_t session_id, tSmeCmd *cmd,
struct csr_roam_info *roam_info_ptr, enum csr_join_state *roam_state)
enum csr_join_state *roam_state, tCsrScanResultInfo *result,
struct tag_csrscan_result *scan_result)
{ {
QDF_STATUS status; QDF_STATUS status;
struct csr_roam_session *session; struct csr_roam_session *session;
@@ -2879,63 +2872,20 @@ static void csr_roam_join_handle_profile(struct mac_context *mac_ctx,
} }
/** static QDF_STATUS csr_roam(struct mac_context *mac, tSmeCmd *pCommand)
* csr_roam_join_next_bss() - Pick the next BSS for join
* @mac_ctx: Global MAC Context
* @cmd: Command
* @use_same_bss: Use Same BSS to Join
*
* Return: The Join State
*/
static enum csr_join_state csr_roam_join_next_bss(struct mac_context *mac_ctx,
tSmeCmd *cmd, bool use_same_bss)
{
struct tag_csrscan_result *scan_result = NULL;
enum csr_join_state roam_state = eCsrStopRoaming;
struct csr_roam_info *roam_info = NULL;
uint32_t session_id = cmd->vdev_id;
struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
tCsrScanResultInfo *result = NULL;
if (!session) {
sme_err("session %d not found", session_id);
return eCsrStopRoaming;
}
roam_info = qdf_mem_malloc(sizeof(*roam_info));
if (!roam_info)
return eCsrStopRoaming;
qdf_mem_copy(&roam_info->bssid, &session->joinFailStatusCode.bssId,
sizeof(tSirMacAddr));
roam_info->u.pConnectedProfile = &session->connectedProfile;
csr_roam_join_handle_profile(mac_ctx, session_id, cmd, roam_info,
&roam_state, result, scan_result);
qdf_mem_free(roam_info);
return roam_state;
}
static QDF_STATUS csr_roam(struct mac_context *mac, tSmeCmd *pCommand,
bool use_same_bss)
{ {
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
enum csr_join_state RoamState; enum csr_join_state roam_state = eCsrStopRoaming;
enum csr_roam_substate substate; enum csr_roam_substate substate;
uint32_t sessionId = pCommand->vdev_id; uint8_t vdev_id = pCommand->vdev_id;
/* Attept to join a Bss... */ csr_roam_join_handle_profile(mac, vdev_id, pCommand, &roam_state);
RoamState = csr_roam_join_next_bss(mac, pCommand, use_same_bss); if (roam_state == eCsrStopRoaming) {
/* if nothing to join.. */
if (RoamState == eCsrStopRoaming) {
bool fComplete = false; bool fComplete = false;
if (csr_is_conn_state_connected_infra_ap(mac, if (csr_is_conn_state_connected_infra_ap(mac,
sessionId)) { vdev_id)) {
substate = eCSR_ROAM_SUBSTATE_STOP_BSS_REQ; substate = eCSR_ROAM_SUBSTATE_STOP_BSS_REQ;
status = csr_roam_issue_stop_bss(mac, sessionId, status = csr_roam_issue_stop_bss(mac, vdev_id,
substate); substate);
if (!QDF_IS_STATUS_SUCCESS(status)) { if (!QDF_IS_STATUS_SUCCESS(status)) {
sme_warn("fail issuing stop bss status = %d", sme_warn("fail issuing stop bss status = %d",
@@ -2951,8 +2901,7 @@ static QDF_STATUS csr_roam(struct mac_context *mac, tSmeCmd *pCommand,
} }
if (fComplete) if (fComplete)
csr_roam_complete(mac, csr_roam_complete(mac, eCsrNothingToJoin, NULL, vdev_id);
eCsrNothingToJoin, NULL, sessionId);
} }
return status; return status;
@@ -3063,40 +3012,37 @@ QDF_STATUS csr_roam_process_command(struct mac_context *mac, tSmeCmd *pCommand)
pCommand->u.roamCmd.peerMac, pCommand->u.roamCmd.peerMac,
pCommand->u.roamCmd.reason); pCommand->u.roamCmd.reason);
break; break;
case eCsrHddIssued: case eCsrStartBss:
/* for success case */ /* for success case */
/* fallthrough */ /* fallthrough */
default: default:
csr_roam_state_change(mac, eCSR_ROAMING_STATE_JOINING, csr_roam_state_change(mac, eCSR_ROAMING_STATE_JOINING,
sessionId); sessionId);
if (pCommand->u.roamCmd.fUpdateCurRoamProfile) { /* Remember the roaming profile */
/* Remember the roaming profile */ lock_status = sme_acquire_global_lock(&mac->sme);
lock_status = sme_acquire_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(lock_status)) {
if (!QDF_IS_STATUS_SUCCESS(lock_status)) { csr_roam_complete(mac, eCsrNothingToJoin, NULL,
csr_roam_complete(mac, eCsrNothingToJoin, NULL, sessionId);
sessionId); return lock_status;
return lock_status;
}
csr_free_roam_profile(mac, sessionId);
pSession->pCurRoamProfile =
qdf_mem_malloc(sizeof(struct csr_roam_profile));
if (pSession->pCurRoamProfile) {
csr_roam_copy_profile(mac,
pSession->pCurRoamProfile,
&pCommand->u.roamCmd.roamProfile,
sessionId);
}
sme_release_global_lock(&mac->sme);
} }
csr_free_roam_profile(mac, sessionId);
pSession->pCurRoamProfile =
qdf_mem_malloc(sizeof(struct csr_roam_profile));
if (pSession->pCurRoamProfile) {
csr_roam_copy_profile(mac,
pSession->pCurRoamProfile,
&pCommand->u.roamCmd.roamProfile,
sessionId);
}
sme_release_global_lock(&mac->sme);
/* /*
* At this point original uapsd_mask is saved in * At this point original uapsd_mask is saved in
* pCurRoamProfile. uapsd_mask in the pCommand may change from * pCurRoamProfile. uapsd_mask in the pCommand may change from
* this point on. Attempt to roam with the new scan results * this point on. Attempt to roam with the new scan results
* (if we need to..) * (if we need to..)
*/ */
status = csr_roam(mac, pCommand, false); status = csr_roam(mac, pCommand);
if (!QDF_IS_STATUS_SUCCESS(status)) if (!QDF_IS_STATUS_SUCCESS(status))
sme_warn("csr_roam() failed with status = 0x%08X", sme_warn("csr_roam() failed with status = 0x%08X",
status); status);
@@ -3107,17 +3053,10 @@ QDF_STATUS csr_roam_process_command(struct mac_context *mac, tSmeCmd *pCommand)
void csr_reinit_roam_cmd(struct mac_context *mac, tSmeCmd *pCommand) void csr_reinit_roam_cmd(struct mac_context *mac, tSmeCmd *pCommand)
{ {
if (pCommand->u.roamCmd.fReleaseBssList) {
csr_scan_result_purge(mac, pCommand->u.roamCmd.hBSSList);
pCommand->u.roamCmd.fReleaseBssList = false;
pCommand->u.roamCmd.hBSSList = CSR_INVALID_SCANRESULT_HANDLE;
}
if (pCommand->u.roamCmd.fReleaseProfile) { if (pCommand->u.roamCmd.fReleaseProfile) {
csr_release_profile(mac, &pCommand->u.roamCmd.roamProfile); csr_release_profile(mac, &pCommand->u.roamCmd.roamProfile);
pCommand->u.roamCmd.fReleaseProfile = false; pCommand->u.roamCmd.fReleaseProfile = false;
} }
pCommand->u.roamCmd.pLastRoamBss = NULL;
pCommand->u.roamCmd.pRoamBssEntry = NULL;
/* Because u.roamCmd is union and share with scanCmd and StatusChange */ /* Because u.roamCmd is union and share with scanCmd and StatusChange */
qdf_mem_zero(&pCommand->u.roamCmd, sizeof(struct roam_cmd)); qdf_mem_zero(&pCommand->u.roamCmd, sizeof(struct roam_cmd));
} }
@@ -3355,9 +3294,7 @@ static void csr_roam_process_start_bss_success(struct mac_context *mac_ctx,
* start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS * start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS
* will trigger the connection start indication in Vista * will trigger the connection start indication in Vista
*/ */
roam_info->status_code = roam_info->status_code = eSIR_SME_SUCCESS;
session->joinFailStatusCode.status_code;
roam_info->reasonCode = session->joinFailStatusCode.reasonCode;
roam_info->bss_desc = bss_desc; roam_info->bss_desc = bss_desc;
if (bss_desc) if (bss_desc)
qdf_mem_copy(roam_info->bssid.bytes, bss_desc->bssId, qdf_mem_copy(roam_info->bssid.bytes, bss_desc->bssId,
@@ -3594,16 +3531,13 @@ end:
QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId,
struct csr_roam_profile *pProfile, struct csr_roam_profile *pProfile,
tScanResultHandle hBSSList, enum csr_roam_reason reason, uint32_t roamId)
enum csr_roam_reason reason, uint32_t roamId,
bool fImediate, bool fClearScan)
{ {
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
tSmeCmd *pCommand; tSmeCmd *pCommand;
pCommand = csr_get_command_buffer(mac); pCommand = csr_get_command_buffer(mac);
if (!pCommand) { if (!pCommand) {
csr_scan_result_purge(mac, hBSSList);
sme_err(" fail to get command buffer"); sme_err(" fail to get command buffer");
status = QDF_STATUS_E_RESOURCES; status = QDF_STATUS_E_RESOURCES;
} else { } else {
@@ -3634,15 +3568,10 @@ QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId,
pCommand->command = eSmeCommandRoam; pCommand->command = eSmeCommandRoam;
pCommand->vdev_id = (uint8_t) sessionId; pCommand->vdev_id = (uint8_t) sessionId;
pCommand->u.roamCmd.hBSSList = hBSSList;
pCommand->u.roamCmd.roamId = roamId; pCommand->u.roamCmd.roamId = roamId;
pCommand->u.roamCmd.roamReason = reason; pCommand->u.roamCmd.roamReason = reason;
/* We need to free the BssList when the command is done */ status = csr_queue_sme_command(mac, pCommand, false);
pCommand->u.roamCmd.fReleaseBssList = true;
pCommand->u.roamCmd.fUpdateCurRoamProfile = true;
status = csr_queue_sme_command(mac, pCommand, fImediate);
if (!QDF_IS_STATUS_SUCCESS(status)) { if (!QDF_IS_STATUS_SUCCESS(status)) {
sme_err("fail to send message status: %d", status); sme_err("fail to send message status: %d", status);
} }
@@ -3706,9 +3635,8 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t vdev_id,
*pRoamId = roam_id; *pRoamId = roam_id;
if (CSR_IS_INFRA_AP(profile) || CSR_IS_NDI(profile)) { if (CSR_IS_INFRA_AP(profile) || CSR_IS_NDI(profile)) {
status = csr_roam_issue_connect(mac, vdev_id, profile, NULL, status = csr_roam_issue_connect(mac, vdev_id, profile,
eCsrHddIssued, roam_id, eCsrStartBss, roam_id);
false, false);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
sme_err("CSR failed to issue start BSS/NDI cmd with status: 0x%08X", sme_err("CSR failed to issue start BSS/NDI cmd with status: 0x%08X",
status); status);
@@ -3947,8 +3875,6 @@ static void
csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx, csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
tSmeCmd *cmd, uint8_t vdev_id) tSmeCmd *cmd, uint8_t vdev_id)
{ {
struct tag_csrscan_result *scan_result = NULL;
struct bss_description *bss_desc = NULL;
uint32_t session_id; uint32_t session_id;
struct csr_roam_session *session; struct csr_roam_session *session;
@@ -3964,22 +3890,11 @@ csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
return; return;
} }
/*
* Successfully set the configuration parameters for the new Bss.
* Attempt to join the roaming Bss
*/
if (cmd->u.roamCmd.pRoamBssEntry) {
scan_result = GET_BASE_ADDR(cmd->u.roamCmd.pRoamBssEntry,
struct tag_csrscan_result,
Link);
bss_desc = &scan_result->Result.BssDescriptor;
}
if (CSR_IS_INFRA_AP(&cmd->u.roamCmd.roamProfile) || if (CSR_IS_INFRA_AP(&cmd->u.roamCmd.roamProfile) ||
CSR_IS_NDI(&cmd->u.roamCmd.roamProfile)) { CSR_IS_NDI(&cmd->u.roamCmd.roamProfile)) {
if (!QDF_IS_STATUS_SUCCESS(csr_roam_issue_start_bss(mac_ctx, if (!QDF_IS_STATUS_SUCCESS(csr_roam_issue_start_bss(mac_ctx,
session_id, &session->bssParams, session_id, &session->bssParams,
&cmd->u.roamCmd.roamProfile, &cmd->u.roamCmd.roamProfile,
bss_desc,
cmd->u.roamCmd.roamId))) { cmd->u.roamCmd.roamId))) {
sme_err("CSR start BSS failed"); sme_err("CSR start BSS failed");
/* We need to complete the command */ /* We need to complete the command */
@@ -4039,9 +3954,6 @@ void csr_roam_roaming_state_disassoc_rsp_processor(struct mac_context *mac,
static void csr_roam_roaming_state_deauth_rsp_processor(struct mac_context *mac, static void csr_roam_roaming_state_deauth_rsp_processor(struct mac_context *mac,
struct deauth_rsp *pSmeRsp) struct deauth_rsp *pSmeRsp)
{ {
tSirResultCodes status_code;
status_code = csr_get_de_auth_rsp_status_code(pSmeRsp);
mac->roam.deauthRspStatus = status_code;
csr_roam_complete(mac, eCsrNothingToJoin, NULL, pSmeRsp->sessionId); csr_roam_complete(mac, eCsrNothingToJoin, NULL, pSmeRsp->sessionId);
} }
@@ -5404,72 +5316,19 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
struct deauth_ind *pDeauthIndMsg = NULL; struct deauth_ind *pDeauthIndMsg = NULL;
struct disassoc_ind *pDisassocIndMsg = NULL; struct disassoc_ind *pDisassocIndMsg = NULL;
eCsrRoamResult result = eCSR_ROAM_RESULT_LOSTLINK;
struct csr_roam_info *roam_info;
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
bool from_ap = false;
if (!pSession) { sme_debug("vdev_id %d type %d ", sessionId, type);
sme_err("session: %d not found", sessionId);
return QDF_STATUS_E_FAILURE; if (type == eWNI_SME_DISASSOC_IND) {
}
roam_info = qdf_mem_malloc(sizeof(*roam_info));
if (!roam_info)
return QDF_STATUS_E_NOMEM;
if (eWNI_SME_DISASSOC_IND == type) {
result = eCSR_ROAM_RESULT_DISASSOC_IND;
pDisassocIndMsg = (struct disassoc_ind *)pSirMsg; pDisassocIndMsg = (struct disassoc_ind *)pSirMsg;
pSession->roamingStatusCode = pDisassocIndMsg->status_code; status = csr_send_mb_disassoc_cnf_msg(mac, pDisassocIndMsg);
pSession->joinFailStatusCode.reasonCode = } else if (type == eWNI_SME_DEAUTH_IND) {
pDisassocIndMsg->reasonCode;
from_ap = pDisassocIndMsg->from_ap;
qdf_copy_macaddr(&roam_info->peerMac,
&pDisassocIndMsg->peer_macaddr);
} else if (eWNI_SME_DEAUTH_IND == type) {
result = eCSR_ROAM_RESULT_DEAUTH_IND;
pDeauthIndMsg = (struct deauth_ind *)pSirMsg; pDeauthIndMsg = (struct deauth_ind *)pSirMsg;
pSession->roamingStatusCode = pDeauthIndMsg->status_code; status = csr_send_mb_deauth_cnf_msg(mac, pDeauthIndMsg);
pSession->joinFailStatusCode.reasonCode =
pDeauthIndMsg->reasonCode;
from_ap = pDeauthIndMsg->from_ap;
qdf_copy_macaddr(&roam_info->peerMac,
&pDeauthIndMsg->peer_macaddr);
} else { } else {
sme_warn("gets an unknown type (%d)", type); sme_warn("gets an unknown type (%d)", type);
result = eCSR_ROAM_RESULT_NONE;
pSession->joinFailStatusCode.reasonCode = 1;
} }
mlme_set_discon_reason_n_from_ap(mac->psoc, sessionId, from_ap,
pSession->joinFailStatusCode.reasonCode);
if (eWNI_SME_DISASSOC_IND == type)
status = csr_send_mb_disassoc_cnf_msg(mac, pDisassocIndMsg);
else if (eWNI_SME_DEAUTH_IND == type)
status = csr_send_mb_deauth_cnf_msg(mac, pDeauthIndMsg);
/* prepare to tell HDD to disconnect */
qdf_mem_zero(roam_info, sizeof(*roam_info));
roam_info->status_code = (tSirResultCodes)pSession->roamingStatusCode;
roam_info->reasonCode = pSession->joinFailStatusCode.reasonCode;
if (eWNI_SME_DISASSOC_IND == type) {
/* staMacAddr */
qdf_copy_macaddr(&roam_info->peerMac,
&pDisassocIndMsg->peer_macaddr);
roam_info->staId = (uint8_t)pDisassocIndMsg->staId;
roam_info->reasonCode = pDisassocIndMsg->reasonCode;
} else if (eWNI_SME_DEAUTH_IND == type) {
/* staMacAddr */
qdf_copy_macaddr(&roam_info->peerMac,
&pDeauthIndMsg->peer_macaddr);
roam_info->staId = (uint8_t)pDeauthIndMsg->staId;
roam_info->reasonCode = pDeauthIndMsg->reasonCode;
roam_info->rxRssi = pDeauthIndMsg->rssi;
}
sme_debug("roamInfo.staId: %d", roam_info->staId);
/* Dont initiate internal driver based roaming after disconnection*/
qdf_mem_free(roam_info);
return status; return status;
} }
@@ -6195,8 +6054,7 @@ static void csr_roam_determine_max_rate_for_ad_hoc(struct mac_context *mac,
QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
struct csr_roamstart_bssparams *pParam, struct csr_roamstart_bssparams *pParam,
struct csr_roam_profile *pProfile, struct csr_roam_profile *pProfile,
struct bss_description *bss_desc, uint32_t roamId)
uint32_t roamId)
{ {
QDF_STATUS status = QDF_STATUS_SUCCESS; QDF_STATUS status = QDF_STATUS_SUCCESS;
enum reg_wifi_band band; enum reg_wifi_band band;
@@ -6262,8 +6120,7 @@ QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
pParam->beacon_tx_rate = pProfile->beacon_tx_rate; pParam->beacon_tx_rate = pProfile->beacon_tx_rate;
status = csr_send_mb_start_bss_req_msg(mac, sessionId, status = csr_send_mb_start_bss_req_msg(mac, sessionId,
pProfile->BSSType, pParam, pProfile->BSSType, pParam);
bss_desc);
return status; return status;
} }
@@ -7453,8 +7310,7 @@ QDF_STATUS csr_send_assoc_cnf_msg(struct mac_context *mac,
QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
sessionId, eCsrRoamBssType bssType, sessionId, eCsrRoamBssType bssType,
struct csr_roamstart_bssparams *pParam, struct csr_roamstart_bssparams *pParam)
struct bss_description *bss_desc)
{ {
struct start_bss_req *pMsg; struct start_bss_req *pMsg;
struct validate_bss_data candidate_info; struct validate_bss_data candidate_info;
@@ -7465,8 +7321,6 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
pSession->joinFailStatusCode.status_code = eSIR_SME_SUCCESS;
pSession->joinFailStatusCode.reasonCode = 0;
pMsg = qdf_mem_malloc(sizeof(*pMsg)); pMsg = qdf_mem_malloc(sizeof(*pMsg));
if (!pMsg) if (!pMsg)
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
@@ -7477,10 +7331,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
qdf_copy_macaddr(&pMsg->bssid, &pParam->bssid); qdf_copy_macaddr(&pMsg->bssid, &pParam->bssid);
/* self_mac_addr */ /* self_mac_addr */
qdf_copy_macaddr(&pMsg->self_macaddr, &pSession->self_mac_addr); qdf_copy_macaddr(&pMsg->self_macaddr, &pSession->self_mac_addr);
/* beaconInterval */ if (pParam->beaconInterval)
if (bss_desc && bss_desc->beaconInterval)
candidate_info.beacon_interval = bss_desc->beaconInterval;
else if (pParam->beaconInterval)
candidate_info.beacon_interval = pParam->beaconInterval; candidate_info.beacon_interval = pParam->beaconInterval;
else else
candidate_info.beacon_interval = MLME_CFG_BEACON_INTERVAL_DEF; candidate_info.beacon_interval = MLME_CFG_BEACON_INTERVAL_DEF;
@@ -7736,7 +7587,7 @@ QDF_STATUS csr_setup_vdev_session(struct vdev_mlme_obj *vdev_mlme)
} }
session->sessionActive = true; session->sessionActive = true;
session->sessionId = vdev_id; session->vdev_id = vdev_id;
qdf_mem_copy(&session->self_mac_addr, mac_addr, qdf_mem_copy(&session->self_mac_addr, mac_addr,
sizeof(struct qdf_mac_addr)); sizeof(struct qdf_mac_addr));
@@ -7842,7 +7693,7 @@ static void csr_init_session(struct mac_context *mac, uint32_t sessionId)
return; return;
pSession->sessionActive = false; pSession->sessionActive = false;
pSession->sessionId = WLAN_UMAC_VDEV_ID_MAX; pSession->vdev_id = WLAN_UMAC_VDEV_ID_MAX;
pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED; pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
csr_free_roam_profile(mac, sessionId); csr_free_roam_profile(mac, sessionId);
csr_roam_free_connect_profile(&pSession->connectedProfile); csr_roam_free_connect_profile(&pSession->connectedProfile);
@@ -8010,9 +7861,9 @@ void wlan_cm_ese_populate_addtional_ies(struct wlan_objmgr_pdev *pdev,
tspec_ie = (ese_wmm_tspec_ie *)(tspec_ie_buf + SIR_MAC_OUI_WME_HDR_MIN); tspec_ie = (ese_wmm_tspec_ie *)(tspec_ie_buf + SIR_MAC_OUI_WME_HDR_MIN);
if (csr_is_wmm_supported(mac_ctx) && if (csr_is_wmm_supported(mac_ctx) &&
mlme_obj->cfg.lfr.ese_enabled && mlme_obj->cfg.lfr.ese_enabled &&
wlan_cm_get_ese_assoc(pdev, session->sessionId)) { wlan_cm_get_ese_assoc(pdev, session->vdev_id)) {
ese_tspec.numTspecs = sme_qos_ese_retrieve_tspec_info( ese_tspec.numTspecs = sme_qos_ese_retrieve_tspec_info(
mac_ctx, session->sessionId, mac_ctx, session->vdev_id,
(tTspecInfo *)&ese_tspec.tspec[0]); (tTspecInfo *)&ese_tspec.tspec[0]);
qdf_mem_copy(tspec_ie_buf, tspec_ie_hdr, qdf_mem_copy(tspec_ie_buf, tspec_ie_hdr,
SIR_MAC_OUI_WME_HDR_MIN); SIR_MAC_OUI_WME_HDR_MIN);
@@ -8136,7 +7987,7 @@ static enum wlan_serialization_cmd_type csr_get_roam_cmd_type(
enum wlan_serialization_cmd_type cmd_type = WLAN_SER_CMD_MAX; enum wlan_serialization_cmd_type cmd_type = WLAN_SER_CMD_MAX;
switch (sme_cmd->u.roamCmd.roamReason) { switch (sme_cmd->u.roamCmd.roamReason) {
case eCsrHddIssued: case eCsrStartBss:
cmd_type = WLAN_SER_CMD_VDEV_START_BSS; cmd_type = WLAN_SER_CMD_VDEV_START_BSS;
break; break;
case eCsrStopBss: case eCsrStopBss:

View File

@@ -582,44 +582,6 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
qdf_mem_free(p_buf); qdf_mem_free(p_buf);
} }
/**
* csr_get_fst_bssdescr_ptr() - This function returns the pointer to first bss
* description from scan handle
* @result_handle: an object for the result.
*
* Return: first bss descriptor from the scan handle.
*/
struct bss_description*
csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle)
{
tListElem *first_element = NULL;
struct tag_csrscan_result *scan_result = NULL;
struct scan_result_list *bss_list =
(struct scan_result_list *)result_handle;
if (!bss_list) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
FL("Empty bss_list"));
return NULL;
}
if (csr_ll_is_list_empty(&bss_list->List, LL_ACCESS_NOLOCK)) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
FL("bss_list->List is empty"));
return NULL;
}
first_element = csr_ll_peek_head(&bss_list->List, LL_ACCESS_NOLOCK);
if (!first_element) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
FL("peer head return NULL"));
return NULL;
}
scan_result = GET_BASE_ADDR(first_element, struct tag_csrscan_result,
Link);
return &scan_result->Result.BssDescriptor;
}
static void csr_fill_rsn_auth_type(enum csr_akm_type *auth_type, uint32_t akm) static void csr_fill_rsn_auth_type(enum csr_akm_type *auth_type, uint32_t akm)
{ {
/* Try the more preferred ones first. */ /* Try the more preferred ones first. */
@@ -884,8 +846,7 @@ static QDF_STATUS csr_parse_scan_list(struct mac_context *mac_ctx,
QDF_STATUS csr_scan_get_result(struct mac_context *mac_ctx, QDF_STATUS csr_scan_get_result(struct mac_context *mac_ctx,
struct scan_filter *filter, struct scan_filter *filter,
tScanResultHandle *results, tScanResultHandle *results)
bool scoring_required)
{ {
QDF_STATUS status; QDF_STATUS status;
struct scan_result_list *ret_list = NULL; struct scan_result_list *ret_list = NULL;
@@ -982,7 +943,7 @@ QDF_STATUS csr_scan_get_result_for_bssid(struct mac_context *mac_ctx,
QDF_MAC_ADDR_SIZE); QDF_MAC_ADDR_SIZE);
status = csr_scan_get_result(mac_ctx, scan_filter, status = csr_scan_get_result(mac_ctx, scan_filter,
&filtered_scan_result, false); &filtered_scan_result);
if (!QDF_IS_STATUS_SUCCESS(status)) { if (!QDF_IS_STATUS_SUCCESS(status)) {
sme_err("Failed to get scan result"); sme_err("Failed to get scan result");

View File

@@ -124,9 +124,7 @@ QDF_STATUS csr_roam_call_callback(struct mac_context *mac, uint32_t sessionId,
eRoamCmdStatus u1, eCsrRoamResult u2); eRoamCmdStatus u1, eCsrRoamResult u2);
QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId,
struct csr_roam_profile *pProfile, struct csr_roam_profile *pProfile,
tScanResultHandle hBSSList, enum csr_roam_reason reason, uint32_t roamId);
enum csr_roam_reason reason, uint32_t roamId,
bool fImediate, bool fClearScan);
void csr_roam_complete(struct mac_context *mac, enum csr_roamcomplete_result Result, void csr_roam_complete(struct mac_context *mac, enum csr_roamcomplete_result Result,
void *Context, uint8_t session_id); void *Context, uint8_t session_id);
@@ -167,8 +165,7 @@ void csr_roam_check_for_link_status_change(struct mac_context *mac,
QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
struct csr_roamstart_bssparams *pParam, struct csr_roamstart_bssparams *pParam,
struct csr_roam_profile *pProfile, struct csr_roam_profile *pProfile,
struct bss_description *bss_desc, uint32_t roamId);
uint32_t roamId);
QDF_STATUS csr_roam_issue_stop_bss(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_roam_issue_stop_bss(struct mac_context *mac, uint32_t sessionId,
enum csr_roam_substate NewSubstate); enum csr_roam_substate NewSubstate);
/* pBand can be NULL if caller doesn't need to get it */ /* pBand can be NULL if caller doesn't need to get it */
@@ -191,8 +188,7 @@ QDF_STATUS csr_send_assoc_cnf_msg(struct mac_context *mac,
QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac,
uint32_t sessionId, uint32_t sessionId,
eCsrRoamBssType bssType, eCsrRoamBssType bssType,
struct csr_roamstart_bssparams *pParam, struct csr_roamstart_bssparams *pParam);
struct bss_description *bss_desc);
QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac, QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac,
uint32_t sessionId); uint32_t sessionId);
@@ -282,14 +278,12 @@ enum csr_cfgdot11mode csr_find_best_phy_mode(struct mac_context *mac,
* @mac: Pointer to Global MAC structure * @mac: Pointer to Global MAC structure
* @filter: If pFilter is NULL, all cached results are returned * @filter: If pFilter is NULL, all cached results are returned
* @phResult: an object for the result. * @phResult: an object for the result.
* @scoring_required: if scoding is required for AP
* *
* Return QDF_STATUS * Return QDF_STATUS
*/ */
QDF_STATUS csr_scan_get_result(struct mac_context *mac, QDF_STATUS csr_scan_get_result(struct mac_context *mac,
struct scan_filter *filter, struct scan_filter *filter,
tScanResultHandle *phResult, tScanResultHandle *phResult);
bool scoring_required);
/** /**
* csr_scan_get_result_for_bssid - gets the scan result from scan cache for the * csr_scan_get_result_for_bssid - gets the scan result from scan cache for the
@@ -610,9 +604,6 @@ QDF_STATUS csr_sta_continue_csa(struct mac_context *mac_ctx,
QDF_STATUS csr_set_ht2040_mode(struct mac_context *mac, uint32_t sessionId, QDF_STATUS csr_set_ht2040_mode(struct mac_context *mac, uint32_t sessionId,
ePhyChanBondState cbMode, bool obssEnabled); ePhyChanBondState cbMode, bool obssEnabled);
#endif #endif
struct bss_description*
csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle);
QDF_STATUS QDF_STATUS
csr_roam_prepare_bss_config_from_profile(struct mac_context *mac_ctx, csr_roam_prepare_bss_config_from_profile(struct mac_context *mac_ctx,
struct csr_roam_profile *profile, struct csr_roam_profile *profile,

View File

@@ -504,7 +504,7 @@ static QDF_STATUS sme_rrm_send_scan_result(struct mac_context *mac_ctx,
if (QDF_STATUS_E_FAILURE == csr_roam_get_session_id_from_bssid(mac_ctx, if (QDF_STATUS_E_FAILURE == csr_roam_get_session_id_from_bssid(mac_ctx,
&rrm_ctx->sessionBssId, &session_id)) { &rrm_ctx->sessionBssId, &session_id)) {
sme_debug("BSSID mismatch, using current session_id"); sme_debug("BSSID mismatch, using current session_id");
session_id = mac_ctx->roam.roamSession->sessionId; session_id = mac_ctx->roam.roamSession->vdev_id;
} }
status = sme_scan_get_result(mac_handle, (uint8_t)session_id, status = sme_scan_get_result(mac_handle, (uint8_t)session_id,
filter, &result_handle); filter, &result_handle);