mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Replace chan num with frequency about measurement request
Add frequency to tSirChannelInfo, not replace because channelNum has specail meaning. Replace channelNumber of struct report_channel_list. Use channel frequency in functions which process measurement request Change-Id: I615b1f61c2810474dac6daf1eeb1ce19c2b1da33 CRs-Fixed: 2559283
This commit is contained in:
parent
e36cddb56f
commit
2f11454941
5 changed files with 154 additions and 159 deletions
|
|
@ -726,8 +726,8 @@ struct start_bss_rsp {
|
|||
};
|
||||
|
||||
struct report_channel_list {
|
||||
uint8_t numChannels;
|
||||
uint8_t channelNumber[SIR_ESE_MAX_MEAS_IE_REQS];
|
||||
uint8_t num_channels;
|
||||
uint32_t chan_freq_lst[SIR_ESE_MAX_MEAS_IE_REQS];
|
||||
};
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
|
|
|
|||
|
|
@ -40,10 +40,11 @@ typedef enum eRrmMsgReqSource {
|
|||
eRRM_MSG_SOURCE_ESE_UPLOAD = 3, /* ese upload approach */
|
||||
} tRrmMsgReqSource;
|
||||
|
||||
typedef struct sSirChannelInfo {
|
||||
uint8_t regulatoryClass;
|
||||
uint8_t channelNum;
|
||||
} tSirChannelInfo, *tpSirChannelInfo;
|
||||
struct sir_channel_info {
|
||||
uint8_t reg_class;
|
||||
uint8_t chan_num;
|
||||
uint32_t chan_freq;
|
||||
};
|
||||
|
||||
typedef struct sSirBeaconReportReqInd {
|
||||
uint16_t messageType; /* eWNI_SME_BEACON_REPORT_REQ_IND */
|
||||
|
|
@ -51,14 +52,14 @@ typedef struct sSirBeaconReportReqInd {
|
|||
tSirMacAddr bssId;
|
||||
uint16_t measurementDuration[SIR_ESE_MAX_MEAS_IE_REQS]; /* ms */
|
||||
uint16_t randomizationInterval; /* ms */
|
||||
tSirChannelInfo channelInfo;
|
||||
struct sir_channel_info channel_info;
|
||||
/* 0: wildcard */
|
||||
tSirMacAddr macaddrBssid;
|
||||
/* 0:Passive, 1: Active, 2: table mode */
|
||||
uint8_t fMeasurementtype[SIR_ESE_MAX_MEAS_IE_REQS];
|
||||
tAniSSID ssId; /* May be wilcard. */
|
||||
uint16_t uDialogToken;
|
||||
struct report_channel_list channelList; /* From AP channel report. */
|
||||
struct report_channel_list channel_list; /* From AP channel report. */
|
||||
tRrmMsgReqSource msgSource;
|
||||
} tSirBeaconReportReqInd, *tpSirBeaconReportReqInd;
|
||||
|
||||
|
|
|
|||
|
|
@ -480,12 +480,15 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|||
tDot11fIEMeasurementRequest *pBeaconReq,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
tpSirBeaconReportReqInd pSmeBcnReportReq;
|
||||
uint8_t num_channels = 0, num_APChanReport;
|
||||
struct scheduler_msg mmh_msg = {0};
|
||||
tpSirBeaconReportReqInd psbrr;
|
||||
uint8_t num_rpt, idx_rpt;
|
||||
uint16_t measDuration, maxMeasduration;
|
||||
int8_t maxDuration;
|
||||
uint8_t sign;
|
||||
tDot11fIEAPChannelReport *ie_ap_chan_rpt;
|
||||
uint8_t tmp_idx;
|
||||
uint16_t ch_ctr = 0;
|
||||
|
||||
if (pBeaconReq->measurement_request.Beacon.BeaconReporting.present &&
|
||||
(pBeaconReq->measurement_request.Beacon.BeaconReporting.
|
||||
|
|
@ -573,80 +576,72 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|||
pCurrentReq->request.Beacon.reqIes.num);
|
||||
}
|
||||
|
||||
if (pBeaconReq->measurement_request.Beacon.num_APChannelReport) {
|
||||
for (num_APChanReport = 0;
|
||||
num_APChanReport <
|
||||
pBeaconReq->measurement_request.Beacon.num_APChannelReport;
|
||||
num_APChanReport++)
|
||||
num_channels +=
|
||||
pBeaconReq->measurement_request.Beacon.
|
||||
APChannelReport[num_APChanReport].num_channelList;
|
||||
}
|
||||
/* Prepare the request to send to SME. */
|
||||
pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
|
||||
if (!pSmeBcnReportReq)
|
||||
psbrr = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
|
||||
if (!psbrr)
|
||||
return eRRM_FAILURE;
|
||||
|
||||
/* Alloc memory for pSmeBcnReportReq, will be freed by other modules */
|
||||
qdf_mem_copy(pSmeBcnReportReq->bssId, pe_session->bssId,
|
||||
qdf_mem_copy(psbrr->bssId, pe_session->bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
|
||||
pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd);
|
||||
pSmeBcnReportReq->uDialogToken = pBeaconReq->measurement_token;
|
||||
pSmeBcnReportReq->msgSource = eRRM_MSG_SOURCE_11K;
|
||||
pSmeBcnReportReq->randomizationInterval =
|
||||
psbrr->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
|
||||
psbrr->length = sizeof(tSirBeaconReportReqInd);
|
||||
psbrr->uDialogToken = pBeaconReq->measurement_token;
|
||||
psbrr->msgSource = eRRM_MSG_SOURCE_11K;
|
||||
psbrr->randomizationInterval =
|
||||
SYS_TU_TO_MS(pBeaconReq->measurement_request.Beacon.randomization);
|
||||
pSmeBcnReportReq->channelInfo.regulatoryClass =
|
||||
psbrr->channel_info.reg_class =
|
||||
pBeaconReq->measurement_request.Beacon.regClass;
|
||||
pSmeBcnReportReq->channelInfo.channelNum =
|
||||
psbrr->channel_info.chan_num =
|
||||
pBeaconReq->measurement_request.Beacon.channel;
|
||||
pSmeBcnReportReq->measurementDuration[0] = measDuration;
|
||||
pSmeBcnReportReq->fMeasurementtype[0] =
|
||||
psbrr->channel_info.chan_freq =
|
||||
wlan_reg_chan_opclass_to_freq(psbrr->channel_info.chan_num,
|
||||
psbrr->channel_info.reg_class,
|
||||
false);
|
||||
psbrr->measurementDuration[0] = measDuration;
|
||||
psbrr->fMeasurementtype[0] =
|
||||
pBeaconReq->measurement_request.Beacon.meas_mode;
|
||||
qdf_mem_copy(pSmeBcnReportReq->macaddrBssid,
|
||||
qdf_mem_copy(psbrr->macaddrBssid,
|
||||
pBeaconReq->measurement_request.Beacon.BSSID,
|
||||
sizeof(tSirMacAddr));
|
||||
|
||||
if (pBeaconReq->measurement_request.Beacon.SSID.present) {
|
||||
pSmeBcnReportReq->ssId.length =
|
||||
psbrr->ssId.length =
|
||||
pBeaconReq->measurement_request.Beacon.SSID.num_ssid;
|
||||
qdf_mem_copy(pSmeBcnReportReq->ssId.ssId,
|
||||
qdf_mem_copy(psbrr->ssId.ssId,
|
||||
pBeaconReq->measurement_request.Beacon.SSID.ssid,
|
||||
pSmeBcnReportReq->ssId.length);
|
||||
psbrr->ssId.length);
|
||||
}
|
||||
|
||||
pCurrentReq->token = pBeaconReq->measurement_token;
|
||||
|
||||
pSmeBcnReportReq->channelList.numChannels = num_channels;
|
||||
if (pBeaconReq->measurement_request.Beacon.num_APChannelReport) {
|
||||
uint8_t *ch_lst = pSmeBcnReportReq->channelList.channelNumber;
|
||||
uint8_t len;
|
||||
uint16_t ch_ctr = 0;
|
||||
num_rpt = pBeaconReq->measurement_request.Beacon.num_APChannelReport;
|
||||
|
||||
for (num_APChanReport = 0;
|
||||
num_APChanReport <
|
||||
pBeaconReq->measurement_request.Beacon.num_APChannelReport;
|
||||
num_APChanReport++) {
|
||||
len = pBeaconReq->measurement_request.Beacon.
|
||||
APChannelReport[num_APChanReport].num_channelList;
|
||||
if (ch_ctr + len >
|
||||
sizeof(pSmeBcnReportReq->channelList.channelNumber))
|
||||
for (idx_rpt = 0; idx_rpt < num_rpt; idx_rpt++) {
|
||||
ie_ap_chan_rpt =
|
||||
&pBeaconReq->measurement_request.Beacon.APChannelReport[idx_rpt];
|
||||
for (tmp_idx = 0;
|
||||
tmp_idx < ie_ap_chan_rpt->num_channelList;
|
||||
tmp_idx++) {
|
||||
psbrr->channel_list.chan_freq_lst[ch_ctr++] =
|
||||
wlan_reg_chan_opclass_to_freq(
|
||||
ie_ap_chan_rpt->channelList[tmp_idx],
|
||||
ie_ap_chan_rpt->regulatoryClass,
|
||||
false);
|
||||
if (ch_ctr >= QDF_ARRAY_SIZE(psbrr->channel_list.chan_freq_lst))
|
||||
break;
|
||||
|
||||
qdf_mem_copy(&ch_lst[ch_ctr],
|
||||
pBeaconReq->measurement_request.Beacon.
|
||||
APChannelReport[num_APChanReport].
|
||||
channelList, len);
|
||||
|
||||
ch_ctr += len;
|
||||
}
|
||||
if (ch_ctr >= QDF_ARRAY_SIZE(psbrr->channel_list.chan_freq_lst))
|
||||
break;
|
||||
}
|
||||
psbrr->channel_list.num_channels = ch_ctr;
|
||||
|
||||
/* Send request to SME. */
|
||||
mmhMsg.type = eWNI_SME_BEACON_REPORT_REQ_IND;
|
||||
mmhMsg.bodyptr = pSmeBcnReportReq;
|
||||
mmh_msg.type = eWNI_SME_BEACON_REPORT_REQ_IND;
|
||||
mmh_msg.bodyptr = psbrr;
|
||||
MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG,
|
||||
pe_session->peSessionId, mmhMsg.type));
|
||||
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
|
||||
pe_session->peSessionId, mmh_msg.type));
|
||||
lim_sys_process_mmh_msg_api(mac, &mmh_msg);
|
||||
return eRRM_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1639,55 +1639,55 @@ QDF_STATUS sme_set_ese_beacon_request(mac_handle_t mac_handle,
|
|||
{
|
||||
QDF_STATUS status;
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
tpSirBeaconReportReqInd pSmeBcnReportReq = NULL;
|
||||
const tCsrEseBeaconReqParams *pBeaconReq = NULL;
|
||||
tpSirBeaconReportReqInd sme_bcn_rpt_req = NULL;
|
||||
const tCsrEseBeaconReqParams *bcn_req = NULL;
|
||||
uint8_t counter = 0;
|
||||
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
|
||||
tpRrmSMEContext pSmeRrmContext = &mac->rrm.rrmSmeContext;
|
||||
struct csr_roam_session *session = CSR_GET_SESSION(mac, sessionId);
|
||||
tpRrmSMEContext sme_rrm_ctx = &mac->rrm.rrmSmeContext;
|
||||
|
||||
if (pSmeRrmContext->eseBcnReqInProgress == true) {
|
||||
if (sme_rrm_ctx->eseBcnReqInProgress == true) {
|
||||
sme_err("A Beacon Report Req is already in progress");
|
||||
return QDF_STATUS_E_RESOURCES;
|
||||
}
|
||||
|
||||
/* Store the info in RRM context */
|
||||
qdf_mem_copy(&pSmeRrmContext->eseBcnReqInfo, in_req,
|
||||
qdf_mem_copy(&sme_rrm_ctx->eseBcnReqInfo, in_req,
|
||||
sizeof(tCsrEseBeaconReq));
|
||||
|
||||
/* Prepare the request to send to SME. */
|
||||
pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
|
||||
if (!pSmeBcnReportReq)
|
||||
sme_bcn_rpt_req = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
|
||||
if (!sme_bcn_rpt_req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
pSmeRrmContext->eseBcnReqInProgress = true;
|
||||
sme_rrm_ctx->eseBcnReqInProgress = true;
|
||||
|
||||
sme_debug("Sending Beacon Report Req to SME");
|
||||
|
||||
pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
|
||||
pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd);
|
||||
qdf_mem_copy(pSmeBcnReportReq->bssId,
|
||||
pSession->connectedProfile.bssid.bytes,
|
||||
sme_bcn_rpt_req->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
|
||||
sme_bcn_rpt_req->length = sizeof(tSirBeaconReportReqInd);
|
||||
qdf_mem_copy(sme_bcn_rpt_req->bssId,
|
||||
session->connectedProfile.bssid.bytes,
|
||||
sizeof(tSirMacAddr));
|
||||
pSmeBcnReportReq->channelInfo.channelNum = 255;
|
||||
pSmeBcnReportReq->channelList.numChannels = in_req->numBcnReqIe;
|
||||
pSmeBcnReportReq->msgSource = eRRM_MSG_SOURCE_ESE_UPLOAD;
|
||||
sme_bcn_rpt_req->channel_info.chan_num = 255;
|
||||
sme_bcn_rpt_req->channel_list.num_channels = in_req->numBcnReqIe;
|
||||
sme_bcn_rpt_req->msgSource = eRRM_MSG_SOURCE_ESE_UPLOAD;
|
||||
|
||||
for (counter = 0; counter < in_req->numBcnReqIe; counter++) {
|
||||
pBeaconReq = &in_req->bcnReq[counter];
|
||||
pSmeBcnReportReq->fMeasurementtype[counter] =
|
||||
pBeaconReq->scanMode;
|
||||
pSmeBcnReportReq->measurementDuration[counter] =
|
||||
SYS_TU_TO_MS(pBeaconReq->measurementDuration);
|
||||
pSmeBcnReportReq->channelList.channelNumber[counter] =
|
||||
wlan_reg_freq_to_chan(mac->pdev, pBeaconReq->ch_freq);
|
||||
bcn_req = &in_req->bcnReq[counter];
|
||||
sme_bcn_rpt_req->fMeasurementtype[counter] =
|
||||
bcn_req->scanMode;
|
||||
sme_bcn_rpt_req->measurementDuration[counter] =
|
||||
SYS_TU_TO_MS(bcn_req->measurementDuration);
|
||||
sme_bcn_rpt_req->channel_list.chan_freq_lst[counter] =
|
||||
bcn_req->ch_freq;
|
||||
}
|
||||
|
||||
status = sme_rrm_process_beacon_report_req_ind(mac, pSmeBcnReportReq);
|
||||
status = sme_rrm_process_beacon_report_req_ind(mac, sme_bcn_rpt_req);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
pSmeRrmContext->eseBcnReqInProgress = false;
|
||||
sme_rrm_ctx->eseBcnReqInProgress = false;
|
||||
|
||||
qdf_mem_free(pSmeBcnReportReq);
|
||||
qdf_mem_free(sme_bcn_rpt_req);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1018,8 +1018,8 @@ static uint8_t *sme_rrm_get_meas_mode_string(uint8_t meas_mode)
|
|||
QDF_STATUS sme_rrm_process_beacon_report_req_ind(struct mac_context *mac,
|
||||
void *msg_buf)
|
||||
{
|
||||
tpSirBeaconReportReqInd pBeaconReq = (tpSirBeaconReportReqInd)msg_buf;
|
||||
tpRrmSMEContext pSmeRrmContext = &mac->rrm.rrmSmeContext;
|
||||
tpSirBeaconReportReqInd beacon_req = (tpSirBeaconReportReqInd)msg_buf;
|
||||
tpRrmSMEContext sme_rrm_ctx = &mac->rrm.rrmSmeContext;
|
||||
uint32_t len = 0, i = 0;
|
||||
uint8_t country[WNI_CFG_COUNTRY_CODE_LEN];
|
||||
uint32_t session_id;
|
||||
|
|
@ -1028,10 +1028,10 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(struct mac_context *mac,
|
|||
uint32_t num_chan;
|
||||
bool chan_valid;
|
||||
uint32_t *rrm_freq_list;
|
||||
uint8_t bcn_chan;
|
||||
uint32_t bcn_chan_freq;
|
||||
|
||||
status = csr_roam_get_session_id_from_bssid(mac, (struct qdf_mac_addr *)
|
||||
pBeaconReq->bssId,
|
||||
beacon_req->bssId,
|
||||
&session_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
sme_err("sme session ID not found for bssid");
|
||||
|
|
@ -1052,152 +1052,151 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(struct mac_context *mac,
|
|||
else
|
||||
country[2] = OP_CLASS_GLOBAL;
|
||||
|
||||
sme_debug("Channel = %d", pBeaconReq->channelInfo.channelNum);
|
||||
sme_debug("Channel = %d", beacon_req->channel_info.chan_num);
|
||||
|
||||
sme_debug("Request Reg class %d, AP's country code %c%c 0x%x",
|
||||
pBeaconReq->channelInfo.regulatoryClass,
|
||||
beacon_req->channel_info.reg_class,
|
||||
country[0], country[1], country[2]);
|
||||
|
||||
if (pBeaconReq->channelList.numChannels >
|
||||
SIR_ESE_MAX_MEAS_IE_REQS) {
|
||||
if (beacon_req->channel_list.num_channels > SIR_ESE_MAX_MEAS_IE_REQS) {
|
||||
sme_err("Beacon report request numChannels:%u exceeds max num channels",
|
||||
pBeaconReq->channelList.numChannels);
|
||||
beacon_req->channel_list.num_channels);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* section 11.10.8.1 (IEEE Std 802.11k-2008) */
|
||||
/* channel 0 and 255 has special meaning. */
|
||||
if ((pBeaconReq->channelInfo.channelNum == 0) ||
|
||||
((pBeaconReq->channelInfo.channelNum == 255)
|
||||
&& (pBeaconReq->channelList.numChannels == 0))) {
|
||||
if ((beacon_req->channel_info.chan_num == 0) ||
|
||||
((beacon_req->channel_info.chan_num == 255) &&
|
||||
(beacon_req->channel_list.num_channels == 0))) {
|
||||
/* Add all the channel in the regulatory domain. */
|
||||
len = mac->mlme_cfg->reg.valid_channel_list_num;
|
||||
if (pSmeRrmContext->channelList.freq_list) {
|
||||
qdf_mem_free(pSmeRrmContext->channelList.freq_list);
|
||||
pSmeRrmContext->channelList.freq_list = NULL;
|
||||
if (sme_rrm_ctx->channelList.freq_list) {
|
||||
qdf_mem_free(sme_rrm_ctx->channelList.freq_list);
|
||||
sme_rrm_ctx->channelList.freq_list = NULL;
|
||||
}
|
||||
pSmeRrmContext->channelList.freq_list =
|
||||
sme_rrm_ctx->channelList.freq_list =
|
||||
qdf_mem_malloc(sizeof(uint32_t) * len);
|
||||
if (!pSmeRrmContext->channelList.freq_list) {
|
||||
if (!sme_rrm_ctx->channelList.freq_list) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
pSmeRrmContext->channelList.numOfChannels = 0;
|
||||
sme_rrm_ctx->channelList.numOfChannels = 0;
|
||||
goto cleanup;
|
||||
}
|
||||
csr_get_cfg_valid_channels(
|
||||
mac, pSmeRrmContext->channelList.freq_list, &len);
|
||||
|
||||
if (pBeaconReq->channelInfo.regulatoryClass) {
|
||||
if (sme_rrm_fill_scan_channels(mac, country,
|
||||
pSmeRrmContext,
|
||||
pBeaconReq->channelInfo.
|
||||
regulatoryClass, len) !=
|
||||
csr_get_cfg_valid_channels(
|
||||
mac, sme_rrm_ctx->channelList.freq_list, &len);
|
||||
|
||||
if (beacon_req->channel_info.reg_class) {
|
||||
if (sme_rrm_fill_scan_channels(
|
||||
mac, country, sme_rrm_ctx,
|
||||
beacon_req->channel_info.reg_class, len) !=
|
||||
QDF_STATUS_SUCCESS)
|
||||
goto cleanup;
|
||||
} else {
|
||||
pSmeRrmContext->channelList.numOfChannels = len;
|
||||
sme_rrm_ctx->channelList.numOfChannels = len;
|
||||
}
|
||||
} else {
|
||||
len = 0;
|
||||
pSmeRrmContext->channelList.numOfChannels = 0;
|
||||
sme_rrm_ctx->channelList.numOfChannels = 0;
|
||||
num_chan = 0;
|
||||
|
||||
/* If valid channel is present. We first Measure on the given
|
||||
* channel and if there are additional channels present in
|
||||
* APchannelreport, measure on these also.
|
||||
*/
|
||||
if (pBeaconReq->channelInfo.channelNum != 255)
|
||||
if (beacon_req->channel_info.chan_num != 255)
|
||||
len = 1;
|
||||
|
||||
len += pBeaconReq->channelList.numChannels;
|
||||
len += beacon_req->channel_list.num_channels;
|
||||
|
||||
if (pSmeRrmContext->channelList.freq_list) {
|
||||
qdf_mem_free(pSmeRrmContext->channelList.freq_list);
|
||||
pSmeRrmContext->channelList.freq_list = NULL;
|
||||
if (sme_rrm_ctx->channelList.freq_list) {
|
||||
qdf_mem_free(sme_rrm_ctx->channelList.freq_list);
|
||||
sme_rrm_ctx->channelList.freq_list = NULL;
|
||||
}
|
||||
pSmeRrmContext->channelList.freq_list =
|
||||
sme_rrm_ctx->channelList.freq_list =
|
||||
qdf_mem_malloc(sizeof(uint32_t) * len);
|
||||
if (!pSmeRrmContext->channelList.freq_list) {
|
||||
pSmeRrmContext->channelList.numOfChannels = 0;
|
||||
if (!sme_rrm_ctx->channelList.freq_list) {
|
||||
sme_rrm_ctx->channelList.numOfChannels = 0;
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
rrm_freq_list = pSmeRrmContext->channelList.freq_list;
|
||||
bcn_chan = pBeaconReq->channelInfo.channelNum;
|
||||
rrm_freq_list = sme_rrm_ctx->channelList.freq_list;
|
||||
bcn_chan_freq = beacon_req->channel_info.chan_freq;
|
||||
|
||||
if (bcn_chan != 255) {
|
||||
chan_valid = csr_roam_is_channel_valid(mac, bcn_chan);
|
||||
if (beacon_req->channel_info.chan_num != 255) {
|
||||
chan_valid =
|
||||
csr_roam_is_chan_freq_valid(mac, bcn_chan_freq);
|
||||
|
||||
if (chan_valid) {
|
||||
rrm_freq_list[num_chan] =
|
||||
wlan_reg_chan_to_freq(mac->pdev,
|
||||
bcn_chan);
|
||||
rrm_freq_list[num_chan] = bcn_chan_freq;
|
||||
num_chan++;
|
||||
} else {
|
||||
sme_err("Invalid channel: %d",
|
||||
pBeaconReq->channelInfo.channelNum);
|
||||
beacon_req->channel_info.chan_num);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < pBeaconReq->channelList.numChannels; i++) {
|
||||
bcn_chan = pBeaconReq->channelList.channelNumber[i];
|
||||
chan_valid = csr_roam_is_channel_valid(mac, bcn_chan);
|
||||
for (i = 0; i < beacon_req->channel_list.num_channels; i++) {
|
||||
bcn_chan_freq =
|
||||
beacon_req->channel_list.chan_freq_lst[i];
|
||||
chan_valid =
|
||||
csr_roam_is_chan_freq_valid(mac,
|
||||
bcn_chan_freq);
|
||||
|
||||
if (chan_valid) {
|
||||
rrm_freq_list[num_chan] =
|
||||
wlan_reg_chan_to_freq(mac->pdev,
|
||||
bcn_chan);
|
||||
rrm_freq_list[num_chan] = bcn_chan_freq;
|
||||
num_chan++;
|
||||
}
|
||||
}
|
||||
|
||||
pSmeRrmContext->channelList.numOfChannels = num_chan;
|
||||
sme_rrm_ctx->channelList.numOfChannels = num_chan;
|
||||
}
|
||||
|
||||
/* Copy session bssid */
|
||||
qdf_mem_copy(pSmeRrmContext->sessionBssId.bytes, pBeaconReq->bssId,
|
||||
qdf_mem_copy(sme_rrm_ctx->sessionBssId.bytes, beacon_req->bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
|
||||
/* copy measurement bssid */
|
||||
qdf_mem_copy(pSmeRrmContext->bssId, pBeaconReq->macaddrBssid,
|
||||
qdf_mem_copy(sme_rrm_ctx->bssId, beacon_req->macaddrBssid,
|
||||
sizeof(tSirMacAddr));
|
||||
|
||||
/* Copy ssid */
|
||||
qdf_mem_copy(&pSmeRrmContext->ssId, &pBeaconReq->ssId,
|
||||
qdf_mem_copy(&sme_rrm_ctx->ssId, &beacon_req->ssId,
|
||||
sizeof(tAniSSID));
|
||||
|
||||
pSmeRrmContext->token = pBeaconReq->uDialogToken;
|
||||
pSmeRrmContext->regClass = pBeaconReq->channelInfo.regulatoryClass;
|
||||
pSmeRrmContext->randnIntvl =
|
||||
QDF_MAX(pBeaconReq->randomizationInterval,
|
||||
pSmeRrmContext->rrmConfig.max_randn_interval);
|
||||
pSmeRrmContext->currentIndex = 0;
|
||||
pSmeRrmContext->msgSource = pBeaconReq->msgSource;
|
||||
qdf_mem_copy((uint8_t *) &pSmeRrmContext->measMode,
|
||||
(uint8_t *) &pBeaconReq->fMeasurementtype,
|
||||
sme_rrm_ctx->token = beacon_req->uDialogToken;
|
||||
sme_rrm_ctx->regClass = beacon_req->channel_info.reg_class;
|
||||
sme_rrm_ctx->randnIntvl =
|
||||
QDF_MAX(beacon_req->randomizationInterval,
|
||||
sme_rrm_ctx->rrmConfig.max_randn_interval);
|
||||
sme_rrm_ctx->currentIndex = 0;
|
||||
sme_rrm_ctx->msgSource = beacon_req->msgSource;
|
||||
qdf_mem_copy((uint8_t *)&sme_rrm_ctx->measMode,
|
||||
(uint8_t *)&beacon_req->fMeasurementtype,
|
||||
SIR_ESE_MAX_MEAS_IE_REQS);
|
||||
qdf_mem_copy((uint8_t *) &pSmeRrmContext->duration,
|
||||
(uint8_t *) &pBeaconReq->measurementDuration,
|
||||
qdf_mem_copy((uint8_t *)&sme_rrm_ctx->duration,
|
||||
(uint8_t *)&beacon_req->measurementDuration,
|
||||
SIR_ESE_MAX_MEAS_IE_REQS);
|
||||
|
||||
sme_debug("token: %d regClass: %d randnIntvl: %d msgSource: %d measurementduration %d, rrm_ctx duration %d Meas_mode: %s",
|
||||
pSmeRrmContext->token, pSmeRrmContext->regClass,
|
||||
pSmeRrmContext->randnIntvl, pSmeRrmContext->msgSource,
|
||||
pBeaconReq->measurementDuration[0],
|
||||
pSmeRrmContext->duration[0],
|
||||
sme_rrm_get_meas_mode_string(pSmeRrmContext->measMode[0]));
|
||||
sme_rrm_ctx->token, sme_rrm_ctx->regClass,
|
||||
sme_rrm_ctx->randnIntvl, sme_rrm_ctx->msgSource,
|
||||
beacon_req->measurementDuration[0],
|
||||
sme_rrm_ctx->duration[0],
|
||||
sme_rrm_get_meas_mode_string(sme_rrm_ctx->measMode[0]));
|
||||
|
||||
return sme_rrm_issue_scan_req(mac);
|
||||
|
||||
cleanup:
|
||||
if (pBeaconReq->msgSource == eRRM_MSG_SOURCE_11K) {
|
||||
if (beacon_req->msgSource == eRRM_MSG_SOURCE_11K) {
|
||||
/* Copy session bssid */
|
||||
qdf_mem_copy(pSmeRrmContext->sessionBssId.bytes,
|
||||
pBeaconReq->bssId, sizeof(tSirMacAddr));
|
||||
qdf_mem_copy(sme_rrm_ctx->sessionBssId.bytes,
|
||||
beacon_req->bssId, sizeof(tSirMacAddr));
|
||||
|
||||
/* copy measurement bssid */
|
||||
qdf_mem_copy(pSmeRrmContext->bssId, pBeaconReq->macaddrBssid,
|
||||
qdf_mem_copy(sme_rrm_ctx->bssId, beacon_req->macaddrBssid,
|
||||
sizeof(tSirMacAddr));
|
||||
sme_rrm_send_beacon_report_xmit_ind(mac, NULL, true, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue