From 8fd74a017dffdb506cdc2423d986a5e7863593a1 Mon Sep 17 00:00:00 2001 From: Vignesh U Date: Thu, 5 Dec 2019 18:09:24 +0530 Subject: [PATCH] qcacmn: Add a new DFS domain for Japan (MKKN) Introduce a new DFS domain MKKN that supports new w53 Japan RADAR pattern only. Initialize a new empty RADAR table dfs_mkkn_radars for MKKN DFS domain. Map The 5G regdamain MKK17 to the new DFS domain MKKN to make sure that the new w53 Radar pulses should be detected only by JP country or MKK17 5G regdomain. Change-Id: Ib0f6a7e98353c9930e90703ead2342b932e491e3 CRs-Fixed: 2575347 --- umac/dfs/core/src/dfs_internal.h | 4 +++- .../src/filtering/dfs_partial_offload_radar.c | 18 ++++++++++++++++++ umac/regulatory/core/src/reg_db.c | 2 +- umac/regulatory/core/src/reg_services_common.c | 1 + .../inc/reg_services_public_struct.h | 4 ++++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/umac/dfs/core/src/dfs_internal.h b/umac/dfs/core/src/dfs_internal.h index 07ff4b1670e4..33bcb7514375 100644 --- a/umac/dfs/core/src/dfs_internal.h +++ b/umac/dfs/core/src/dfs_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for @@ -36,6 +36,7 @@ * @DFS_MKK4_DOMAIN: MKK domain * @DFS_CN_DOMAIN: China domain * @DFS_KR_DOMAIN: Korea domain + * @DFS_MKKN_DOMAIN: MKKN domain * @DFS_UNDEF_DOMAIN: Undefined domain */ enum DFS_DOMAIN { @@ -45,6 +46,7 @@ enum DFS_DOMAIN { DFS_MKK4_DOMAIN = 3, DFS_CN_DOMAIN = 4, DFS_KR_DOMAIN = 5, + DFS_MKKN_DOMAIN = 6, DFS_UNDEF_DOMAIN }; diff --git a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c index 12ed4458f48f..662fbb57691e 100644 --- a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c +++ b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c @@ -96,6 +96,16 @@ static struct dfs_pulse dfs_mkk4_radars[] = { {16, 15, 2000, 5000, 0, 4, 7, 11, 23, 22, 0, 3, 0, 5, 0, 11}, }; +/** + * struct dfs_pulse dfs_mkkn_radars - MKKN radar table for Offload chipsets. + */ +static struct dfs_pulse dfs_mkkn_radars[] = { + /** Since the table is empty no new radar type shall be detected. + * New filters shall be added to this tables after proper testing + * and verification. + */ +}; + /** * struct dfs_bin5pulse dfs_fcc_bin5pulses - FCC BIN5 pulses for Offload * chipsets. @@ -406,6 +416,14 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) rinfo.b5pulses = NULL; rinfo.numb5radars = 0; break; + case DFS_MKKN_DOMAIN: + dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "MKKN domain"); + rinfo.dfsdomain = DFS_MKKN_DOMAIN; + rinfo.dfs_radars = dfs_mkkn_radars; + rinfo.numradars = QDF_ARRAY_SIZE(dfs_mkkn_radars); + rinfo.b5pulses = NULL; + rinfo.numb5radars = 0; + break; case DFS_MKK4_DOMAIN: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "MKK4 domain"); rinfo.dfsdomain = DFS_MKK4_DOMAIN; diff --git a/umac/regulatory/core/src/reg_db.c b/umac/regulatory/core/src/reg_db.c index f780496f5030..e3cf2f7f984d 100644 --- a/umac/regulatory/core/src/reg_db.c +++ b/umac/regulatory/core/src/reg_db.c @@ -1480,7 +1480,7 @@ const struct regdomain regdomains_5g[] = { [MKK16] = {CTL_MKK, DFS_MKK_REGION, 2, 0, 1, {CHAN_5490_5710_6} }, - [MKK17] = {CTL_MKK, DFS_MKK_REGION, 2, 0, 3, {CHAN_5170_5250_8, + [MKK17] = {CTL_MKK, DFS_MKKN_REGION, 2, 0, 3, {CHAN_5170_5250_8, CHAN_5250_5330_12, CHAN_5490_5730_6} }, diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 6dd71f81c575..9580427f20a1 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -998,6 +998,7 @@ void reg_init_channel_map(enum dfs_reg dfs_region) channel_map = channel_map_eu; break; case DFS_MKK_REGION: + case DFS_MKKN_REGION: channel_map = channel_map_jp; break; case DFS_CN_REGION: diff --git a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h index 979f173b237e..d4db425a8cdd 100644 --- a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h +++ b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h @@ -68,6 +68,9 @@ * @DFS_MKK_REGION: MKK region * @DFS_CN_REGION: China region * @DFS_KR_REGION: Korea region + * @DFS_MKK_REGION: MKKN region + * that supports updated W53 RADAR pattern + * detection. * @DFS_UNDEF_REGION: Undefined region */ enum dfs_reg { @@ -77,6 +80,7 @@ enum dfs_reg { DFS_MKK_REGION = 3, DFS_CN_REGION = 4, DFS_KR_REGION = 5, + DFS_MKKN_REGION = 6, DFS_UNDEF_REGION = 0xFFFF, };