mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: SAP DFS CAC Support in 80+80MHz mode
Add support to perform CAC when SAP comes up in 160MHz or 80+80MHz with any of the 80MHz band is DFS band. Change-Id: If24d6cd325f747934195598ffe0f456eea939026 CRs-Fixed: 964262
This commit is contained in:
parent
9d6b75d1a4
commit
949eaa7aab
3 changed files with 41 additions and 8 deletions
|
|
@ -3845,6 +3845,7 @@ typedef struct sSirChAvoidIndType {
|
|||
#endif /* FEATURE_WLAN_CH_AVOID || FEATURE_WLAN_FORCE_SAP_SCC */
|
||||
|
||||
#define SIR_DFS_MAX_20M_SUB_CH 8
|
||||
#define SIR_80MHZ_START_CENTER_CH_DIFF 6
|
||||
|
||||
typedef struct sSirSmeDfsChannelList {
|
||||
uint32_t nchannels;
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ void lim_process_mlm_start_cnf(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|||
uint8_t smesessionId;
|
||||
uint16_t smetransactionId;
|
||||
uint8_t channelId;
|
||||
uint8_t send_bcon_ind = false;
|
||||
|
||||
if (pMsgBuf == NULL) {
|
||||
PELOGE(lim_log(pMac, LOGE, FL("Buffer is Pointing to NULL"));)
|
||||
|
|
@ -294,10 +295,25 @@ void lim_process_mlm_start_cnf(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|||
* request from upper layers to start the beacon transmission
|
||||
*/
|
||||
|
||||
if (LIM_IS_IBSS_ROLE(psessionEntry) ||
|
||||
(LIM_IS_AP_ROLE(psessionEntry) &&
|
||||
(cds_get_channel_state(channelId) !=
|
||||
CHANNEL_STATE_DFS))) {
|
||||
if (!(LIM_IS_IBSS_ROLE(psessionEntry) ||
|
||||
(LIM_IS_AP_ROLE(psessionEntry))))
|
||||
return;
|
||||
if (psessionEntry->ch_width == CH_WIDTH_160MHZ) {
|
||||
send_bcon_ind = false;
|
||||
} else if (psessionEntry->ch_width == CH_WIDTH_80P80MHZ) {
|
||||
if ((cds_get_channel_state(channelId) !=
|
||||
CHANNEL_STATE_DFS) &&
|
||||
(cds_get_channel_state(psessionEntry->
|
||||
ch_center_freq_seg1 -
|
||||
SIR_80MHZ_START_CENTER_CH_DIFF) !=
|
||||
CHANNEL_STATE_DFS))
|
||||
send_bcon_ind = true;
|
||||
} else {
|
||||
if (cds_get_channel_state(channelId) !=
|
||||
CHANNEL_STATE_DFS)
|
||||
send_bcon_ind = true;
|
||||
}
|
||||
if (send_bcon_ind) {
|
||||
/* Configure beacon and send beacons to HAL */
|
||||
QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_INFO,
|
||||
FL("Start Beacon with ssid %s Ch %d"),
|
||||
|
|
|
|||
|
|
@ -3433,6 +3433,7 @@ static QDF_STATUS sap_fsm_state_starting(ptSapContext sap_ctx,
|
|||
tCsrRoamInfo *roam_info = (tCsrRoamInfo *) (sap_event->params);
|
||||
tSapDfsInfo *sap_dfs_info;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
uint8_t is_dfs = false;
|
||||
|
||||
if (msg == eSAP_MAC_START_BSS_SUCCESS) {
|
||||
/*
|
||||
|
|
@ -3440,8 +3441,9 @@ static QDF_STATUS sap_fsm_state_starting(ptSapContext sap_ctx,
|
|||
* (both without substates)
|
||||
*/
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
FL("from state channel = %d %s => %s"),
|
||||
sap_ctx->channel, "eSAP_STARTING", "eSAP_STARTED");
|
||||
FL("from state channel = %d %s => %s ch_width %d"),
|
||||
sap_ctx->channel, "eSAP_STARTING", "eSAP_STARTED",
|
||||
sap_ctx->ch_params.ch_width);
|
||||
sap_ctx->sapsMachine = eSAP_STARTED;
|
||||
|
||||
/* Action code for transition */
|
||||
|
|
@ -3454,8 +3456,22 @@ static QDF_STATUS sap_fsm_state_starting(ptSapContext sap_ctx,
|
|||
* running, however, the AP is still not beaconing, until
|
||||
* CAC is done if the operating channel is DFS
|
||||
*/
|
||||
if (CHANNEL_STATE_DFS ==
|
||||
cds_get_channel_state(sap_ctx->channel)) {
|
||||
if (sap_ctx->ch_params.ch_width == CH_WIDTH_160MHZ) {
|
||||
is_dfs = true;
|
||||
} else if (sap_ctx->ch_params.ch_width == CH_WIDTH_80P80MHZ) {
|
||||
if (cds_get_channel_state(sap_ctx->channel) ==
|
||||
CHANNEL_STATE_DFS ||
|
||||
cds_get_channel_state(sap_ctx->
|
||||
ch_params.center_freq_seg1 -
|
||||
SIR_80MHZ_START_CENTER_CH_DIFF) ==
|
||||
CHANNEL_STATE_DFS)
|
||||
is_dfs = true;
|
||||
} else {
|
||||
if (cds_get_channel_state(sap_ctx->channel) ==
|
||||
CHANNEL_STATE_DFS)
|
||||
is_dfs = true;
|
||||
}
|
||||
if (is_dfs) {
|
||||
sap_dfs_info = &mac_ctx->sap.SapDfsInfo;
|
||||
if ((false == sap_dfs_info->ignore_cac) &&
|
||||
(eSAP_DFS_DO_NOT_SKIP_CAC ==
|
||||
|
|
|
|||
Loading…
Reference in a new issue