qcacld-3.0: Update the sap channel only after sap start event
In the case of SAP restart due to a RADAR, or force SCC due to STA vdev formed, in the SAP restart path the driver updates the SAP channel in the global AP context, and then sends the command to change the channel to south bound layers to process, which may reject or accept the command. If the command has been accepted, the channel in the global config would be the same as the channel configured in the restart path, but for a case where the command was rejected by the south bound, due to a concurrency check, or other reasons the SAP remains on the previous channel in SCC, or MCC, with the STA interface, but the channel in the global config is same as that given in the restart path, so the real operating channel, and the config channel are different. Because of this if a fresh bringup of some vdev is to be done according to the channel of the SAP, that would fail in some cases ( SAP on DFS channel, and STA coming, so the driver would reject MCC, and SCC) which could be avoided if the channel of the SAP wouldnt be configured in the restart path, and would be configured in the callback of SAP. Also the secondary channel of the SAP was configured as the secondary channel configured at time of fresh SAP bringup, hence the sec channel isn't updated after every restart of SAP. Fix is to configure the channel of in the global AP context only when the SAP START or CHANNEL CHANGE event comes for the SAP. Also update the secondary channel after the CSA. Change-Id: I6cbc31cae4958c0d7da79d4640e5ad8b1ce98338 CRs-Fixed: 2355420
This commit is contained in:

کامیت شده توسط
nshrivas

والد
4c8e6be021
کامیت
379e05c97a
@@ -1176,6 +1176,22 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
|
||||
QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
|
||||
uint8_t target_channel);
|
||||
|
||||
/**
|
||||
* wlansap_get_sec_channel() - get the secondary sap channel
|
||||
* @sec_ch_offset: secondary channel offset.
|
||||
* @op_channel: Operating sap channel.
|
||||
* @sec_channel: channel to be filled.
|
||||
*
|
||||
* This API will get the secondary sap channel from the offset, and
|
||||
* operating channel.
|
||||
*
|
||||
* Return: None
|
||||
*
|
||||
*/
|
||||
void wlansap_get_sec_channel(uint8_t sec_ch_offset,
|
||||
uint8_t op_channel,
|
||||
uint8_t *sec_channel);
|
||||
|
||||
/**
|
||||
* wlansap_start_beacon_req() - Send Start Beaconing Request
|
||||
* @sap_ctx: Pointer to the SAP context
|
||||
|
@@ -1731,8 +1731,8 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
|
||||
sap_ap_event.sapHddEventCode = eSAP_CHANNEL_CHANGE_EVENT;
|
||||
|
||||
acs_selected = &sap_ap_event.sapevt.sap_ch_selected;
|
||||
acs_selected->pri_ch = sap_ctx->acs_cfg->pri_ch;
|
||||
acs_selected->ht_sec_ch = sap_ctx->acs_cfg->ht_sec_ch;
|
||||
acs_selected->pri_ch = sap_ctx->channel;
|
||||
acs_selected->ht_sec_ch = sap_ctx->secondary_ch;
|
||||
acs_selected->ch_width =
|
||||
sap_ctx->csr_roamProfile.ch_params.ch_width;
|
||||
acs_selected->vht_seg0_center_ch =
|
||||
|
@@ -1600,6 +1600,25 @@ QDF_STATUS wlan_sap_get_pre_cac_vdev_id(mac_handle_t handle, uint8_t *vdev_id)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
void wlansap_get_sec_channel(uint8_t sec_ch_offset,
|
||||
uint8_t op_channel,
|
||||
uint8_t *sec_channel)
|
||||
{
|
||||
switch (sec_ch_offset) {
|
||||
case LOW_PRIMARY_CH:
|
||||
*sec_channel = op_channel + 4;
|
||||
break;
|
||||
case HIGH_PRIMARY_CH:
|
||||
*sec_channel = op_channel - 4;
|
||||
break;
|
||||
default:
|
||||
*sec_channel = 0;
|
||||
}
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: sec channel offset %d, sec channel %d",
|
||||
__func__, sec_ch_offset, *sec_channel);
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
|
||||
uint8_t target_channel)
|
||||
{
|
||||
@@ -1658,11 +1677,13 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
|
||||
ch_params = &mac_ctx->sap.SapDfsInfo.new_ch_params;
|
||||
wlan_reg_set_channel_params(mac_ctx->pdev, target_channel,
|
||||
0, ch_params);
|
||||
sapContext->ch_params.ch_width = ch_params->ch_width;
|
||||
sapContext->ch_params = *ch_params;
|
||||
/* Update the channel as this will be used to
|
||||
* send event to supplicant
|
||||
*/
|
||||
sapContext->channel = target_channel;
|
||||
wlansap_get_sec_channel(ch_params->sec_ch_offset, target_channel,
|
||||
(uint8_t *)(&sapContext->secondary_ch));
|
||||
sapContext->csr_roamProfile.ch_params.ch_width = ch_params->ch_width;
|
||||
sapContext->csr_roamProfile.ch_params.sec_ch_offset =
|
||||
ch_params->sec_ch_offset;
|
||||
|
مرجع در شماره جدید
Block a user