Jelajahi Sumber

qcacld-3.0: Remove legacy PNO related WCNSS_qcom.ini items

The following PNO related ini items are moved to converged scan
component:
CFG_ENABLE_DFS_PNO_CHNL_SCAN 	 CFG_PNO_SCAN_SUPPORT
CFG_PNO_SCAN_TIMER_REPEAT_VALUE	 CFG_PNO_SLOW_SCAN_MULTIPLIER
CFG_PNO_CHANNEL_PREDICTION	 CFG_TOP_K_NUM_OF_CHANNELS
CFG_STATIONARY_THRESHOLD	 CFG_CHANNEL_PREDICTION_FULL_SCAN_MS
CFG_ADAPTIVE_PNOSCAN_DWELL_MODE	 CFG_MAWC_NLO_EXP_BACKOFF_RATIO
CFG_SCAN_BACKOFF_MULTIPLIER      CFG_MAWC_NLO_ENABLED
CFG_MAWC_NLO_INIT_SCAN_INTERVAL	 CFG_MAWC_NLO_MAX_SCAN_INTERVAL

Remove legacy ini definitions and related macros for these
ini values.

Change-Id: I81bdbd917969fc8a73e6e5359ca69f78acdf723c
CRs-Fixed: 2375450
Pragaspathi Thilagaraj 6 tahun lalu
induk
melakukan
24789d3b86

+ 0 - 324
core/hdd/inc/wlan_hdd_cfg.h

@@ -115,29 +115,6 @@ enum hdd_dot11_mode {
 	eHDD_DOT11_MODE_11ax,
 };
 
-/*
- * <ini>
- * gEnableDFSPnoChnlScan - enable dfs channels in PNO scan
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable/disable dfs channels in PNO scan request,
- * enabling this ini enables driver to include dfs channels in its
- * PNO scan request
- * Related: NA
- *
- * Supported Feature: DFS, PNO
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_NAME              "gEnableDFSPnoChnlScan"
-#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_MIN               (0)
-#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_MAX               (1)
-#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_DEFAULT           (1)
-
 /*
  * <ini>
  * gScanAgingTime - Set scan aging time
@@ -166,78 +143,6 @@ enum hdd_dot11_mode {
 #define CFG_SCAN_AGING_PARAM_DEFAULT       (30)
 #endif
 
-#ifdef FEATURE_WLAN_SCAN_PNO
-/*
- * <ini>
- * gPNOScanSupport - Enable or Disable PNO scan
- * @Min: 1
- * @Max: 0
- * @Default: 1
- *
- * This ini is used to Enable or Disable PNO scan
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_PNO_SCAN_SUPPORT                         "gPNOScanSupport"
-#define CFG_PNO_SCAN_SUPPORT_ENABLE                  (1)
-#define CFG_PNO_SCAN_SUPPORT_DISABLE                 (0)
-#define CFG_PNO_SCAN_SUPPORT_DEFAULT                 (1)
-
-/*
- * <ini>
- * gPNOScanTimerRepeatValue - Set PNO scan timer repeat value
- * @Min: 30
- * @Max: 0
- * @Default: 0xffffffff
- *
- * This ini is used by firmware to set fast scan max cycles
- * equal to gPNOScanTimerRepeatValue. Taking power consumption
- * into account firmware after gPNOScanTimerRepeatValue times
- * fast_scan_period switches to slow_scan_period.
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE              "gPNOScanTimerRepeatValue"
-#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE_DEFAULT      (30)
-#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE_MIN          (0)
-#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE_MAX          (0xffffffff)
-
-/*
- * <ini>
- * gPNOSlowScanMultiplier - Set PNO slow scan multiplier
- * @Min: 6
- * @Max: 0
- * @Default: 30
- *
- * This ini is used by firmware to set slow scan period
- * as gPNOSlowScanMultiplier times fast_scan_period.
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_PNO_SLOW_SCAN_MULTIPLIER                 "gPNOSlowScanMultiplier"
-#define CFG_PNO_SLOW_SCAN_MULTIPLIER_DEFAULT         (6)
-#define CFG_PNO_SLOW_SCAN_MULTIPLIER_MIN             (0)
-#define CFG_PNO_SLOW_SCAN_MULTIPLIER_MAX             (30)
-#endif
-
 /*
  * <ini>
  * max_scan_count - Set maximum number of scans
@@ -268,32 +173,6 @@ enum hdd_dot11_mode {
 #define CFG_MAX_SCAN_COUNT_MAX            (8)
 #define CFG_MAX_SCAN_COUNT_DEFAULT        (4)
 
-/*
- * <ini>
- * gChPredictionFullScanMs - Set periodic timer for channel
- * prediction
- * @Min: 3000
- * @Max: 0x7fffffff
- * @Default: 60000
- *
- * This ini is used to set the periodic timer upon which
- * a full scan needs to be triggered when PNO channel
- * prediction feature is enabled. This parameter is intended
- * to tweak the internal algortihm for experiments.
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: Internal
- *
- * </ini>
- */
-#define CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_NAME      "gChPredictionFullScanMs"
-#define CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_MIN       (30000)
-#define CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_MAX       (0x7fffffff)
-#define CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_DEFAULT   (60000)
-
 /*
  * <ini>
  * extscan_adaptive_dwell_mode - Enable adaptive dwell mode
@@ -324,36 +203,6 @@ enum hdd_dot11_mode {
 #define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MAX      (4)
 #define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_DEFAULT  (1)
 
-/*
- * <ini>
- * pnoscan_adaptive_dwell_mode - Enable adaptive dwell mode
- * during pno scan
- * @Min: 0
- * @Max: 4
- * @Default: 1
- *
- * This ini will set the algo used in dwell time optimization
- * during pno scan. see enum scan_dwelltime_adaptive_mode.
- * Acceptable values for this:
- * 0: Default (Use firmware default mode)
- * 1: Conservative optimization
- * 2: Moderate optimization
- * 3: Aggressive optimization
- * 4: Static
- *
- * Related: None
- *
- * Supported Feature: Scan
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_NAME     "pnoscan_adaptive_dwell_mode"
-#define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_MIN      (0)
-#define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_MAX      (4)
-#define CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_DEFAULT  (1)
-
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 /*
  * <ini>
@@ -535,41 +384,6 @@ enum hdd_dot11_mode {
 #define CFG_GO_11AC_OVERRIDE_MAX              (1)
 #define CFG_GO_11AC_OVERRIDE_DEFAULT          (1)
 
-/*
- * gPNOChannelPrediction will allow user to enable/disable the
- * PNO channel prediction feature.
- * In current PNO implementation, scan is always done until all configured
- * channels are scanned. If we can determine DUT is stationary based on
- * scanning a subset of channels, we may cancel the remaining channels.
- * Hence, we can save additional power consumption.
- */
-#define CFG_PNO_CHANNEL_PREDICTION_NAME      "gPNOChannelPrediction"
-#define CFG_PNO_CHANNEL_PREDICTION_MIN       (0)
-#define CFG_PNO_CHANNEL_PREDICTION_MAX       (1)
-#define CFG_PNO_CHANNEL_PREDICTION_DEFAULT   (0)
-/*
- * The top K number of channels are used for tanimoto distance
- * calculation. These are the top channels on which the probability
- * of finding the AP's is extremely high. This number is intended
- * for tweaking the internal algorithm for experiments. This should
- * not be changed externally.
- */
-#define CFG_TOP_K_NUM_OF_CHANNELS_NAME      "gTopKNumOfChannels"
-#define CFG_TOP_K_NUM_OF_CHANNELS_MIN       (1)
-#define CFG_TOP_K_NUM_OF_CHANNELS_MAX       (5)
-#define CFG_TOP_K_NUM_OF_CHANNELS_DEFAULT   (3)
-/*
- * This is the threshold value to determine that the STA is
- * stationary. If the tanimoto distance is less than this
- * value, then the device is considered to be stationary.
- * This parameter is intended to tweak the internal algorithm
- * for experiments. This should not be changed externally.
- */
-#define CFG_STATIONARY_THRESHOLD_NAME      "gStationaryThreshold"
-#define CFG_STATIONARY_THRESHOLD_MIN       (0)
-#define CFG_STATIONARY_THRESHOLD_MAX       (100)
-#define CFG_STATIONARY_THRESHOLD_DEFAULT   (10)
-
 #ifdef CONFIG_DP_TRACE
 /* Max length of gDptraceConfig string. e.g.- "1, 6, 1, 62" */
 #define DP_TRACE_CONFIG_STRING_LENGTH		(20)
@@ -616,122 +430,6 @@ enum hdd_dot11_mode {
 
 #endif
 
-/*
- * <ini>
- * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
- *	max cycles
- * @Min: 0
- * @Max: 255
- * @Default: 0
- *
- * For Network Listen Offload and Perfered Network Offload, multiply the fast
- * scan period by this value after max cycles have occurred. Setting this to 0
- * disables the feature.
- *
- * @E.g.
- *	# Disable scan backoff multiplier
- *	gScanBackoffMultiplier=0
- *	# Effectively the same
- *	gScanBackoffMultiplier=1
- *	# Double the scan period after each max cycles have occurred
- *	gScanBackoffMultiplier=2
- *
- * Related: NLO, PNO
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_SCAN_BACKOFF_MULTIPLIER_NAME	"gScanBackoffMultiplier"
-#define CFG_SCAN_BACKOFF_MULTIPLIER_MIN		(0)
-#define CFG_SCAN_BACKOFF_MULTIPLIER_MAX		(255)
-#define CFG_SCAN_BACKOFF_MULTIPLIER_DEFAULT	(0)
-
-/*
- * <ini>
- * mawc_nlo_enabled - For NLO/PNO, enable MAWC based scan
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * Enable/Disable the Motion Aided Wireless Connectivity
- * based NLO using this parameter
- *
- * Related: NLO, PNO
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_MAWC_NLO_ENABLED_NAME	"mawc_nlo_enabled"
-#define CFG_MAWC_NLO_ENABLED_MIN	(0)
-#define CFG_MAWC_NLO_ENABLED_MAX	(1)
-#define CFG_MAWC_NLO_ENABLED_DEFAULT	(1)
-
-/*
- * <ini>
- * mawc_nlo_exp_backoff_ratio - Exponential back off ratio
- * @Min: 0
- * @Max: 300
- * @Default: 3
- *
- * Configure the exponential back off ratio using this
- * parameter for MAWC based NLO
- * ratio of exponential backoff, next = current + current*ratio/100
- *
- * Related: NLO, PNO
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_MAWC_NLO_EXP_BACKOFF_RATIO_NAME     "mawc_nlo_exp_backoff_ratio"
-#define CFG_MAWC_NLO_EXP_BACKOFF_RATIO_MIN      (0)
-#define CFG_MAWC_NLO_EXP_BACKOFF_RATIO_MAX      (300)
-#define CFG_MAWC_NLO_EXP_BACKOFF_RATIO_DEFAULT  (3)
-
-/*
- * <ini>
- * mawc_nlo_init_scan_interval - Initial Scan Interval
- * @Min: 1000
- * @Max: 0xFFFFFFFF
- * @Default: 10000
- *
- * Configure the initial scan interval  using this
- * parameter for MAWC based NLO (Units in Milliseconds)
- *
- * Related: NLO, PNO
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_MAWC_NLO_INIT_SCAN_INTERVAL_NAME     "mawc_nlo_init_scan_interval"
-#define CFG_MAWC_NLO_INIT_SCAN_INTERVAL_MIN      (1000)
-#define CFG_MAWC_NLO_INIT_SCAN_INTERVAL_MAX      (0xFFFFFFFF)
-#define CFG_MAWC_NLO_INIT_SCAN_INTERVAL_DEFAULT  (10000)
-
-/*
- * <ini>
- * mawc_nlo_max_scan_interval - Maximum Scan Interval
- * @Min: 1000
- * @Max: 0xFFFFFFFF
- * @Default: 60000
- *
- * Configure the maximum scan interval  using this
- * parameter for MAWC based NLO (Units in Milliseconds)
- *
- * Related: NLO, PNO
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_MAWC_NLO_MAX_SCAN_INTERVAL_NAME     "mawc_nlo_max_scan_interval"
-#define CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MIN      (1000)
-#define CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MAX      (0xFFFFFFFF)
-#define CFG_MAWC_NLO_MAX_SCAN_INTERVAL_DEFAULT  (60000)
-
 /*
  * <ini>
  * gEnableUnitTestFramework - Enable/Disable unit test framework
@@ -795,22 +493,12 @@ struct hdd_config {
 #endif
 	uint32_t DelayedTriggerFrmInt;
 
-#ifdef FEATURE_WLAN_SCAN_PNO
-	bool PnoOffload;
-#endif
 #ifdef ENABLE_MTRACE_LOG
 	bool enable_mtrace;
 #endif
-	uint8_t enable_dfs_pno_chnl_scan;
 	bool prevent_link_down;
 	uint8_t scanAgingTimeout;
 	bool fEnableSNRMonitoring;
-	/*PNO related parameters */
-#ifdef FEATURE_WLAN_SCAN_PNO
-	bool configPNOScanSupport;
-	uint32_t configPNOScanTimerRepeatValue;
-	uint32_t pno_slow_scan_multiplier;
-#endif
 	bool advertiseConcurrentOperation;
 #ifdef DHCP_SERVER_OFFLOAD
 	uint8_t dhcpServerIP[IPADDR_STRING_LENGTH];
@@ -819,27 +507,15 @@ struct hdd_config {
 	uint8_t sap_11ac_override;
 	uint8_t go_11ac_override;
 	uint8_t max_scan_count;
-#ifdef FEATURE_WLAN_SCAN_PNO
-	bool pno_channel_prediction;
-	uint8_t top_k_num_of_channels;
-	uint8_t stationary_thresh;
-	uint32_t channel_prediction_full_scan;
-#endif
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 	bool enable_lfr_subnet_detection;
 #endif
 	bool apf_enabled;
 	enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
-	enum scan_dwelltime_adaptive_mode pnoscan_adaptive_dwell_mode;
 	uint16_t sap_tx_leakage_threshold;
 	bool sap_internal_restart;
 	bool tx_orphan_enable;
 
-	uint8_t scan_backoff_multiplier;
-	bool mawc_nlo_enabled;
-	uint32_t mawc_nlo_exp_backoff_ratio;
-	uint32_t mawc_nlo_init_scan_interval;
-	uint32_t mawc_nlo_max_scan_interval;
 	bool enable_11d_in_world_mode;
 	bool is_11k_offload_supported;
 	bool action_oui_enable;

+ 0 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -2193,7 +2193,6 @@ struct hdd_adapter *hdd_get_first_valid_adapter(struct hdd_context *hdd_ctx);
 void hdd_allow_suspend(uint32_t reason);
 void hdd_prevent_suspend_timeout(uint32_t timeout, uint32_t reason);
 
-void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy);
 QDF_STATUS hdd_set_ibss_power_save_params(struct hdd_adapter *adapter);
 
 /**

+ 0 - 103
core/hdd/src/wlan_hdd_cfg.c

@@ -77,13 +77,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_TL_DELAYED_TRGR_FRM_INT_MIN,
 		     CFG_TL_DELAYED_TRGR_FRM_INT_MAX),
 
-	REG_VARIABLE(CFG_ENABLE_DFS_PNO_CHNL_SCAN_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, enable_dfs_pno_chnl_scan,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ENABLE_DFS_PNO_CHNL_SCAN_DEFAULT,
-		     CFG_ENABLE_DFS_PNO_CHNL_SCAN_MIN,
-		     CFG_ENABLE_DFS_PNO_CHNL_SCAN_MAX),
-
 	REG_VARIABLE(CFG_SCAN_AGING_PARAM_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, scanAgingTimeout,
 		     VAR_FLAGS_OPTIONAL,
@@ -98,28 +91,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_SNR_MONITORING_MIN,
 		     CFG_ENABLE_SNR_MONITORING_MAX),
 
-#ifdef FEATURE_WLAN_SCAN_PNO
-	REG_VARIABLE(CFG_PNO_SCAN_SUPPORT, WLAN_PARAM_Integer,
-		     struct hdd_config, configPNOScanSupport,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_PNO_SCAN_SUPPORT_DEFAULT,
-		     CFG_PNO_SCAN_SUPPORT_DISABLE,
-		     CFG_PNO_SCAN_SUPPORT_ENABLE),
-
-	REG_VARIABLE(CFG_PNO_SCAN_TIMER_REPEAT_VALUE, WLAN_PARAM_Integer,
-		     struct hdd_config, configPNOScanTimerRepeatValue,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_PNO_SCAN_TIMER_REPEAT_VALUE_DEFAULT,
-		     CFG_PNO_SCAN_TIMER_REPEAT_VALUE_MIN,
-		     CFG_PNO_SCAN_TIMER_REPEAT_VALUE_MAX),
-
-	REG_VARIABLE(CFG_PNO_SLOW_SCAN_MULTIPLIER, WLAN_PARAM_Integer,
-		     struct hdd_config, pno_slow_scan_multiplier,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_PNO_SLOW_SCAN_MULTIPLIER_DEFAULT,
-		     CFG_PNO_SLOW_SCAN_MULTIPLIER_MIN,
-		     CFG_PNO_SLOW_SCAN_MULTIPLIER_MAX),
-#endif
 #ifdef DHCP_SERVER_OFFLOAD
 	REG_VARIABLE_STRING(CFG_DHCP_SERVER_IP_NAME, WLAN_PARAM_String,
 			    struct hdd_config, dhcpServerIP,
@@ -157,45 +128,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_MAX_SCAN_COUNT_MIN,
 		     CFG_MAX_SCAN_COUNT_MAX),
 
-#ifdef FEATURE_WLAN_SCAN_PNO
-	REG_VARIABLE(CFG_PNO_CHANNEL_PREDICTION_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, pno_channel_prediction,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_PNO_CHANNEL_PREDICTION_DEFAULT,
-		     CFG_PNO_CHANNEL_PREDICTION_MIN,
-		     CFG_PNO_CHANNEL_PREDICTION_MAX),
-
-	REG_VARIABLE(CFG_TOP_K_NUM_OF_CHANNELS_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, top_k_num_of_channels,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_TOP_K_NUM_OF_CHANNELS_DEFAULT,
-		     CFG_TOP_K_NUM_OF_CHANNELS_MIN,
-		     CFG_TOP_K_NUM_OF_CHANNELS_MAX),
-
-	REG_VARIABLE(CFG_STATIONARY_THRESHOLD_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, stationary_thresh,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_STATIONARY_THRESHOLD_DEFAULT,
-		     CFG_STATIONARY_THRESHOLD_MIN,
-		     CFG_STATIONARY_THRESHOLD_MAX),
-
-	REG_VARIABLE(CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_NAME,
-		     WLAN_PARAM_Integer,
-		     struct hdd_config, channel_prediction_full_scan,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_DEFAULT,
-		     CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_MIN,
-		     CFG_CHANNEL_PREDICTION_FULL_SCAN_MS_MAX),
-
-	REG_VARIABLE(CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_NAME,
-		     WLAN_PARAM_Integer,
-		     struct hdd_config, pnoscan_adaptive_dwell_mode,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_DEFAULT,
-		     CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_MIN,
-		     CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_MAX),
-#endif
-
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 	REG_VARIABLE(CFG_ENABLE_LFR_SUBNET_DETECTION, WLAN_PARAM_Integer,
 		     struct hdd_config, enable_lfr_subnet_detection,
@@ -212,41 +144,6 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MIN,
 		CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MAX),
 
-	REG_VARIABLE(CFG_SCAN_BACKOFF_MULTIPLIER_NAME, WLAN_PARAM_Integer,
-		struct hdd_config, scan_backoff_multiplier,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_SCAN_BACKOFF_MULTIPLIER_DEFAULT,
-		CFG_SCAN_BACKOFF_MULTIPLIER_MIN,
-		CFG_SCAN_BACKOFF_MULTIPLIER_MAX),
-
-	REG_VARIABLE(CFG_MAWC_NLO_ENABLED_NAME, WLAN_PARAM_Integer,
-		struct hdd_config, mawc_nlo_enabled,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_MAWC_NLO_ENABLED_DEFAULT,
-		CFG_MAWC_NLO_ENABLED_MIN,
-		CFG_MAWC_NLO_ENABLED_MAX),
-
-	REG_VARIABLE(CFG_MAWC_NLO_EXP_BACKOFF_RATIO_NAME, WLAN_PARAM_Integer,
-		struct hdd_config, mawc_nlo_exp_backoff_ratio,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_MAWC_NLO_EXP_BACKOFF_RATIO_DEFAULT,
-		CFG_MAWC_NLO_EXP_BACKOFF_RATIO_MIN,
-		CFG_MAWC_NLO_EXP_BACKOFF_RATIO_MAX),
-
-	REG_VARIABLE(CFG_MAWC_NLO_INIT_SCAN_INTERVAL_NAME, WLAN_PARAM_Integer,
-		struct hdd_config, mawc_nlo_init_scan_interval,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_MAWC_NLO_INIT_SCAN_INTERVAL_DEFAULT,
-		CFG_MAWC_NLO_INIT_SCAN_INTERVAL_MIN,
-		CFG_MAWC_NLO_INIT_SCAN_INTERVAL_MAX),
-
-	REG_VARIABLE(CFG_MAWC_NLO_MAX_SCAN_INTERVAL_NAME, WLAN_PARAM_Integer,
-		struct hdd_config, mawc_nlo_max_scan_interval,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_MAWC_NLO_MAX_SCAN_INTERVAL_DEFAULT,
-		CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MIN,
-		CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MAX),
-
 	REG_VARIABLE(CFG_ENABLE_11D_IN_WORLD_MODE_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, enable_11d_in_world_mode,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

+ 3 - 119
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3182,7 +3182,7 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
 		fset |= WIFI_FEATURE_D2AP_RTT;
 	}
 #ifdef FEATURE_WLAN_SCAN_PNO
-	if (hdd_ctx->config->configPNOScanSupport &&
+	if (ucfg_scan_get_pno_scan_support(hdd_ctx->psoc) &&
 	    sme_is_feature_supported_by_fw(PNO)) {
 		hdd_debug("PNO is supported by firmware");
 		fset |= WIFI_FEATURE_PNO;
@@ -12386,93 +12386,6 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
 	FEATURE_NAN_VENDOR_COMMANDS
 };
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
-static inline void
-hdd_wiphy_set_max_sched_scans(struct wiphy *wiphy, uint8_t max_scans)
-{
-	if (max_scans == 0)
-		wiphy->flags &= ~WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
-	else
-		wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
-}
-#else
-static inline void
-hdd_wiphy_set_max_sched_scans(struct wiphy *wiphy, uint8_t max_scans)
-{
-	wiphy->max_sched_scan_reqs = max_scans;
-}
-#endif /* KERNEL_VERSION(4, 12, 0) */
-
-/**
- * wlan_hdd_cfg80211_add_connected_pno_support() - Set connected PNO support
- * @wiphy: Pointer to wireless phy
- *
- * This function is used to set connected PNO support to kernel
- *
- * Return: None
- */
-#if defined(CFG80211_REPORT_BETTER_BSS_IN_SCHED_SCAN) || \
-	(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
-static void wlan_hdd_cfg80211_add_connected_pno_support(struct wiphy *wiphy)
-{
-	wiphy_ext_feature_set(wiphy,
-		NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI);
-}
-#else
-static void wlan_hdd_cfg80211_add_connected_pno_support(struct wiphy *wiphy)
-{
-}
-#endif
-
-#if ((LINUX_VERSION_CODE > KERNEL_VERSION(4, 4, 0)) || \
-	defined(CFG80211_MULTI_SCAN_PLAN_BACKPORT)) && \
-	defined(FEATURE_WLAN_SCAN_PNO)
-/**
- * hdd_config_sched_scan_plans_to_wiphy() - configure sched scan plans to wiphy
- * @wiphy: pointer to wiphy
- * @config: pointer to config
- *
- * Return: None
- */
-static void hdd_config_sched_scan_plans_to_wiphy(struct wiphy *wiphy,
-						 struct hdd_config *config)
-{
-	struct wlan_objmgr_psoc *psoc;
-	struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
-
-	psoc = hdd_ctx->psoc;
-
-	if (!psoc) {
-		hdd_err("Invalid psoc");
-		return;
-	}
-
-	if (config->configPNOScanSupport) {
-		hdd_wiphy_set_max_sched_scans(wiphy, 1);
-		wiphy->max_sched_scan_ssids = SCAN_PNO_MAX_SUPP_NETWORKS;
-		wiphy->max_match_sets = SCAN_PNO_MAX_SUPP_NETWORKS;
-		wiphy->max_sched_scan_ie_len = SIR_MAC_MAX_IE_LENGTH;
-		wiphy->max_sched_scan_plans = SCAN_PNO_MAX_PLAN_REQUEST;
-
-		/*
-		 * Exception: Using cfg_get() here because these two
-		 * schedule scan params are used only at this place
-		 * to copy to wiphy structure
-		 */
-		wiphy->max_sched_scan_plan_interval =
-			cfg_get(psoc, CFG_MAX_SCHED_SCAN_PLAN_INTERVAL);
-
-		wiphy->max_sched_scan_plan_iterations =
-			cfg_get(psoc, CFG_MAX_SCHED_SCAN_PLAN_ITERATIONS);
-	}
-}
-#else
-static void hdd_config_sched_scan_plans_to_wiphy(struct wiphy *wiphy,
-						 struct hdd_config *config)
-{
-}
-#endif
-
 struct hdd_context *hdd_cfg80211_wiphy_alloc(void)
 {
 	struct wiphy *wiphy;
@@ -12803,8 +12716,8 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 
 	wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy);
 
-	hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg);
-	wlan_hdd_cfg80211_add_connected_pno_support(wiphy);
+	wlan_config_sched_scan_plans_to_wiphy(wiphy, hdd_ctx->psoc);
+	wlan_scan_cfg80211_add_connected_pno_support(wiphy);
 
 	wiphy->max_scan_ssids = MAX_SCAN_SSID;
 
@@ -13199,35 +13112,6 @@ int wlan_hdd_cfg80211_register(struct wiphy *wiphy)
 	return 0;
 }
 
-/*
- * HDD function to update wiphy capability based on target offload status.
- *
- * wlan_hdd_cfg80211_init() does initialization of all wiphy related
- * capability even before downloading firmware to the target. In discrete
- * case, host will get know certain offload capability (say sched_scan
- * caps) only after downloading firmware to the target and target boots up.
- * This function is used to override setting done in wlan_hdd_cfg80211_init()
- * based on target capability.
- */
-void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy)
-{
-#ifdef FEATURE_WLAN_SCAN_PNO
-	struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
-	struct hdd_config *pCfg = hdd_ctx->config;
-
-	/* wlan_hdd_cfg80211_init() sets sched_scan caps already in wiphy before
-	 * control comes here. Here just we need to clear it if firmware doesn't
-	 * have PNO support.
-	 */
-	if (!pCfg->PnoOffload) {
-		hdd_wiphy_set_max_sched_scans(wiphy, 0);
-		wiphy->max_sched_scan_ssids = 0;
-		wiphy->max_match_sets = 0;
-		wiphy->max_sched_scan_ie_len = 0;
-	}
-#endif
-}
-
 /* This function registers for all frame which supplicant is interested in */
 int wlan_hdd_cfg80211_register_frames(struct hdd_adapter *adapter)
 {

+ 1 - 31
core/hdd/src/wlan_hdd_main.c

@@ -1400,7 +1400,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
 	/* PNO offload */
 	hdd_debug("PNO Capability in f/w = %d", cfg->pno_offload);
 	if (cfg->pno_offload)
-		config->PnoOffload = true;
+		ucfg_scan_set_pno_offload(hdd_ctx->psoc, true);
 #endif
 #ifdef FEATURE_WLAN_TDLS
 	cfg_tdls_get_support_enable(hdd_ctx->psoc, &tdls_support);
@@ -14378,35 +14378,6 @@ static int hdd_update_pmo_config(struct hdd_context *hdd_ctx)
 	return qdf_status_to_os_return(status);
 }
 
-#ifdef FEATURE_WLAN_SCAN_PNO
-static inline void hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
-	struct hdd_context *hdd_ctx)
-{
-	struct nlo_mawc_params *mawc_cfg = &pno_cfg->mawc_params;
-	struct hdd_config *cfg = hdd_ctx->config;
-	bool mawc_enabled;
-
-	pno_cfg->channel_prediction = cfg->pno_channel_prediction;
-	pno_cfg->top_k_num_of_channels = cfg->top_k_num_of_channels;
-	pno_cfg->stationary_thresh = cfg->stationary_thresh;
-	pno_cfg->adaptive_dwell_mode = cfg->pnoscan_adaptive_dwell_mode;
-	pno_cfg->channel_prediction_full_scan =
-		cfg->channel_prediction_full_scan;
-
-	ucfg_mlme_is_mawc_enabled(hdd_ctx->psoc, &mawc_enabled);
-	mawc_cfg->enable = mawc_enabled && cfg->mawc_nlo_enabled;
-	mawc_cfg->exp_backoff_ratio = cfg->mawc_nlo_exp_backoff_ratio;
-	mawc_cfg->init_scan_interval = cfg->mawc_nlo_init_scan_interval;
-	mawc_cfg->max_scan_interval = cfg->mawc_nlo_max_scan_interval;
-}
-#else
-static inline void
-hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
-		      struct hdd_context *hdd_ctx)
-{
-}
-#endif
-
 void hdd_update_ie_whitelist_attr(struct probe_req_whitelist_attr *ie_whitelist,
 				  struct hdd_context *hdd_ctx)
 {
@@ -14567,7 +14538,6 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
 		return -EIO;
 	}
 	scan_cfg.sta_miracast_mcc_rest_time = mcast_mcc_rest_time;
-	hdd_update_pno_config(&scan_cfg.pno_cfg, hdd_ctx);
 	hdd_update_ie_whitelist_attr(&scan_cfg.ie_whitelist, hdd_ctx);
 
 	status = hdd_update_score_config(&scan_cfg.score_config, hdd_ctx);

+ 14 - 4
core/hdd/src/wlan_hdd_scan.c

@@ -40,6 +40,7 @@
 #include "wma_api.h"
 #include "cds_utils.h"
 #include "wlan_p2p_ucfg_api.h"
+#include "cfg_ucfg_api.h"
 
 #ifdef WLAN_UMAC_CONVERGENCE
 #include "wlan_cfg80211.h"
@@ -1268,6 +1269,8 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
 	struct hdd_context *hdd_ctx;
 	struct wlan_objmgr_vdev *vdev;
 	int ret;
+	bool pno_offload_enabled;
+	uint8_t scan_backoff_multiplier;
 
 	hdd_enter();
 
@@ -1289,8 +1292,9 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
 	if (ret)
 		return ret;
 
-	if (!hdd_ctx->config->PnoOffload) {
-		hdd_debug("PnoOffload is not enabled!!!");
+	pno_offload_enabled = ucfg_scan_is_pno_offload_enabled(hdd_ctx->psoc);
+	if (!pno_offload_enabled) {
+		hdd_debug("Pno Offload is not enabled");
 		return -EINVAL;
 	}
 
@@ -1305,8 +1309,11 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
 	vdev = hdd_objmgr_get_vdev(adapter);
 	if (!vdev)
 		return -EINVAL;
+
+	scan_backoff_multiplier =
+			ucfg_get_scan_backoff_multiplier(hdd_ctx->psoc);
 	ret = wlan_cfg80211_sched_scan_start(vdev, request,
-				      hdd_ctx->config->scan_backoff_multiplier);
+					     scan_backoff_multiplier);
 	hdd_objmgr_put_vdev(adapter);
 
 	return ret;
@@ -1340,6 +1347,7 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev)
 	struct hdd_context *hdd_ctx;
 	struct wlan_objmgr_vdev *vdev;
 	int ret;
+	bool pno_offload_enabled;
 
 	if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
 		hdd_err("Command not allowed in FTM mode");
@@ -1354,7 +1362,9 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev)
 		hdd_err("HDD context is Null");
 		return -EINVAL;
 	}
-	if (!hdd_ctx->config->PnoOffload) {
+
+	pno_offload_enabled = ucfg_scan_is_pno_offload_enabled(hdd_ctx->psoc);
+	if (!pno_offload_enabled) {
 		hdd_debug("PnoOffload is not enabled!!!");
 		return -EINVAL;
 	}

+ 1 - 1
core/wma/src/wma_features.c

@@ -227,7 +227,7 @@ static int wma_wake_reason_nlod(t_wma_handle *wma, uint8_t vdev_id)
 						 sizeof(param));
 }
 #else
-static inline int wma_wake_reason_nlod(uint8_t vdev_id)
+static inline int wma_wake_reason_nlod(t_wma_handle *wma, uint8_t vdev_id)
 {
 	return 0;
 }