qcacld-3.0: Avoid VDEV restart for SAP when roaming in progress

Currently, driver allows VDEV-RESTART on SAP interface in order to
channel switch or hidden ssid connection when roaming is in progress
on STA interface. This leads to two simultaneous vdev starts or
vdev-restart in FW which causes the FW to assert.

Add changes to reject the channel switch for SAP or in hidden ssid
connection if roaming is in progress on any STA interface.

Change-Id: I1cea389021049779b5aa00145e2470cd67158edd
CRs-Fixed: 2390235
This commit is contained in:
Abhinav Kumar
2019-02-04 17:30:10 +05:30
committed by nshrivas
parent 4816c5985f
commit 338e57d779
14 changed files with 168 additions and 14 deletions

View File

@@ -169,6 +169,8 @@ typedef enum {
eSAP_ACS_CHANNEL_SELECTED,
eSAP_ECSA_CHANGE_CHAN_IND,
eSAP_DFS_NEXT_CHANNEL_REQ,
/* Event sent channel switch status to upper layer */
eSAP_CHANNEL_CHANGE_RESP,
} eSapHddEvent;
typedef enum {
@@ -427,6 +429,7 @@ typedef struct sap_Event_s {
struct sap_ch_selected_s sap_ch_selected;
struct sap_ch_change_ind sap_chan_cng_ind;
struct sap_acs_scan_complete_event sap_acs_scan_comp;
QDF_STATUS ch_change_rsp_status;
} sapevt;
} tSap_Event, *tpSap_Event;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2019 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
@@ -1206,6 +1206,11 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info,
case eCSR_ROAM_RESULT_CHANNEL_CHANGE_SUCCESS:
wlansap_roam_process_ch_change_success(mac_ctx, sap_ctx,
csr_roam_info, &qdf_ret_status);
qdf_ret_status =
sap_signal_hdd_event(sap_ctx, csr_roam_info,
eSAP_CHANNEL_CHANGE_RESP,
(void *)QDF_STATUS_SUCCESS);
break;
case eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE:
/* This is much more serious issue, we have to vacate the
@@ -1213,6 +1218,11 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info,
* failed, stop the BSS operation completely and inform hostapd
*/
qdf_ret_status = wlansap_stop_bss(sap_ctx);
qdf_ret_status =
sap_signal_hdd_event(sap_ctx, csr_roam_info,
eSAP_CHANNEL_CHANGE_RESP,
(void *)QDF_STATUS_E_FAILURE);
break;
case eCSR_ROAM_EXT_CHG_CHNL_UPDATE_IND:
qdf_status = sap_signal_hdd_event(sap_ctx, csr_roam_info,

View File

@@ -1736,6 +1736,15 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
sap_ctx->sessionId, sap_ctx->self_mac_addr,
sap_ctx->channel);
break;
case eSAP_CHANNEL_CHANGE_RESP:
sap_ap_event.sapHddEventCode = eSAP_CHANNEL_CHANGE_RESP;
sap_ap_event.sapevt.ch_change_rsp_status = (QDF_STATUS)context;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
"In %s, SAP event callback event = %s",
__func__, "eSAP_CHANNEL_CHANGE_RESP");
break;
default:
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("SAP Unknown callback event = %d"),