1 /* 2 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* 20 * DOC: contains scan manager functionality 21 */ 22 23 #ifndef _WLAN_SCAN_MANAGER_6GHZ_API_H_ 24 #define _WLAN_SCAN_MANAGER_6GHZ_API_H_ 25 26 #include "wlan_scan_main.h" 27 28 #ifdef CONFIG_BAND_6GHZ 29 30 /* 31 * Userspace/framework tracks last few days(e.g: 10 days) history of 32 * connected APs and maintains best 10 channels out of that list by 33 * considering multiple parameters like scoring, location etc. 34 * It's likely to find an AP in one of these channels when a scan issued. 35 * So, framework issues first scan request with a maximum of 10 channels 36 * Any scan request which consist of more than 10 channels can be considered as 37 * full scan 38 */ 39 #define FULL_SCAN_CH_COUNT_MIN_BY_USERSPACE 11 40 41 /* 42 * This can used to set the RNR_ONLY flag to certain type(PSC/non-PSC) or 43 * all channels. 44 */ 45 #define SET_RNR_FLAG_TO_PSC_CHANNEL 0x1 46 #define SET_RNR_FLAG_TO_NON_PSC_CHANNEL 0x2 47 #define SET_RNR_FLAG_TO_ALL_6G_CHANNELS 0x3 48 49 /** 50 * scm_update_6ghz_channel_list() - Update 6ghz channel list in the scan req 51 * @req: scan start request 52 * @scan_obj: scan component object 53 * 54 * Filter out the unsupported 6ghz channels from scan request and add supported 55 * 6ghz channels based on the ini. 56 * 57 * Return: None 58 */ 59 void 60 scm_update_6ghz_channel_list(struct scan_start_request *req, 61 struct wlan_scan_obj *scan_obj); 62 63 /** 64 * scm_is_6ghz_scan_optimization_supported() - Check firmware capability 65 * @psoc: psoc 66 * 67 * Check if firmware supports 6ghz scan optimization from fw_ext_caps of psoc. 68 * 69 * Return: None 70 */ 71 bool 72 scm_is_6ghz_scan_optimization_supported(struct wlan_objmgr_psoc *psoc); 73 #else 74 static inline void 75 scm_update_6ghz_channel_list(struct scan_start_request *req, 76 struct wlan_scan_obj *scan_obj) 77 { 78 } 79 80 static inline bool 81 scm_is_6ghz_scan_optimization_supported(struct wlan_objmgr_psoc *psoc) 82 { 83 return false; 84 } 85 #endif 86 87 #endif 88