qcacld-3.0: Cleanup the legacy Scan cache
Cleanup the legacy scan cache code as it is moved to common scan component. Change-Id: I6f6710450ff692f4722ccb6d704871f50178680c CRs-Fixed: 2033079
This commit is contained in:

committed by
Sandeep Puligilla

szülő
77edd5674f
commit
6f56d21a01
@@ -124,23 +124,11 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
||||
TRACE_CODE_RX_MGMT_TSF, 0, bcn_ptr->timeStamp[0]);)
|
||||
MTRACE(mac_trace(mac_ctx, TRACE_CODE_RX_MGMT_TSF, 0,
|
||||
bcn_ptr->timeStamp[1]);)
|
||||
lim_check_and_add_bss_description(mac_ctx, bcn_ptr,
|
||||
rx_pkt_info, false, true);
|
||||
|
||||
if ((mac_ctx->lim.gLimMlmState ==
|
||||
eLIM_MLM_WT_PROBE_RESP_STATE) ||
|
||||
(mac_ctx->lim.gLimMlmState ==
|
||||
eLIM_MLM_PASSIVE_SCAN_STATE)) {
|
||||
/* If we are scanning for P2P, only accept probe rsp */
|
||||
if ((mac_ctx->lim.gLimHalScanState !=
|
||||
eLIM_HAL_SCANNING_STATE) ||
|
||||
(NULL == mac_ctx->lim.gpLimMlmScanReq) ||
|
||||
!mac_ctx->lim.gpLimMlmScanReq->p2pSearch)
|
||||
lim_check_and_add_bss_description(mac_ctx, bcn_ptr,
|
||||
rx_pkt_info,
|
||||
((mac_ctx->lim.gLimHalScanState ==
|
||||
eLIM_HAL_SCANNING_STATE) ? true : false),
|
||||
false);
|
||||
/*
|
||||
* Calling dfsChannelList which will convert DFS channel
|
||||
* to active channel for x secs if this channel is DFS
|
||||
@@ -175,85 +163,3 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
||||
qdf_mem_free(bcn_ptr);
|
||||
return;
|
||||
}
|
||||
#ifndef NAPIER_SCAN
|
||||
/**---------------------------------------------------------------
|
||||
\fn lim_process_beacon_frame_no_session
|
||||
\brief This function is called by limProcessMessageQueue()
|
||||
\ upon Beacon reception.
|
||||
\
|
||||
\param pMac
|
||||
\param *pRxPacketInfo - A pointer to Rx packet info structure
|
||||
\return None
|
||||
------------------------------------------------------------------*/
|
||||
void
|
||||
lim_process_beacon_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo)
|
||||
{
|
||||
tpSirMacMgmtHdr pHdr;
|
||||
tSchBeaconStruct *pBeacon;
|
||||
|
||||
pMac->lim.gLimNumBeaconsRcvd++;
|
||||
pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo);
|
||||
|
||||
lim_log(pMac, LOG2, FL("Received Beacon frame with length=%d from "),
|
||||
WMA_GET_RX_MPDU_LEN(pRxPacketInfo));
|
||||
lim_print_mac_addr(pMac, pHdr->sa, LOG2);
|
||||
|
||||
|
||||
/**
|
||||
* No session has been established. Expect Beacon only when
|
||||
* 1. STA is in Scan mode waiting for Beacon/Probe response or
|
||||
* 2. STA/AP is in Learn mode
|
||||
*/
|
||||
if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
|
||||
(pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) ||
|
||||
(pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE)) {
|
||||
pBeacon = qdf_mem_malloc(sizeof(tSchBeaconStruct));
|
||||
if (NULL == pBeacon) {
|
||||
lim_log(pMac, LOGE,
|
||||
FL
|
||||
("Unable to allocate memory in lim_process_beacon_frame_no_session"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (sir_convert_beacon_frame2_struct
|
||||
(pMac, (uint8_t *) pRxPacketInfo,
|
||||
pBeacon) != eSIR_SUCCESS) {
|
||||
/* Received wrongly formatted/invalid Beacon. Ignore and move on. */
|
||||
lim_log(pMac, LOGW,
|
||||
FL
|
||||
("Received invalid Beacon in global MLM state %X"),
|
||||
pMac->lim.gLimMlmState);
|
||||
lim_print_mlm_state(pMac, LOGW, pMac->lim.gLimMlmState);
|
||||
qdf_mem_free(pBeacon);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
|
||||
(pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE)) {
|
||||
/*If we are scanning for P2P, only accept probe rsp */
|
||||
if ((pMac->lim.gLimHalScanState !=
|
||||
eLIM_HAL_SCANNING_STATE) ||
|
||||
(NULL == pMac->lim.gpLimMlmScanReq) ||
|
||||
!pMac->lim.gpLimMlmScanReq->p2pSearch)
|
||||
lim_check_and_add_bss_description(pMac, pBeacon,
|
||||
pRxPacketInfo, true, false);
|
||||
/* Calling dfsChannelList which will convert DFS channel
|
||||
* to Active channel for x secs if this channel is DFS channel */
|
||||
lim_set_dfs_channel_list(pMac, pBeacon->channelNumber,
|
||||
&pMac->lim.dfschannelList);
|
||||
} else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE) {
|
||||
} /* end of eLIM_MLM_LEARN_STATE) */
|
||||
qdf_mem_free(pBeacon);
|
||||
} /* end of (eLIM_MLM_WT_PROBE_RESP_STATE) || (eLIM_MLM_PASSIVE_SCAN_STATE) */
|
||||
else {
|
||||
lim_log(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %s (%d)"),
|
||||
lim_mlm_state_str(pMac->lim.gLimMlmState),
|
||||
pMac->lim.gLimMlmState);
|
||||
#ifdef WLAN_DEBUG
|
||||
pMac->lim.gLimUnexpBcnCnt++;
|
||||
#endif
|
||||
}
|
||||
|
||||
return;
|
||||
} /*** end lim_process_beacon_frame_no_session() ***/
|
||||
#endif
|
||||
|
@@ -940,19 +940,6 @@ lim_handle80211_frames(tpAniSirGlobal pMac, struct scheduler_msg *limMsg,
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
if (WMA_GET_OFFLOADSCANLEARN(pRxPacketInfo)) {
|
||||
if (fc.subType == SIR_MAC_MGMT_BEACON) {
|
||||
pe_debug("Learning scan beacon");
|
||||
__lim_handle_beacon(pMac, limMsg, NULL);
|
||||
} else if (fc.subType == SIR_MAC_MGMT_PROBE_RSP) {
|
||||
pe_debug("Learning scan probe rsp");
|
||||
lim_process_probe_rsp_frame_no_session(pMac, pRxPacketInfo);
|
||||
} else {
|
||||
pe_err("Wrong frame Type %d, Subtype %d for LFR",
|
||||
fc.type, fc.subType);
|
||||
}
|
||||
goto end;
|
||||
}
|
||||
/* Added For BT-AMP Support */
|
||||
psessionEntry = pe_find_session_by_bssid(pMac, pHdr->bssId,
|
||||
&sessionId);
|
||||
@@ -1070,10 +1057,7 @@ lim_handle80211_frames(tpAniSirGlobal pMac, struct scheduler_msg *limMsg,
|
||||
break;
|
||||
|
||||
case SIR_MAC_MGMT_PROBE_RSP:
|
||||
if (psessionEntry == NULL)
|
||||
lim_process_probe_rsp_frame_no_session(pMac,
|
||||
pRxPacketInfo);
|
||||
else
|
||||
if (psessionEntry)
|
||||
lim_process_probe_rsp_frame(pMac,
|
||||
pRxPacketInfo,
|
||||
psessionEntry);
|
||||
|
@@ -166,18 +166,7 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info,
|
||||
return;
|
||||
}
|
||||
|
||||
lim_check_and_add_bss_description(mac_ctx, probe_rsp,
|
||||
rx_Packet_info, false, true);
|
||||
/* To Support BT-AMP */
|
||||
if ((mac_ctx->lim.gLimMlmState ==
|
||||
eLIM_MLM_WT_PROBE_RESP_STATE) ||
|
||||
(mac_ctx->lim.gLimMlmState ==
|
||||
eLIM_MLM_PASSIVE_SCAN_STATE)) {
|
||||
lim_check_and_add_bss_description(mac_ctx, probe_rsp,
|
||||
rx_Packet_info, ((mac_ctx->lim.
|
||||
gLimHalScanState == eLIM_HAL_SCANNING_STATE)
|
||||
? true : false), true);
|
||||
} else if (session_entry->limMlmState ==
|
||||
if (session_entry->limMlmState ==
|
||||
eLIM_MLM_WT_JOIN_BEACON_STATE) {
|
||||
/*
|
||||
* Either Beacon/probe response is required.
|
||||
@@ -316,71 +305,3 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info,
|
||||
/* Ignore Probe Response frame in all other states */
|
||||
return;
|
||||
}
|
||||
#ifndef NAPIER_SCAN
|
||||
/**
|
||||
* lim_process_probe_rsp_frame_no_session() - process Probe Response frame
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
* @rx_packet_info: A pointer to Buffer descriptor + associated PDUs
|
||||
*
|
||||
* This function processes received Probe Response frame with no session.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx,
|
||||
uint8_t *rx_packet_info)
|
||||
{
|
||||
uint8_t *body;
|
||||
uint32_t frame_len = 0;
|
||||
tpSirMacMgmtHdr header;
|
||||
tSirProbeRespBeacon *probe_rsp;
|
||||
|
||||
probe_rsp = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
|
||||
if (NULL == probe_rsp) {
|
||||
pe_err("Unable to allocate memory");
|
||||
return;
|
||||
}
|
||||
|
||||
probe_rsp->ssId.length = 0;
|
||||
probe_rsp->wpa.length = 0;
|
||||
|
||||
header = WMA_GET_RX_MAC_HEADER(rx_packet_info);
|
||||
|
||||
pe_debug("Received Probe Response frame with length=%d from",
|
||||
WMA_GET_RX_MPDU_LEN(rx_packet_info));
|
||||
lim_print_mac_addr(mac_ctx, header->sa, LOG2);
|
||||
|
||||
/* Validate IE information before processing Probe Response Frame */
|
||||
if (lim_validate_ie_information_in_probe_rsp_frame(mac_ctx,
|
||||
rx_packet_info) !=
|
||||
eSIR_SUCCESS) {
|
||||
pe_err("Parse error ProbeResponse, length=%d", frame_len);
|
||||
qdf_mem_free(probe_rsp);
|
||||
return;
|
||||
}
|
||||
|
||||
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_packet_info);
|
||||
pe_debug("Probe Resp Frame Received: BSSID "
|
||||
MAC_ADDRESS_STR " (RSSI %d)",
|
||||
MAC_ADDR_ARRAY(header->bssId),
|
||||
(uint) abs((int8_t)WMA_GET_RX_RSSI_NORMALIZED(
|
||||
rx_packet_info)));
|
||||
/*
|
||||
* Get pointer to Probe Response frame body
|
||||
*/
|
||||
body = WMA_GET_RX_MPDU_DATA(rx_packet_info);
|
||||
if (sir_convert_probe_frame2_struct(mac_ctx, body, frame_len,
|
||||
probe_rsp) == eSIR_FAILURE) {
|
||||
pe_err("Parse error ProbeResponse, length=%d",
|
||||
frame_len);
|
||||
qdf_mem_free(probe_rsp);
|
||||
return;
|
||||
}
|
||||
|
||||
pe_debug("Save this probe rsp in LFR cache");
|
||||
lim_check_and_add_bss_description(mac_ctx, probe_rsp,
|
||||
rx_packet_info, false, true);
|
||||
qdf_mem_free(probe_rsp);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@@ -226,140 +226,3 @@ lim_collect_bss_description(tpAniSirGlobal pMac,
|
||||
|
||||
return;
|
||||
} /*** end lim_collect_bss_description() ***/
|
||||
|
||||
#ifndef NAPIER_SCAN
|
||||
/**
|
||||
* lim_check_and_add_bss_description()
|
||||
* @mac_ctx: Pointer to Global MAC structure
|
||||
* @bpr: Pointer to parsed Beacon/Probe Response structure
|
||||
* @rx_packet_info: Pointer to Received frame's BD
|
||||
* @scanning: bool to indicate whether the BSS is from current scan
|
||||
* or just happens to receive a beacon
|
||||
*
|
||||
* FUNCTION:
|
||||
* This function is called during scan upon receiving
|
||||
* Beacon/Probe Response frame to check if the received
|
||||
* frame matches scan criteria, collect BSS description
|
||||
* and add it to cached scan results.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
||||
void
|
||||
lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
|
||||
tpSirProbeRespBeacon bpr, uint8_t *rx_packet_info,
|
||||
bool scanning, uint8_t fProbeRsp)
|
||||
{
|
||||
tSirBssDescription *bssdescr = NULL;
|
||||
uint32_t frame_len, ie_len = 0;
|
||||
uint8_t rx_chan_in_beacon = 0;
|
||||
QDF_STATUS status;
|
||||
uint8_t dont_update_all = 0;
|
||||
uint8_t rf_band = 0;
|
||||
uint8_t rx_chan_bd = 0;
|
||||
|
||||
tSirMacAddr bssid_zero = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
|
||||
tpSirMacDataHdr3a hdr;
|
||||
|
||||
hdr = WMA_GET_RX_MPDUHEADER3A((uint8_t *) rx_packet_info);
|
||||
|
||||
/* Check For Null BSSID and Skip in case of P2P */
|
||||
if (!qdf_mem_cmp(bssid_zero, &hdr->addr3, 6))
|
||||
return;
|
||||
|
||||
/*
|
||||
* SSID/BSSID policy:
|
||||
* Accept beacons/probe responses with any SSID or BSSID because
|
||||
* multiple scan requests may be running at the same time and
|
||||
* firmware may forward results to CLD from scans requested through a
|
||||
* different path.
|
||||
*
|
||||
* CSA Policy:
|
||||
* There is no point in caching & reporting the scan results for APs
|
||||
* which are in the process of switching the channel. So, we are not
|
||||
* caching the scan results for APs which are adverzing the
|
||||
* channel-switch element in their beacons and probe responses.
|
||||
*/
|
||||
if (bpr->channelSwitchPresent)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If beacon/probe resp DS param channel does not match with
|
||||
* RX BD channel then don't save the results. It might be a beacon
|
||||
* from another channel heard as noise on the current scanning channel
|
||||
*/
|
||||
|
||||
if ((bpr->dsParamsPresent) || (bpr->HTInfo.present)) {
|
||||
/* This means that we are in 2.4GHz mode or 5GHz 11n mode */
|
||||
rx_chan_in_beacon = lim_get_channel_from_beacon(mac_ctx, bpr);
|
||||
rf_band = WMA_GET_RX_RFBAND(rx_packet_info);
|
||||
rx_chan_bd = WMA_GET_RX_CH(rx_packet_info);
|
||||
|
||||
if (rx_chan_bd != rx_chan_in_beacon) {
|
||||
/* BCAST Frame, if CH do not match, Drop */
|
||||
if (WMA_IS_RX_BCAST(rx_packet_info)) {
|
||||
lim_log(mac_ctx, LOG3,
|
||||
FL("Beacon/Probe Rsp dropped. Channel in BD %d. Channel in beacon %d"),
|
||||
WMA_GET_RX_CH(rx_packet_info),
|
||||
lim_get_channel_from_beacon(mac_ctx,
|
||||
bpr));
|
||||
return;
|
||||
}
|
||||
/* Unit cast frame, Probe RSP, do not drop */
|
||||
else {
|
||||
dont_update_all = 1;
|
||||
lim_log(mac_ctx, LOG3,
|
||||
FL("SSID %s, CH in ProbeRsp %d, CH in BD %d, mismatch, Do Not Drop"),
|
||||
bpr->ssId.ssId, rx_chan_in_beacon,
|
||||
WMA_GET_RX_CH(rx_packet_info));
|
||||
WMA_GET_RX_CH(rx_packet_info) =
|
||||
rx_chan_in_beacon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate buffer to hold BSS description from
|
||||
* received Beacon frame.
|
||||
* Include size of fixed fields and IEs length
|
||||
*/
|
||||
|
||||
ie_len = WMA_GET_RX_PAYLOAD_LEN(rx_packet_info);
|
||||
if (ie_len <= SIR_MAC_B_PR_SSID_OFFSET) {
|
||||
lim_log(mac_ctx, LOGP,
|
||||
FL("RX packet has invalid length %d"), ie_len);
|
||||
return;
|
||||
}
|
||||
|
||||
ie_len -= SIR_MAC_B_PR_SSID_OFFSET;
|
||||
|
||||
/* IEs will be overlap ieFields field. Adjust the length accordingly */
|
||||
frame_len = sizeof(*bssdescr) + ie_len - sizeof(bssdescr->ieFields[1]);
|
||||
bssdescr = (tSirBssDescription *) qdf_mem_malloc(frame_len);
|
||||
|
||||
if (NULL == bssdescr) {
|
||||
/* Log error */
|
||||
lim_log(mac_ctx, LOGE,
|
||||
FL("qdf_mem_malloc(length=%d) failed"), frame_len);
|
||||
return;
|
||||
}
|
||||
|
||||
/* In scan state, store scan result. */
|
||||
lim_collect_bss_description(mac_ctx, bssdescr, bpr, rx_packet_info,
|
||||
scanning);
|
||||
bssdescr->fProbeRsp = fProbeRsp;
|
||||
|
||||
/*
|
||||
* Send the beacon to CSR with registered callback routine.
|
||||
* scan_id and flags parameters are currently unused and set to 0.
|
||||
*/
|
||||
if (mac_ctx->lim.add_bssdescr_callback) {
|
||||
(mac_ctx->lim.add_bssdescr_callback) (mac_ctx, bssdescr, 0, 0);
|
||||
} else {
|
||||
lim_log(mac_ctx, LOGE,
|
||||
FL("No CSR callback routine to send beacons"));
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
}
|
||||
qdf_mem_free(bssdescr);
|
||||
}
|
||||
#endif
|
||||
|
@@ -44,15 +44,6 @@
|
||||
uint8_t lim_scan_hash_function(tSirMacAddr);
|
||||
void lim_restore_pre_scan_state(tpAniSirGlobal);
|
||||
void lim_copy_scan_result(tpAniSirGlobal, uint8_t *);
|
||||
#ifndef NAPIER_SCAN
|
||||
void lim_check_and_add_bss_description(tpAniSirGlobal, tpSirProbeRespBeacon,
|
||||
uint8_t *, bool, uint8_t);
|
||||
#else
|
||||
static inline
|
||||
void lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
|
||||
tpSirProbeRespBeacon bcn, uint8_t *rx_pkt,
|
||||
bool scanning, uint8_t probe){}
|
||||
#endif
|
||||
void lim_collect_bss_description(tpAniSirGlobal pMac,
|
||||
tSirBssDescription *pBssDescr,
|
||||
tpSirProbeRespBeacon pBPR,
|
||||
|
@@ -434,16 +434,8 @@ void lim_cleanup_mlm(tpAniSirGlobal);
|
||||
|
||||
/* Management frame handling functions */
|
||||
void lim_process_beacon_frame(tpAniSirGlobal, uint8_t *, tpPESession);
|
||||
void lim_process_beacon_frame_no_session(tpAniSirGlobal, uint8_t *);
|
||||
void lim_process_probe_req_frame(tpAniSirGlobal, uint8_t *, tpPESession);
|
||||
void lim_process_probe_rsp_frame(tpAniSirGlobal, uint8_t *, tpPESession);
|
||||
#ifndef NAPIER_SCAN
|
||||
void lim_process_probe_rsp_frame_no_session(tpAniSirGlobal, uint8_t *);
|
||||
#else
|
||||
static inline
|
||||
void lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx,
|
||||
uint8_t *pkt){}
|
||||
#endif
|
||||
void lim_process_probe_req_frame_multiple_bss(tpAniSirGlobal, uint8_t *,
|
||||
tpPESession);
|
||||
|
||||
|
@@ -299,16 +299,6 @@ static void __sch_beacon_process_no_session(tpAniSirGlobal pMac,
|
||||
lim_handle_ibss_coalescing(pMac, pBeacon, pRxPacketInfo,
|
||||
psessionEntry);
|
||||
}
|
||||
#ifndef NAPIER_SCAN
|
||||
/* If station(STA/BT-STA/BT-AP/IBSS) mode, Always save the
|
||||
* beacon in the scan results, if atleast one session is
|
||||
* active. sch_beacon_process_no_session will be called only
|
||||
* when there is atleast one session active, so not checking
|
||||
* it again here.
|
||||
*/
|
||||
lim_check_and_add_bss_description(pMac, pBeacon, pRxPacketInfo, false,
|
||||
false);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -373,9 +363,6 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx,
|
||||
* This handles two cases:
|
||||
* -- Infra STA receving beacons from AP
|
||||
*/
|
||||
/* Always save the beacon into LIM's cached scan results */
|
||||
lim_check_and_add_bss_description(mac_ctx, bcn, rx_pkt_info,
|
||||
false, false);
|
||||
|
||||
/**
|
||||
* This is the Beacon received from the AP we're currently associated
|
||||
|
@@ -671,8 +671,6 @@ typedef struct tagCsrVotes11d {
|
||||
|
||||
typedef struct tagCsrScanStruct {
|
||||
tScanProfile scanProfile;
|
||||
tDblLinkList scanResultList;
|
||||
tDblLinkList tempScanResults;
|
||||
bool fScanEnable;
|
||||
bool fFullScanIssued;
|
||||
#ifdef WLAN_AP_STA_CONCURRENCY
|
||||
|
@@ -12064,22 +12064,6 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
}
|
||||
sme_debug("roamInfo.staId: %d", roamInfo.staId);
|
||||
/* Dont initiate internal driver based roaming after disconnection*/
|
||||
#ifndef NAPIER_SCAN
|
||||
/* See if we can possibly roam. If so, start the roaming process and notify HDD
|
||||
that we are roaming. But if we cannot possibly roam, or if we are unable to
|
||||
currently roam, then notify HDD of the lost link */
|
||||
if (fToRoam) {
|
||||
/* Only remove the connected BSS in infrastructure mode */
|
||||
csr_roam_remove_connected_bss_from_scan_cache(pMac,
|
||||
&pSession->
|
||||
connectedProfile);
|
||||
/* Not to do anying for lostlink with WDS */
|
||||
status = csr_roam_start_roaming(pMac, sessionId,
|
||||
(eWNI_SME_DEAUTH_IND == type) ?
|
||||
eCsrLostlinkRoamingDeauth :
|
||||
eCsrLostlinkRoamingDisassoc);
|
||||
}
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -13785,103 +13769,6 @@ eRoamCmdStatus csr_get_roam_complete_status(tpAniSirGlobal pMac, uint32_t sessio
|
||||
return retStatus;
|
||||
}
|
||||
|
||||
/* This function remove the connected BSS from te cached scan result */
|
||||
QDF_STATUS
|
||||
csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac,
|
||||
tCsrRoamConnectedProfile *pConnProfile)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
tCsrScanResultFilter *pScanFilter = NULL;
|
||||
tListElem *pEntry;
|
||||
tCsrScanResult *pResult;
|
||||
tDot11fBeaconIEs *pIes;
|
||||
bool fMatch;
|
||||
|
||||
if ((qdf_is_macaddr_zero(&pConnProfile->bssid) ||
|
||||
qdf_is_macaddr_broadcast(&pConnProfile->bssid)))
|
||||
return status;
|
||||
/*
|
||||
* Prepare the filter. Only fill in the necessary fields. Not all fields
|
||||
* are needed
|
||||
*/
|
||||
pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
|
||||
if (NULL == pScanFilter)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
pScanFilter->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr));
|
||||
if (NULL == pScanFilter->BSSIDs.bssid) {
|
||||
qdf_mem_free(pScanFilter);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(pScanFilter->BSSIDs.bssid,
|
||||
&pConnProfile->bssid, sizeof(struct qdf_mac_addr));
|
||||
pScanFilter->BSSIDs.numOfBSSIDs = 1;
|
||||
if (!csr_is_nullssid(pConnProfile->SSID.ssId,
|
||||
pConnProfile->SSID.length)) {
|
||||
pScanFilter->SSIDs.SSIDList = qdf_mem_malloc(
|
||||
sizeof(tCsrSSIDInfo));
|
||||
if (NULL == pScanFilter->SSIDs.SSIDList) {
|
||||
csr_free_scan_filter(pMac, pScanFilter);
|
||||
qdf_mem_free(pScanFilter);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(&pScanFilter->SSIDs.SSIDList[0].SSID,
|
||||
&pConnProfile->SSID, sizeof(tSirMacSSid));
|
||||
}
|
||||
pScanFilter->authType.numEntries = 1;
|
||||
pScanFilter->authType.authType[0] = pConnProfile->AuthType;
|
||||
pScanFilter->BSSType = pConnProfile->BSSType;
|
||||
pScanFilter->EncryptionType.numEntries = 1;
|
||||
pScanFilter->EncryptionType.encryptionType[0] =
|
||||
pConnProfile->EncryptionType;
|
||||
pScanFilter->mcEncryptionType.numEntries = 1;
|
||||
pScanFilter->mcEncryptionType.encryptionType[0] =
|
||||
pConnProfile->mcEncryptionType;
|
||||
/* We ignore the channel for now, BSSID should be enough */
|
||||
pScanFilter->ChannelInfo.numOfChannels = 0;
|
||||
/* Also ignore the following fields */
|
||||
pScanFilter->uapsd_mask = 0;
|
||||
pScanFilter->bWPSAssociation = false;
|
||||
pScanFilter->bOSENAssociation = false;
|
||||
pScanFilter->countryCode[0] = 0;
|
||||
pScanFilter->phyMode = eCSR_DOT11_MODE_AUTO;
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
pScanFilter->MFPEnabled = pConnProfile->MFPEnabled;
|
||||
pScanFilter->MFPRequired = pConnProfile->MFPRequired;
|
||||
pScanFilter->MFPCapable = pConnProfile->MFPCapable;
|
||||
#endif
|
||||
csr_ll_lock(&pMac->scan.scanResultList);
|
||||
pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK);
|
||||
while (pEntry) {
|
||||
pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link);
|
||||
pIes = (tDot11fBeaconIEs *) (pResult->Result.pvIes);
|
||||
fMatch = csr_match_bss(pMac, &pResult->Result.BssDescriptor,
|
||||
pScanFilter, NULL, NULL, NULL, &pIes);
|
||||
/* Release the IEs allocated by csr_match_bss is needed */
|
||||
if (!pResult->Result.pvIes) {
|
||||
/*
|
||||
* need to free the IEs since it is allocated
|
||||
* by csr_match_bss
|
||||
*/
|
||||
qdf_mem_free(pIes);
|
||||
}
|
||||
if (fMatch) {
|
||||
/* We found the one */
|
||||
if (csr_ll_remove_entry(&pMac->scan.scanResultList,
|
||||
pEntry, LL_ACCESS_NOLOCK))
|
||||
/* Free the memory */
|
||||
csr_free_scan_result_entry(pMac, pResult);
|
||||
break;
|
||||
}
|
||||
pEntry = csr_ll_next(&pMac->scan.scanResultList,
|
||||
pEntry, LL_ACCESS_NOLOCK);
|
||||
} /* while */
|
||||
csr_ll_unlock(&pMac->scan.scanResultList);
|
||||
csr_free_scan_filter(pMac, pScanFilter);
|
||||
qdf_mem_free(pScanFilter);
|
||||
return status;
|
||||
}
|
||||
|
||||
static QDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
tCsrRoamProfile *pProfile,
|
||||
tSirBssDescription *pBssDesc)
|
||||
|
A különbségek nem kerülnek megjelenítésre, mivel a fájl túl nagy
Load Diff
@@ -465,12 +465,6 @@ QDF_STATUS csr_neighbor_roam_candidate_found_ind_hdlr(tpAniSirGlobal pMac,
|
||||
sme_err("Recvd in NotCONNECTED or OsReqHandoff. Ignore");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
} else {
|
||||
/* Firmware indicated that roaming candidate is found. Beacons
|
||||
* are already in the SME scan results table.
|
||||
* Process the results for choosing best roaming candidate.
|
||||
*/
|
||||
csr_save_scan_results(pMac, eCsrScanCandidateFound,
|
||||
sessionId);
|
||||
/* Future enhancements:
|
||||
* If firmware tags candidate beacons, give them preference
|
||||
* for roaming.
|
||||
|
@@ -434,9 +434,6 @@ void csr_apply_channel_power_info_to_fw(tpAniSirGlobal pMac,
|
||||
void csr_apply_power2_current(tpAniSirGlobal pMac);
|
||||
void csr_assign_rssi_for_category(tpAniSirGlobal pMac, int8_t bestApRssi,
|
||||
uint8_t catOffset);
|
||||
QDF_STATUS csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac,
|
||||
tCsrRoamConnectedProfile *
|
||||
pConnProfile);
|
||||
QDF_STATUS csr_roam_start_roaming(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
eCsrRoamingReason roamingReason);
|
||||
/* return a bool to indicate whether roaming completed or continue. */
|
||||
@@ -540,9 +537,6 @@ QDF_STATUS csr_scan_flush_result(tpAniSirGlobal);
|
||||
*/
|
||||
QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac);
|
||||
|
||||
void csr_save_scan_results(tpAniSirGlobal pMac, uint8_t reason,
|
||||
uint8_t sessionId);
|
||||
|
||||
QDF_STATUS csr_scan_flush_selective_result(tpAniSirGlobal, bool flushP2P);
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user