diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index a28a8a6a38..b2ad32dee7 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2013, 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2005-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -53,21 +53,20 @@ #define DC(x) ((struct wlan_dfs *)(x)) /** - * dfs_log: dfs logging using submodule MASKs and - * QDF trace level. - * The logging is controlled by two bitmasks: - * 1) submodule bitmask: sm - * 2) trace level masks: level - * + * dfs_log() - dfs logging using submodule MASKs and QDF trace level. * @dfs: The dfs object pointer or NULL if dfs is not defined. * @sm: Submodule BITMASK. * @level: QDF trace level. * @args...: Variable argument list. * + * The logging is controlled by two bitmasks: + * 1) submodule bitmask: sm + * 2) trace level masks: level + * * The submodule(sm) cannot be empty even if argument dfs is NULL. * Else the macro will create a compilation error. - * One may provide WLAN_DEBUG_DFS_ALWAYS when the argument dfs is NULL. - * Example:- + * One may provide WLAN_DEBUG_DFS_ALWAYS when the argument @dfs is NULL. + * * dfs_log(NULL, WLAN_DEBUG_DFS_ALWAYS, QDF_TRACE_LEVEL_INFO,"Error pulse"); * * Why DC(x) is required? @@ -76,7 +75,7 @@ * then during compilation (NULL)->dfs_debug_mask will dereference * a (void *) type, which is illegal. Therefore, we need * the cast: (DC(dfs))->dfs_debug_mask. - * Example:- + * * dfs_log(NULL, WLAN_DEBUG_DFS, QDF_TRACE_LEVEL_INFO,"dfs is NULL"); */ #define dfs_log(dfs, sm, level, args...) do { \ @@ -109,13 +108,13 @@ #define DFS_MAX(a, b) ((a) > (b)?(a) : (b)) #define DFS_DIFF(a, b)(DFS_MAX(a, b) - DFS_MIN(a, b)) -/** +/* * Maximum number of radar events to be processed in a single iteration. * Allows soft watchdog to run. */ #define MAX_EVENTS 100 -/** +/* * Constants to use for chirping detection. * * All are unconverted as HW reports them. @@ -126,7 +125,7 @@ #define MAX_DUR_FOR_LOW_RSSI 4 -/** +/* * Cascade has issue with reported duration especially when there is a * crossover of chirp from one segment to another. It may report a value * of duration that is well below 50us for a valid FCC type 5 chirping @@ -148,7 +147,7 @@ #define DFS_MARGIN_EQUAL(a, b, margin) ((DFS_DIFF(a, b)) <= margin) #define DFS_MAX_STAGGERED_BURSTS 3 -/** +/* * All filter thresholds in the radar filter tables are effective at a 50% * channel loading. */ @@ -255,12 +254,12 @@ #define DFS_BIN_MAX_PULSES 60 /* max num of pulses in a burst */ #define DFS_BIN5_PRI_LOWER_LIMIT 990 /* us */ -/** +/* * To cover the single pusle burst case, change from 2010 us to * 2010000 us. */ -/** +/* * This is reverted back to 2010 as larger value causes false * bin5 detect (EV76432, EV76320) */ @@ -269,7 +268,7 @@ #define DFS_BIN5_WIDTH_MARGIN 4 /* us */ #define DFS_BIN5_RSSI_MARGIN 5 /* dBm */ -/** +/* * Following threshold is not specified but should be * okay statistically. */ @@ -289,7 +288,7 @@ /* Max value of valid psidx diff */ #define DFS_MAX_PSIDX_DIFF 16 -/** +/* * Software use: channel interference used for as AR as well as RADAR * interference detection. */ @@ -411,7 +410,7 @@ * @DETECTOR_ID_2: Detector ID 2 (Agile detector in 80p80MHZ supported devices). * @AGILE_DETECTOR_ID_TRUE_160MHZ: Agile detector ID in true 160MHz devices. * @AGILE_DETECTOR_11BE: Agile detector ID in true 320 MHz devices. - * @AGILE_DETECTOR_ID_80p80: Agile detector ID in 80p80MHz supported devices. + * @AGILE_DETECTOR_ID_80P80: Agile detector ID in 80p80MHz supported devices. * @INVALID_DETECTOR_ID: Invalid detector id. */ enum detector_id { @@ -449,7 +448,7 @@ struct dfs_pulseparams { /** * struct dfs_pulseline - Pulseline structure. - * @pl_elems[]: array of pulses in delay line. + * @pl_elems: array of pulses in delay line. * @pl_firstelem: Index of the first element. * @pl_lastelem: Index of the last element. * @pl_numelems: Number of elements in the delay line. @@ -472,6 +471,9 @@ struct dfs_pulseline { ((e)->re_flags & (DFS_EVENT_HW_CHIRP | DFS_EVENT_SW_CHIRP)) /** + * DFS_EVENT_NOTCHIRP() - Check if event can be a chirp + * @e: event + * * Check if the given event is to be rejected as not possibly * a chirp. This means: * (a) it's a hardware or software checked chirp, and @@ -549,13 +551,13 @@ struct dfs_event { /** * struct dfs_ar_state - DFS AR state structure. * @ar_prevwidth: Previous width. - * @ar_phyerrcount[]: Phy error count. + * @ar_phyerrcount: Phy error count. * @ar_acksum: Acksum. * @ar_packetthreshold: Thresh to determine traffic load. * @ar_parthreshold: Thresh to determine peak. * @ar_radarrssi: Rssi threshold for AR event. * @ar_prevtimestamp: Prev time stamp. - * @ar_peaklist[]: Peak list. + * @ar_peaklist: Peak list. */ struct dfs_ar_state { uint32_t ar_prevwidth; @@ -594,7 +596,7 @@ struct dfs_delayelem { /** * struct dfs_delayline - DFS Delay Line. - * @dl_elems[]: Array of pulses in delay line. + * @dl_elems: Array of pulses in delay line. * @dl_last_ts: Last timestamp the delay line was used (in usecs). * @dl_firstelem: Index of the first element. * @dl_lastelem: Index of the last element. @@ -677,7 +679,7 @@ struct dfs_filter { /** * struct dfs_filtertype - Structure of DFS Filter type. - * @ft_filters[]: Array of ptrs storing addresses for struct of dfs_filter. + * @ft_filters: Array of ptrs storing addresses for struct of dfs_filter. * @ft_filterdur: Duration of pulse which specifies filter type. * @ft_numfilters: Num filters of this type. * @ft_last_ts: Last timestamp this filtertype was used (in usecs). @@ -761,7 +763,8 @@ struct dfs_state { /** * struct dfs_nolelem - DFS NOL element. - * @nol_dfs Back pointer to dfs object. + * @nolelem_list: NOL element list node + * @nol_dfs: Back pointer to dfs object. * @nol_freq: Centre frequency. * @nol_chwidth: Event width (MHz). * @nol_start_us: NOL start time in us. @@ -827,7 +830,7 @@ struct dfs_bin5elem { /** * struct dfs_bin5radars - BIN5 radars. - * @br_elems[]: List of bin5 elems that fall within the time window. + * @br_elems: List of bin5 elems that fall within the time window. * @br_firstelem: Index of the first element. * @br_lastelem: Index of the last element. * @br_numelems: Number of elements in the delay line. @@ -952,9 +955,9 @@ struct dfs_mode_switch_defer_params { * @DFS_AGILE_S_INIT: Default state or the start state of the Agile SM. * @DFS_AGILE_S_RUNNING: Agile Engine is being run. * @DFS_AGILE_S_COMPLETE: The Agile Engine's minimum run is complete. - However, it is still running. Used only for RCAC - as RCAC needs to run continuously (uninterrupted) - until the channel change. + * However, it is still running. Used only for RCAC + * as RCAC needs to run continuously (uninterrupted) + * until the channel change. * @DFS_AGILE_S_MAX: Max (invalid) state. */ enum dfs_agile_sm_state { @@ -975,107 +978,38 @@ struct dfs_rcac_params { }; #endif -/** +/* + * NB: not using kernel-doc format since the kernel-doc script doesn't + * handle the TAILQ_HEAD() or STAILQ_HEAD() macros + * * struct wlan_dfs - The main dfs structure. * @dfs_debug_mask: Current debug bitmask. * @dfs_curchan_radindex: Current channel radar index. * @dfs_extchan_radindex: Extension channel radar index. - * @dfsdomain: Current DFS domain. - * @dfs_proc_phyerr: Flags for Phy Errs to process. - * @dfs_eventq: Q of free dfs event objects. - * @dfs_eventqlock: Lock for free dfs event list. - * @dfs_radarq: Q of radar events. - * @dfs_radarqlock: Lock for dfs q. - * @dfs_arq: Q of AR events. - * @dfs_arqlock: Lock for AR q. * @dfs_ar_state: AR state. - * @dfs_radar[]: Per-Channel Radar detector state. - * @dfs_radarf[]: One filter for each radar pulse type. + * @dfs_radar: Per-Channel Radar detector state. + * @dfs_radarf: One filter for each radar pulse type. * @dfs_rinfo: State vars for radar processing. * @dfs_b5radars: Array of bin5 radar events. * @dfs_ftindextable: Map of radar durs to filter types. - * @dfs_nol: Non occupancy list for radar. - * @dfs_nol_count: How many items? * @dfs_defaultparams: Default phy params per radar state. - * @wlan_dfs_stats: DFS related stats. - * @pulses: Pulse history. * @events: Events structure. - * @wlan_radar_tasksched: Radar task is scheduled. - * @wlan_dfswait: Waiting on channel for radar detect. - * @wlan_dfstest: Test timer in progress. * @dfs_caps: Object of wlan_dfs_caps structure. - * @wlan_dfstest_ieeechan: IEEE chan num to return to after a dfs mute - * test. - * @wlan_dfs_cac_time: CAC period. - * @wlan_dfstesttime: Time to stay off chan during dfs test. - * @wlan_dfstesttimer: Dfs mute test timer. - * @dfs_bangradar_type: Radar simulation type. - * @is_radar_found_on_secondary_seg: Radar on second segment. - * @is_radar_during_precac: Radar found during precac. - * @dfs_precac_lock: Lock to protect precac lists. - * @dfs_precac_secondary_freq_mhz: Second segment freq in MHZ for precac. - * Applicable to only legacy chips. - * @dfs_precac_primary_freq_mhz: PreCAC Primary freq in MHZ applicable only - * to legacy chips. - * @dfs_defer_precac_channel_change: Defer precac channel change. - * @dfs_precac_inter_chan_freq: Intermediate non-DFS freq used while - * doing precac. - * @dfs_autoswitch_chan: Desired channel of dfs_channel structure - * which will be prioritized for preCAC. - * @dfs_autoswitch_des_mode: Desired PHY mode which has to be used - * after precac. * @wlan_dfs_task_timer: Dfs wait timer. * @dur_multiplier: Duration multiplier. * @wlan_dfs_isdfsregdomain: True when AP is in DFS domain - * @wlan_dfs_false_rssi_thres: False RSSI Threshold. - * @wlan_dfs_peak_mag: Peak mag. - * @radar_log[]: Radar log. - * @dfs_event_log_count: Event log count. - * @dfs_event_log_on: Event log on. - * @dfs_phyerr_count: Same as number of PHY radar interrupts. - * @dfs_phyerr_reject_count: When TLV is supported, # of radar events - * ignored after TLV is parsed. - * @dfs_phyerr_queued_count: Number of radar events queued for matching - * the filters. - * @dfs_phyerr_freq_min: Phyerr min freq. - * @dfs_phyerr_freq_max: Phyerr max freq. * @dfs_phyerr_w53_counter: Phyerr w53 counter. - * @dfs_pri_multiplier: Allow pulse if they are within multiple of - * PRI for the radar type. - * @wlan_dfs_nol_timeout: NOL timeout. - * @update_nol: Update NOL. * @dfs_seq_num: Sequence number. - * @dfs_nol_free_list: NOL free list. - * @dfs_nol_elem_free_work: The work queue to free an NOL element. - * @dfs_cac_timer: CAC timer. - * @dfs_cac_valid_timer: Ignore CAC when this timer is running. - * @dfs_cac_timeout_override: Overridden cac timeout. - * @dfs_enable: DFS Enable. - * @dfs_cac_timer_running: DFS CAC timer running. - * @dfs_ignore_dfs: Ignore DFS. - * @dfs_ignore_cac: Ignore CAC. - * @dfs_cac_valid: DFS CAC valid. - * @dfs_cac_valid_time: Time for which CAC will be valid and will - * not be re-done. - * @dfs_precac_timeout_override: Overridden precac timeout. - * @dfs_precac_list: PreCAC list (contains individual trees). - * @dfs_precac_chwidth: PreCAC channel width enum. - * @dfs_curchan: DFS current channel. - * @dfs_prevchan: DFS previous channel. - * @dfs_cac_started_chan: CAC started channel. - * @dfs_pdev_obj: DFS pdev object. - * @dfs_is_offload_enabled: Set if DFS offload enabled. - * @dfs_is_bangradar_320_supported: Set if DFS 320MHZ enabled. - * @dfs_is_radar_found_chan_freq_eq_center_freq: - * Set if chan_freq parameter of the radar - * found wmi event indicates channel center. - * @dfs_agile_precac_freq_mhz: Freq in MHZ configured on Agile DFS engine. - * @dfs_use_nol: Use the NOL when radar found(default: TRUE) - * @dfs_nol_lock: Lock to protect nol list. - * @tx_leakage_threshold: Tx leakage threshold for dfs. - * @dfs_use_nol_subchannel_marking: Use subchannel marking logic to add only - * radar affected subchannel instead of all - * bonding channels. + * @dfs_min_sidx: Minimum sidx of the received radar pulses. + * @dfs_max_sidx: Maximum sidx of the received radar pulses. + * @dfs_data_struct_lock: DFS data structure lock. This is to protect + * all the filtering data structures. For + * example: dfs_bin5radars, dfs_filtertype, + * etc. + * @dfs_lowest_pri_limit: + * @dfs_eventq: Q of free dfs event objects. + * @dfs_radarq: Q of radar events. + * @dfs_arq: Q of AR events. * @dfs_host_wait_timer: The timer that is started from host after * sending the average radar parameters. * Before this timeout host expects its dfs @@ -1091,22 +1025,103 @@ struct dfs_rcac_params { * radar parameters. * @dfs_no_res_from_fw: Indicates no response from fw. * @dfs_spoof_check_failed: Indicates if the spoof check has failed. - * @dfs_spoof_test_done: Indicates if the sppof test is done. + * @dfs_radar_found_chan: The channel on which radar was found. * @dfs_status_timeout_override: Used to change the timeout value of * dfs_host_wait_timer. + * @dfs_allow_hw_pulses: Allow/Block HW pulses. When synthetic + * pulses are injected, the HW pulses should + * be blocked and this variable should be + * false so that HW pulses and synthetic + * pulses do not get mixed up. + * @dfsdomain: Current DFS domain. + * @dfs_proc_phyerr: Flags for Phy Errs to process. + * @dfs_eventqlock: Lock for free dfs event list. + * @dfs_radarqlock: Lock for dfs q. + * @dfs_arqlock: Lock for AR q. + * @dfs_nol: Non occupancy list for radar. + * @dfs_nol_count: How many items? + * @wlan_dfs_stats: DFS related stats. + * @pulses: Pulse history. + * @wlan_radar_tasksched: Radar task is scheduled. + * @wlan_dfswait: Waiting on channel for radar detect. + * @wlan_dfstest: Test timer in progress. + * @wlan_dfstest_ieeechan: IEEE chan num to return to after a dfs mute + * test. + * @wlan_dfs_cac_time: CAC period. + * @wlan_dfstesttime: Time to stay off chan during dfs test. + * @wlan_dfstesttimer: Dfs mute test timer. + * @dfs_bangradar_type: Radar simulation type. + * @is_radar_found_on_secondary_seg: Radar on second segment. + * @is_radar_during_precac: Radar found during precac. + * @dfs_precac_lock: Lock to protect precac lists. + * @dfs_precac_secondary_freq_mhz: Second segment freq in MHZ for precac. + * Applicable to only legacy chips. + * @dfs_precac_primary_freq_mhz: PreCAC Primary freq in MHZ applicable only + * to legacy chips. + * @dfs_defer_precac_channel_change: Defer precac channel change. + * @dfs_autoswitch_des_mode: Desired PHY mode which has to be used + * after precac. + * @dfs_autoswitch_chan: Desired channel of dfs_channel structure + * which will be prioritized for preCAC. + * @dfs_precac_inter_chan_freq: Intermediate non-DFS freq used while + * doing precac. + * @wlan_dfs_false_rssi_thres: False RSSI Threshold. + * @wlan_dfs_peak_mag: Peak mag. + * @radar_log: Radar log. + * @dfs_event_log_count: Event log count. + * @dfs_event_log_on: Event log on. + * @dfs_phyerr_count: Same as number of PHY radar interrupts. + * @dfs_phyerr_reject_count: When TLV is supported, # of radar events + * ignored after TLV is parsed. + * @dfs_phyerr_queued_count: Number of radar events queued for matching + * the filters. + * @dfs_phyerr_freq_min: Phyerr min freq. + * @dfs_phyerr_freq_max: Phyerr max freq. + * @dfs_pri_multiplier: Allow pulse if they are within multiple of + * PRI for the radar type. + * @wlan_dfs_nol_timeout: NOL timeout. + * @update_nol: Update NOL. + * @dfs_nol_free_list: NOL free list. + * @dfs_nol_elem_free_work: The work queue to free an NOL element. + * @dfs_cac_timer: CAC timer. + * @dfs_cac_valid_timer: Ignore CAC when this timer is running. + * @dfs_cac_timeout_override: Overridden cac timeout. + * @dfs_enable: DFS Enable. + * @dfs_cac_timer_running: DFS CAC timer running. + * @dfs_ignore_dfs: Ignore DFS. + * @dfs_ignore_cac: Ignore CAC. + * @dfs_cac_valid: DFS CAC valid. + * @dfs_cac_valid_time: Time for which CAC will be valid and will + * not be re-done. + * @dfs_precac_timeout_override: Overridden precac timeout. + * @dfs_disable_radar_marking: To mark or unmark NOL chan as radar hit. + * @dfs_precac_list: PreCAC list (contains individual trees). + * @dfs_precac_chwidth: PreCAC channel width enum. + * @dfs_curchan: DFS current channel. + * @dfs_prevchan: DFS previous channel. + * @dfs_cac_started_chan: CAC started channel. + * @dfs_pdev_obj: DFS pdev object. + * @dfs_soc_obj: DFS soc object. + * @dfs_psoc_idx: DFS psoc index + * @dfs_agile_precac_freq_mhz: Freq in MHZ configured on Agile DFS engine. + * @dfs_is_offload_enabled: Set if DFS offload enabled. + * @dfs_is_bangradar_320_supported: Set if DFS 320MHZ enabled. + * @dfs_is_radar_found_chan_freq_eq_center_freq: + * Set if chan_freq parameter of the radar + * found wmi event indicates channel center. + * @dfs_use_nol: Use the NOL when radar found(default: TRUE) + * @dfs_nol_lock: Lock to protect nol list. + * @tx_leakage_threshold: Tx leakage threshold for dfs. + * @dfs_use_nol_subchannel_marking: Use subchannel marking logic to add only + * radar affected subchannel instead of all + * bonding channels. + * @dfs_spoof_test_done: Indicates if the sppof test is done. * @dfs_is_stadfs_enabled: Is STADFS enabled. - * @dfs_min_sidx: Minimum sidx of the received radar pulses. - * @dfs_max_sidx: Maximum sidx of the received radar pulses. * @dfs_seg_id: Segment ID of the radar hit channel. * @dfs_is_chirp: Radar Chirp in pulse present or not. * @dfs_bw_reduced: DFS bandwidth reduced channel bit. * @dfs_freq_offset: Frequency offset where radar was found. * @dfs_cac_aborted: DFS cac is aborted. - * @dfs_disable_radar_marking: To mark or unmark NOL chan as radar hit. - * @dfs_data_struct_lock: DFS data structure lock. This is to protect - * all the filtering data structures. For - * example: dfs_bin5radars, dfs_filtertype, - * etc. * @dfs_nol_ie_bandwidth: Minimum Bandwidth of subchannels that * are added to NOL. * @dfs_nol_ie_startfreq: The centre frequency of the starting @@ -1117,7 +1132,6 @@ struct dfs_rcac_params { * to be sent in NOL IE with RCSA. * @dfs_is_rcsa_ie_sent: To send or to not send RCSA IE. * @dfs_is_nol_ie_sent: To send or to not send NOL IE. - * @dfs_agile_precac_ucfg: User configuration for agile preCAC. * @dfs_bw_expand_target_freq: User configured Channel frequency for * bandwidth expansion feature. * @dfs_bw_expand_des_mode: User configured Channel Phymode for @@ -1126,16 +1140,11 @@ struct dfs_rcac_params { * disabling BW Expansion feature. * @dfs_use_puncture: User configured value for enabling or * disabling DFS puncturing feature. + * @dfs_agile_precac_ucfg: User configuration for agile preCAC. * @dfs_agile_rcac_ucfg: User configuration for Rolling CAC. * @dfs_fw_adfs_support_320: Target Agile DFS support for 320 BW. * @dfs_fw_adfs_support_non_160: Target Agile DFS support for non-160 BWs. * @dfs_fw_adfs_support_160: Target Agile DFS support for 160 BW. - * @dfs_allow_hw_pulses: Allow/Block HW pulses. When synthetic - * pulses are injected, the HW pulses should - * be blocked and this variable should be - * false so that HW pulses and synthetic - * pulses do not get mixed up. - * defer timer running. * @dfs_defer_params: DFS deferred event parameters (allocated * only for the duration of defer alone). * @dfs_agile_detector_id: Agile detector ID for the DFS object. @@ -1334,7 +1343,7 @@ struct wlan_dfs { #if defined(QCA_SUPPORT_AGILE_DFS) || defined(ATH_SUPPORT_ZERO_CAC_DFS) /** * struct wlan_dfs_priv - dfs private struct with agile capability info - * @wlan_dfs: pointer to wlan_dfs object. + * @dfs: pointer to wlan_dfs object. * @agile_precac_active: agile precac active information for wlan_dfs_priv obj */ struct wlan_dfs_priv { @@ -1355,17 +1364,18 @@ struct wlan_dfs_priv { * radar detection related information to host. * @dfs_priv: array of dfs private structs with agile capability info * @num_dfs_privs: array size of dfs private structs for given psoc. - * @cur_dfs_index: index of the current dfs object using the Agile Engine. + * @cur_agile_dfs_index: index of the current dfs object using the Agile Engine. * It is used to index struct wlan_dfs_priv dfs_priv[] array. * @dfs_precac_timer: agile precac timer * @dfs_precac_timer_running: precac timer running flag + * @precac_state_started: true if pre-CAC has started * @ocac_status: Off channel CAC complete status - * @dfs_nol_ctx: dfs NOL data for all radios. + * @dfs_psoc_nolinfo: dfs NOL data for all radios. * @dfs_rcac_timer: Agile RCAC (Rolling CAC) timer. * @dfs_agile_sm_hdl: The handle for the state machine that drives Agile * Engine. * @dfs_agile_sm_cur_state: Current state of the Agile State Machine. - * @dfs_rcac_sm_lock: DFS Rolling CAC state machine lock. + * @dfs_agile_sm_lock: Agile state machine lock. */ struct dfs_soc_priv_obj { struct wlan_objmgr_psoc *psoc; @@ -1392,7 +1402,7 @@ struct dfs_soc_priv_obj { }; /** - * enum DFS debug - This should match the table from if_ath.c. + * enum dfs_debug - This should match the table from if_ath.c. * @WLAN_DEBUG_DFS: Minimal DFS debug. * @WLAN_DEBUG_DFS1: Normal DFS debug. * @WLAN_DEBUG_DFS2: Maximal DFS debug. @@ -1409,8 +1419,10 @@ struct dfs_soc_priv_obj { * detection. * @WLAN_DEBUG_DFS_RANDOM_CHAN: Random channel selection. * @WLAN_DEBUG_DFS_AGILE: Agile PreCAC/RCAC + * @WLAN_DEBUG_DFS_MAX: Max flag + * @WLAN_DEBUG_DFS_ALWAYS: Always debug */ -enum { +enum dfs_debug { WLAN_DEBUG_DFS = 0x00000100, WLAN_DEBUG_DFS1 = 0x00000200, WLAN_DEBUG_DFS2 = 0x00000400, @@ -1430,18 +1442,18 @@ enum { WLAN_DEBUG_DFS_ALWAYS = WLAN_DEBUG_DFS_MAX }; -/** - * enum host dfs spoof check status. - * @HOST_DFS_CHECK_PASSED: Host indicates RADAR detected and the FW - * confirms it to be spoof radar to host. - * @HOST_DFS_CHECK_FAILED: Host doesn't indicate RADAR detected or spoof - * radar parameters by - * WMI_HOST_DFS_RADAR_FOUND_CMDID doesn't match. - * @HOST_DFS_STATUS_CHECK_HW_RADAR: Host indicates RADAR detected and the - * FW confirms it to be real HW radar to host. - */ #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) -enum { +/** + * enum host_dfs_spoof_check_status - DFS spoof check status values + * @HOST_DFS_STATUS_CHECK_PASSED: Host indicates RADAR detected and the FW + * confirms it to be spoof radar to host. + * @HOST_DFS_STATUS_CHECK_FAILED: Host doesn't indicate RADAR detected or spoof + * radar parameters by + * WMI_HOST_DFS_RADAR_FOUND_CMDID doesn't match. + * @HOST_DFS_STATUS_CHECK_HW_RADAR: Host indicates RADAR detected and the FW + * confirms it to be real HW radar to host. + */ +enum host_dfs_spoof_check_status { HOST_DFS_STATUS_CHECK_PASSED = 0, HOST_DFS_STATUS_CHECK_FAILED = 1, HOST_DFS_STATUS_CHECK_HW_RADAR = 2 @@ -1800,9 +1812,8 @@ void dfs_print_filter(struct wlan_dfs *dfs, * @index: To save the index of dfs_radar[] * @ext_chan_flag: Extension channel flag; */ -struct dfs_state *dfs_getchanstate(struct wlan_dfs *dfs, - uint8_t *index, - int ext_ch_flag); +struct dfs_state *dfs_getchanstate(struct wlan_dfs *dfs, uint8_t *index, + int ext_chan_flag); /** * dfs_round() - DFS found. @@ -1873,7 +1884,7 @@ void dfs_add_pulse(struct wlan_dfs *dfs, int dfs_bin_check(struct wlan_dfs *dfs, struct dfs_filter *rf, uint32_t deltaT, - uint32_t dur, + uint32_t width, int ext_chan_flag); /** @@ -2035,6 +2046,7 @@ void dfs_reset(struct wlan_dfs *dfs); * dfs_radar_enable() - Enables the radar. * @dfs: Pointer to wlan_dfs structure. * @no_cac: If no_cac is 0, it cancels the CAC. + * @opmode: Operational mode */ #if defined(WLAN_DFS_PARTIAL_OFFLOAD) void dfs_radar_enable(struct wlan_dfs *dfs, @@ -2207,7 +2219,7 @@ void dfs_start_cac_timer(struct wlan_dfs *dfs); /** * dfs_cac_valid_reset_for_freq() - Cancels the dfs_cac_valid_timer timer. * @dfs: Pointer to wlan_dfs structure. - * @prevchan_chan: Prevchan frequency + * @prevchan_freq: Prevchan frequency * @prevchan_flags: Prevchan flags. */ #ifdef CONFIG_CHAN_FREQ_API @@ -2674,6 +2686,7 @@ void dfs_get_nol_chfreq_and_chwidth(struct dfsreq_nolelem *dfs_nol, * @prev: prev index. * @i: Index. * @this: index to br_elems[] + * @index: index array. */ void bin5_rules_check_internal(struct wlan_dfs *dfs, struct dfs_bin5radars *br, @@ -2734,11 +2747,11 @@ int dfs_second_segment_radar_disable(struct wlan_dfs *dfs); /** * dfs_fetch_nol_ie_info() - Fill NOL information to be sent with RCSA. - * @dfs - Pointer to wlan_dfs structure. - * @nol_ie_bandwidth - Minimum subchannel bandwidth. - * @nol_ie_startfreq - Radar affected channel list's first subchannel's - * - centre frequency. - * @nol_ie_bitmap - NOL bitmap denoting affected subchannels. + * @dfs: Pointer to wlan_dfs structure. + * @nol_ie_bandwidth: Minimum subchannel bandwidth. + * @nol_ie_startfreq: Radar affected channel list's first subchannel's + * centre frequency. + * @nol_ie_bitmap: NOL bitmap denoting affected subchannels. */ #if defined(QCA_DFS_RCSA_SUPPORT) void dfs_fetch_nol_ie_info(struct wlan_dfs *dfs, uint8_t *nol_ie_bandwidth, @@ -2794,11 +2807,11 @@ void dfs_get_rcsa_flags(struct wlan_dfs *dfs, bool *is_rcsa_ie_sent, /** * dfs_process_nol_ie_bitmap() - Update NOL with external radar information. - * @dfs - Pointer to wlan_dfs structure. - * @nol_ie_bandwidth - Minimum subchannel bandwidth. - * @nol_ie_starfreq - Radar affected channel list's first subchannel's - * - centre frequency. - * @nol_ie_bitmap - Bitmap denoting radar affected subchannels. + * @dfs: Pointer to wlan_dfs structure. + * @nol_ie_bandwidth: Minimum subchannel bandwidth. + * @nol_ie_startfreq: Radar affected channel list's first subchannel's + * centre frequency. + * @nol_ie_bitmap: Bitmap denoting radar affected subchannels. * * Return: True if NOL IE should be propagated, else false. */ @@ -2849,6 +2862,7 @@ void dfs_timer_detach(struct wlan_dfs *dfs); * dfs_is_disable_radar_marking_set() - Check if radar marking is set on * NOL chan. * @dfs: Pointer to wlan_dfs structure. + * @disable_radar_marking: Is radar marking disabled. */ #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) int dfs_is_disable_radar_marking_set(struct wlan_dfs *dfs, @@ -2875,7 +2889,7 @@ static inline bool dfs_get_disable_radar_marking(struct wlan_dfs *dfs) /** * dfs_reset_agile_config() - Reset the ADFS config variables. - * @dfs: Pointer to dfs_soc_priv_obj. + * @dfs_soc: Pointer to dfs_soc_priv_obj. */ #ifdef QCA_SUPPORT_AGILE_DFS void dfs_reset_agile_config(struct dfs_soc_priv_obj *dfs_soc); @@ -3058,7 +3072,7 @@ void dfs_clear_cac_started_chan(struct wlan_dfs *dfs); #ifdef QCA_DFS_BANGRADAR /** - * dfs_bangradar() - Handles all type of Bangradar. + * dfs_bang_radar() - Handles all type of Bangradar. * @dfs: Pointer to wlan_dfs structure. * @indata: reference to input data * @insize: input data size @@ -3135,10 +3149,9 @@ dfs_restart_rcac_on_nol_expiry(struct wlan_dfs *dfs) #endif /** - * dfs_chan_to_ch_width: Outputs the channel width in MHz of the given input - * dfs_channel. - * - * chan: Pointer to the input dfs_channel structure. + * dfs_chan_to_ch_width() - Outputs the channel width in MHz of the given input + * dfs_channel. + * @chan: Pointer to the input dfs_channel structure. * * Return: Channel width in MHz. (uint16) -EINVAL on invalid channel. */ diff --git a/umac/dfs/core/src/dfs_partial_offload_radar.h b/umac/dfs/core/src/dfs_partial_offload_radar.h index f40a37d049..e6f56e9881 100644 --- a/umac/dfs/core/src/dfs_partial_offload_radar.h +++ b/umac/dfs/core/src/dfs_partial_offload_radar.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -39,7 +39,7 @@ static inline void dfs_get_po_radars(struct wlan_dfs *dfs) #endif /** - * dfs_send_avg_params_to_fw - send avg radar parameters to FW. + * dfs_send_avg_params_to_fw() - send avg radar parameters to FW. * @dfs: Pointer to wlan_dfs structure. * @params: Pointer to dfs_radar_found_params. * @@ -219,7 +219,7 @@ static inline void dfs_allow_hw_pulses(struct wlan_dfs *dfs, #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(WLAN_DFS_SYNTHETIC_RADAR) /** * dfs_is_hw_pulses_allowed() - Check if HW pulses are allowed or not. - * @pdev: Pointer to DFS pdev object. + * @dfs: Pointer to wlan_dfs structure. * * Return: bool */ diff --git a/umac/dfs/core/src/dfs_process_radar_found_ind.h b/umac/dfs/core/src/dfs_process_radar_found_ind.h index 4b6e44de3a..e1b84da8e7 100644 --- a/umac/dfs/core/src/dfs_process_radar_found_ind.h +++ b/umac/dfs/core/src/dfs_process_radar_found_ind.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -36,7 +36,7 @@ #define BW_160 160 #define BW_320 320 /** - * dfs_false_radarfound_reset_vars () - Reset dfs radar detection related + * dfs_flush_additional_pulses() - Reset dfs radar detection related * variables and queues after processing radar and disabling phyerror reception. * * @dfs: Pointer to wlan_dfs structure. @@ -341,7 +341,7 @@ dfs_get_bonding_channel_without_seg_info_for_freq(struct dfs_channel *chan, /** * dfs_set_nol_subchannel_marking() - Set or unset NOL subchannel marking. * @dfs: Pointer to wlan_dfs structure. - * @nol_subchannel_marking - Configure NOL subchannel marking. + * @nol_subchannel_marking: Configure NOL subchannel marking. * * Return: Status of the configuration. */ @@ -352,7 +352,7 @@ dfs_set_nol_subchannel_marking(struct wlan_dfs *dfs, /** * dfs_get_nol_subchannel_marking() - Get the value of NOL subchannel marking. * @dfs: Pointer to wlan_dfs structure. - * @nol_subchannel_marking - Read and store the value of NOL subchannel marking + * @nol_subchannel_marking: Read and store the value of NOL subchannel marking * config. * * Return: Status of the read. diff --git a/umac/dfs/core/src/dfs_random_chan_sel.h b/umac/dfs/core/src/dfs_random_chan_sel.h index 9c69d1fa81..9e11c562b3 100644 --- a/umac/dfs/core/src/dfs_random_chan_sel.h +++ b/umac/dfs/core/src/dfs_random_chan_sel.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -188,6 +188,7 @@ struct chan_bonding_bitmap { /** * struct dfs_tx_leak_info - DFS leakage info * @leak_chan: leak channel. + * @leak_chan_freq: leak channel frequency. * @leak_lvl: tx leakage lvl. */ struct dfs_tx_leak_info { @@ -199,7 +200,8 @@ struct dfs_tx_leak_info { /** * struct dfs_matrix_tx_leak_info - DFS leakage matrix info for dfs channel. * @channel: channel to switch from - * @chan_matrix DFS leakage matrix info for given dfs channel. + * @channel_freq: channel frequency + * @chan_matrix: DFS leakage matrix info for given dfs channel. */ struct dfs_matrix_tx_leak_info { uint8_t channel; @@ -234,10 +236,9 @@ QDF_STATUS dfs_mark_leaking_chan_for_freq(struct wlan_dfs *dfs, * from the list of available channels. * @dfs: dfs handler. * @chan_list: channel list. - * @ch_count: Number of channels in given list. + * @chan_cnt: Number of channels in given list. * @flags: DFS_RANDOM_CH_FLAG_* - * @chan_wd: input channel width, used same variable to return new ch width. - * @cur_chan: current channel. + * @chan_params: channel parameters * @dfs_region: DFS region. * @acs_info: acs channel range information. * @@ -250,8 +251,8 @@ QDF_STATUS dfs_mark_leaking_chan_for_freq(struct wlan_dfs *dfs, */ #ifdef CONFIG_CHAN_FREQ_API uint16_t dfs_prepare_random_channel_for_freq(struct wlan_dfs *dfs, - struct dfs_channel *ch_list, - uint32_t chan_count, + struct dfs_channel *chan_list, + uint32_t chan_cnt, uint32_t flags, struct ch_params *chan_params, uint8_t dfs_region, diff --git a/umac/dfs/core/src/dfs_structs.h b/umac/dfs/core/src/dfs_structs.h index 0700b896c2..7810df2e02 100644 --- a/umac/dfs/core/src/dfs_structs.h +++ b/umac/dfs/core/src/dfs_structs.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2011-2012, 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -21,7 +22,7 @@ #ifndef _DFS_STRUCTS_H_ #define _DFS_STRUCTS_H_ -/** +/* * This represents the general case of the radar PHY configuration, * across all chips. * @@ -32,7 +33,7 @@ #define WLAN_DFS_PHYERR_PARAM_NOVAL 0xFFFF #define WLAN_DFS_PHYERR_PARAM_ENABLE 0x8000 -/** +/* * For the dfs_nol_clist_update() method - this is the * update command. */ diff --git a/umac/dfs/core/src/dfs_zero_cac.h b/umac/dfs/core/src/dfs_zero_cac.h index fb30bf8c18..f219636614 100644 --- a/umac/dfs/core/src/dfs_zero_cac.h +++ b/umac/dfs/core/src/dfs_zero_cac.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. * @@ -359,7 +359,7 @@ static inline bool dfs_is_precac_done(struct wlan_dfs *dfs, * precac status of configured * DFS channel. * @dfs: Pointer to wlan_dfs structure. - * @pref_chan: Configured DFS channel frequency + * @pref_chan_freq: Configured DFS channel frequency * @mode: Configured PHY mode. * * Return: True if intermediate channel needs to configure. False otherwise. @@ -587,8 +587,7 @@ dfs_set_fw_adfs_support(struct wlan_dfs *dfs, /** * dfs_agile_soc_obj_init() - Initialize soc obj for agile precac. * @dfs: Pointer to wlan_dfs structure. - * @precac_chan: Start thr precac timer in this channel. - * @ocac_status: Status of the off channel CAC. + * @psoc: Pointer to psoc object */ void dfs_agile_soc_obj_init(struct wlan_dfs *dfs, struct wlan_objmgr_psoc *psoc); @@ -715,8 +714,8 @@ static inline uint32_t dfs_get_intermediate_chan(struct wlan_dfs *dfs) /** * dfs_get_precac_chan_state_for_freq() - Get precac status of a given channel. - * @dfs: Pointer to wlan_dfs structure. - * @precac_chan: Channel freq for which precac state need to be checked. + * @dfs: Pointer to wlan_dfs structure. + * @precac_chan_freq: Channel freq for which precac state need to be checked. */ #ifdef CONFIG_CHAN_FREQ_API @@ -766,8 +765,8 @@ static inline void dfs_reinit_precac_lists(struct wlan_dfs *src_dfs, /** * dfs_is_precac_done_on_non_80p80_chan_for_freq() - Is precac done on * a 20/40/80/160/165/320 MHz channel. - *@dfs: Pointer to wlan_dfs structure. - *@chan: Channel frequency + * @dfs: Pointer to wlan_dfs structure. + * @chan_freq: Channel frequency * * Return: * * True: If CAC is done on channel. @@ -844,7 +843,7 @@ void dfs_mark_precac_nol_for_freq(struct wlan_dfs *dfs, /** * dfs_unmark_precac_nol_for_freq() - Unmark the precac channel as radar. * @dfs: Pointer to wlan_dfs structure. - * @channel: channel freq marked as radar. + * @chan_freq: channel freq marked as radar. */ #ifdef CONFIG_CHAN_FREQ_API void dfs_unmark_precac_nol_for_freq(struct wlan_dfs *dfs, uint16_t chan_freq); diff --git a/umac/dfs/core/src/filtering/dfs_bindetects.c b/umac/dfs/core/src/filtering/dfs_bindetects.c index 2d7f91c501..470fafc159 100644 --- a/umac/dfs/core/src/filtering/dfs_bindetects.c +++ b/umac/dfs/core/src/filtering/dfs_bindetects.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2002-2010, Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -90,6 +90,9 @@ static inline bool dfs_ts_within_window( * dfs_ts_eq_prevts() - Calculate pulses for timestamp equals to prev event * @dfs: Pointer to wlan_dfs structure. * @pl: Pointer to dfs_pulseline structure. + * @next_event_ts: next event timestamp + * @event_ts: current event timestamp + * @refpri: reference PRI * @index: Index to dfs pulse elements. * @dur: Pulse duration/width * @numpulses: Number of pulses 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 48578ae057..5f7900989f 100644 --- a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c +++ b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2011, Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -34,7 +34,7 @@ #include "../dfs_confirm_radar.h" #ifdef MOBILE_DFS_SUPPORT -/** +/* * struct dfs_pulse dfs_fcc_radars_qcn7605 - FCC radar table for QCN7605 * chipsets. */ @@ -66,7 +66,7 @@ static const struct dfs_pulse dfs_fcc_radars_qcn7605[] = { {18, 1, 325, 500, 0, 4, 9, 0, 1, 22, 0, 3, 0, 5, 0, 23}, }; -/** +/* * struct dfs_pulse dfs_mkk4_radars_qcn7605 - MKK4 radar table for QCN7605 * chipsets. */ @@ -100,7 +100,7 @@ static const struct dfs_pulse dfs_mkk4_radars_qcn7605[] = { {16, 15, 2000, 5000, 0, 4, 7, 11, 23, 22, 0, 3, 0, 5, 0, 11}, }; -/** +/* * dfs_pulse dfs_etsi_radars_qcn7605 - ETSI radar table for QCN7605 * chipsets. */ @@ -154,7 +154,7 @@ static const struct dfs_pulse dfs_etsi_radars_qcn7605[] = { }; static const struct dfs_pulse dfs_mkk4_radars_qcn7605[] = { }; #endif -/** +/* * struct dfs_pulse dfs_fcc_radars - FCC radar table for Offload chipsets. */ static struct dfs_pulse dfs_fcc_radars[] = { @@ -185,7 +185,7 @@ static struct dfs_pulse dfs_fcc_radars[] = { {18, 1, 325, 500, 0, 4, 9, 0, 1, 22, 0, 3, 0, 5, 0, 23}, }; -/** +/* * struct dfs_pulse dfs_mkk4_radars - MKK4 radar table for Offload chipsets. */ static struct dfs_pulse dfs_mkk4_radars[] = { @@ -219,7 +219,7 @@ 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_bin5pulse dfs_fcc_bin5pulses - FCC BIN5 pulses for Offload * chipsets. */ @@ -227,7 +227,7 @@ static struct dfs_bin5pulse dfs_fcc_bin5pulses[] = { {6, 28, 105, 12, 18, 5}, }; -/** +/* * struct dfs_bin5pulse dfs_jpn_bin5pulses - JAPAN BIN5 pulses for Offload * chipsets. */ @@ -235,7 +235,7 @@ static struct dfs_bin5pulse dfs_jpn_bin5pulses[] = { {5, 28, 105, 12, 22, 5}, }; -/** +/* * dfs_bin5pulse dfs_fcc_bin5pulses_ar900b - FCC BIN5 pulses for AR9300 * chipsets. * @@ -250,7 +250,7 @@ static struct dfs_bin5pulse dfs_fcc_bin5pulses_ar900b[] = { {5, 28, 105, 12, 20, 5}, }; -/** +/* * dfs_bin5pulse dfs_jpn_bin5pulses_ar900b - JAPAN BIN5 pulses for AR9300 * chipsets. */ @@ -258,7 +258,7 @@ static struct dfs_bin5pulse dfs_jpn_bin5pulses_ar900b[] = { {5, 28, 105, 12, 20, 5}, }; -/** +/* * dfs_bin5pulse dfs_fcc_bin5pulses_qca9984 - FCC BIN5 pulses for QCA9984 * chipsets. * WAR : IR-83400 @@ -272,7 +272,7 @@ static struct dfs_bin5pulse dfs_fcc_bin5pulses_qca9984[] = { {5, 20, 105, 12, 20, 0}, }; -/** +/* * dfs_bin5pulse dfs_jpn_bin5pulses_qca9984 - JAPAN BIN5 pulses for QCA9984 * chipsets. */ @@ -280,7 +280,7 @@ static struct dfs_bin5pulse dfs_jpn_bin5pulses_qca9984[] = { {5, 20, 105, 12, 20, 0}, }; -/** +/* * dfs_pulse dfs_etsi_radars - ETSI radar table. */ static struct dfs_pulse dfs_etsi_radars[] = { @@ -329,7 +329,7 @@ static struct dfs_pulse dfs_etsi_radars[] = { {20, 30, 2000, 4000, 0, 4, 6, 19, 33, 24, 0, 0, 0, 24, 1, 36}, }; -/** +/* * dfs_pulse dfs_china_radars - CHINA radar table. */ static struct dfs_pulse dfs_china_radars[] = { @@ -367,7 +367,7 @@ static struct dfs_pulse dfs_china_radars[] = { {20, 1, 1000, 1000, 0, 6, 6, 0, 1, 18, 0, 3, 0, 0, 0, 50}, }; -/** +/* * dfs_pulse dfs_korea_radars - KOREA radar table. */ static struct dfs_pulse dfs_korea_radars[] = { @@ -471,9 +471,10 @@ void dfs_handle_radar_tab_init_failure(struct wlan_dfs_radar_tab_info *rinfo) /** * dfs_merge_external_radar() - Get and merge the external radar table with * internal radar table. - * @dfs: Pointer to the DFS structure. * @rinfo: Pointer to wlan_dfs_radar_tab_info structure. + * @external_radars: list of external radar pulses * @dfsdomain: dfs domain. + * @num_ext_radars: number of @external_radar entries * * Return: Pointer to the allocated merged radar table if success, else NULL. * The caller is responsible for freeing up the allocated memory when no longer @@ -513,7 +514,7 @@ void dfs_update_radar_info(struct wlan_dfs_radar_tab_info *rinfo, * dfs_assign_mkk_bin5_radars() - Assign the MKK bin5 radar table * @rinfo: Pointer to wlan_dfs_radar_tab_info structure. * @target_type: Target type. - * @tx_ops: target tx ops. + * @tgt_tx_ops: target tx ops. */ static void dfs_assign_mkk_bin5_radars(struct wlan_dfs_radar_tab_info *rinfo, @@ -731,9 +732,12 @@ void dfs_send_avg_params_to_fw(struct wlan_dfs *dfs, tgt_dfs_send_avg_params_to_fw(dfs->dfs_pdev_obj, params); } -/** +/* * dfs_no_res_from_fw_task() - The timer function that is called if there is no * response from fw after sending the average radar pulse parameters. + * + * NB: not using kernel-doc format since the kernel-doc script doesn't + * handle the os_timer_func() macro */ static os_timer_func(dfs_no_res_from_fw_task) { diff --git a/umac/dfs/core/src/filtering/dfs_phyerr_tlv.c b/umac/dfs/core/src/filtering/dfs_phyerr_tlv.c index 8bbf40be3a..109418806b 100644 --- a/umac/dfs/core/src/filtering/dfs_phyerr_tlv.c +++ b/umac/dfs/core/src/filtering/dfs_phyerr_tlv.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012, 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -166,11 +166,11 @@ static void dfs_radar_summary_parse(struct wlan_dfs *dfs, } /** - * dfs_radar_fft_search_report_parse () - Parse FFT report. + * dfs_radar_fft_search_report_parse() - Parse FFT report. * @dfs: pointer to wlan_dfs structure. * @buf: Phyerr buffer. * @len: Phyerr buflen. - * @rsu: Pointer to rx_radar_status structure. + * @rsfr: Pointer to rx_search_fft_report structure. */ static void dfs_radar_fft_search_report_parse(struct wlan_dfs *dfs, const char *buf, diff --git a/umac/dfs/core/src/filtering/dfs_process_radarevent.c b/umac/dfs/core/src/filtering/dfs_process_radarevent.c index 5ecdc4c879..40603ba9d2 100644 --- a/umac/dfs/core/src/filtering/dfs_process_radarevent.c +++ b/umac/dfs/core/src/filtering/dfs_process_radarevent.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2013, 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2002-2010, Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -102,7 +102,7 @@ static inline uint8_t dfs_process_pulse_dur(struct wlan_dfs *dfs, } #ifdef DFS_FCC_TYPE4_DURATION_CHECK -/* +/** * dfs_dur_check() - Modify the pulse duration for FCC Type 4 and JAPAN W56 * Type 8 radar pulses when the conditions mentioned in the * function body are reported in the radar summary report. @@ -154,7 +154,7 @@ static inline void dfs_dur_check( } #endif -/* +/** * dfs_print_radar_events() - Prints the Radar events. * @dfs: Pointer to wlan_dfs structure. */ @@ -366,7 +366,7 @@ static bool dfs_is_real_radar(struct wlan_dfs *dfs, } #endif /* CONFIG_EXT_RADAR_PROCESS */ -/* +/** * dfs_reject_on_pri() - Rejecting on individual filter based on min PRI . * @dfs: Pointer to wlan_dfs structure. * @rf: Pointer to dfs_filter structure. @@ -448,19 +448,21 @@ static inline void dfs_confirm_radar_check( } } -/* +/** * __dfs_process_radarevent() - Continuation of process a radar event function. * @dfs: Pointer to wlan_dfs structure. * @ft: Pointer to dfs_filtertype structure. * @re: Pointer to dfs_event structure. * @this_ts: Timestamp. + * @found: set if radar event is found + * @false_radar_found: set if false radar found * * There is currently no way to specify that a radar event has occurred on * a specific channel, so the current methodology is to mark both the pri * and ext channels as being unavailable. This should be fixed for 802.11ac * or we'll quickly run out of valid channels to use. * - * Return: If a radar event is found, return 1. Otherwise, return 0. + * Return: void */ static void __dfs_process_radarevent(struct wlan_dfs *dfs, struct dfs_filtertype *ft, @@ -669,10 +671,13 @@ static void dfs_print_radar_found_freq(struct wlan_dfs *dfs) #endif /** - * dfs_handle_bangradar - Handle the case of bangradar + * dfs_handle_bangradar() - Handle the case of bangradar * @dfs: Pointer to wlan_dfs structure. * @chan: Current channel. * @rs: Pointer to dfs_state. + * @seg_id: Pointer to segment id + * @retval: Pointer to return value + * * Return: if bangradar then return 1. Otherwise, return 0. */ static inline int dfs_handle_bangradar( @@ -1156,11 +1161,12 @@ static inline void dfs_calculate_timestamps( } /** - * dfs_add_to_pulseline - Extract necessary items from dfs_event and + * dfs_add_to_pulseline() - Extract necessary items from dfs_event and * add it as pulse in the pulseline * @dfs: Pointer to wlan_dfs structure. * @re: Pointer to re(radar event) - * @this_ts: Pointer to this_ts (this timestamp) + * @this_ts: Pointer to this_ts (this timestamp) + * @test_ts: Pointer to test_ts (test timestamp) * @diff_ts: Diff ts. * @index: Pointer to get index value. */ @@ -1229,7 +1235,7 @@ static inline void dfs_add_to_pulseline( } /** - * dfs_conditional_clear_delaylines - Clear delay lines to remove the + * dfs_conditional_clear_delaylines() - Clear delay lines to remove the * false pulses. * @dfs: Pointer to wlan_dfs structure. * @diff_ts: diff between timerstamps. @@ -1278,7 +1284,7 @@ static inline void dfs_conditional_clear_delaylines( } /** - * dfs_process_each_radarevent - remove each event from the dfs radar queue + * dfs_process_each_radarevent() - remove each event from the dfs radar queue * and process it. * @dfs: Pointer to wlan_dfs structure. * @chan: Pointer to DFS current channel. @@ -1363,8 +1369,8 @@ static inline int dfs_process_each_radarevent( } /** - * dfs_false_radarfound_reset_vars () - Reset dfs variables after false radar - * found. + * dfs_false_radarfound_reset_vars() - Reset dfs variables after false radar + * found. * @dfs: Pointer to wlan_dfs structure. */ void dfs_false_radarfound_reset_vars( @@ -1383,15 +1389,16 @@ void dfs_false_radarfound_reset_vars( } /** - * dfs_process_radarevent() - For Full Offload, FW sends segment id,freq_offset - * and chirp information and gets assigned when there is radar detect. In - * case of radartool bangradar enhanced command and real radar for DA and PO, - * we assign these information here. - * + * dfs_fill_radar_found_info() - Fill radar found info * @dfs: Pointer to wlan_dfs structure. * @radar_found: Pointer to radar_found_info structure. + * + * For Full Offload, FW sends segment id, freq_offset and chirp + * information and gets assigned when there is radar detect. In case + * of radartool bangradar enhanced command and real radar for DA and + * PO, we assign these information here. + * */ - static void dfs_fill_radar_found_info(struct wlan_dfs *dfs, struct radar_found_info *radar_found) diff --git a/umac/dfs/core/src/misc/dfs.c b/umac/dfs/core/src/misc/dfs.c index 31ca1be508..f42ddcba2a 100644 --- a/umac/dfs/core/src/misc/dfs.c +++ b/umac/dfs/core/src/misc/dfs.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2002-2006, Atheros Communications Inc. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -38,7 +38,7 @@ #define DISABLE_NOL_FW 0 #ifndef WLAN_DFS_STATIC_MEM_ALLOC -/* +/** * dfs_alloc_wlan_dfs() - allocate wlan_dfs buffer * * Return: buffer, null on failure. @@ -48,7 +48,7 @@ static inline struct wlan_dfs *dfs_alloc_wlan_dfs(void) return qdf_mem_malloc(sizeof(struct wlan_dfs)); } -/* +/** * dfs_free_wlan_dfs() - Free wlan_dfs buffer * @dfs: wlan_dfs buffer pointer * @@ -59,7 +59,7 @@ static inline void dfs_free_wlan_dfs(struct wlan_dfs *dfs) qdf_mem_free(dfs); } -/* +/** * dfs_alloc_dfs_curchan() - allocate dfs_channel buffer * * Return: buffer, null on failure. @@ -74,7 +74,7 @@ static inline struct dfs_channel *dfs_alloc_dfs_prevchan(void) return qdf_mem_malloc(sizeof(struct dfs_channel)); } -/* +/** * dfs_free_dfs_chan() - Free dfs_channel buffer * @dfs_chan: dfs_channel buffer pointer * @@ -116,12 +116,15 @@ static inline void dfs_free_dfs_chan(struct dfs_channel *dfs_chan) } #endif -/** +/* * dfs_testtimer_task() - Sends CSA in the current channel. * * When the user sets usenol to 0 and inject the RADAR, AP does not mark the * channel as RADAR and does not add the channel to NOL. It sends the CSA in * the current channel. + * + * NB: not using kernel-doc format since the kernel-doc script doesn't + * handle the os_timer_func() macro */ #ifdef CONFIG_CHAN_FREQ_API static os_timer_func(dfs_testtimer_task) @@ -703,6 +706,7 @@ dfs_is_chan_punc_same_as_given_punc(struct dfs_channel *dfs_curchan, * @dfs_ch_flagext: New curchan's channel flags extension. * @dfs_ch_vhtop_ch_freq_seg1: New curchan's primary centre IEEE. * @dfs_ch_vhtop_ch_freq_seg2: New curchan's secondary centre IEEE. + * @dfs_chan_punc_pattern: Channel puncture pattern * * Return: True if curchan has the same channel parameters of the given channel, * else false. @@ -865,7 +869,7 @@ uint8_t dfs_get_agile_detector_id(struct wlan_dfs *dfs) #endif /** - * dfs_chan_to_ch_width: Outputs the channel width in MHz of the given input + * dfs_chan_to_ch_width() - Outputs the channel width in MHz of the given input * dfs_channel. * @chan: Pointer to the input dfs_channel structure. * diff --git a/umac/dfs/core/src/misc/dfs_cac.c b/umac/dfs/core/src/misc/dfs_cac.c index 08b0fd9929..8e2d8289ed 100644 --- a/umac/dfs/core/src/misc/dfs_cac.c +++ b/umac/dfs/core/src/misc/dfs_cac.c @@ -2,7 +2,7 @@ * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting * All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -42,9 +42,12 @@ #define CH100_START_FREQ 5490 #define CH100 100 -/** +/* * dfs_cac_valid_timeout() - Timeout function for dfs_cac_valid_timer * cac_valid bit will be reset in this function. + * + * NB: not using kernel-doc format since the kernel-doc script doesn't + * handle the os_timer_func() macro */ static os_timer_func(dfs_cac_valid_timeout) { @@ -161,6 +164,7 @@ void dfs_process_cac_completion(struct wlan_dfs *dfs) /** * dfs_cac_timeout() - DFS cactimeout function. + * @arg: Container of dfs object. * * Sets dfs_cac_timer_running to 0 and dfs_cac_valid_timer. */ diff --git a/umac/dfs/core/src/misc/dfs_filter_init.c b/umac/dfs/core/src/misc/dfs_filter_init.c index 9f6856fe41..6bf0395947 100644 --- a/umac/dfs/core/src/misc/dfs_filter_init.c +++ b/umac/dfs/core/src/misc/dfs_filter_init.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2002-2006, Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -104,8 +104,11 @@ static inline void dfs_free_dfs_pulseline(struct dfs_pulseline *pulses) * usenol=2, no CSA and stay on the same channel on radar detect */ -/** +/* * dfs_task() - The timer function to process the radar pulses. + * + * NB: not using kernel-doc format since the kernel-doc script doesn't + * handle the os_timer_func() macro */ static os_timer_func(dfs_task) { diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index 3f62793abc..0de700cffd 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2002-2010, Atheros Communications Inc. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -54,7 +54,8 @@ bool dfs_get_update_nol_flag(struct wlan_dfs *dfs) } /** - * dfs_nol_elem_free_work_cb - Free NOL element + * dfs_nol_elem_free_work_cb() - Free NOL element + * @context: work context (wlan_dfs) * * Free the NOL element memory */ diff --git a/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c b/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c index 0d2c9244f8..0530e8583e 100644 --- a/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c +++ b/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -31,7 +31,7 @@ #include #include "wlan_dfs_mlme_api.h" #include "../dfs_internal.h" -/** +/* * TODO: The code is not according to the following description needs * modification and correction. Code always adds left and right channels to * NOL even if it is not a chirp radar. @@ -404,14 +404,15 @@ dfs_find_radar_affected_subchans_for_freq(struct wlan_dfs *dfs, #endif /** - * dfs_calc_bonding_freqs: Calculate bonding channel frequencies from the - * channel width's center frequency and channel width. - * It is assumed that the caller has allocated sufficient memory for 'freq_list' - * so that it can hold all the output subchannels. + * dfs_calc_bonding_freqs() - Calculate bonding channel frequencies + * @center_freq: Center frequency of the channel width. + * @ch_width: Channel width. + * @freq_list: output array of sub-channel frequencies. * - * center_freq: Center frequency of the channel width. - * ch_width: Channel width. - * freq_list: output array of sub-channel frequencies. + * Calculate bonding channel frequencies from the channel width's + * center frequency and channel width. It is assumed that the caller + * has allocated sufficient memory for @freq_list so that it can hold + * all the output subchannels. * * Return: void */ @@ -496,10 +497,11 @@ void dfs_get_160mhz_bonding_channels(uint16_t center_freq, uint16_t *freq_list) } /** - * dfs_get_320mhz_bonding_channels() - Get bonding frequency list of 320MHz + * dfs_get_320mhz_bonding_channels() - Get bonding frequency list of 320 MHz * channel. - * @center_freq: Center frequency of the 320MHz channel. + * @center_freq: Center frequency of the 320 MHz channel. * @freq_list: Pointer to frequency list. + * @nchannels: Number of channels in @freq_list * * Return: void */ @@ -511,9 +513,9 @@ void dfs_get_320mhz_bonding_channels(uint16_t center_freq, uint16_t *freq_list, uint16_t chwidth = 320; /* - * In 5Ghz band, the 320Mhz channel is always 80Mhz punctured - * to the right. Therefore, it is actually a 240Mhz channel and - * has twelve 20Mhz subchannels. + * In 5 GHz band, the 320 MHz channel is always 80 MHz punctured + * to the right. Therefore, it is actually a 240 MHz channel and + * has twelve 20 MHz subchannels. */ *nchannels = NUM_CHANNELS_240MHZ; dfs_calc_bonding_freqs(center_freq, chwidth, freq_list); @@ -529,7 +531,7 @@ void dfs_get_320mhz_bonding_channels(uint16_t center_freq, uint16_t *freq_list, } #endif -/* +/** * dfs_get_bonding_channel_without_seg_info_for_freq() - Get bonding frequency * list. * @chan: Pointer to dfs_channel. @@ -579,7 +581,7 @@ dfs_get_bonding_channel_without_seg_info_for_freq(struct dfs_channel *chan, #endif #ifdef CONFIG_CHAN_FREQ_API -/* +/** * dfs_get_agile_subchans_for_curchan_160() - Get bonding frequency list of * agile channels when current operating channel is 160MHz. * @@ -634,7 +636,7 @@ dfs_get_agile_subchans_for_curchan_160(struct wlan_dfs *dfs, } } -/* +/** * dfs_get_bonding_channels_for_freq() - Get bonding channel frequency. * @dfs: Pointer to wlan_dfs. * @curchan: Pointer to dfs_channel. @@ -1012,14 +1014,14 @@ dfs_process_radar_ind(struct wlan_dfs *dfs, #if defined(QCA_DFS_BW_PUNCTURE) && defined(WLAN_FEATURE_11BE) /** - * dfs_is_ignore_radar_for_punctured_chans: Store the radar bitmap and check if - * radar is found in already punctured - * channel and ignore the radar. - * - * dfs: Wlan_dfs structure - * dfs_radar_bitmap: Variable to store radar bitmap. - * freq_list: output array of sub-channel frequencies. - * num_channels: Number of sub-channels in target DFS channel. + * dfs_is_ignore_radar_for_punctured_chans() - Store the radar bitmap and check + * if radar is found in already + * punctured channel and ignore the + * radar. + * @dfs: Wlan_dfs structure + * @dfs_radar_bitmap: Variable to store radar bitmap. + * @freq_list: output array of sub-channel frequencies. + * @num_channels: Number of sub-channels in target DFS channel. * * Return: If radar is found on punctured channel then return true. * Else return false. diff --git a/umac/dfs/core/src/misc/dfs_random_chan_sel.c b/umac/dfs/core/src/misc/dfs_random_chan_sel.c index 8e1413e67c..9f8aaae3f3 100644 --- a/umac/dfs/core/src/misc/dfs_random_chan_sel.c +++ b/umac/dfs/core/src/misc/dfs_random_chan_sel.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -947,7 +947,7 @@ dfs_populate_40mhz_available_channel_for_freq(struct wlan_dfs *dfs, * @dfs: Pointer to DFS structure. * @bitmap: bitmap * @chan_width: channel width - * @avail_freq_list: prepared channel list + * @freq_list: prepared channel list * * Prepare channel list based on width and channel bitmap. * @@ -1019,6 +1019,9 @@ static uint16_t dfs_get_rand_from_lst_for_freq(struct wlan_dfs *dfs, } #endif +#ifdef CONFIG_CHAN_FREQ_API +#define FREQUENCY_BAND_LIMIT 60 + /** * dfs_random_channel_sel_set_bitmap_for_freq()- Set channel bit in bitmap based * on given channel number @@ -1030,8 +1033,6 @@ static uint16_t dfs_get_rand_from_lst_for_freq(struct wlan_dfs *dfs, * * Return: None */ -#ifdef CONFIG_CHAN_FREQ_API -#define FREQUENCY_BAND_LIMIT 60 static void dfs_random_channel_sel_set_bitmap_for_freq(struct wlan_dfs *dfs, struct chan_bonding_bitmap *bitmap, diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_init_deinit_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_init_deinit_api.h index c02e5d6cc4..a67024f095 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_init_deinit_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_init_deinit_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -29,8 +29,8 @@ /** * wlan_pdev_get_dfs_obj() - Get DFS object from PDEV. * @pdev: Pointer to PDEV structure. - * @id: DFS component ID. - * @obj: Pointer to DFS object. + * + * Return: DFS object */ struct wlan_dfs *wlan_pdev_get_dfs_obj(struct wlan_objmgr_pdev *pdev); @@ -52,6 +52,7 @@ QDF_STATUS dfs_deinit(void); /** * wlan_dfs_pdev_obj_create_notification() - DFS pdev object create handler. * @pdev: Pointer to DFS pdev object. + * @arg: component argument */ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, void *arg); @@ -59,6 +60,7 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, /** * wlan_dfs_pdev_obj_destroy_notification() - DFS pdev object delete handler. * @pdev: Pointer to DFS pdev object. + * @arg: component argument */ QDF_STATUS wlan_dfs_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, void *arg); diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_ioctl.h b/umac/dfs/dispatcher/inc/wlan_dfs_ioctl.h index 400968e6fe..a316f04e5c 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_ioctl.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_ioctl.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2011, 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2010, Atheros Communications Inc. * All Rights Reserved. * @@ -307,7 +307,7 @@ enum WLAN_DFS_EVENTS { }; #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(WLAN_DFS_SYNTHETIC_RADAR) -/** +/* * Structure of Pulse to be injected into the DFS Module * ****************************************************** * Header @@ -375,7 +375,7 @@ struct seq_store { /** * enum dfs_agile_sm_evt - DFS Agile SM events. * @DFS_AGILE_SM_EV_AGILE_START: Event to start AGILE PreCAC/RCAC. - * @DFS_AGILE_SM_EV_AGILE_DOWN: Event to stop AGILE PreCAC/RCAC.. + * @DFS_AGILE_SM_EV_AGILE_STOP: Event to stop AGILE PreCAC/RCAC.. * @DFS_AGILE_SM_EV_AGILE_DONE: Event to complete AGILE PreCAC/RCAC.. * @DFS_AGILE_SM_EV_ADFS_RADAR: Event to restart AGILE PreCAC/RCAC after radar. */ diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_lmac_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_lmac_api.h index e250649682..3b185d0e90 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_lmac_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_lmac_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -99,6 +100,7 @@ uint32_t lmac_get_target_type(struct wlan_objmgr_pdev *pdev); /** * lmac_get_phymode_info() - Get phymode info. * @pdev: Pointer to PDEV structure. + * @chan_mode: Channel mode */ uint32_t lmac_get_phymode_info(struct wlan_objmgr_pdev *pdev, uint32_t chan_mode); diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h index 7df3805298..6cf91d551b 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -73,7 +73,7 @@ dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev *pdev) * @pdev: Pointer to DFS pdev object. * @ieee_chan: Channel number. * @freq: Channel frequency. - * @cfreq2: HT80 cfreq2 in Mhz. + * @cfreq2_mhz: HT80 cfreq2 in MHz. * @flags: channel flags. */ #ifdef CONFIG_CHAN_FREQ_API @@ -98,7 +98,7 @@ void dfs_mlme_proc_cac(struct wlan_objmgr_pdev *pdev, uint32_t vdev_id); void dfs_mlme_deliver_event_up_after_cac(struct wlan_objmgr_pdev *pdev); /** - * dfs_mlme_get_extchan() - Get extension channel. + * dfs_mlme_get_extchan_for_freq() - Get extension channel. * @pdev: Pointer to DFS pdev object. * @dfs_chan_freq: Frequency in Mhz. * @dfs_chan_flags: Channel flags. @@ -146,19 +146,19 @@ int dfs_mlme_ieee2mhz(struct wlan_objmgr_pdev *pdev, * dfs_mlme_find_dot11_chan_for_freq() - Find a channel pointer given the mode, * frequency and channel flags. * @pdev: Pointer to DFS pdev object. - * @ch_freq: Channel frequency. - * @des_cfreq2_mhz: cfreq2 in MHZ. + * @chan_freq: Channel frequency. + * @des_cfreq2_mhz: cfreq2 in MHz. * @mode: Phymode - * @dfs_chan_freq: Frequency in Mhz. + * @dfs_chan_freq: Frequency in MHz. * @dfs_chan_flags: Channel flags. * @dfs_chan_flagext: Extended channel flags. * @dfs_chan_ieee: IEEE channel number. * @dfs_chan_vhtop_ch_freq_seg1: Channel Center IEEE for primary 80 segment. * @dfs_chan_vhtop_ch_freq_seg2: Channel Center frequency applicable for - * 80+80MHz mode of operation. + * 80+80 MHz mode of operation. * @dfs_chan_mhz_freq_seg1: Channel center frequency of primary 80 segment. * @dfs_chan_mhz_freq_seg2: Channel center frequency for secondary 80 - * segment applicable only for 80+80MHZ mode of + * segment applicable only for 80+80 MHz mode of * operation. * * Return: @@ -241,9 +241,9 @@ void dfs_mlme_clist_update(struct wlan_objmgr_pdev *pdev, /** * dfs_mlme_get_cac_timeout_for_freq() - Get cac_timeout. * @pdev: Pointer to DFS pdev object. - * @dfs_chan_freq: Frequency in Mhz. - * @dfs_chan_vhtop_freq_seg2: Channel Center frequency applicable for 80+80MHz - * mode of operation. + * @dfs_chan_freq: Frequency in MHz. + * @dfs_chan_vhtop_freq_seg2_mhz: Channel Center frequency applicable for + * 80+80 MHz mode of operation. * @dfs_chan_flags: Channel flags. */ #ifdef CONFIG_CHAN_FREQ_API @@ -291,7 +291,7 @@ void dfs_mlme_restart_vaps_with_non_dfs_chan(struct wlan_objmgr_pdev *pdev, * dfs_mlme_check_allowed_prim_chanlist() - Check whether the given channel is * present in the primary allowed channel list or not * @pdev: Pointer to DFS pdev object. - * @chan_num: Channel number + * @chan_freq: Channel frequency */ #if defined(WLAN_SUPPORT_PRIMARY_ALLOWED_CHAN) bool dfs_mlme_check_allowed_prim_chanlist(struct wlan_objmgr_pdev *pdev, diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h b/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h index b30933d317..7e2ccc4de0 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -129,7 +130,7 @@ struct dfs_radar_found_params { * enum adfs_ocac_mode - Various Off-Channel CAC modes. * @QUICK_OCAC_MODE: Used for OCAC where the CAC timeout value is finite. * This is also known as PreCAC. - * @EXTENSIVE_OCAC: Extensive OCAC. + * @EXTENSIVE_OCAC_MODE: Extensive OCAC. * @QUICK_RCAC_MODE: Used for RollingCAC where the timeout value is assumed to * be infinite by the Firmware code, that is, the FW has to * be on the agile channel until host stop/aborts the agile diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h index 82dcf0551c..1a4d40c759 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -160,6 +160,7 @@ tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev, * tgt_dfs_radar_enable() - Enables the radar. * @pdev: Pointer to DFS pdev object. * @no_cac: If no_cac is 0, it cancels the CAC. + * @opmode: operating mode * @enable: disable/enable radar * * This is called each time a channel change occurs, to (potentially) enable @@ -177,6 +178,7 @@ QDF_STATUS tgt_dfs_radar_enable( * @insize: size of the input buffer. * @outdata: A buffer for the results. * @outsize: Size of the output buffer. + * @error: returned error */ QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev, u_int id, @@ -356,7 +358,7 @@ QDF_STATUS tgt_dfs_agile_precac_start(struct wlan_objmgr_pdev *pdev); /** * tgt_dfs_ocac_complete() - Process off channel cac complete indication. * @pdev: Pointer to DFS pdev object. - * @vdev_adfs_complete_status: Off channel CAC complete status. + * @ocac_status: Off channel CAC complete status. * * wrapper function for dfs_set_agile_precac_state. * This function called from outside of dfs component. @@ -388,7 +390,7 @@ QDF_STATUS tgt_dfs_reg_ev_handler(struct wlan_objmgr_psoc *psoc); /** * tgt_dfs_stop() - Clear dfs timers. - * @dfs: Pointer to wlan_dfs structure. + * @pdev: Pointer to pdev object */ QDF_STATUS tgt_dfs_stop(struct wlan_objmgr_pdev *pdev); @@ -396,6 +398,7 @@ QDF_STATUS tgt_dfs_stop(struct wlan_objmgr_pdev *pdev); * tgt_dfs_process_emulate_bang_radar_cmd() - Process to emulate dfs bangradar * command. * @pdev: Pointer to DFS pdev object. +* @dfs_unit_test: bang radar emulation command * * Process to emulate dfs bangradar command. * diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h index 6dd6500093..d98dacd78e 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -35,19 +35,30 @@ * struct dfs_to_mlme - These are MLME function pointer used by DFS component. * @pdev_component_obj_attach: Attach DFS object to PDEV. * @pdev_component_obj_detach: Detach DFS object from PDEV. - * @pdev_get_comp_private_obj: Get DFS object from PDEV. * @dfs_start_rcsa: Send RCSA to RootAP. + * @mlme_mark_dfs: Mark DFS channel frequency as radar. + * @mlme_start_csa_for_freq: * @mlme_proc_cac: Process the CAC completion event. * @mlme_deliver_event_up_after_cac: Send a CAC timeout, VAP up event to user * space + * @mlme_get_extchan_for_freq: Get the extension channel. * @mlme_set_no_chans_available: Sets no_chans_available flag. * @mlme_ieee2mhz: Gets Channel freq from ieee number. + * @mlme_find_dot11_chan_for_freq: Find a channel pointer. + * @mlme_get_dfs_channels_for_freq: Get DFS channels from current channel + * list. * @mlme_dfs_ch_flags_ext: Gets channel extension flag. * @mlme_channel_change_by_precac: Channel change triggered by PreCAC. + * @mlme_precac_chan_change_csa_for_freq:Channel change triggered by PrCAC using + * Channel Switch Announcement. + * @mlme_postnol_chan_switch: Channel change post NOL using Channel + * Switch Announcement. * @mlme_nol_timeout_notification: NOL timeout notification. * @mlme_clist_update: Updates the channel list. * @mlme_is_opmode_sta: Check if pdev opmode is STA. - * @mlme_rebuild_chan_list_with_non_dfs_channel: Rebuild channels with non-dfs + * @mlme_get_cac_timeout_for_freq: Get CAC timeout for a given channel + * frequency. + * @mlme_rebuild_chan_list_with_non_dfs_channels: Rebuild channels with non-dfs * channels. * @mlme_restart_vaps_with_non_dfs_chan: Restart vaps with non-dfs channel. * @mlme_check_allowed_prim_chanlist: Check whether the given channel is @@ -56,21 +67,13 @@ * @mlme_update_scan_channel_list: Update the scan channel list sent to FW. * @mlme_bringdown_vaps: Bringdown vaps if no chans is present. * @mlme_dfs_deliver_event: Deliver DFS events to user space - * @mlme_precac_chan_change_csa_for_freq:Channel change triggered by PrCAC using - * Channel Switch Announcement. - * @mlme_postnol_chan_switch: Channel change post NOL using Channel - * Switch Announcement. - * @mlme_mark_dfs: Mark DFS channel frequency as radar. - * @mlme_get_extchan_for_freq: Get the extension channel. - * @mlme_find_dot11_chan_for_freq: Find a channel pointer. - * @mlme_get_dfs_channels_for_freq: Get DFS channels from current channel - * list. - * @mlme_get_cac_timeout_for_freq: Get CAC timeout for a given channel - * frequency. + * @mlme_is_inter_band_chan_switch_allowed: Check if switch between 5 GHz and + * 6 GHz is allowed. * @mlme_acquire_radar_mode_switch_lock: Acquire lock for radar processing over * mode switch. * @mlme_release_radar_mode_switch_lock: Release lock taken for radar processing * over mode switch. + * @mlme_proc_spoof_success: Called when FW send spoof success event. */ struct dfs_to_mlme { QDF_STATUS (*pdev_component_obj_attach)(struct wlan_objmgr_pdev *pdev, @@ -208,6 +211,7 @@ extern struct dfs_to_mlme global_dfs_to_mlme; /** * wlan_dfs_pdev_obj_create_notification() - DFS pdev object create handler. * @pdev: Pointer to DFS pdev object. + * @arg: component argument */ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, void *arg); @@ -215,6 +219,7 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, /** * wlan_dfs_pdev_obj_destroy_notification() - DFS pdev object delete handler. * @pdev: Pointer to DFS pdev object. + * @arg: component argument */ QDF_STATUS wlan_dfs_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, void *arg); @@ -244,6 +249,7 @@ QDF_STATUS ucfg_dfs_getnol(struct wlan_objmgr_pdev *pdev, void *dfs_nolinfo); * ucfg_dfs_override_cac_timeout() - Override the default CAC timeout. * @pdev: Pointer to DFS pdev object. * @cac_timeout: CAC timeout value. + * @status: pointer to save status * * Wrapper function for dfs_override_cac_timeout(). * This function called from outside of dfs component. @@ -255,6 +261,7 @@ QDF_STATUS ucfg_dfs_override_cac_timeout(struct wlan_objmgr_pdev *pdev, * ucfg_dfs_get_override_cac_timeout() - Get override CAC timeout value. * @pdev: Pointer to DFS pdev object. * @cac_timeout: Pointer to save the CAC timeout value. + * @status: pointer to save status * * Wrapper function for dfs_get_override_cac_timeout(). * This function called from outside of dfs component. @@ -345,7 +352,7 @@ QDF_STATUS ucfg_dfs_get_precac_intermediate_chan(struct wlan_objmgr_pdev *pdev, * ucfg_dfs_get_precac_chan_state_for_freq() - Get precac status for the * given channel. * @pdev: Pointer to DFS pdev object. - * @precac_chan: Channel frequency for which precac state needs to be + * @precac_freq: Channel frequency for which precac state needs to be * determined. * * Wrapper function for dfs_get_precac_chan_state_for_freq(). @@ -503,7 +510,7 @@ QDF_STATUS ucfg_dfs_reinit_timers(struct wlan_objmgr_pdev *pdev); /** * ucfg_dfs_reset_agile_config() - Reset ADFS config. - * @pdev: Pointer to wlan_objmgr_pdev structure. + * @psoc: Pointer to wlan_objmgr_psoc structure. * * Wrapper function to reset Agile DFS config such as the variables which hold * information about the state of the preCAC timer, active precac diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h index 5a2a56ac76..8930a95afd 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -226,12 +226,11 @@ QDF_STATUS utils_dfs_stacac_stop(struct wlan_objmgr_pdev *pdev); */ QDF_STATUS utils_dfs_get_usenol(struct wlan_objmgr_pdev *pdev, uint16_t *usenol); -/* - * utils_dfs_radar_disable() - Disables the radar. + +/** + * utils_dfs_is_spruce_spur_war_applicable() - Is Spruce spur WAR applicable * @pdev: Pointer to DFS pdev object. * - * Return: true if Spruce spur WAR is applicable else false. - * * Spur or leakage transmissions is observed in Spruce HW in * frequencies from 5260MHz to 5320MHz when one of the following * conditions is true, @@ -252,6 +251,8 @@ QDF_STATUS utils_dfs_get_usenol(struct wlan_objmgr_pdev *pdev, * should make sure to prevent moving to the adjacent channels 36/44/48 in * 80MHz mode. Failing to do so will cause spur transmissions in channel 52 * through 64. + * + * Return: true if Spruce spur WAR is applicable else false. */ bool utils_dfs_is_spruce_spur_war_applicable(struct wlan_objmgr_pdev *pdev); @@ -311,7 +312,7 @@ QDF_STATUS utils_dfs_get_nol_timeout(struct wlan_objmgr_pdev *pdev, /** * utils_dfs_nol_addchan() - Add channel to NOL. * @pdev: Pointer to DFS pdev object. - * @chan: channel t o add NOL. + * @freq: channel frequency to add to NOL. * @dfs_nol_timeout: NOL timeout. * * wrapper function for dfs_nol_addchan(). this @@ -343,11 +344,11 @@ QDF_STATUS utils_dfs_second_segment_radar_disable( /** * utils_dfs_fetch_nol_ie_info() - Fills the arguments with NOL information * needed for sending RCSA. - * pdev: Pointer to DFS pdev object. - * nol_ie_bandwidth: Minimum DFS subchannel Bandwidth. - * nol_ie_startfreq: Radar affected channel list start subchannel's centre + * @pdev: Pointer to DFS pdev object. + * @nol_ie_bandwidth: Minimum DFS subchannel Bandwidth. + * @nol_ie_startfreq: Radar affected channel list start subchannel's centre * frequency. - * nol_ie_bitmap: Bitmap of radar affected subchannels. + * @nol_ie_bitmap: Bitmap of radar affected subchannels. */ QDF_STATUS utils_dfs_fetch_nol_ie_info(struct wlan_objmgr_pdev *pdev, uint8_t *nol_ie_bandwidth, @@ -357,9 +358,9 @@ QDF_STATUS utils_dfs_fetch_nol_ie_info(struct wlan_objmgr_pdev *pdev, /** * utils_dfs_set_rcsa_flags() - Set flags that are required for sending * RCSA and NOL IE. - * pdev: Pointer to DFS pdev object. - * is_rcsa_ie_sent: Boolean to check if RCSA IE should be sent or not. - * is_nol_ie_sent: Boolean to check if NOL IE should be sent or not. + * @pdev: Pointer to DFS pdev object. + * @is_rcsa_ie_sent: Boolean to check if RCSA IE should be sent or not. + * @is_nol_ie_sent: Boolean to check if NOL IE should be sent or not. */ QDF_STATUS utils_dfs_set_rcsa_flags(struct wlan_objmgr_pdev *pdev, @@ -369,9 +370,9 @@ QDF_STATUS utils_dfs_set_rcsa_flags(struct wlan_objmgr_pdev *pdev, /** * utils_dfs_get_rcsa_flags() - Get flags that are required for sending * RCSA and NOL IE. - * pdev: Pointer to DFS pdev object. - * is_rcsa_ie_sent: Boolean to check if RCSA IE should be sent or not. - * is_nol_ie_sent: Boolean to check if NOL IE should be sent or not. + * @pdev: Pointer to DFS pdev object. + * @is_rcsa_ie_sent: Boolean to check if RCSA IE should be sent or not. + * @is_nol_ie_sent: Boolean to check if NOL IE should be sent or not. */ QDF_STATUS utils_dfs_get_rcsa_flags(struct wlan_objmgr_pdev *pdev, @@ -381,11 +382,11 @@ QDF_STATUS utils_dfs_get_rcsa_flags(struct wlan_objmgr_pdev *pdev, /** * utils_dfs_process_nol_ie_bitmap() - Update NOL with external radar * information. - * pdev: Pointer to DFS pdev object. - * nol_ie_bandwidth: Minimum DFS subchannel Bandwidth. - * nol_ie_startfreq: Radar affected channel list start channel's + * @pdev: Pointer to DFS pdev object. + * @nol_ie_bandwidth: Minimum DFS subchannel Bandwidth. + * @nol_ie_startfreq: Radar affected channel list start channel's * centre frequency. - * nol_ie_bitmap: Bitmap of radar affected subchannels. + * @nol_ie_bitmap: Bitmap of radar affected subchannels. * * Return: True if NOL IE should be propagated, else false. */ @@ -465,7 +466,7 @@ utils_dfs_get_random_channel_for_freq(struct wlan_objmgr_pdev *pdev, * @flags: random channel selection flags. * @ch_params: current channel params. * @hw_mode: current operating mode. - * @target_chan: Pointer to target_chan_freq. + * @target_chan_freq: Pointer to target_chan_freq. * @acs_info: acs range info. * * Get random channel based on vdev interface type. If the vdev is null, @@ -485,7 +486,7 @@ QDF_STATUS utils_dfs_get_vdev_random_channel_for_freq( * @pdev: Pointer to DFS pdev object. * @ch_params: current channel params. * @hw_mode: current operating mode. - * @target_chan: Pointer to target_chan freq. + * @target_chan_freq: Pointer to target_chan freq. * * wrapper function for get bw_reduced_channel. this * function called from outside of dfs component. @@ -594,7 +595,7 @@ void utils_dfs_reg_update_nol_chan_for_freq(struct wlan_objmgr_pdev *pdev, bool nol_ch); #endif /** - * utils_dfs_freq_to_chan () - convert channel freq to channel number + * utils_dfs_freq_to_chan() - convert channel freq to channel number * @freq: frequency * * Return: channel number @@ -602,7 +603,7 @@ void utils_dfs_reg_update_nol_chan_for_freq(struct wlan_objmgr_pdev *pdev, uint8_t utils_dfs_freq_to_chan(uint32_t freq); /** - * utils_dfs_chan_to_freq () - convert channel number to frequency + * utils_dfs_chan_to_freq() - convert channel number to frequency * @chan: channel number * * Return: frequency @@ -684,22 +685,23 @@ utils_dfs_can_ignore_radar_event(struct wlan_objmgr_pdev *pdev) */ int utils_get_dfsdomain(struct wlan_objmgr_pdev *pdev); +#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) /** * utils_dfs_is_spoof_check_failed() - get spoof check status. * @pdev: pdev ptr * @is_spoof_check_failed: pointer containing the status. * * Return: QDF_STATUS. + */ +QDF_STATUS utils_dfs_is_spoof_check_failed(struct wlan_objmgr_pdev *pdev, + bool *is_spoof_check_failed); +/** * utils_dfs_is_spoof_done() - get spoof check status. * @pdev: pdev ptr * * Return: True if dfs_spoof_test_done is set. */ -#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) -QDF_STATUS utils_dfs_is_spoof_check_failed(struct wlan_objmgr_pdev *pdev, - bool *is_spoof_check_failed); - bool utils_dfs_is_spoof_done(struct wlan_objmgr_pdev *pdev); #else static inline @@ -747,17 +749,18 @@ void utils_dfs_get_nol_history_chan_list(struct wlan_objmgr_pdev *pdev, * utils_dfs_reg_update_nol_history_chan_for_freq() - set nol history channel * * @pdev: pdev ptr - * @ch_list: freq channel list to be returned - * @num_ch: number of channels - * @nol_history_ch: nol history flag + * @freq_list: freq channel list to be returned + * @num_chan: number of channels + * @nol_history_chan: nol history flag * * Return: void */ #ifdef CONFIG_CHAN_FREQ_API -void utils_dfs_reg_update_nol_history_chan_for_freq(struct wlan_objmgr_pdev *, - uint16_t *freq_list, - uint8_t num_ch, - bool nol_history_ch); +void +utils_dfs_reg_update_nol_history_chan_for_freq(struct wlan_objmgr_pdev *pdev, + uint16_t *freq_list, + uint8_t num_chan, + bool nol_history_chan); #endif /** @@ -797,7 +800,8 @@ utils_dfs_is_cac_required_on_dfs_curchan(struct wlan_objmgr_pdev *pdev, bool *continue_current_cac, bool is_vap_restart); -/** utils_dfs_is_precac_done() - Check if precac has been done in chosen channel +/** + * utils_dfs_is_precac_done() - Check if precac has been done in chosen channel * @pdev: Pointer to DFS pdev object. * @wlan_chan: Pointer to wlan channel object that can be accessed by other * components. @@ -814,7 +818,8 @@ bool utils_dfs_is_precac_done(struct wlan_objmgr_pdev *pdev, * utils_dfs_get_disable_radar_marking() - Retrieve the value of disable radar. * marking. * @pdev: Pointer to DFS pdev object. - * @dis_radar_marking: pointer to retrieve the value of disable_radar_marking. + * @disable_radar_marking: pointer to retrieve the value of + * disable_radar_marking. */ #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) QDF_STATUS utils_dfs_get_disable_radar_marking(struct wlan_objmgr_pdev *pdev, @@ -831,7 +836,7 @@ QDF_STATUS utils_dfs_get_disable_radar_marking(struct wlan_objmgr_pdev *pdev, /** * utils_dfs_deliver_event() - Deliver DFS event to userspace. * @pdev: Pointer to DFS pdev object - * @chan: channel radar hit on + * @freq: frequency radar hit on * @event: event being sent */ void utils_dfs_deliver_event(struct wlan_objmgr_pdev *pdev, uint16_t freq, @@ -868,8 +873,8 @@ void utils_dfs_agile_sm_deliver_evt(struct wlan_objmgr_pdev *pdev, * utils_dfs_get_rcac_channel() - Get the completed Rolling CAC channel if * available. * @pdev: Pointer to DFS pdev object. - * @ch_params: current channel params. - * @target_chan: Pointer to target_chan freq. + * @chan_params: current channel params. + * @target_chan_freq: Pointer to target_chan freq. * * Return: QDF_STATUS. */ diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index 247e68c71a..98721e7b6a 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -705,7 +705,7 @@ void utils_dfs_get_chan_list(struct wlan_objmgr_pdev *pdev, * on current channel list. * @pdev: Pointer to pdev structure. * @vdev: vdev of request - * @chan: Pointer to channel list. + * @chan_list: Pointer to channel list. * @num_chan: number of channels. * * Get regdb channel list based on dfs current channel. @@ -1461,7 +1461,7 @@ static void utils_dfs_convert_freq_to_index(qdf_freq_t freq, int8_t *index) /** * utils_dfs_update_chan_state_array_element() - Update the per dfs channel * state array element indexed by the frequency with the new state. - * + * @dfs: DFS context * @freq: Input DFS Channel frequency which will converted to channel state * array index. * @state: Input DFS state with which the value indexed by frequency will be