mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Check for 6 ghz operating class in IEs
For legacy platforms, due to channel number ambiguity between 6ghz and 5/2.4 channels, operating class should be checked while processing management frames. Therefore check the operating class in the relevant IEs. Change-Id: I85b9d3da0430e6448480d47dc95b2fdfa8b6e288 CRs-Fixed: 2556219
This commit is contained in:
parent
8e4c902786
commit
999bd8a3aa
2 changed files with 42 additions and 6 deletions
|
|
@ -360,10 +360,20 @@ lim_process_ext_channel_switch_action_frame(struct mac_context *mac_ctx,
|
|||
status, frame_len);
|
||||
}
|
||||
|
||||
if (!wlan_reg_is_6ghz_supported(mac_ctx->pdev) &&
|
||||
(wlan_reg_is_6ghz_op_class(mac_ctx->pdev,
|
||||
ext_channel_switch_frame->
|
||||
ext_chan_switch_ann_action.op_class))) {
|
||||
pe_err("channel belongs to 6 ghz spectrum, abort");
|
||||
qdf_mem_free(ext_channel_switch_frame);
|
||||
return;
|
||||
}
|
||||
|
||||
target_freq =
|
||||
wlan_reg_chan_opclass_to_freq(ext_channel_switch_frame->ext_chan_switch_ann_action.new_channel,
|
||||
ext_channel_switch_frame->ext_chan_switch_ann_action.op_class,
|
||||
false);
|
||||
wlan_reg_chan_opclass_to_freq(ext_channel_switch_frame->ext_chan_switch_ann_action.new_channel,
|
||||
ext_channel_switch_frame->ext_chan_switch_ann_action.op_class,
|
||||
false);
|
||||
|
||||
/* Free ext_channel_switch_frame here as its no longer needed */
|
||||
qdf_mem_free(ext_channel_switch_frame);
|
||||
/*
|
||||
|
|
@ -1392,6 +1402,7 @@ __lim_process_neighbor_report(struct mac_context *mac, uint8_t *pRxPacketInfo,
|
|||
pe_debug("There were warnings while unpacking a Neighbor report response (0x%08x, %d bytes):",
|
||||
nStatus, frameLen);
|
||||
}
|
||||
|
||||
/* Call rrm function to handle the request. */
|
||||
rrm_process_neighbor_report_response(mac, pFrm, pe_session);
|
||||
|
||||
|
|
|
|||
|
|
@ -372,6 +372,15 @@ rrm_process_neighbor_report_response(struct mac_context *mac,
|
|||
fMobilityDomain =
|
||||
pNeighborRep->NeighborReport[i].MobilityDomain;
|
||||
|
||||
if (!wlan_reg_is_6ghz_supported(mac->pdev) &&
|
||||
(wlan_reg_is_6ghz_op_class(mac->pdev,
|
||||
pNeighborRep->NeighborReport[i].
|
||||
regulatoryClass))) {
|
||||
pe_err("channel belongs to 6 ghz spectrum, abort");
|
||||
qdf_mem_free(pSmeNeighborRpt);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pSmeNeighborRpt->sNeighborBssDescription[i].regClass =
|
||||
pNeighborRep->NeighborReport[i].regulatoryClass;
|
||||
pSmeNeighborRpt->sNeighborBssDescription[i].channel =
|
||||
|
|
@ -590,10 +599,19 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|||
psbrr->msgSource = eRRM_MSG_SOURCE_11K;
|
||||
psbrr->randomizationInterval =
|
||||
SYS_TU_TO_MS(pBeaconReq->measurement_request.Beacon.randomization);
|
||||
psbrr->channel_info.reg_class =
|
||||
pBeaconReq->measurement_request.Beacon.regClass;
|
||||
|
||||
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");
|
||||
qdf_mem_free(psbrr);
|
||||
return eRRM_FAILURE;
|
||||
}
|
||||
|
||||
psbrr->channel_info.chan_num =
|
||||
pBeaconReq->measurement_request.Beacon.channel;
|
||||
psbrr->channel_info.reg_class =
|
||||
pBeaconReq->measurement_request.Beacon.regClass;
|
||||
psbrr->channel_info.chan_freq =
|
||||
wlan_reg_chan_opclass_to_freq(psbrr->channel_info.chan_num,
|
||||
psbrr->channel_info.reg_class,
|
||||
|
|
@ -616,13 +634,20 @@ rrm_process_beacon_report_req(struct mac_context *mac,
|
|||
pCurrentReq->token = pBeaconReq->measurement_token;
|
||||
|
||||
num_rpt = pBeaconReq->measurement_request.Beacon.num_APChannelReport;
|
||||
|
||||
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++) {
|
||||
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");
|
||||
qdf_mem_free(psbrr);
|
||||
return eRRM_FAILURE;
|
||||
}
|
||||
|
||||
psbrr->channel_list.chan_freq_lst[ch_ctr++] =
|
||||
wlan_reg_chan_opclass_to_freq(
|
||||
ie_ap_chan_rpt->channelList[tmp_idx],
|
||||
|
|
|
|||
Loading…
Reference in a new issue