qcacmn: Add support to choose 160MHz random channel for Pine

Pine supports restricted 80+80 MHz only on cfreq=5690 and cfreq=5775. If AP
detects RADAR in this channel, it chooses new 80+80 MHz random channel
which is not supported by Pine because, notion of 80+80 is not present in
current channel in regulatory component. Hence, as a temporary fix we
change the invalid 80+80 MHz channel to 160 MHz or lower.

Change-Id: I749607236a1dd7b9c7aa93ff889b65adcbb4191c
CRs-Fixed: 2570057
This commit is contained in:
Shashikala Prabhu
2019-11-13 16:56:31 +05:30
committed by nshrivas
parent 65d547730f
commit 52ee85cf6f
2 changed files with 31 additions and 0 deletions

View File

@@ -57,6 +57,18 @@
#define DFS_ALLOW_HW_PULSES 28
#define DFS_SET_PRI_MULTIPILER 29
#define RESTRICTED_80P80_START_CHAN 132
#define RESTRICTED_80P80_END_CHAN 161
/* Check if the given channels are within restricted 80P80 start chan(132) and
* end chan (161).
*/
#define CHAN_WITHIN_RESTRICTED_80P80(chan, cfreq_seg2) \
((((chan) >= RESTRICTED_80P80_START_CHAN) && \
((chan) <= RESTRICTED_80P80_END_CHAN) && \
((cfreq_seg2) >= RESTRICTED_80P80_START_CHAN) && \
((cfreq_seg2) <= RESTRICTED_80P80_END_CHAN)) ? true : false)
/*
* Spectral IOCTLs use DFS_LAST_IOCTL as the base.
* This must always be the last IOCTL in DFS and have
@@ -193,6 +205,10 @@ struct dfs_bangradar_params {
/* Flag to exclude Japan W53 channnels */
#define DFS_RANDOM_CH_FLAG_NO_JAPAN_W53_CH 0x0100 /* 0000 0001 0000 0000 */
/* Restricted 80P80 MHz is enabled */
#define DFS_RANDOM_CH_FLAG_RESTRICTED_80P80_ENABLED 0x0200
/* 0000 0010 0000 0000 */
/**
* struct wlan_dfs_caps - DFS capability structure.
* @wlan_dfs_ext_chan_ok: Can radar be detected on the extension chan?