|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -496,8 +496,11 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
int8_t maxDuration;
|
|
|
uint8_t sign;
|
|
|
tDot11fIEAPChannelReport *ie_ap_chan_rpt;
|
|
|
- uint8_t tmp_idx;
|
|
|
+ uint8_t tmp_idx, buf_left, buf_cons;
|
|
|
uint16_t ch_ctr = 0;
|
|
|
+ char req_ssid[WLAN_SSID_MAX_LEN] = {0};
|
|
|
+ char ch_buf[RRM_CH_BUF_LEN];
|
|
|
+ char *tmp_buf = NULL;
|
|
|
|
|
|
if (pBeaconReq->measurement_request.Beacon.BeaconReporting.present &&
|
|
|
(pBeaconReq->measurement_request.Beacon.BeaconReporting.
|
|
@@ -507,7 +510,7 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
/* Beacon reporting should not be included in request if number of repetitons is zero. */
|
|
|
/* IEEE Std 802.11k-2008 Table 7-29g and section 11.10.8.1 */
|
|
|
|
|
|
- pe_err("Dropping the request: Reporting condition included in beacon report request and it is not zero");
|
|
|
+ pe_nofl_err("RX: [802.11 BCN_RPT] Dropping req: Reporting condition included is not zero");
|
|
|
return eRRM_INCAPABLE;
|
|
|
}
|
|
|
|
|
@@ -533,19 +536,31 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
|
|
|
measDuration = pBeaconReq->measurement_request.Beacon.meas_duration;
|
|
|
|
|
|
- pe_info("maxDuration = %d sign = %d maxMeasduration = %d measDuration = %d",
|
|
|
- maxDuration, sign, maxMeasduration, measDuration);
|
|
|
+ if (pBeaconReq->measurement_request.Beacon.SSID.present)
|
|
|
+ qdf_snprintf(req_ssid, WLAN_SSID_MAX_LEN, "%s",
|
|
|
+ pBeaconReq->measurement_request.Beacon.SSID.ssid);
|
|
|
+
|
|
|
+ pe_nofl_info("RX: [802.11 BCN_RPT] SSID:%s BSSID:%pM Token:%d op_class:%d ch:%d meas_mode:%d meas_duration:%d",
|
|
|
+ req_ssid, pBeaconReq->measurement_request.Beacon.BSSID,
|
|
|
+ pBeaconReq->measurement_token,
|
|
|
+ pBeaconReq->measurement_request.Beacon.regClass,
|
|
|
+ pBeaconReq->measurement_request.Beacon.channel,
|
|
|
+ pBeaconReq->measurement_request.Beacon.meas_mode,
|
|
|
+ measDuration);
|
|
|
+
|
|
|
+ pe_debug("RX: [802.11 BCN_RPT] max_dur: %d sign: %d max_meas_dur: %d",
|
|
|
+ maxDuration, sign, maxMeasduration);
|
|
|
|
|
|
if (measDuration == 0 &&
|
|
|
pBeaconReq->measurement_request.Beacon.meas_mode !=
|
|
|
eSIR_BEACON_TABLE) {
|
|
|
- pe_err("Invalid measurement duration");
|
|
|
+ pe_nofl_err("RX: [802.11 BCN_RPT] Invalid measurement duration");
|
|
|
return eRRM_REFUSED;
|
|
|
}
|
|
|
|
|
|
if (maxMeasduration < measDuration) {
|
|
|
if (pBeaconReq->durationMandatory) {
|
|
|
- pe_err("Dropping the request: duration mandatory and maxduration > measduration");
|
|
|
+ pe_nofl_err("RX: [802.11 BCN_RPT] Dropping the req: duration mandatory & maxduration > measduration");
|
|
|
return eRRM_REFUSED;
|
|
|
} else
|
|
|
measDuration = maxMeasduration;
|
|
@@ -561,18 +576,17 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
pCurrentReq->request.Beacon.last_beacon_report_indication =
|
|
|
pBeaconReq->measurement_request.Beacon.
|
|
|
last_beacon_report_indication.last_fragment;
|
|
|
- pe_debug("Last Beacon Report in request = %d",
|
|
|
- pCurrentReq->request.Beacon.
|
|
|
- last_beacon_report_indication);
|
|
|
+ pe_debug("RX: [802.11 BCN_RPT] Last Bcn Report in the req: %d",
|
|
|
+ pCurrentReq->request.Beacon.last_beacon_report_indication);
|
|
|
} else {
|
|
|
pCurrentReq->request.Beacon.last_beacon_report_indication = 0;
|
|
|
- pe_debug("Last Beacon report not present in request");
|
|
|
+ pe_debug("RX: [802.11 BCN_RPT] Last Bcn rpt ind not present");
|
|
|
}
|
|
|
|
|
|
if (pBeaconReq->measurement_request.Beacon.RequestedInfo.present) {
|
|
|
if (!pBeaconReq->measurement_request.Beacon.RequestedInfo.
|
|
|
num_requested_eids) {
|
|
|
- pe_debug("802.11k BCN RPT: Requested num of EID is 0");
|
|
|
+ pe_debug("RX: [802.11 BCN_RPT]: Requested num of EID is 0");
|
|
|
return eRRM_FAILURE;
|
|
|
}
|
|
|
pCurrentReq->request.Beacon.reqIes.pElementIds =
|
|
@@ -589,7 +603,7 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
pBeaconReq->measurement_request.Beacon.
|
|
|
RequestedInfo.requested_eids,
|
|
|
pCurrentReq->request.Beacon.reqIes.num);
|
|
|
- pe_debug("802.11k BCN RPT: Requested EIDs: num:[%d]",
|
|
|
+ pe_debug("RX: [802.11 BCN_RPT] Requested EIDs:[%d]",
|
|
|
pCurrentReq->request.Beacon.reqIes.num);
|
|
|
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
|
|
|
pCurrentReq->request.Beacon.reqIes.pElementIds,
|
|
@@ -614,7 +628,7 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
if (!wlan_reg_is_6ghz_supported(mac->pdev) &&
|
|
|
(wlan_reg_is_6ghz_op_class(mac->pdev,
|
|
|
pBeaconReq->measurement_request.Beacon.regClass))) {
|
|
|
- pe_err("channel belongs to 6 ghz spectrum, abort");
|
|
|
+ pe_nofl_err("RX: [802.11 BCN_RPT] Ch belongs to 6 ghz spectrum, abort");
|
|
|
qdf_mem_free(psbrr);
|
|
|
return eRRM_FAILURE;
|
|
|
}
|
|
@@ -654,7 +668,7 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
if (!wlan_reg_is_6ghz_supported(mac->pdev) &&
|
|
|
(wlan_reg_is_6ghz_op_class(mac->pdev,
|
|
|
ie_ap_chan_rpt->regulatoryClass))) {
|
|
|
- pe_err("channel belongs to 6 ghz spectrum, abort");
|
|
|
+ pe_nofl_err("RX: [802.11 BCN_RPT] Ch belongs to 6 ghz spectrum, abort");
|
|
|
qdf_mem_free(psbrr);
|
|
|
return eRRM_FAILURE;
|
|
|
}
|
|
@@ -670,7 +684,19 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|
|
if (ch_ctr >= QDF_ARRAY_SIZE(psbrr->channel_list.chan_freq_lst))
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
psbrr->channel_list.num_channels = ch_ctr;
|
|
|
+ buf_left = sizeof(ch_buf);
|
|
|
+ tmp_buf = ch_buf;
|
|
|
+ for (idx_rpt = 0; idx_rpt < ch_ctr; idx_rpt++) {
|
|
|
+ buf_cons = qdf_snprint(tmp_buf, buf_left, "%d ",
|
|
|
+ psbrr->channel_list.chan_freq_lst[idx_rpt]);
|
|
|
+ buf_left -= buf_cons;
|
|
|
+ tmp_buf += buf_cons;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ch_ctr)
|
|
|
+ pe_nofl_info("RX: [802.11 BCN_RPT] Ch-list:%s", ch_buf);
|
|
|
|
|
|
/* Send request to SME. */
|
|
|
mmh_msg.type = eWNI_SME_BEACON_REPORT_REQ_IND;
|
|
@@ -853,7 +879,8 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
session_entry = pe_find_session_by_bssid(mac_ctx,
|
|
|
beacon_xmit_ind->bssId, &session_id);
|
|
|
if (!session_entry) {
|
|
|
- pe_err("session does not exist for given bssId");
|
|
|
+ pe_err("TX: [802.11 BCN_RPT] Session does not exist for bssId:%pM",
|
|
|
+ beacon_xmit_ind->bssId);
|
|
|
status = QDF_STATUS_E_FAILURE;
|
|
|
goto end;
|
|
|
}
|
|
@@ -868,18 +895,18 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
|
|
|
for (i = 0; i < MAX_BEACON_REPORTS &&
|
|
|
bss_desc_count < beacon_xmit_ind->numBssDesc; i++) {
|
|
|
- beacon_report =
|
|
|
- &report[i].report.beaconReport;
|
|
|
+ beacon_report = &report[i].report.beaconReport;
|
|
|
/*
|
|
|
* If the scan result is NULL then send report request
|
|
|
* with option subelement as NULL.
|
|
|
*/
|
|
|
- pe_debug("report %d bss %d", i, bss_desc_count);
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] report %d bss %d", i,
|
|
|
+ bss_desc_count);
|
|
|
bss_desc = beacon_xmit_ind->
|
|
|
pBssDescription[bss_desc_count];
|
|
|
+
|
|
|
/* Prepare the beacon report and send it to the peer.*/
|
|
|
- report[i].token =
|
|
|
- beacon_xmit_ind->uDialogToken;
|
|
|
+ report[i].token = beacon_xmit_ind->uDialogToken;
|
|
|
report[i].refused = 0;
|
|
|
report[i].incapable = 0;
|
|
|
report[i].type = SIR_MAC_RRM_BEACON_TYPE;
|
|
@@ -914,11 +941,11 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
switch (curr_req->request.Beacon.reportingDetail) {
|
|
|
case BEACON_REPORTING_DETAIL_NO_FF_IE:
|
|
|
/* 0: No need to include any elements. */
|
|
|
- pe_debug("No reporting detail requested");
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] No reporting detail requested");
|
|
|
break;
|
|
|
case BEACON_REPORTING_DETAIL_ALL_FF_REQ_IE:
|
|
|
/* 1: Include all FFs and Requested Ies. */
|
|
|
- pe_debug("Only requested IEs in reporting detail requested");
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] Only requested IEs in reporting detail requested");
|
|
|
|
|
|
if (!bss_desc)
|
|
|
break;
|
|
@@ -935,7 +962,7 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
case BEACON_REPORTING_DETAIL_ALL_FF_IE:
|
|
|
/* 2: default - Include all FFs and all Ies. */
|
|
|
default:
|
|
|
- pe_debug("Default all IEs and FFs");
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] Default all IEs and FFs");
|
|
|
if (!bss_desc)
|
|
|
break;
|
|
|
|
|
@@ -962,7 +989,7 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
last_beacon_report_indication) {
|
|
|
offset = GET_IE_LEN_IN_BSS(
|
|
|
bss_desc->length) - rem_len;
|
|
|
- pe_debug("offset %d ie_len %lu rem_len %d frag_id %d",
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] offset %d ie_len %lu rem_len %d frag_id %d",
|
|
|
offset,
|
|
|
GET_IE_LEN_IN_BSS(bss_desc->length),
|
|
|
rem_len, frag_id);
|
|
@@ -975,17 +1002,17 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
false;
|
|
|
frag_id = 0;
|
|
|
bss_desc_count++;
|
|
|
- pe_debug("No remaining IEs");
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] No remaining IEs");
|
|
|
}
|
|
|
|
|
|
if (curr_req->request.Beacon.
|
|
|
last_beacon_report_indication) {
|
|
|
- pe_debug("Setting last beacon report support");
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] Setting last beacon report support");
|
|
|
beacon_report->last_bcn_report_ind_support = 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- pe_debug("Total reports filled %d", i);
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] Total reports filled %d", i);
|
|
|
num_frames = i / RADIO_REPORTS_MAX_IN_A_FRAME;
|
|
|
if (i % RADIO_REPORTS_MAX_IN_A_FRAME)
|
|
|
num_frames++;
|
|
@@ -994,7 +1021,7 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
|
|
|
num_reports_in_frame = QDF_MIN((i - report_index),
|
|
|
RADIO_REPORTS_MAX_IN_A_FRAME);
|
|
|
|
|
|
- pe_debug("Sending Action frame number %d",
|
|
|
+ pe_debug("TX: [802.11 BCN_RPT] Sending Action frame number %d",
|
|
|
num_reports_in_frame);
|
|
|
lim_send_radio_measure_report_action_frame(mac_ctx,
|
|
|
curr_req->dialog_token, num_reports_in_frame,
|
|
@@ -1045,8 +1072,8 @@ static void rrm_process_beacon_request_failure(struct mac_context *mac,
|
|
|
pReport->incapable = 1;
|
|
|
break;
|
|
|
default:
|
|
|
- pe_err("Beacon request processing failed no report sent with status %d",
|
|
|
- status);
|
|
|
+ pe_err("RX [802.11 BCN_RPT] Beacon request processing failed no report sent with status %d",
|
|
|
+ status);
|
|
|
qdf_mem_free(pReport);
|
|
|
return;
|
|
|
}
|
|
@@ -1199,7 +1226,7 @@ rrm_process_radio_measurement_request(struct mac_context *mac_ctx,
|
|
|
report = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
|
|
|
if (!report)
|
|
|
return QDF_STATUS_E_NOMEM;
|
|
|
- pe_err("No requestIes in the measurement request, sending incapable report");
|
|
|
+ pe_err("RX: [802.11 RRM] No requestIes in the measurement request, sending incapable report");
|
|
|
report->incapable = 1;
|
|
|
num_report = 1;
|
|
|
lim_send_radio_measure_report_action_frame(mac_ctx,
|
|
@@ -1210,7 +1237,7 @@ rrm_process_radio_measurement_request(struct mac_context *mac_ctx,
|
|
|
}
|
|
|
/* PF Fix */
|
|
|
if (rrm_req->NumOfRepetitions.repetitions > 0) {
|
|
|
- pe_info("number of repetitions %d",
|
|
|
+ pe_info("RX: [802.11 RRM] number of repetitions %d, sending incapable report",
|
|
|
rrm_req->NumOfRepetitions.repetitions);
|
|
|
/*
|
|
|
* Send a report with incapable bit set.
|