From 48e9e716071eb74e3822aae3d40a5cf204a44fb8 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Mon, 2 Jul 2018 19:25:35 +0200 Subject: [PATCH] Disable AP mode channel switching due to DFS checks --- core/rtw_ap.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 82393dd..75c52cf 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -1523,6 +1523,8 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm) chbw_decision: ch_setting_changed = rtw_ap_chbw_decision(padapter, req_ch, req_bw, req_offset , &ch_to_set, &bw_to_set, &offset_to_set, &chbw_allow); + RTW_INFO(FUNC_ADPT_FMT": channel setting changed: %d\n" + , FUNC_ADPT_ARG(padapter), ch_setting_changed); /* let pnetwork_mlme == pnetwork_mlmeext */ _rtw_memcpy(pnetwork, pnetwork_mlmeext, pnetwork_mlmeext->Length); @@ -4095,16 +4097,16 @@ bool rtw_ap_chbw_decision(_adapter *adapter, s16 req_ch, s8 req_bw, s8 req_offse goto exit; } - if (rtw_odm_dfs_domain_unknown(adapter) && rtw_is_dfs_chbw(dec_ch, dec_bw, dec_offset)) { - if (req_ch >= 0) - RTW_WARN(FUNC_ADPT_FMT" DFS channel %u,%u,%u can't be used\n", FUNC_ADPT_ARG(adapter), dec_ch, dec_bw, dec_offset); - if (req_ch > 0) { - /* specific channel and not from IE => don't change channel setting */ - *chbw_allow = _FALSE; - goto exit; - } - goto choose_chbw; - } + //if (rtw_odm_dfs_domain_unknown(adapter) && rtw_is_dfs_chbw(dec_ch, dec_bw, dec_offset)) { + // if (req_ch >= 0) + // RTW_WARN(FUNC_ADPT_FMT" DFS channel %u,%u,%u can't be used\n", FUNC_ADPT_ARG(adapter), dec_ch, dec_bw, dec_offset); + // if (req_ch > 0) { + // /* specific channel and not from IE => don't change channel setting */ + // *chbw_allow = _FALSE; + // goto exit; + // } + // goto choose_chbw; + //} if (rtw_chset_is_ch_non_ocp(adapter_to_chset(adapter), dec_ch, dec_bw, dec_offset) == _FALSE) goto update_bss_chbw;