qcacmn: Pass hopping radar test when DFS puncture enabled
Hopping radar happens on whole band, hope all DFS sub channels are put to NOL, but F/W only reports single radar event on special freq to host. When DFS puncture enabled, sub channel marking is enabled, host only put single affected 20M sub channel to NOL instead of all current bonded sub channel, AP still stays on current freq for valid puncture bitmap instead of leave DFS freq. If the radar is a frequency hopping radar that truly hops over entire DFS band, then the AP and clients are best served by moving out of the DFS band. But it could well be that only part of the band is used. It is difficult to find product specifications with info on the total bandwidth. Mostly military systems use frequency hopping to avoid jamming. So a middle ground would be to put full bandwidth of current AP to NOL for FCC type 6 frequency hopping radar. When frequency hopping radar happens, F/W set flag that full bandwidth need put to NOL in new added tlv radar_flags of event WMI_PDEV_DFS_RADAR_DETECTION_EVENT, When find the flag is set, host will put full bandwidth of current AP to NOL even sub channel marking is enabled. To avoid compatibility issue between old/new F/W and new/old host, add a F/W service bit wmi_service_radar_flags_support and host service flag is_full_bw_nol_supported. If the wmi_service WMI_SERVICE_RADAR_FLAGS_SUPPORT is enabled by FW, host shall set/unset a bit in the host service flag is_full_bw_nol_supported based on host capabilities. This host service flag is then sent to FW via WMI_INIT_CMDID. Change-Id: I6e280ca4ab00dce97c5aec90c7a4b4fc7c4a440a CRs-Fixed: 3595476
This commit is contained in:

committed by
Rahul Choudhary

parent
9bfc041802
commit
f6fa6b6729
@@ -612,6 +612,12 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle,
|
||||
target_if_err("Legacy callback return error!");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (wmi_service_enabled(wmi_handle, wmi_service_radar_flags_support)) {
|
||||
target_if_debug("Full bw nol supported");
|
||||
info->wlan_res_cfg.is_full_bw_nol_supported = true;
|
||||
}
|
||||
|
||||
target_if_regulatory_set_ext_tpc(psoc);
|
||||
|
||||
target_if_reg_set_lower_6g_edge_ch_info(psoc);
|
||||
|
@@ -890,6 +890,31 @@ dfs_radar_action_for_hw_mode_switch(struct wlan_dfs *dfs,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
#ifdef MOBILE_DFS_SUPPORT
|
||||
static uint8_t
|
||||
dfs_find_radar_full_bw_channels(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found,
|
||||
uint16_t *freq_list)
|
||||
{
|
||||
uint8_t num_channels = 0;
|
||||
|
||||
if (radar_found->is_full_bw_nol)
|
||||
num_channels =
|
||||
dfs_get_bonding_channel_without_seg_info_for_freq
|
||||
(dfs->dfs_curchan, freq_list);
|
||||
|
||||
return num_channels;
|
||||
}
|
||||
#else
|
||||
static uint8_t
|
||||
dfs_find_radar_full_bw_channels(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found,
|
||||
uint16_t *freq_list)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t
|
||||
dfs_find_radar_affected_channels(struct wlan_dfs *dfs,
|
||||
struct radar_found_info *radar_found,
|
||||
@@ -898,6 +923,11 @@ dfs_find_radar_affected_channels(struct wlan_dfs *dfs,
|
||||
{
|
||||
uint8_t num_channels;
|
||||
|
||||
num_channels = dfs_find_radar_full_bw_channels(dfs, radar_found,
|
||||
freq_list);
|
||||
if (num_channels)
|
||||
return num_channels;
|
||||
|
||||
if (dfs->dfs_bangradar_type == DFS_BANGRADAR_FOR_ALL_SUBCHANS)
|
||||
num_channels =
|
||||
dfs_get_bonding_channel_without_seg_info_for_freq
|
||||
|
@@ -39,6 +39,7 @@
|
||||
* @chan_freq: channel frequency (Primary channel frequency).
|
||||
* @radar_freq: radar frequency (Is it same as '@chan_freq'?).
|
||||
* @sidx: sidx value (same as freq_offset).
|
||||
* @is_full_bw_nol: Is full bandwidth needed to put to NOL.
|
||||
*/
|
||||
struct radar_found_info {
|
||||
uint32_t pdev_id;
|
||||
@@ -52,6 +53,7 @@ struct radar_found_info {
|
||||
uint32_t chan_freq;
|
||||
uint32_t radar_freq;
|
||||
int32_t sidx;
|
||||
uint8_t is_full_bw_nol;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -6437,6 +6437,7 @@ typedef enum {
|
||||
wmi_service_atf_max_client_512_support,
|
||||
#endif
|
||||
wmi_service_fisa_dynamic_msdu_aggr_size_support,
|
||||
wmi_service_radar_flags_support,
|
||||
wmi_services_max,
|
||||
} wmi_conv_service_ids;
|
||||
#define WMI_SERVICE_UNAVAILABLE 0xFFFF
|
||||
@@ -6817,6 +6818,7 @@ struct target_feature_set {
|
||||
* @tx_ilp_enable: capability to support TX ILP from host
|
||||
* @rf_path: Indicates RF path 0 primary, 1 secondary
|
||||
* @fw_ast_indication_disable: Disable AST indication
|
||||
* @is_full_bw_nol_supported: Is full bandwidth needed to put to NOL
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t num_vdevs;
|
||||
@@ -6951,6 +6953,7 @@ typedef struct {
|
||||
#endif
|
||||
bool rf_path;
|
||||
bool fw_ast_indication_disable;
|
||||
bool is_full_bw_nol_supported;
|
||||
} target_resource_config;
|
||||
|
||||
/**
|
||||
|
@@ -9401,6 +9401,22 @@ void wmi_copy_latency_flowq_support(wmi_resource_config *resource_cfg,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOBILE_DFS_SUPPORT
|
||||
static inline
|
||||
void wmi_copy_full_bw_nol_cfg(wmi_resource_config *resource_cfg,
|
||||
target_resource_config *tgt_res_cfg)
|
||||
{
|
||||
WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_SET(resource_cfg->host_service_flags,
|
||||
tgt_res_cfg->is_full_bw_nol_supported);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
void wmi_copy_full_bw_nol_cfg(wmi_resource_config *resource_cfg,
|
||||
target_resource_config *tgt_res_cfg)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static
|
||||
void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
||||
target_resource_config *tgt_res_cfg)
|
||||
@@ -9700,6 +9716,8 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
||||
}
|
||||
|
||||
wmi_copy_latency_flowq_support(resource_cfg, tgt_res_cfg);
|
||||
wmi_copy_full_bw_nol_cfg(resource_cfg, tgt_res_cfg);
|
||||
|
||||
}
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
@@ -17279,6 +17297,7 @@ static QDF_STATUS extract_dfs_radar_detection_event_tlv(
|
||||
if (radar_found->pdev_id == WMI_HOST_PDEV_ID_INVALID)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
qdf_mem_zero(radar_found, sizeof(struct radar_found_info));
|
||||
radar_found->detection_mode = radar_event->detection_mode;
|
||||
radar_found->chan_freq = radar_event->chan_freq;
|
||||
radar_found->chan_width = radar_event->chan_width;
|
||||
@@ -17289,6 +17308,19 @@ static QDF_STATUS extract_dfs_radar_detection_event_tlv(
|
||||
radar_found->freq_offset = radar_event->freq_offset;
|
||||
radar_found->sidx = radar_event->sidx;
|
||||
|
||||
if (is_service_enabled_tlv(wmi_handle,
|
||||
WMI_SERVICE_RADAR_FLAGS_SUPPORT)) {
|
||||
WMI_RADAR_FLAGS *radar_flags;
|
||||
|
||||
radar_flags = param_tlv->radar_flags;
|
||||
if (radar_flags) {
|
||||
radar_found->is_full_bw_nol =
|
||||
WMI_RADAR_FLAGS_FULL_BW_NOL_GET(radar_flags->flags);
|
||||
wmi_debug("Is full bw nol %d",
|
||||
radar_found->is_full_bw_nol);
|
||||
}
|
||||
}
|
||||
|
||||
wmi_debug("processed radar found event pdev %d,"
|
||||
"Radar Event Info:pdev_id %d,timestamp %d,chan_freq (dur) %d,"
|
||||
"chan_width (RSSI) %d,detector_id (false_radar) %d,"
|
||||
@@ -22765,6 +22797,8 @@ static void populate_tlv_service(uint32_t *wmi_service)
|
||||
#endif
|
||||
wmi_service[wmi_service_fisa_dynamic_msdu_aggr_size_support] =
|
||||
WMI_SERVICE_FISA_DYNAMIC_MSDU_AGGR_SIZE_SUPPORT;
|
||||
wmi_service[wmi_service_radar_flags_support] =
|
||||
WMI_SERVICE_RADAR_FLAGS_SUPPORT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user