diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index b6603d580a613..9bf7abc0f1312 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -264,194 +264,6 @@ enum hdd_dot11_mode {
#define CFG_SCAN_RESULT_AGE_COUNT_MAX (100)
#define CFG_SCAN_RESULT_AGE_COUNT_DEFAULT (1)
-/*
- *
- * gNeighborScanTimerPeriod - Set neighbor scan timer period
- * @Min: 3
- * @Max: 300
- * @Default: 200
- *
- * This ini is used to set the timer period in secs after
- * which neighbor scan is trigerred.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_NAME "gNeighborScanTimerPeriod"
-#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN (3)
-#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX (300)
-#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_DEFAULT (100)
-
-/*
- *
- * gRoamRestTimeMin - Set min neighbor scan timer period
- * @Min: 3
- * @Max: 300
- * @Default: 200
- *
- * This is the min rest time after which firmware will check for traffic
- * and if there no traffic it will move to a new channel to scan
- * else it will stay on the home channel till gNeighborScanTimerPeriod time
- * and then will move to a new channel to scan.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_NAME "gRoamRestTimeMin"
-#define CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_MIN (3)
-#define CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_MAX (300)
-#define CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_DEFAULT (50)
-
-/*
- *
- * gOpportunisticThresholdDiff - Set oppurtunistic threshold diff
- * @Min: 0
- * @Max: 127
- * @Default: 0
- *
- * This ini is used to set opportunistic threshold diff.
- * This parameter is the RSSI diff above neighbor lookup
- * threshold, when opportunistic scan should be triggered.
- * MAX value is chosen so that this type of scan can be
- * always enabled by user.
- * MIN value will cause opportunistic scan to be triggered
- * in neighbor lookup RSSI range.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_NAME "gOpportunisticThresholdDiff"
-#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_MIN (0)
-#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_MAX (127)
-#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_DEFAULT (0)
-
-/*
- *
- * gNeighborScanChannelList - Set channels to be scanned
- * by firmware for LFR scan
- * @Default: ""
- *
- * This ini is used to set the channels to be scanned
- * by firmware for LFR scan.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_NEIGHBOR_SCAN_CHAN_LIST_NAME "gNeighborScanChannelList"
-#define CFG_NEIGHBOR_SCAN_CHAN_LIST_DEFAULT ""
-
-/*
- *
- * gNeighborScanChannelMinTime - Set neighbor scan channel min time
- * @Min: 10
- * @Max: 40
- * @Default: 20
- *
- * This ini is used to set the minimum time in secs spent on each
- * channel in LFR scan inside firmware.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_NAME "gNeighborScanChannelMinTime"
-#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN (10)
-#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX (40)
-#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_DEFAULT (20)
-
-/*
- *
- * gNeighborScanChannelMaxTime - Set neighbor scan channel max time
- * @Min: 3
- * @Max: 300
- * @Default: 30
- *
- * This ini is used to set the maximum time in secs spent on each
- * channel in LFR scan inside firmware.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_NAME "gNeighborScanChannelMaxTime"
-#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN (3)
-#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX (300)
-#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_DEFAULT (30)
-
-/*
- *
- * gNeighborScanRefreshPeriod - Set neighbor scan refresh period
- * @Min: 1000
- * @Max: 60000
- * @Default: 20000
- *
- * This ini is used by firmware to set scan refresh period
- * in msecs for lfr scan.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_NAME "gNeighborScanRefreshPeriod"
-#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN (1000)
-#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX (60000)
-#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_DEFAULT (20000)
-
-/*
- *
- * gEmptyScanRefreshPeriod - Set empty scan refresh period
- * @Min: 0
- * @Max: 60000
- * @Default: 0
- *
- * This ini is used by firmware to set scan period in msecs
- * following empty scan results.
- *
- * Related: None
- *
- * Supported Feature: LFR Scan
- *
- * Usage: External
- *
- *
- */
-#define CFG_EMPTY_SCAN_REFRESH_PERIOD_NAME "gEmptyScanRefreshPeriod"
-#define CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN (0)
-#define CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX (60000)
-#define CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT (0)
-
/*
*
* gEnableDFSChnlScan - Enable DFS channel scan
@@ -979,169 +791,6 @@ enum hdd_dot11_mode {
#define CFG_RSSI_CATEGORY_GAP_MAX (100)
#define CFG_RSSI_CATEGORY_GAP_DEFAULT (5)
-/*
- *
- * gRoamPrefer5GHz - Prefer roaming to 5GHz Bss
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to inform FW to prefer roaming to 5GHz BSS
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_PREFER_5GHZ "gRoamPrefer5GHz"
-#define CFG_ROAM_PREFER_5GHZ_MIN (0)
-#define CFG_ROAM_PREFER_5GHZ_MAX (1)
-#define CFG_ROAM_PREFER_5GHZ_DEFAULT (1)
-
-/*
- *
- * gRoamIntraBand - Prefer roaming within Band
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to inform FW to prefer roaming within band
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_INTRA_BAND "gRoamIntraBand"
-#define CFG_ROAM_INTRA_BAND_MIN (0)
-#define CFG_ROAM_INTRA_BAND_MAX (1)
-#define CFG_ROAM_INTRA_BAND_DEFAULT (0)
-
-/*
- *
- * FastRoamEnabled - Enable fast roaming
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to inform FW to enable fast roaming
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_LFR_FEATURE_ENABLED_NAME "FastRoamEnabled"
-#define CFG_LFR_FEATURE_ENABLED_MIN (0)
-#define CFG_LFR_FEATURE_ENABLED_MAX (1)
-#define CFG_LFR_FEATURE_ENABLED_DEFAULT (0)
-
-/*
- *
- * FastTransitionEnabled - Enable fast transition in case of 11r and ese.
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to turn ON/OFF the whole neighbor roam, pre-auth, reassoc.
- * With this turned OFF 11r will completely not work. For 11r this flag has to
- * be ON. For ESE fastroam will not work.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_FAST_TRANSITION_ENABLED_NAME "FastTransitionEnabled"
-#define CFG_FAST_TRANSITION_ENABLED_NAME_MIN (0)
-#define CFG_FAST_TRANSITION_ENABLED_NAME_MAX (1)
-#define CFG_FAST_TRANSITION_ENABLED_NAME_DEFAULT (1)
-
-/*
- *
- * RoamRssiDiff - Enable roam based on rssi
- * @Min: 0
- * @Max: 30
- * @Default: 5
- *
- * This INI is used to decide whether to Roam or not based on RSSI. AP1 is the
- * currently associated AP and AP2 is chosen for roaming. The Roaming will
- * happen only if AP2 has better Signal Quality and it has a RSSI better than
- * AP2. RoamRssiDiff is the number of units (typically measured in dB) AP2
- * is better than AP1.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_RSSI_DIFF_NAME "RoamRssiDiff"
-#define CFG_ROAM_RSSI_DIFF_MIN (0)
-#define CFG_ROAM_RSSI_DIFF_MAX (30)
-#define CFG_ROAM_RSSI_DIFF_DEFAULT (5)
-
-/*
- *
- * gRoamScanNProbes - Sets the number of probes to be sent for firmware roaming
- * @Min: 1
- * @Max: 10
- * @Default: 2
- *
- * This INI is used to set the maximum number of probes the firmware can send
- * for firmware internal roaming cases.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_N_PROBES "gRoamScanNProbes"
-#define CFG_ROAM_SCAN_N_PROBES_MIN (1)
-#define CFG_ROAM_SCAN_N_PROBES_MAX (10)
-#define CFG_ROAM_SCAN_N_PROBES_DEFAULT (2)
-
-/*
- *
- * gRoamScanHomeAwayTime - Sets the Home Away Time to firmware
- * @Min: 0
- * @Max: 300
- * @Default: 0
- *
- * Home Away Time should be at least equal to (gNeighborScanChannelMaxTime
- * + (2*RFS)), where RFS is the RF Switching time(3). It is twice RFS
- * to consider the time to go off channel and return to the home channel.
- *
- * Related: gNeighborScanChannelMaxTime
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_HOME_AWAY_TIME "gRoamScanHomeAwayTime"
-#define CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN (0)
-#define CFG_ROAM_SCAN_HOME_AWAY_TIME_MAX (300)
-#define CFG_ROAM_SCAN_HOME_AWAY_TIME_DEFAULT (0)
-
/*
*
* OkcEnabled - Enable OKC(Oppurtunistic Key Caching)
@@ -1164,52 +813,6 @@ enum hdd_dot11_mode {
#define CFG_OKC_FEATURE_ENABLED_MAX (1)
#define CFG_OKC_FEATURE_ENABLED_DEFAULT (1)
-/*
- *
- * gRoamScanOffloadEnabled - Enable Roam Scan Offload
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This INI is used to enable Roam Scan Offload in firmware
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_OFFLOAD_ENABLED "gRoamScanOffloadEnabled"
-#define CFG_ROAM_SCAN_OFFLOAD_ENABLED_MIN (0)
-#define CFG_ROAM_SCAN_OFFLOAD_ENABLED_MAX (1)
-#define CFG_ROAM_SCAN_OFFLOAD_ENABLED_DEFAULT (1)
-
-/*
- *
- * gRoamRescanRssiDiff - Sets RSSI for Scan trigger in firmware
- * @Min: 0
- * @Max: 100
- * @Default: 5
- *
- * This INI is the drop in RSSI value that will trigger a precautionary
- * scan by firmware. Max value is chosen in such a way that this type
- * of scan can be disabled by user.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_RESCAN_RSSI_DIFF_NAME "gRoamRescanRssiDiff"
-#define CFG_ROAM_RESCAN_RSSI_DIFF_MIN (0)
-#define CFG_ROAM_RESCAN_RSSI_DIFF_MAX (100)
-#define CFG_ROAM_RESCAN_RSSI_DIFF_DEFAULT (5)
-
/*
*
* gForce1x1Exception - force 1x1 when connecting to certain peer
@@ -1233,119 +836,6 @@ enum hdd_dot11_mode {
#define CFG_FORCE_1X1_MAX (1)
#define CFG_FORCE_1X1_DEFAULT (1)
-/*
- *
- * gEnableFastRoamInConcurrency - Enable LFR roaming on STA during concurrency
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This INI is used to enable Legacy fast roaming(LFR) on STA link during
- * concurrent sessions.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY "gEnableFastRoamInConcurrency"
-#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MIN (0)
-#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MAX (1)
-#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_DEFAULT (1)
-
-/*
- *
- * gRoamScanHiRssiMaxCount - Sets 5GHz maximum scan count
- * @Min: 0
- * @Max: 10
- * @Default: 3
- *
- * This INI is used to set maximum scan count in 5GHz
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_NAME "gRoamScanHiRssiMaxCount"
-#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_MIN (0)
-#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_MAX (10)
-#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_DEFAULT (3)
-
-/*
- *
- * gRoamScanHiRssiDelta - Sets RSSI Delta for scan trigger
- * @Min: 0
- * @Max: 16
- * @Default: 10
- *
- * This INI is used to set change in RSSI at which scan is triggered
- * in 5GHz.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_HI_RSSI_DELTA_NAME "gRoamScanHiRssiDelta"
-#define CFG_ROAM_SCAN_HI_RSSI_DELTA_MIN (0)
-#define CFG_ROAM_SCAN_HI_RSSI_DELTA_MAX (16)
-#define CFG_ROAM_SCAN_HI_RSSI_DELTA_DEFAULT (10)
-
-/*
- *
- * gRoamScanHiRssiDelay - Sets minimum delay between 5GHz scans
- * @Min: 5000
- * @Max: 0x7fffffff
- * @Default: 15000
- *
- * This INI is used to set the minimum delay between 5GHz scans.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_HI_RSSI_DELAY_NAME "gRoamScanHiRssiDelay"
-#define CFG_ROAM_SCAN_HI_RSSI_DELAY_MIN (5000)
-#define CFG_ROAM_SCAN_HI_RSSI_DELAY_MAX (0x7fffffff)
-#define CFG_ROAM_SCAN_HI_RSSI_DELAY_DEFAULT (15000)
-
-/*
- *
- * gRoamScanHiRssiUpperBound - Sets upper bound after which 5GHz scan
- * @Min: -66
- * @Max: 0
- * @Default: -30
- *
- * This INI is used to set the RSSI upper bound above which the 5GHz scan
- * will not be performed.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- *
- */
-#define CFG_ROAM_SCAN_HI_RSSI_UB_NAME "gRoamScanHiRssiUpperBound"
-#define CFG_ROAM_SCAN_HI_RSSI_UB_MIN (-66)
-#define CFG_ROAM_SCAN_HI_RSSI_UB_MAX (0)
-#define CFG_ROAM_SCAN_HI_RSSI_UB_DEFAULT (-30)
-
#ifdef FEATURE_LFR_SUBNET_DETECTION
/*
*
@@ -2557,77 +2047,6 @@ enum station_keepalive_method {
#define CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_MAX (1)
#define CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_DEFAULT (0)
-#ifdef FEATURE_WLAN_ESE
-/*
- *
- * EseEnabled - Enable ESE
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to control whether ESE is enabled or not.
- *
- * Related: None.
- *
- * Supported Feature: WMM/ESE
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ESE_FEATURE_ENABLED_NAME "EseEnabled"
-#define CFG_ESE_FEATURE_ENABLED_MIN (0)
-#define CFG_ESE_FEATURE_ENABLED_MAX (1)
-#define CFG_ESE_FEATURE_ENABLED_DEFAULT (0) /* disabled */
-#endif /* FEATURE_WLAN_ESE */
-
-/*
- *
- * MAWCEnabled - Enable/Disable Motion Aided Wireless Connectivity Global
- * @Min: 0 - Disabled
- * @Max: 1 - Enabled
- * @Default: 0
- *
- * This ini is used to controls the MAWC feature globally.
- * MAWC is Motion Aided Wireless Connectivity.
- *
- * Related: mawc_roam_enabled.
- *
- * Supported Feature: Roaming and PNO/NLO
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_LFR_MAWC_FEATURE_ENABLED_NAME "MAWCEnabled"
-#define CFG_LFR_MAWC_FEATURE_ENABLED_MIN (0)
-#define CFG_LFR_MAWC_FEATURE_ENABLED_MAX (1)
-#define CFG_LFR_MAWC_FEATURE_ENABLED_DEFAULT (0)
-
-/*
- *
- * gWESModeEnabled - Enable/Disable Wireless Extended Security Mode
- * @Min: 0 - Disabled
- * @Max: 1 - Enabled
- * @Default: 0
- *
- * This parameter is used to set Wireless Extended Security Mode.
- *
- * Related: mawc_roam_enabled.
- *
- * Supported Feature: Roaming and PNO/NLO
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ENABLE_WES_MODE_NAME "gWESModeEnabled"
-#define CFG_ENABLE_WES_MODE_NAME_MIN (0)
-#define CFG_ENABLE_WES_MODE_NAME_MAX (1)
-#define CFG_ENABLE_WES_MODE_NAME_DEFAULT (0)
-
/*
*
* DelayedTriggerFrmInt - UAPSD delay interval
@@ -2722,126 +2141,6 @@ enum station_keepalive_method {
#define CFG_RM_CAPABILITY_NAME "rm_capability"
#define CFG_RM_CAPABILITY_DEFAULT "73,10,91,00,04"
-/*
- *
- * gNeighborLookupThreshold - Neighbor lookup RSSI threshold
- * @Min: 10
- * @Max: 120
- * @Default: 78
- *
- * This ini is used to control the RSSI threshold for neighbor lookup.
- *
- * Related: None.
- *
- * Supported Feature: 11k
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_NAME "gNeighborLookupThreshold"
-#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN (10)
-#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX (120)
-#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_DEFAULT (78)
-
-/*
- *
- * gDelayBeforeVdevStop - Delay before vdev stop
- * @Min: 2
- * @Max: 200
- * @Default: 20
- *
- * This ini is used to control the time driver has to wait for tx to finish
- * before BSS is to be stopped.
- *
- * Related: None.
- *
- * Supported Feature: 11k
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_DELAY_BEFORE_VDEV_STOP_NAME "gDelayBeforeVdevStop"
-#define CFG_DELAY_BEFORE_VDEV_STOP_MIN (2)
-#define CFG_DELAY_BEFORE_VDEV_STOP_MAX (200)
-#define CFG_DELAY_BEFORE_VDEV_STOP_DEFAULT (20)
-
-/*
- *
- * gRoamBmissFirstBcnt - Beacon miss count to trigger 1st bmiss event
- * @Min: 5
- * @Max: 100
- * @Default: 10
- *
- * This ini is used to control how many beacon miss will trigger first bmiss
- * event. First bmiss event will result in roaming scan.
- *
- * Related: None.
- *
- * Supported Feature: 11k
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ROAM_BMISS_FIRST_BCNT_NAME "gRoamBmissFirstBcnt"
-#define CFG_ROAM_BMISS_FIRST_BCNT_MIN (5)
-#define CFG_ROAM_BMISS_FIRST_BCNT_MAX (100)
-#define CFG_ROAM_BMISS_FIRST_BCNT_DEFAULT (10)
-
-/*
- *
- * gRoamBmissFirstBcnt - Beacon miss count to trigger final bmiss event
- * @Min: 5
- * @Max: 100
- * @Default: 20
- *
- * This ini is used to control how many beacon miss will trigger final bmiss
- * event. Final bmiss event will make roaming take place or cause the
- * indication of final bmiss event.
- *
- * Related: None.
- *
- * Supported Feature: 11k
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ROAM_BMISS_FINAL_BCNT_NAME "gRoamBmissFinalBcnt"
-#define CFG_ROAM_BMISS_FINAL_BCNT_MIN (5)
-#define CFG_ROAM_BMISS_FINAL_BCNT_MAX (100)
-#define CFG_ROAM_BMISS_FINAL_BCNT_DEFAULT (20)
-
-/*
- *
- * gRoamBeaconRssiWeight - Beacon RSSI weight
- * @Min: 0
- * @Max: 16
- * @Default: 14
- *
- * This ini controls how many beacons' RSSI values will be used to calculate
- * the average value of RSSI.
- *
- * Related: None.
- *
- * Supported Feature: 11k
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ROAM_BEACON_RSSI_WEIGHT_NAME "gRoamBeaconRssiWeight"
-#define CFG_ROAM_BEACON_RSSI_WEIGHT_MIN (0)
-#define CFG_ROAM_BEACON_RSSI_WEIGHT_MAX (16)
-#define CFG_ROAM_BEACON_RSSI_WEIGHT_DEFAULT (14)
-
/*
*
* gHwFilterMode - configure hardware filter for DTIM mode
@@ -3679,32 +2978,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_INITIAL_SCAN_NO_DFS_CHNL_MIN (0)
#define CFG_INITIAL_SCAN_NO_DFS_CHNL_MAX (1)
-/*
- *
- * gAllowDFSChannelRoam - Allow dfs channel in roam
- * @Min: 0
- * @Max: 1
- * @Default: 2
- *
- * This ini is used to set default dfs channel
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- *
- */
-
-#define CFG_ROAMING_DFS_CHANNEL_NAME "gAllowDFSChannelRoam"
-#define CFG_ROAMING_DFS_CHANNEL_DISABLED (0)
-#define CFG_ROAMING_DFS_CHANNEL_ENABLED_NORMAL (1)
-#define CFG_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE (2)
-#define CFG_ROAMING_DFS_CHANNEL_MIN (CFG_ROAMING_DFS_CHANNEL_DISABLED)
-#define CFG_ROAMING_DFS_CHANNEL_MAX (CFG_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE)
-#define CFG_ROAMING_DFS_CHANNEL_DEFAULT (CFG_ROAMING_DFS_CHANNEL_DISABLED)
-
#ifdef MSM_PLATFORM
/*
*
@@ -5925,25 +5198,6 @@ struct hdd_config {
uint32_t mws_coex_5g_nr_pwr_limit;
#endif
- uint16_t nNeighborScanPeriod;
- uint16_t neighbor_scan_min_period;
- uint8_t nNeighborLookupRssiThreshold;
- uint8_t delay_before_vdev_stop;
- uint8_t nOpportunisticThresholdDiff;
- uint8_t nRoamRescanRssiDiff;
- uint8_t neighborScanChanList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
- uint16_t nNeighborScanMinChanTime;
- uint16_t nNeighborScanMaxChanTime;
- uint16_t nNeighborResultsRefreshPeriod;
- uint16_t nEmptyScanRefreshPeriod;
- uint8_t nRoamBmissFirstBcnt;
- uint8_t nRoamBmissFinalBcnt;
- uint8_t nRoamBeaconRssiWeight;
- uint32_t nhi_rssi_scan_max_count;
- uint32_t nhi_rssi_scan_rssi_delta;
- uint32_t nhi_rssi_scan_delay;
- int32_t nhi_rssi_scan_rssi_ub;
-
/* Additional Handoff params */
uint32_t nPassiveMaxChnTime; /* in units of milliseconds */
uint32_t nActiveMaxChnTime; /* in units of milliseconds */
@@ -5969,17 +5223,6 @@ struct hdd_config {
bool mcc_bcast_prob_resp_enable;
uint8_t wow_data_inactivity_timeout;
- /* WMM QoS Configuration */
- bool isFastRoamIniFeatureEnabled;
- bool MAWCEnabled;
-#ifdef FEATURE_WLAN_ESE
- bool isEseIniFeatureEnabled;
-#endif
- bool isFastTransitionEnabled;
- uint8_t RoamRssiDiff;
- bool isWESModeEnabled;
- bool isRoamOffloadScanEnabled;
-
uint32_t DelayedTriggerFrmInt;
#ifdef FEATURE_RUNTIME_PM
@@ -6027,10 +5270,6 @@ struct hdd_config {
int32_t linkSpeedRssiHigh;
int32_t linkSpeedRssiMid;
int32_t linkSpeedRssiLow;
- bool nRoamPrefer5GHz;
- bool nRoamIntraBand;
- uint8_t nProbes;
- uint16_t nRoamScanHomeAwayTime;
uint8_t enableMCC;
uint8_t allowMCCGODiffBI;
uint8_t thermalMitigationEnable;
@@ -6070,7 +5309,6 @@ struct hdd_config {
bool prevent_link_down;
uint8_t scanAgingTimeout;
uint8_t disableLDPCWithTxbfAP;
- bool bFastRoamInConIniFeatureEnabled;
bool fEnableSNRMonitoring;
/*PNO related parameters */
#ifdef FEATURE_WLAN_SCAN_PNO
@@ -6100,8 +5338,6 @@ struct hdd_config {
bool fRegChangeDefCountry;
bool advertiseConcurrentOperation;
- uint8_t allowDFSChannelRoam;
-
uint8_t enableFwModuleLogLevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
uint8_t ignoreCAC;
@@ -6210,7 +5446,6 @@ struct hdd_config {
uint8_t rssi_penalize_factor_5g;
uint8_t max_rssi_penalize_5g;
bool enable_lprx;
- int8_t rssi_thresh_offset_5g;
uint32_t scan_11d_interval;
bool is_bssid_hint_priority;
uint16_t wlm_latency_enable;
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 25050b6b1d841..efade6a60efb4 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -2536,7 +2536,11 @@ static inline bool roaming_offload_enabled(struct hdd_context *hdd_ctx)
#ifdef WLAN_FEATURE_HOST_ROAM
static inline bool hdd_driver_roaming_supported(struct hdd_context *hdd_ctx)
{
- return hdd_ctx->config->isFastRoamIniFeatureEnabled;
+ bool lfr_enabled;
+
+ ucfg_mlme_is_lfr_enabled(hdd_ctx->psoc, &lfr_enabled);
+
+ return lfr_enabled;
}
#else
static inline bool hdd_driver_roaming_supported(struct hdd_context *hdd_ctx)
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 6765daceb8006..949debeef4af5 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -48,225 +48,6 @@
#include "cfg_ucfg_api.h"
#include "hdd_dp_cfg.h"
-static void
-cb_notify_set_roam_prefer5_g_hz(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_update_roam_prefer5_g_hz(hdd_ctx->mac_handle,
- hdd_ctx->config->nRoamPrefer5GHz);
-}
-
-static void
-cb_notify_set_roam_rssi_diff(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_update_roam_rssi_diff(hdd_ctx->mac_handle,
- 0, hdd_ctx->config->RoamRssiDiff);
-}
-
-static void
-cb_notify_set_fast_transition_enabled(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- bool enabled = hdd_ctx->config->isFastTransitionEnabled;
-
- sme_update_fast_transition_enabled(hdd_ctx->mac_handle, enabled);
-}
-
-static void
-cb_notify_set_roam_intra_band(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_roam_intra_band(hdd_ctx->mac_handle,
- hdd_ctx->config->nRoamIntraBand);
-}
-
-static void cb_notify_set_wes_mode(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_update_wes_mode(hdd_ctx->mac_handle,
- hdd_ctx->config->isWESModeEnabled, 0);
-}
-
-static void
-cb_notify_set_roam_scan_n_probes(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_update_roam_scan_n_probes(hdd_ctx->mac_handle, 0,
- hdd_ctx->config->nProbes);
-}
-
-static void
-cb_notify_set_roam_scan_home_away_time(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint16_t away_time = hdd_ctx->config->nRoamScanHomeAwayTime;
-
- sme_update_roam_scan_home_away_time(hdd_ctx->mac_handle, 0,
- away_time, true);
-}
-
-static void
-notify_is_fast_roam_ini_feature_enabled(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- bool enabled = hdd_ctx->config->isFastRoamIniFeatureEnabled;
-
- sme_update_is_fast_roam_ini_feature_enabled(hdd_ctx->mac_handle, 0,
- enabled);
-}
-
-static void
-notify_is_mawc_ini_feature_enabled(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_update_is_mawc_ini_feature_enabled(hdd_ctx->mac_handle,
- hdd_ctx->config->MAWCEnabled);
-}
-
-#ifdef FEATURE_WLAN_ESE
-static void
-cb_notify_set_ese_feature_enabled(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- bool enabled = hdd_ctx->config->isEseIniFeatureEnabled;
-
- sme_update_is_ese_feature_enabled(hdd_ctx->mac_handle, 0, enabled);
-}
-#endif
-
-static void
-cb_notify_set_opportunistic_scan_threshold_diff(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint8_t diff = hdd_ctx->config->nOpportunisticThresholdDiff;
-
- sme_set_roam_opportunistic_scan_threshold_diff(hdd_ctx->mac_handle,
- 0, diff);
-}
-
-static void cb_notify_set_roam_rescan_rssi_diff(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_roam_rescan_rssi_diff(hdd_ctx->mac_handle,
- 0, hdd_ctx->config->nRoamRescanRssiDiff);
-}
-
-static void
-cb_notify_set_neighbor_lookup_rssi_threshold(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint8_t threshold = hdd_ctx->config->nNeighborLookupRssiThreshold;
-
- sme_set_neighbor_lookup_rssi_threshold(hdd_ctx->mac_handle, 0,
- threshold);
-}
-
-static void
-cb_notify_set_delay_before_vdev_stop(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_delay_before_vdev_stop(hdd_ctx->mac_handle, 0,
- hdd_ctx->config->delay_before_vdev_stop);
-}
-
-static void
-cb_notify_set_neighbor_scan_period(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_neighbor_scan_period(hdd_ctx->mac_handle, 0,
- hdd_ctx->config->nNeighborScanPeriod);
-}
-
-/*
- * cb_notify_set_neighbor_scan_min_period() - configure min rest
- * time during roaming scan
- *
- * @hdd_ctx: HDD context data structure
- * @notify_id: Identifies 1 of the 4 parameters to be modified
- *
- * Picks up the value from hdd configuration and passes it to SME.
- * Return: void
- */
-static void
-cb_notify_set_neighbor_scan_min_period(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint16_t period = hdd_ctx->config->neighbor_scan_min_period;
-
- sme_set_neighbor_scan_min_period(hdd_ctx->mac_handle, 0,
- period);
-}
-
-static void
-cb_notify_set_neighbor_results_refresh_period(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint16_t period = hdd_ctx->config->nNeighborResultsRefreshPeriod;
-
- sme_set_neighbor_scan_refresh_period(hdd_ctx->mac_handle, 0,
- period);
-}
-
-static void
-cb_notify_set_empty_scan_refresh_period(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint16_t period = hdd_ctx->config->nEmptyScanRefreshPeriod;
-
- sme_update_empty_scan_refresh_period(hdd_ctx->mac_handle, 0,
- period);
-}
-
-static void
-cb_notify_set_neighbor_scan_min_chan_time(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint16_t min_chan_time = hdd_ctx->config->nNeighborScanMinChanTime;
-
- sme_set_neighbor_scan_min_chan_time(hdd_ctx->mac_handle,
- min_chan_time, 0);
-}
-
-static void
-cb_notify_set_neighbor_scan_max_chan_time(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- uint16_t max_chan_time = hdd_ctx->config->nNeighborScanMaxChanTime;
-
- sme_set_neighbor_scan_max_chan_time(hdd_ctx->mac_handle, 0,
- max_chan_time);
-}
-
-static void cb_notify_set_roam_bmiss_first_bcnt(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_roam_bmiss_first_bcnt(hdd_ctx->mac_handle,
- 0, hdd_ctx->config->nRoamBmissFirstBcnt);
-}
-
-static void cb_notify_set_roam_bmiss_final_bcnt(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_roam_bmiss_final_bcnt(hdd_ctx->mac_handle, 0,
- hdd_ctx->config->nRoamBmissFinalBcnt);
-}
-
-static void cb_notify_set_roam_beacon_rssi_weight(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_set_roam_beacon_rssi_weight(hdd_ctx->mac_handle, 0,
- hdd_ctx->config->nRoamBeaconRssiWeight);
-}
-
-static void
-cb_notify_set_dfs_scan_mode(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- sme_update_dfs_scan_mode(hdd_ctx->mac_handle, 0,
- hdd_ctx->config->allowDFSChannelRoam);
-}
-
static void ch_notify_set_g_disable_dfs_japan_w53(struct hdd_context *hdd_ctx,
unsigned long notify_id)
{
@@ -275,76 +56,6 @@ static void ch_notify_set_g_disable_dfs_japan_w53(struct hdd_context *hdd_ctx,
wlansap_set_dfs_restrict_japan_w53(hdd_ctx->mac_handle, disabled);
}
-static void
-cb_notify_update_roam_scan_offload_enabled(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- bool enabled = hdd_ctx->config->isRoamOffloadScanEnabled;
-
- sme_update_roam_scan_offload_enabled(hdd_ctx->mac_handle, enabled);
- if (enabled)
- return;
-
- /* fate sharing */
- hdd_ctx->config->bFastRoamInConIniFeatureEnabled = false;
- sme_update_enable_fast_roam_in_concurrency(hdd_ctx->mac_handle, false);
-}
-
-static void
-cb_notify_set_enable_fast_roam_in_concurrency(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- bool enabled = hdd_ctx->config->bFastRoamInConIniFeatureEnabled;
-
- sme_update_enable_fast_roam_in_concurrency(hdd_ctx->mac_handle,
- enabled);
-}
-
-/**
- * cb_notify_set_roam_scan_hi_rssi_scan_params() - configure hi rssi
- * scan params from cfg to sme.
- * @hdd_ctx: HDD context data structure
- * @notify_id: Identifies 1 of the 4 parameters to be modified
- *
- * Picks up the value from hdd configuration and passes it to SME.
- * Return: void
- */
-
-static void
-cb_notify_set_roam_scan_hi_rssi_scan_params(struct hdd_context *hdd_ctx,
- unsigned long notify_id)
-{
- int32_t val;
-
- if (wlan_hdd_validate_context(hdd_ctx))
- return;
-
- switch (notify_id) {
- case eCSR_HI_RSSI_SCAN_MAXCOUNT_ID:
- val = hdd_ctx->config->nhi_rssi_scan_max_count;
- break;
-
- case eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID:
- val = hdd_ctx->config->nhi_rssi_scan_rssi_delta;
- break;
-
- case eCSR_HI_RSSI_SCAN_DELAY_ID:
- val = hdd_ctx->config->nhi_rssi_scan_delay;
- break;
-
- case eCSR_HI_RSSI_SCAN_RSSI_UB_ID:
- val = hdd_ctx->config->nhi_rssi_scan_rssi_ub;
- break;
-
- default:
- return;
- }
-
- sme_update_roam_scan_hi_rssi_scan_params(hdd_ctx->mac_handle, 0,
- notify_id, val);
-}
-
-
struct reg_table_entry g_registry_table[] = {
REG_VARIABLE(CFG_ENABLE_CONNECTED_SCAN_NAME, WLAN_PARAM_Integer,
struct hdd_config, enable_connected_scan,
@@ -620,78 +331,7 @@ struct reg_table_entry g_registry_table[] = {
#ifdef FEATURE_WLAN_ESE
- REG_DYNAMIC_VARIABLE(CFG_ESE_FEATURE_ENABLED_NAME, WLAN_PARAM_Integer,
- struct hdd_config, isEseIniFeatureEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ESE_FEATURE_ENABLED_DEFAULT,
- CFG_ESE_FEATURE_ENABLED_MIN,
- CFG_ESE_FEATURE_ENABLED_MAX,
- cb_notify_set_ese_feature_enabled, 0),
#endif /* FEATURE_WLAN_ESE */
-
- /* flag to turn ON/OFF Legacy Fast Roaming */
- REG_DYNAMIC_VARIABLE(CFG_LFR_FEATURE_ENABLED_NAME, WLAN_PARAM_Integer,
- struct hdd_config, isFastRoamIniFeatureEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_LFR_FEATURE_ENABLED_DEFAULT,
- CFG_LFR_FEATURE_ENABLED_MIN,
- CFG_LFR_FEATURE_ENABLED_MAX,
- notify_is_fast_roam_ini_feature_enabled, 0),
-
- /* flag to turn ON/OFF Motion assistance for Legacy Fast Roaming */
- REG_DYNAMIC_VARIABLE(CFG_LFR_MAWC_FEATURE_ENABLED_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, MAWCEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_LFR_MAWC_FEATURE_ENABLED_DEFAULT,
- CFG_LFR_MAWC_FEATURE_ENABLED_MIN,
- CFG_LFR_MAWC_FEATURE_ENABLED_MAX,
- notify_is_mawc_ini_feature_enabled, 0),
-
- /* flag to turn ON/OFF 11r and ESE FastTransition */
- REG_DYNAMIC_VARIABLE(CFG_FAST_TRANSITION_ENABLED_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, isFastTransitionEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_FAST_TRANSITION_ENABLED_NAME_DEFAULT,
- CFG_FAST_TRANSITION_ENABLED_NAME_MIN,
- CFG_FAST_TRANSITION_ENABLED_NAME_MAX,
- cb_notify_set_fast_transition_enabled, 0),
-
- /* Variable to specify the delta/difference between the
- * RSSI of current AP and roamable AP while roaming
- */
- REG_DYNAMIC_VARIABLE(CFG_ROAM_RSSI_DIFF_NAME, WLAN_PARAM_Integer,
- struct hdd_config, RoamRssiDiff,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_RSSI_DIFF_DEFAULT,
- CFG_ROAM_RSSI_DIFF_MIN,
- CFG_ROAM_RSSI_DIFF_MAX,
- cb_notify_set_roam_rssi_diff, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ENABLE_WES_MODE_NAME, WLAN_PARAM_Integer,
- struct hdd_config, isWESModeEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_WES_MODE_NAME_DEFAULT,
- CFG_ENABLE_WES_MODE_NAME_MIN,
- CFG_ENABLE_WES_MODE_NAME_MAX,
- cb_notify_set_wes_mode, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_OFFLOAD_ENABLED, WLAN_PARAM_Integer,
- struct hdd_config, isRoamOffloadScanEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_OFFLOAD_ENABLED_DEFAULT,
- CFG_ROAM_SCAN_OFFLOAD_ENABLED_MIN,
- CFG_ROAM_SCAN_OFFLOAD_ENABLED_MAX,
- cb_notify_update_roam_scan_offload_enabled, 0),
-
REG_VARIABLE(CFG_TL_DELAYED_TRGR_FRM_INT_NAME, WLAN_PARAM_Integer,
struct hdd_config, DelayedTriggerFrmInt,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -718,198 +358,6 @@ struct reg_table_entry g_registry_table[] = {
VAR_FLAGS_OPTIONAL,
(void *) CFG_RM_CAPABILITY_DEFAULT),
- REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_SCAN_TIMER_PERIOD_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nNeighborScanPeriod,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_DEFAULT,
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN,
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX,
- cb_notify_set_neighbor_scan_period, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, neighbor_scan_min_period,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_DEFAULT,
- CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_MIN,
- CFG_NEIGHBOR_SCAN_MIN_TIMER_PERIOD_MAX,
- cb_notify_set_neighbor_scan_min_period, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nNeighborLookupRssiThreshold,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_DEFAULT,
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN,
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX,
- cb_notify_set_neighbor_lookup_rssi_threshold, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nOpportunisticThresholdDiff,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_DEFAULT,
- CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_MIN,
- CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_MAX,
- cb_notify_set_opportunistic_scan_threshold_diff,
- 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_RESCAN_RSSI_DIFF_NAME, WLAN_PARAM_Integer,
- struct hdd_config, nRoamRescanRssiDiff,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_RESCAN_RSSI_DIFF_DEFAULT,
- CFG_ROAM_RESCAN_RSSI_DIFF_MIN,
- CFG_ROAM_RESCAN_RSSI_DIFF_MAX,
- cb_notify_set_roam_rescan_rssi_diff, 0),
-
- REG_VARIABLE_STRING(CFG_NEIGHBOR_SCAN_CHAN_LIST_NAME, WLAN_PARAM_String,
- struct hdd_config, neighborScanChanList,
- VAR_FLAGS_OPTIONAL,
- (void *)CFG_NEIGHBOR_SCAN_CHAN_LIST_DEFAULT),
-
- REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nNeighborScanMinChanTime,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_DEFAULT,
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN,
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX,
- cb_notify_set_neighbor_scan_min_chan_time, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nNeighborScanMaxChanTime,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_DEFAULT,
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN,
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX,
- cb_notify_set_neighbor_scan_max_chan_time, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nNeighborResultsRefreshPeriod,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_DEFAULT,
- CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN,
- CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX,
- cb_notify_set_neighbor_results_refresh_period, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_EMPTY_SCAN_REFRESH_PERIOD_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nEmptyScanRefreshPeriod,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT,
- CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN,
- CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX,
- cb_notify_set_empty_scan_refresh_period, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_BMISS_FIRST_BCNT_NAME, WLAN_PARAM_Integer,
- struct hdd_config, nRoamBmissFirstBcnt,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_BMISS_FIRST_BCNT_DEFAULT,
- CFG_ROAM_BMISS_FIRST_BCNT_MIN,
- CFG_ROAM_BMISS_FIRST_BCNT_MAX,
- cb_notify_set_roam_bmiss_first_bcnt, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_BMISS_FINAL_BCNT_NAME, WLAN_PARAM_Integer,
- struct hdd_config, nRoamBmissFinalBcnt,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_BMISS_FINAL_BCNT_DEFAULT,
- CFG_ROAM_BMISS_FINAL_BCNT_MIN,
- CFG_ROAM_BMISS_FINAL_BCNT_MAX,
- cb_notify_set_roam_bmiss_final_bcnt, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_BEACON_RSSI_WEIGHT_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config, nRoamBeaconRssiWeight,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_BEACON_RSSI_WEIGHT_DEFAULT,
- CFG_ROAM_BEACON_RSSI_WEIGHT_MIN,
- CFG_ROAM_BEACON_RSSI_WEIGHT_MAX,
- cb_notify_set_roam_beacon_rssi_weight, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAMING_DFS_CHANNEL_NAME, WLAN_PARAM_Integer,
- struct hdd_config, allowDFSChannelRoam,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAMING_DFS_CHANNEL_DEFAULT,
- CFG_ROAMING_DFS_CHANNEL_MIN,
- CFG_ROAMING_DFS_CHANNEL_MAX,
- cb_notify_set_dfs_scan_mode, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_DELAY_BEFORE_VDEV_STOP_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config,
- delay_before_vdev_stop,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_DELAY_BEFORE_VDEV_STOP_DEFAULT,
- CFG_DELAY_BEFORE_VDEV_STOP_MIN,
- CFG_DELAY_BEFORE_VDEV_STOP_MAX,
- cb_notify_set_delay_before_vdev_stop,
- 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config,
- nhi_rssi_scan_max_count,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_MIN,
- CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_MAX,
- cb_notify_set_roam_scan_hi_rssi_scan_params,
- eCSR_HI_RSSI_SCAN_MAXCOUNT_ID),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_HI_RSSI_DELTA_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config,
- nhi_rssi_scan_rssi_delta,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_DELTA_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_DELTA_MIN,
- CFG_ROAM_SCAN_HI_RSSI_DELTA_MAX,
- cb_notify_set_roam_scan_hi_rssi_scan_params,
- eCSR_HI_RSSI_SCAN_RSSI_DELTA_ID),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_HI_RSSI_DELAY_NAME,
- WLAN_PARAM_Integer,
- struct hdd_config,
- nhi_rssi_scan_delay,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_DELAY_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_DELAY_MIN,
- CFG_ROAM_SCAN_HI_RSSI_DELAY_MAX,
- cb_notify_set_roam_scan_hi_rssi_scan_params,
- eCSR_HI_RSSI_SCAN_DELAY_ID),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_HI_RSSI_UB_NAME,
- WLAN_PARAM_SignedInteger,
- struct hdd_config,
- nhi_rssi_scan_rssi_ub,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_UB_DEFAULT,
- CFG_ROAM_SCAN_HI_RSSI_UB_MIN,
- CFG_ROAM_SCAN_HI_RSSI_UB_MAX,
- cb_notify_set_roam_scan_hi_rssi_scan_params,
- eCSR_HI_RSSI_SCAN_RSSI_UB_ID),
-
#ifdef FEATURE_WLAN_RA_FILTERING
REG_VARIABLE(CFG_RA_RATE_LIMIT_INTERVAL_NAME, WLAN_PARAM_Integer,
@@ -1157,42 +605,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_LINK_SPEED_RSSI_LOW_MAX,
NULL, 0),
- REG_DYNAMIC_VARIABLE(CFG_ROAM_PREFER_5GHZ, WLAN_PARAM_Integer,
- struct hdd_config, nRoamPrefer5GHz,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_PREFER_5GHZ_DEFAULT,
- CFG_ROAM_PREFER_5GHZ_MIN,
- CFG_ROAM_PREFER_5GHZ_MAX,
- cb_notify_set_roam_prefer5_g_hz, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_INTRA_BAND, WLAN_PARAM_Integer,
- struct hdd_config, nRoamIntraBand,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_INTRA_BAND_DEFAULT,
- CFG_ROAM_INTRA_BAND_MIN,
- CFG_ROAM_INTRA_BAND_MAX,
- cb_notify_set_roam_intra_band, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_N_PROBES, WLAN_PARAM_Integer,
- struct hdd_config, nProbes,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_N_PROBES_DEFAULT,
- CFG_ROAM_SCAN_N_PROBES_MIN,
- CFG_ROAM_SCAN_N_PROBES_MAX,
- cb_notify_set_roam_scan_n_probes, 0),
-
- REG_DYNAMIC_VARIABLE(CFG_ROAM_SCAN_HOME_AWAY_TIME, WLAN_PARAM_Integer,
- struct hdd_config, nRoamScanHomeAwayTime,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ROAM_SCAN_HOME_AWAY_TIME_DEFAULT,
- CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN,
- CFG_ROAM_SCAN_HOME_AWAY_TIME_MAX,
- cb_notify_set_roam_scan_home_away_time, 0),
-
REG_VARIABLE(CFG_ENABLE_MCC_ENABLED_NAME, WLAN_PARAM_Integer,
struct hdd_config, enableMCC,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -1300,16 +712,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN,
CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX),
- REG_DYNAMIC_VARIABLE(CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY,
- WLAN_PARAM_Integer,
- struct hdd_config, bFastRoamInConIniFeatureEnabled,
- VAR_FLAGS_OPTIONAL |
- VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_DEFAULT,
- CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MIN,
- CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MAX,
- cb_notify_set_enable_fast_roam_in_concurrency, 0),
-
REG_VARIABLE(CFG_ENABLE_SNR_MONITORING_NAME, WLAN_PARAM_Integer,
struct hdd_config, fEnableSNRMonitoring,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -3653,7 +3055,10 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
mac_handle_t mac_handle = hdd_ctx->mac_handle;
uint8_t wmm_mode = 0;
bool b80211e_is_enabled;
-
+ bool roam_scan_enabled;
+#ifdef FEATURE_WLAN_ESE
+ bool ese_enabled;
+#endif
struct hdd_config *pConfig = hdd_ctx->config;
smeConfig = qdf_mem_malloc(sizeof(*smeConfig));
@@ -3738,12 +3143,7 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
smeConfig->csrConfig.Is11hSupportEnabled = pConfig->Is11hSupportEnabled;
smeConfig->csrConfig.nTxPowerCap = pConfig->nTxPowerCap;
smeConfig->csrConfig.fEnableDFSChnlScan = pConfig->enableDFSChnlScan;
- smeConfig->csrConfig.nRoamPrefer5GHz = pConfig->nRoamPrefer5GHz;
- smeConfig->csrConfig.nRoamIntraBand = pConfig->nRoamIntraBand;
- smeConfig->csrConfig.nProbes = pConfig->nProbes;
- smeConfig->csrConfig.nRoamScanHomeAwayTime =
- pConfig->nRoamScanHomeAwayTime;
smeConfig->csrConfig.fFirstScanOnly2GChnl =
pConfig->enableFirstScan2GOnly;
@@ -3751,77 +3151,22 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
hdd_set_power_save_offload_config(hdd_ctx);
- smeConfig->csrConfig.isFastRoamIniFeatureEnabled =
- pConfig->isFastRoamIniFeatureEnabled;
- smeConfig->csrConfig.csr_mawc_config.mawc_enabled =
- pConfig->MAWCEnabled;
-
#ifdef FEATURE_WLAN_ESE
- smeConfig->csrConfig.isEseIniFeatureEnabled =
- pConfig->isEseIniFeatureEnabled;
- if (pConfig->isEseIniFeatureEnabled)
- pConfig->isFastTransitionEnabled = true;
+ ucfg_mlme_is_ese_enabled(hdd_ctx->psoc, &ese_enabled);
+ if (ese_enabled)
+ ucfg_mlme_set_fast_transition_enabled(hdd_ctx->psoc, true);
#endif
- smeConfig->csrConfig.isFastTransitionEnabled =
- pConfig->isFastTransitionEnabled;
- smeConfig->csrConfig.RoamRssiDiff = pConfig->RoamRssiDiff;
- smeConfig->csrConfig.isWESModeEnabled = pConfig->isWESModeEnabled;
- smeConfig->csrConfig.isRoamOffloadScanEnabled =
- pConfig->isRoamOffloadScanEnabled;
- smeConfig->csrConfig.bFastRoamInConIniFeatureEnabled =
- pConfig->bFastRoamInConIniFeatureEnabled;
- if (0 == smeConfig->csrConfig.isRoamOffloadScanEnabled) {
+ ucfg_mlme_is_roam_scan_offload_enabled(hdd_ctx->psoc,
+ &roam_scan_enabled);
+
+ if (!roam_scan_enabled) {
/* Disable roaming in concurrency if roam scan
* offload is disabled
*/
- smeConfig->csrConfig.bFastRoamInConIniFeatureEnabled = 0;
+ ucfg_mlme_set_fast_roam_in_concurrency_enabled(
+ hdd_ctx->psoc, false);
}
- smeConfig->csrConfig.neighborRoamConfig.nNeighborLookupRssiThreshold =
- pConfig->nNeighborLookupRssiThreshold;
- smeConfig->csrConfig.neighborRoamConfig.rssi_thresh_offset_5g =
- pConfig->rssi_thresh_offset_5g;
- smeConfig->csrConfig.neighborRoamConfig.delay_before_vdev_stop =
- pConfig->delay_before_vdev_stop;
- smeConfig->csrConfig.neighborRoamConfig.nOpportunisticThresholdDiff =
- pConfig->nOpportunisticThresholdDiff;
- smeConfig->csrConfig.neighborRoamConfig.nRoamRescanRssiDiff =
- pConfig->nRoamRescanRssiDiff;
- smeConfig->csrConfig.neighborRoamConfig.nNeighborScanMaxChanTime =
- pConfig->nNeighborScanMaxChanTime;
- smeConfig->csrConfig.neighborRoamConfig.nNeighborScanMinChanTime =
- pConfig->nNeighborScanMinChanTime;
- smeConfig->csrConfig.neighborRoamConfig.nNeighborScanTimerPeriod =
- pConfig->nNeighborScanPeriod;
- smeConfig->csrConfig.neighborRoamConfig.
- neighbor_scan_min_timer_period =
- pConfig->neighbor_scan_min_period;
- smeConfig->csrConfig.neighborRoamConfig.nNeighborResultsRefreshPeriod =
- pConfig->nNeighborResultsRefreshPeriod;
- smeConfig->csrConfig.neighborRoamConfig.nEmptyScanRefreshPeriod =
- pConfig->nEmptyScanRefreshPeriod;
- hdd_string_to_u8_array(pConfig->neighborScanChanList,
- smeConfig->csrConfig.neighborRoamConfig.
- neighborScanChanList.channelList,
- &smeConfig->csrConfig.neighborRoamConfig.
- neighborScanChanList.numChannels,
- WNI_CFG_VALID_CHANNEL_LIST_LEN);
- smeConfig->csrConfig.neighborRoamConfig.nRoamBmissFirstBcnt =
- pConfig->nRoamBmissFirstBcnt;
- smeConfig->csrConfig.neighborRoamConfig.nRoamBmissFinalBcnt =
- pConfig->nRoamBmissFinalBcnt;
- smeConfig->csrConfig.neighborRoamConfig.nRoamBeaconRssiWeight =
- pConfig->nRoamBeaconRssiWeight;
- smeConfig->csrConfig.neighborRoamConfig.nhi_rssi_scan_max_count =
- pConfig->nhi_rssi_scan_max_count;
- smeConfig->csrConfig.neighborRoamConfig.nhi_rssi_scan_rssi_delta =
- pConfig->nhi_rssi_scan_rssi_delta;
- smeConfig->csrConfig.neighborRoamConfig.nhi_rssi_scan_delay =
- pConfig->nhi_rssi_scan_delay;
- smeConfig->csrConfig.neighborRoamConfig.nhi_rssi_scan_rssi_ub =
- pConfig->nhi_rssi_scan_rssi_ub;
-
- smeConfig->csrConfig.allowDFSChannelRoam = pConfig->allowDFSChannelRoam;
/* Enable/Disable MCC */
smeConfig->csrConfig.fEnableMCCMode = pConfig->enableMCC;
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0eb8baf5c8791..0f58ba677a4f9 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -5573,6 +5573,8 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
mac_handle_t mac_handle;
bool b_value;
struct wlan_objmgr_vdev *vdev;
+ uint8_t bmiss_first_bcnt;
+ uint8_t bmiss_final_bcnt;
hdd_enter_dev(dev);
qdf_mem_zero(&request, sizeof(request));
@@ -6043,14 +6045,17 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT]) {
bmiss_bcnt = nla_get_u8(
tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT]);
- if (hdd_ctx->config->nRoamBmissFirstBcnt < bmiss_bcnt) {
- hdd_ctx->config->nRoamBmissFinalBcnt = bmiss_bcnt
- - hdd_ctx->config->nRoamBmissFirstBcnt;
+ ucfg_mlme_get_roam_bmiss_first_bcnt(hdd_ctx->psoc,
+ &bmiss_first_bcnt);
+ ucfg_mlme_get_roam_bmiss_final_bcnt(hdd_ctx->psoc,
+ &bmiss_final_bcnt);
+ if (bmiss_first_bcnt < bmiss_bcnt) {
+ bmiss_final_bcnt = bmiss_bcnt - bmiss_first_bcnt;
hdd_debug("Bmiss first cnt(%d), Bmiss final cnt(%d)",
- hdd_ctx->config->nRoamBmissFirstBcnt,
- hdd_ctx->config->nRoamBmissFinalBcnt);
+ bmiss_first_bcnt,
+ bmiss_final_bcnt);
ret_val = sme_set_roam_bmiss_final_bcnt(mac_handle,
- 0, hdd_ctx->config->nRoamBmissFinalBcnt);
+ 0, bmiss_final_bcnt);
if (ret_val) {
hdd_err("Failed to set bmiss final Bcnt");
@@ -6058,8 +6063,8 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
}
ret_val = sme_set_bmiss_bcnt(adapter->session_id,
- hdd_ctx->config->nRoamBmissFirstBcnt,
- hdd_ctx->config->nRoamBmissFinalBcnt);
+ bmiss_first_bcnt,
+ bmiss_final_bcnt);
if (ret_val) {
hdd_err("Failed to set bmiss Bcnt");
return ret_val;
@@ -6067,7 +6072,7 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
} else {
hdd_err("Bcnt(%d) needs to exceed BmissFirstBcnt(%d)",
bmiss_bcnt,
- hdd_ctx->config->nRoamBmissFirstBcnt);
+ bmiss_first_bcnt);
return -EINVAL;
}
}
@@ -12265,13 +12270,6 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->wowlan.pattern_max_len = WOWL_PTRN_MAX_SIZE;
#endif
- if (pCfg->isFastTransitionEnabled || pCfg->isFastRoamIniFeatureEnabled
-#ifdef FEATURE_WLAN_ESE
- || pCfg->isEseIniFeatureEnabled
-#endif
- ) {
- wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;
- }
#ifdef FEATURE_WLAN_TDLS
wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS
| WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
@@ -12568,6 +12566,42 @@ static void wlan_hdd_update_band_cap_in_wiphy(struct hdd_context *hdd_ctx)
}
}
+#ifdef FEATURE_WLAN_ESE
+/**
+ * wlan_hdd_update_lfr_wiphy() - update LFR flag based on configures
+ * @hdd_ctx: HDD context
+ *
+ * This function updates the LFR flag based on LFR configures
+ *
+ * Return: void
+ */
+static void wlan_hdd_update_lfr_wiphy(struct hdd_context *hdd_ctx)
+{
+ bool fast_transition_enabled;
+ bool lfr_enabled;
+ bool ese_enabled;
+
+ ucfg_mlme_is_fast_transition_enabled(hdd_ctx->psoc,
+ &fast_transition_enabled);
+ ucfg_mlme_is_lfr_enabled(hdd_ctx->psoc, &lfr_enabled);
+ ucfg_mlme_is_ese_enabled(hdd_ctx->psoc, &ese_enabled);
+ if (fast_transition_enabled || lfr_enabled || ese_enabled)
+ hdd_ctx->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;
+}
+#else
+static void wlan_hdd_update_lfr_wiphy(struct hdd_context *hdd_ctx)
+{
+ bool fast_transition_enabled;
+ bool lfr_enabled;
+
+ ucfg_mlme_is_fast_transition_enabled(hdd_ctx->psoc,
+ &fast_transition_enabled);
+ ucfg_mlme_is_lfr_enabled(hdd_ctx->psoc, &lfr_enabled);
+ if (fast_transition_enabled || lfr_enabled)
+ hdd_ctx->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;
+}
+#endif
+
/*
* In this function, wiphy structure is updated after QDF
* initialization. In wlan_hdd_cfg80211_init, only the
@@ -12585,6 +12619,7 @@ void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx)
hdd_ctx->wiphy->max_ap_assoc_sta = value;
wlan_hdd_update_ht_cap(hdd_ctx);
wlan_hdd_update_band_cap_in_wiphy(hdd_ctx);
+ wlan_hdd_update_lfr_wiphy(hdd_ctx);
fils_enabled = 0;
status = ucfg_mlme_get_fils_enabled_info(hdd_ctx->psoc,
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index c7ad561aa5f5d..7b03a6c59e41e 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -2996,7 +2996,8 @@ static int drv_cmd_set_roam_trigger(struct hdd_adapter *adapter,
int ret;
uint8_t *value = command;
int8_t rssi = 0;
- uint8_t lookUpThreshold = CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_DEFAULT;
+ uint8_t lookup_threshold = cfg_default(
+ CFG_LFR_NEIGHBOR_LOOKUP_RSSI_THRESHOLD);
QDF_STATUS status = QDF_STATUS_SUCCESS;
/* Move pointer to ahead of SETROAMTRIGGER */
@@ -3010,34 +3011,33 @@ static int drv_cmd_set_roam_trigger(struct hdd_adapter *adapter,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed Input value may be out of range[%d - %d]",
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN,
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX);
+ cfg_min(CFG_LFR_NEIGHBOR_LOOKUP_RSSI_THRESHOLD),
+ cfg_max(CFG_LFR_NEIGHBOR_LOOKUP_RSSI_THRESHOLD));
ret = -EINVAL;
goto exit;
}
- lookUpThreshold = abs(rssi);
+ lookup_threshold = abs(rssi);
- if ((lookUpThreshold < CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN) ||
- (lookUpThreshold > CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX)) {
+ if (!cfg_in_range(CFG_LFR_NEIGHBOR_LOOKUP_RSSI_THRESHOLD,
+ lookup_threshold)) {
hdd_err("Neighbor lookup threshold value %d is out of range (Min: %d Max: %d)",
- lookUpThreshold,
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN,
- CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX);
+ lookup_threshold,
+ cfg_min(CFG_LFR_NEIGHBOR_LOOKUP_RSSI_THRESHOLD),
+ cfg_max(CFG_LFR_NEIGHBOR_LOOKUP_RSSI_THRESHOLD));
ret = -EINVAL;
goto exit;
}
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_SETROAMTRIGGER_IOCTL,
- adapter->session_id, lookUpThreshold));
+ adapter->session_id, lookup_threshold));
hdd_debug("Received Command to Set Roam trigger (Neighbor lookup threshold) = %d",
- lookUpThreshold);
+ lookup_threshold);
- hdd_ctx->config->nNeighborLookupRssiThreshold = lookUpThreshold;
status = sme_set_neighbor_lookup_rssi_threshold(hdd_ctx->mac_handle,
adapter->session_id,
- lookUpThreshold);
+ lookup_threshold);
if (QDF_STATUS_SUCCESS != status) {
hdd_err("Failed to set roam trigger, try again");
ret = -EPERM;
@@ -3055,15 +3055,15 @@ static int drv_cmd_get_roam_trigger(struct hdd_adapter *adapter,
struct hdd_priv_data *priv_data)
{
int ret = 0;
- uint8_t lookUpThreshold =
+ uint8_t lookup_threshold =
sme_get_neighbor_lookup_rssi_threshold(hdd_ctx->mac_handle);
- int rssi = (-1) * lookUpThreshold;
+ int rssi = (-1) * lookup_threshold;
char extra[32];
uint8_t len = 0;
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_GETROAMTRIGGER_IOCTL,
- adapter->session_id, lookUpThreshold));
+ adapter->session_id, lookup_threshold));
len = scnprintf(extra, sizeof(extra), "%s %d", command, rssi);
len = QDF_MIN(priv_data->total_len, len + 1);
@@ -3083,9 +3083,9 @@ static int drv_cmd_set_roam_scan_period(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t roamScanPeriod = 0;
- uint16_t neighborEmptyScanRefreshPeriod =
- CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT;
+ uint8_t roam_scan_period = 0;
+ uint16_t empty_scan_refresh_period =
+ cfg_default(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD);
/* input refresh period is in terms of seconds */
@@ -3093,41 +3093,39 @@ static int drv_cmd_set_roam_scan_period(struct hdd_adapter *adapter,
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &roamScanPeriod);
+ ret = kstrtou8(value, 10, &roam_scan_period);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed Input value may be out of range[%d - %d]",
- (CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN / 1000),
- (CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX / 1000));
+ (cfg_min(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD) / 1000),
+ (cfg_max(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD) / 1000));
ret = -EINVAL;
goto exit;
}
- if ((roamScanPeriod < (CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN / 1000))
- || (roamScanPeriod > (CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX / 1000))) {
+ if (!cfg_in_range(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD,
+ roam_scan_period)) {
hdd_err("Roam scan period value %d is out of range (Min: %d Max: %d)",
- roamScanPeriod,
- (CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN / 1000),
- (CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX / 1000));
+ roam_scan_period,
+ (cfg_min(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD) / 1000),
+ (cfg_max(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD) / 1000));
ret = -EINVAL;
goto exit;
}
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_SETROAMSCANPERIOD_IOCTL,
- adapter->session_id, roamScanPeriod));
- neighborEmptyScanRefreshPeriod = roamScanPeriod * 1000;
+ adapter->session_id, roam_scan_period));
+ empty_scan_refresh_period = roam_scan_period * 1000;
hdd_debug("Received Command to Set roam scan period (Empty Scan refresh period) = %d",
- roamScanPeriod);
+ roam_scan_period);
- hdd_ctx->config->nEmptyScanRefreshPeriod =
- neighborEmptyScanRefreshPeriod;
sme_update_empty_scan_refresh_period(hdd_ctx->mac_handle,
adapter->session_id,
- neighborEmptyScanRefreshPeriod);
+ empty_scan_refresh_period);
exit:
return ret;
@@ -3170,51 +3168,49 @@ static int drv_cmd_set_roam_scan_refresh_period(struct hdd_adapter *adapter,
{
int ret;
uint8_t *value = command;
- uint8_t roamScanRefreshPeriod = 0;
- uint16_t neighborScanRefreshPeriod =
- CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_DEFAULT;
+ uint8_t roam_scan_refresh_period = 0;
+ uint16_t neighbor_scan_refresh_period =
+ cfg_default(CFG_LFR_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD);
/* input refresh period is in terms of seconds */
/* Move pointer to ahead of SETROAMSCANREFRESHPERIOD */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &roamScanRefreshPeriod);
+ ret = kstrtou8(value, 10, &roam_scan_refresh_period);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed Input value may be out of range[%d - %d]",
- CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN / 1000,
- CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX / 1000);
- ret = -EINVAL;
- goto exit;
- }
-
- if ((roamScanRefreshPeriod <
- (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN / 1000)) ||
- (roamScanRefreshPeriod >
- (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX / 1000))) {
- hdd_err("Neighbor scan results refresh period value %d is out of range (Min: %d Max: %d)",
- roamScanRefreshPeriod,
- (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN
+ (cfg_min(CFG_LFR_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD)
/ 1000),
- (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX
+ (cfg_max(CFG_LFR_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD)
/ 1000));
ret = -EINVAL;
goto exit;
}
- neighborScanRefreshPeriod = roamScanRefreshPeriod * 1000;
+
+ if (!cfg_in_range(CFG_LFR_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD,
+ roam_scan_refresh_period)) {
+ hdd_err("Neighbor scan results refresh period value %d is out of range (Min: %d Max: %d)",
+ roam_scan_refresh_period,
+ (cfg_min(CFG_LFR_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD)
+ / 1000),
+ (cfg_max(CFG_LFR_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD)
+ / 1000));
+ ret = -EINVAL;
+ goto exit;
+ }
+ neighbor_scan_refresh_period = roam_scan_refresh_period * 1000;
hdd_debug("Received Command to Set roam scan refresh period (Scan refresh period) = %d",
- roamScanRefreshPeriod);
+ neighbor_scan_refresh_period);
- hdd_ctx->config->nNeighborResultsRefreshPeriod =
- neighborScanRefreshPeriod;
sme_set_neighbor_scan_refresh_period(hdd_ctx->mac_handle,
adapter->session_id,
- neighborScanRefreshPeriod);
+ neighbor_scan_refresh_period);
exit:
return ret;
@@ -3254,36 +3250,36 @@ static int drv_cmd_set_roam_mode(struct hdd_adapter *adapter,
mac_handle_t mac_handle;
int ret;
uint8_t *value = command;
- uint8_t roamMode = CFG_LFR_FEATURE_ENABLED_DEFAULT;
+ uint8_t roam_mode = cfg_default(CFG_LFR_FEATURE_ENABLED);
/* Move pointer to ahead of SETROAMMODE */
value = value + SIZE_OF_SETROAMMODE + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &roamMode);
+ ret = kstrtou8(value, 10, &roam_mode);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_LFR_FEATURE_ENABLED_MIN,
- CFG_LFR_FEATURE_ENABLED_MAX);
+ cfg_min(CFG_LFR_FEATURE_ENABLED),
+ cfg_max(CFG_LFR_FEATURE_ENABLED));
ret = -EINVAL;
goto exit;
}
- if ((roamMode < CFG_LFR_FEATURE_ENABLED_MIN) ||
- (roamMode > CFG_LFR_FEATURE_ENABLED_MAX)) {
+
+ if (!cfg_in_range(CFG_LFR_FEATURE_ENABLED, roam_mode)) {
hdd_err("Roam Mode value %d is out of range (Min: %d Max: %d)",
- roamMode,
- CFG_LFR_FEATURE_ENABLED_MIN,
- CFG_LFR_FEATURE_ENABLED_MAX);
+ roam_mode,
+ cfg_min(CFG_LFR_FEATURE_ENABLED),
+ cfg_max(CFG_LFR_FEATURE_ENABLED));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to Set Roam Mode = %d",
- roamMode);
+ roam_mode);
/*
* Note that
* SETROAMMODE 0 is to enable LFR while
@@ -3292,28 +3288,30 @@ static int drv_cmd_set_roam_mode(struct hdd_adapter *adapter,
* enable/disable. So, we have to invert the value
* to call sme_update_is_fast_roam_ini_feature_enabled.
*/
- if (CFG_LFR_FEATURE_ENABLED_MIN == roamMode)
- roamMode = CFG_LFR_FEATURE_ENABLED_MAX; /* Roam enable */
- else
- roamMode = CFG_LFR_FEATURE_ENABLED_MIN; /* Roam disable */
+ if (roam_mode) {
+ /* Roam enable */
+ roam_mode = cfg_min(CFG_LFR_FEATURE_ENABLED);
+ } else {
+ /* Roam disable */
+ roam_mode = cfg_max(CFG_LFR_FEATURE_ENABLED);
+ }
- hdd_ctx->config->isFastRoamIniFeatureEnabled = roamMode;
+ ucfg_mlme_set_lfr_enabled(hdd_ctx->psoc, (bool)roam_mode);
mac_handle = hdd_ctx->mac_handle;
- if (roamMode) {
- hdd_ctx->config->isRoamOffloadScanEnabled = roamMode;
- sme_update_roam_scan_offload_enabled(mac_handle, roamMode);
+ if (roam_mode) {
+ ucfg_mlme_set_roam_scan_offload_enabled(hdd_ctx->psoc,
+ (bool)roam_mode);
sme_update_is_fast_roam_ini_feature_enabled(mac_handle,
adapter->session_id,
- roamMode);
+ roam_mode);
} else {
sme_update_is_fast_roam_ini_feature_enabled(mac_handle,
adapter->session_id,
- roamMode);
- hdd_ctx->config->isRoamOffloadScanEnabled = roamMode;
- sme_update_roam_scan_offload_enabled(mac_handle, roamMode);
+ roam_mode);
+ ucfg_mlme_set_roam_scan_offload_enabled(hdd_ctx->psoc,
+ roam_mode);
}
-
exit:
return ret;
}
@@ -3325,19 +3323,19 @@ static int drv_cmd_get_roam_mode(struct hdd_adapter *adapter,
struct hdd_priv_data *priv_data)
{
int ret = 0;
- bool roamMode = sme_get_is_lfr_feature_enabled(hdd_ctx->mac_handle);
+ bool roam_mode = sme_get_is_lfr_feature_enabled(hdd_ctx->mac_handle);
char extra[32];
uint8_t len;
/*
* roamMode value shall be inverted because the sementics is different.
*/
- if (CFG_LFR_FEATURE_ENABLED_MIN == roamMode)
- roamMode = CFG_LFR_FEATURE_ENABLED_MAX;
+ if (roam_mode)
+ roam_mode = cfg_min(CFG_LFR_FEATURE_ENABLED);
else
- roamMode = CFG_LFR_FEATURE_ENABLED_MIN;
+ roam_mode = cfg_max(CFG_LFR_FEATURE_ENABLED);
- len = scnprintf(extra, sizeof(extra), "%s %d", command, roamMode);
+ len = scnprintf(extra, sizeof(extra), "%s %d", command, roam_mode);
len = QDF_MIN(priv_data->total_len, len + 1);
if (copy_to_user(priv_data->buf, &extra, len)) {
hdd_err("failed to copy data to user buffer");
@@ -3355,42 +3353,40 @@ static int drv_cmd_set_roam_delta(struct hdd_adapter *adapter,
{
int ret;
uint8_t *value = command;
- uint8_t roamRssiDiff = CFG_ROAM_RSSI_DIFF_DEFAULT;
+ uint8_t roam_rssi_diff = cfg_default(CFG_LFR_ROAM_RSSI_DIFF);
/* Move pointer to ahead of SETROAMDELTA */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &roamRssiDiff);
+ ret = kstrtou8(value, 10, &roam_rssi_diff);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ROAM_RSSI_DIFF_MIN,
- CFG_ROAM_RSSI_DIFF_MAX);
+ cfg_min(CFG_LFR_ROAM_RSSI_DIFF),
+ cfg_max(CFG_LFR_ROAM_RSSI_DIFF));
ret = -EINVAL;
goto exit;
}
- if ((roamRssiDiff < CFG_ROAM_RSSI_DIFF_MIN) ||
- (roamRssiDiff > CFG_ROAM_RSSI_DIFF_MAX)) {
+ if (!cfg_in_range(CFG_LFR_ROAM_RSSI_DIFF, roam_rssi_diff)) {
hdd_err("Roam rssi diff value %d is out of range (Min: %d Max: %d)",
- roamRssiDiff,
- CFG_ROAM_RSSI_DIFF_MIN,
- CFG_ROAM_RSSI_DIFF_MAX);
+ roam_rssi_diff,
+ cfg_min(CFG_LFR_ROAM_RSSI_DIFF),
+ cfg_max(CFG_LFR_ROAM_RSSI_DIFF));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to Set roam rssi diff = %d",
- roamRssiDiff);
+ roam_rssi_diff);
- hdd_ctx->config->RoamRssiDiff = roamRssiDiff;
sme_update_roam_rssi_diff(hdd_ctx->mac_handle,
adapter->session_id,
- roamRssiDiff);
+ roam_rssi_diff);
exit:
return ret;
@@ -3641,44 +3637,42 @@ static int drv_cmd_set_roam_scan_channel_min_time(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t minTime = CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_DEFAULT;
+ uint8_t min_time = cfg_default(CFG_LFR_NEIGHBOR_SCAN_MIN_CHAN_TIME);
/* Move pointer to ahead of SETROAMSCANCHANNELMINTIME */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &minTime);
+ ret = kstrtou8(value, 10, &min_time);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN,
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX);
+ cfg_min(CFG_LFR_NEIGHBOR_SCAN_MIN_CHAN_TIME),
+ cfg_max(CFG_LFR_NEIGHBOR_SCAN_MIN_CHAN_TIME));
ret = -EINVAL;
goto exit;
}
- if ((minTime < CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN) ||
- (minTime > CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX)) {
+ if (!cfg_in_range(CFG_LFR_NEIGHBOR_SCAN_MIN_CHAN_TIME, min_time)) {
hdd_err("scan min channel time value %d is out of range (Min: %d Max: %d)",
- minTime,
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN,
- CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX);
+ min_time,
+ cfg_min(CFG_LFR_NEIGHBOR_SCAN_MIN_CHAN_TIME),
+ cfg_max(CFG_LFR_NEIGHBOR_SCAN_MIN_CHAN_TIME));
ret = -EINVAL;
goto exit;
}
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_SETROAMSCANCHANNELMINTIME_IOCTL,
- adapter->session_id, minTime));
+ adapter->session_id, min_time));
hdd_debug("Received Command to change channel min time = %d",
- minTime);
+ min_time);
- hdd_ctx->config->nNeighborScanMinChanTime = minTime;
sme_set_neighbor_scan_min_chan_time(hdd_ctx->mac_handle,
- minTime,
+ min_time,
adapter->session_id);
exit:
@@ -3732,42 +3726,40 @@ static int drv_cmd_set_scan_channel_time(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint16_t maxTime = CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_DEFAULT;
+ uint16_t max_time = cfg_default(CFG_LFR_NEIGHBOR_SCAN_MAX_CHAN_TIME);
/* Move pointer to ahead of SETSCANCHANNELTIME */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou16(value, 10, &maxTime);
+ ret = kstrtou16(value, 10, &max_time);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou16 failed range [%d - %d]",
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN,
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX);
+ cfg_min(CFG_LFR_NEIGHBOR_SCAN_MAX_CHAN_TIME),
+ cfg_max(CFG_LFR_NEIGHBOR_SCAN_MAX_CHAN_TIME));
ret = -EINVAL;
goto exit;
}
- if ((maxTime < CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN) ||
- (maxTime > CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX)) {
+ if (!cfg_in_range(CFG_LFR_NEIGHBOR_SCAN_MAX_CHAN_TIME, max_time)) {
hdd_err("lfr mode value %d is out of range (Min: %d Max: %d)",
- maxTime,
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN,
- CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX);
+ max_time,
+ cfg_min(CFG_LFR_NEIGHBOR_SCAN_MAX_CHAN_TIME),
+ cfg_max(CFG_LFR_NEIGHBOR_SCAN_MAX_CHAN_TIME));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to change channel max time = %d",
- maxTime);
+ max_time);
- hdd_ctx->config->nNeighborScanMaxChanTime = maxTime;
sme_set_neighbor_scan_max_chan_time(hdd_ctx->mac_handle,
adapter->session_id,
- maxTime);
+ max_time);
exit:
return ret;
@@ -3806,7 +3798,7 @@ static int drv_cmd_set_scan_home_time(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint16_t val = CFG_NEIGHBOR_SCAN_TIMER_PERIOD_DEFAULT;
+ uint16_t val = cfg_default(CFG_LFR_NEIGHBOR_SCAN_TIMER_PERIOD);
/* Move pointer to ahead of SETSCANHOMETIME */
value = value + command_len + 1;
@@ -3819,18 +3811,17 @@ static int drv_cmd_set_scan_home_time(struct hdd_adapter *adapter,
* then also kstrtou8 fails
*/
hdd_err("kstrtou16 failed range [%d - %d]",
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN,
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX);
+ cfg_min(CFG_LFR_NEIGHBOR_SCAN_TIMER_PERIOD),
+ cfg_max(CFG_LFR_NEIGHBOR_SCAN_TIMER_PERIOD));
ret = -EINVAL;
goto exit;
}
- if ((val < CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN) ||
- (val > CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX)) {
+ if (!cfg_in_range(CFG_LFR_NEIGHBOR_SCAN_TIMER_PERIOD, val)) {
hdd_err("scan home time value %d is out of range (Min: %d Max: %d)",
val,
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN,
- CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX);
+ cfg_min(CFG_LFR_NEIGHBOR_SCAN_TIMER_PERIOD),
+ cfg_max(CFG_LFR_NEIGHBOR_SCAN_TIMER_PERIOD));
ret = -EINVAL;
goto exit;
}
@@ -3838,7 +3829,6 @@ static int drv_cmd_set_scan_home_time(struct hdd_adapter *adapter,
hdd_debug("Received Command to change scan home time = %d",
val);
- hdd_ctx->config->nNeighborScanPeriod = val;
sme_set_neighbor_scan_period(hdd_ctx->mac_handle,
adapter->session_id, val);
@@ -3879,7 +3869,7 @@ static int drv_cmd_set_roam_intra_band(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t val = CFG_ROAM_INTRA_BAND_DEFAULT;
+ uint8_t val = cfg_default(CFG_LFR_ROAM_INTRA_BAND);
/* Move pointer to ahead of SETROAMINTRABAND */
value = value + command_len + 1;
@@ -3892,26 +3882,23 @@ static int drv_cmd_set_roam_intra_band(struct hdd_adapter *adapter,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ROAM_INTRA_BAND_MIN,
- CFG_ROAM_INTRA_BAND_MAX);
+ cfg_min(CFG_LFR_ROAM_INTRA_BAND),
+ cfg_max(CFG_LFR_ROAM_INTRA_BAND));
ret = -EINVAL;
goto exit;
}
- if ((val < CFG_ROAM_INTRA_BAND_MIN) ||
- (val > CFG_ROAM_INTRA_BAND_MAX)) {
+ if (!cfg_in_range(CFG_LFR_ROAM_INTRA_BAND, val)) {
hdd_err("intra band mode value %d is out of range (Min: %d Max: %d)",
- val,
- CFG_ROAM_INTRA_BAND_MIN,
- CFG_ROAM_INTRA_BAND_MAX);
+ val, cfg_min(CFG_LFR_ROAM_INTRA_BAND),
+ cfg_max(CFG_LFR_ROAM_INTRA_BAND));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to change intra band = %d",
val);
- hdd_ctx->config->nRoamIntraBand = val;
- sme_set_roam_intra_band(hdd_ctx->mac_handle, val);
+ ucfg_mlme_set_roam_intra_band(hdd_ctx->psoc, (bool)val);
exit:
return ret;
@@ -3948,41 +3935,39 @@ static int drv_cmd_set_scan_n_probes(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t nProbes = CFG_ROAM_SCAN_N_PROBES_DEFAULT;
+ uint8_t nprobes = cfg_default(CFG_LFR_ROAM_SCAN_N_PROBES);
/* Move pointer to ahead of SETSCANNPROBES */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &nProbes);
+ ret = kstrtou8(value, 10, &nprobes);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ROAM_SCAN_N_PROBES_MIN,
- CFG_ROAM_SCAN_N_PROBES_MAX);
+ cfg_min(CFG_LFR_ROAM_SCAN_N_PROBES),
+ cfg_max(CFG_LFR_ROAM_SCAN_N_PROBES));
ret = -EINVAL;
goto exit;
}
- if ((nProbes < CFG_ROAM_SCAN_N_PROBES_MIN) ||
- (nProbes > CFG_ROAM_SCAN_N_PROBES_MAX)) {
+ if (!cfg_in_range(CFG_LFR_ROAM_SCAN_N_PROBES, nprobes)) {
hdd_err("NProbes value %d is out of range (Min: %d Max: %d)",
- nProbes,
- CFG_ROAM_SCAN_N_PROBES_MIN,
- CFG_ROAM_SCAN_N_PROBES_MAX);
+ nprobes,
+ cfg_min(CFG_LFR_ROAM_SCAN_N_PROBES),
+ cfg_max(CFG_LFR_ROAM_SCAN_N_PROBES));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to Set nProbes = %d",
- nProbes);
+ nprobes);
- hdd_ctx->config->nProbes = nProbes;
sme_update_roam_scan_n_probes(hdd_ctx->mac_handle,
- adapter->session_id, nProbes);
+ adapter->session_id, nprobes);
exit:
return ret;
@@ -4017,7 +4002,8 @@ static int drv_cmd_set_scan_home_away_time(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint16_t homeAwayTime = CFG_ROAM_SCAN_HOME_AWAY_TIME_DEFAULT;
+ uint16_t home_away_time = cfg_default(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME);
+ uint16_t current_home_away_time;
/* input value is in units of msec */
@@ -4025,38 +4011,36 @@ static int drv_cmd_set_scan_home_away_time(struct hdd_adapter *adapter,
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou16(value, 10, &homeAwayTime);
+ ret = kstrtou16(value, 10, &home_away_time);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN,
- CFG_ROAM_SCAN_HOME_AWAY_TIME_MAX);
+ cfg_min(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME),
+ cfg_max(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME));
ret = -EINVAL;
goto exit;
}
- if ((homeAwayTime < CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN) ||
- (homeAwayTime > CFG_ROAM_SCAN_HOME_AWAY_TIME_MAX)) {
- hdd_err("homeAwayTime value %d is out of range (Min: %d Max: %d)",
- homeAwayTime,
- CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN,
- CFG_ROAM_SCAN_HOME_AWAY_TIME_MAX);
+ if (!cfg_in_range(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME, home_away_time)) {
+ hdd_err("home_away_time value %d is out of range (min: %d max: %d)",
+ home_away_time,
+ cfg_min(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME),
+ cfg_max(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to Set scan away time = %d",
- homeAwayTime);
+ home_away_time);
- if (hdd_ctx->config->nRoamScanHomeAwayTime !=
- homeAwayTime) {
- hdd_ctx->config->nRoamScanHomeAwayTime = homeAwayTime;
+ ucfg_mlme_get_home_away_time(hdd_ctx->psoc, ¤t_home_away_time);
+ if (current_home_away_time != home_away_time) {
sme_update_roam_scan_home_away_time(hdd_ctx->mac_handle,
adapter->session_id,
- homeAwayTime,
+ home_away_time,
true);
}
@@ -4103,40 +4087,36 @@ static int drv_cmd_set_wes_mode(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t wesMode = CFG_ENABLE_WES_MODE_NAME_DEFAULT;
+ uint8_t wes_mode = cfg_default(CFG_LFR_ENABLE_WES_MODE);
/* Move pointer to ahead of SETWESMODE */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &wesMode);
+ ret = kstrtou8(value, 10, &wes_mode);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ENABLE_WES_MODE_NAME_MIN,
- CFG_ENABLE_WES_MODE_NAME_MAX);
+ cfg_min(CFG_LFR_ENABLE_WES_MODE),
+ cfg_max(CFG_LFR_ENABLE_WES_MODE));
ret = -EINVAL;
goto exit;
}
- if ((wesMode < CFG_ENABLE_WES_MODE_NAME_MIN) ||
- (wesMode > CFG_ENABLE_WES_MODE_NAME_MAX)) {
+ if (!cfg_in_range(CFG_LFR_ENABLE_WES_MODE, wes_mode)) {
hdd_err("WES Mode value %d is out of range (Min: %d Max: %d)",
- wesMode,
- CFG_ENABLE_WES_MODE_NAME_MIN,
- CFG_ENABLE_WES_MODE_NAME_MAX);
+ wes_mode, cfg_min(CFG_LFR_ENABLE_WES_MODE),
+ cfg_max(CFG_LFR_ENABLE_WES_MODE));
ret = -EINVAL;
goto exit;
}
- hdd_debug("Received Command to Set WES Mode rssi diff = %d",
- wesMode);
+ hdd_debug("Received Command to Set WES Mode rssi diff = %d", wes_mode);
- hdd_ctx->config->isWESModeEnabled = wesMode;
- sme_update_wes_mode(hdd_ctx->mac_handle, wesMode, adapter->session_id);
+ sme_update_wes_mode(hdd_ctx->mac_handle, wes_mode, adapter->session_id);
exit:
return ret;
@@ -4172,7 +4152,7 @@ static int drv_cmd_set_opportunistic_rssi_diff(struct hdd_adapter *adapter,
int ret = 0;
uint8_t *value = command;
uint8_t nOpportunisticThresholdDiff =
- CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_DEFAULT;
+ cfg_default(CFG_LFR_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF);
/* Move pointer to ahead of SETOPPORTUNISTICRSSIDIFF */
value = value + command_len + 1;
@@ -4230,13 +4210,13 @@ static int drv_cmd_set_roam_rescan_rssi_diff(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t nRoamRescanRssiDiff = CFG_ROAM_RESCAN_RSSI_DIFF_DEFAULT;
+ uint8_t rescan_rssi_diff = cfg_default(CFG_LFR_ROAM_RESCAN_RSSI_DIFF);
/* Move pointer to ahead of SETROAMRESCANRSSIDIFF */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &nRoamRescanRssiDiff);
+ ret = kstrtou8(value, 10, &rescan_rssi_diff);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
@@ -4248,11 +4228,11 @@ static int drv_cmd_set_roam_rescan_rssi_diff(struct hdd_adapter *adapter,
}
hdd_debug("Received Command to Set Roam Rescan RSSI Diff = %d",
- nRoamRescanRssiDiff);
+ rescan_rssi_diff);
sme_set_roam_rescan_rssi_diff(hdd_ctx->mac_handle,
adapter->session_id,
- nRoamRescanRssiDiff);
+ rescan_rssi_diff);
exit:
return ret;
@@ -4287,42 +4267,40 @@ static int drv_cmd_set_fast_roam(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t lfrMode = CFG_LFR_FEATURE_ENABLED_DEFAULT;
+ uint8_t lfr_mode = cfg_default(CFG_LFR_FEATURE_ENABLED);
/* Move pointer to ahead of SETFASTROAM */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &lfrMode);
+ ret = kstrtou8(value, 10, &lfr_mode);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_LFR_FEATURE_ENABLED_MIN,
- CFG_LFR_FEATURE_ENABLED_MAX);
+ cfg_min(CFG_LFR_FEATURE_ENABLED),
+ cfg_max(CFG_LFR_FEATURE_ENABLED));
ret = -EINVAL;
goto exit;
}
- if ((lfrMode < CFG_LFR_FEATURE_ENABLED_MIN) ||
- (lfrMode > CFG_LFR_FEATURE_ENABLED_MAX)) {
+ if (!cfg_in_range(CFG_LFR_FEATURE_ENABLED, lfr_mode)) {
hdd_err("lfr mode value %d is out of range (Min: %d Max: %d)",
- lfrMode,
- CFG_LFR_FEATURE_ENABLED_MIN,
- CFG_LFR_FEATURE_ENABLED_MAX);
+ lfr_mode, cfg_min(CFG_LFR_FEATURE_ENABLED),
+ cfg_max(CFG_LFR_FEATURE_ENABLED));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to change lfr mode = %d",
- lfrMode);
+ lfr_mode);
- hdd_ctx->config->isFastRoamIniFeatureEnabled = lfrMode;
+ ucfg_mlme_set_lfr_enabled(hdd_ctx->psoc, (bool)lfr_mode);
sme_update_is_fast_roam_ini_feature_enabled(hdd_ctx->mac_handle,
adapter->session_id,
- lfrMode);
+ lfr_mode);
exit:
return ret;
@@ -4336,7 +4314,7 @@ static int drv_cmd_set_fast_transition(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t ft = CFG_FAST_TRANSITION_ENABLED_NAME_DEFAULT;
+ uint8_t ft = cfg_default(CFG_LFR_FAST_TRANSITION_ENABLED);
/* Move pointer to ahead of SETFASTROAM */
value = value + command_len + 1;
@@ -4349,26 +4327,23 @@ static int drv_cmd_set_fast_transition(struct hdd_adapter *adapter,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_FAST_TRANSITION_ENABLED_NAME_MIN,
- CFG_FAST_TRANSITION_ENABLED_NAME_MAX);
+ cfg_min(CFG_LFR_FAST_TRANSITION_ENABLED),
+ cfg_max(CFG_LFR_FAST_TRANSITION_ENABLED));
ret = -EINVAL;
goto exit;
}
- if ((ft < CFG_FAST_TRANSITION_ENABLED_NAME_MIN) ||
- (ft > CFG_FAST_TRANSITION_ENABLED_NAME_MAX)) {
+ if (!cfg_in_range(CFG_LFR_FAST_TRANSITION_ENABLED, ft)) {
hdd_err("ft mode value %d is out of range (Min: %d Max: %d)",
- ft,
- CFG_FAST_TRANSITION_ENABLED_NAME_MIN,
- CFG_FAST_TRANSITION_ENABLED_NAME_MAX);
+ ft, cfg_min(CFG_LFR_FAST_TRANSITION_ENABLED),
+ cfg_max(CFG_LFR_FAST_TRANSITION_ENABLED));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to change ft mode = %d", ft);
- hdd_ctx->config->isFastTransitionEnabled = ft;
- sme_update_fast_transition_enabled(hdd_ctx->mac_handle, ft);
+ ucfg_mlme_set_fast_transition_enabled(hdd_ctx->psoc, (bool)ft);
exit:
return ret;
@@ -4945,43 +4920,42 @@ static int hdd_parse_setrmcenable_command(uint8_t *pValue,
}
/* Function header is left blank intentionally */
-static int hdd_parse_setrmcactionperiod_command(uint8_t *pValue,
- uint32_t *pActionPeriod)
+static int hdd_parse_setrmcactionperiod_command(uint8_t *pvalue,
+ uint32_t *paction_period)
{
- uint8_t *inPtr = pValue;
- int tempInt;
+ uint8_t *inptr = pvalue;
+ int temp_int;
int v = 0;
char buf[32];
- *pActionPeriod = 0;
+ *paction_period = 0;
- inPtr = strnchr(pValue, strlen(pValue), SPACE_ASCII_VALUE);
+ inptr = strnchr(pvalue, strlen(pvalue), SPACE_ASCII_VALUE);
- if (NULL == inPtr)
+ if (NULL == inptr)
return -EINVAL;
- else if (SPACE_ASCII_VALUE != *inPtr)
+ else if (SPACE_ASCII_VALUE != *inptr)
return -EINVAL;
- while ((SPACE_ASCII_VALUE == *inPtr) && ('\0' != *inPtr))
- inPtr++;
+ while ((SPACE_ASCII_VALUE == *inptr) && ('\0' != *inptr))
+ inptr++;
- if ('\0' == *inPtr)
+ if ('\0' == *inptr)
return 0;
- v = sscanf(inPtr, "%31s ", buf);
+ v = sscanf(inptr, "%31s ", buf);
if (1 != v)
return -EINVAL;
- v = kstrtos32(buf, 10, &tempInt);
+ v = kstrtos32(buf, 10, &temp_int);
if (v < 0)
return -EINVAL;
- if ((tempInt < cfg_min(CFG_RMC_ACTION_PERIOD_FREQUENCY)) ||
- (tempInt > cfg_max(CFG_RMC_ACTION_PERIOD_FREQUENCY)))
+ if (!cfg_in_range(CFG_RMC_ACTION_PERIOD_FREQUENCY, temp_int))
return -EINVAL;
- *pActionPeriod = tempInt;
+ *paction_period = temp_int;
- hdd_debug("uActionPeriod: %d", *pActionPeriod);
+ hdd_debug("uActionPeriod: %d", *paction_period);
return 0;
}
@@ -5798,7 +5772,7 @@ static int drv_cmd_set_ccx_mode(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t eseMode = CFG_ESE_FEATURE_ENABLED_DEFAULT;
+ uint8_t ese_mode = cfg_default(CFG_LFR_ESE_FEATURE_ENABLED);
struct pmkid_mode_bits pmkid_modes;
mac_handle_t mac_handle;
@@ -5820,34 +5794,31 @@ static int drv_cmd_set_ccx_mode(struct hdd_adapter *adapter,
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &eseMode);
+ ret = kstrtou8(value, 10, &ese_mode);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ESE_FEATURE_ENABLED_MIN,
- CFG_ESE_FEATURE_ENABLED_MAX);
+ cfg_min(CFG_LFR_ESE_FEATURE_ENABLED),
+ cfg_max(CFG_LFR_ESE_FEATURE_ENABLED));
ret = -EINVAL;
goto exit;
}
- if ((eseMode < CFG_ESE_FEATURE_ENABLED_MIN) ||
- (eseMode > CFG_ESE_FEATURE_ENABLED_MAX)) {
+ if (!cfg_in_range(CFG_LFR_ESE_FEATURE_ENABLED, ese_mode)) {
hdd_err("Ese mode value %d is out of range (Min: %d Max: %d)",
- eseMode,
- CFG_ESE_FEATURE_ENABLED_MIN,
- CFG_ESE_FEATURE_ENABLED_MAX);
+ ese_mode, cfg_min(CFG_LFR_ESE_FEATURE_ENABLED),
+ cfg_max(CFG_LFR_ESE_FEATURE_ENABLED));
ret = -EINVAL;
goto exit;
}
- hdd_debug("Received Command to change ese mode = %d", eseMode);
+ hdd_debug("Received Command to change ese mode = %d", ese_mode);
- hdd_ctx->config->isEseIniFeatureEnabled = eseMode;
sme_update_is_ese_feature_enabled(mac_handle,
adapter->session_id,
- eseMode);
+ ese_mode);
exit:
return ret;
@@ -5930,52 +5901,50 @@ static int drv_cmd_set_dfs_scan_mode(struct hdd_adapter *adapter,
{
int ret = 0;
uint8_t *value = command;
- uint8_t dfsScanMode = CFG_ROAMING_DFS_CHANNEL_DEFAULT;
+ uint8_t dfs_scan_mode = cfg_default(CFG_LFR_ROAMING_DFS_CHANNEL);
/* Move pointer to ahead of SETDFSSCANMODE */
value = value + command_len + 1;
/* Convert the value from ascii to integer */
- ret = kstrtou8(value, 10, &dfsScanMode);
+ ret = kstrtou8(value, 10, &dfs_scan_mode);
if (ret < 0) {
/*
* If the input value is greater than max value of datatype,
* then also kstrtou8 fails
*/
hdd_err("kstrtou8 failed range [%d - %d]",
- CFG_ROAMING_DFS_CHANNEL_MIN,
- CFG_ROAMING_DFS_CHANNEL_MAX);
+ cfg_min(CFG_LFR_ROAMING_DFS_CHANNEL),
+ cfg_max(CFG_LFR_ROAMING_DFS_CHANNEL));
ret = -EINVAL;
goto exit;
}
- if ((dfsScanMode < CFG_ROAMING_DFS_CHANNEL_MIN) ||
- (dfsScanMode > CFG_ROAMING_DFS_CHANNEL_MAX)) {
+ if (!cfg_in_range(CFG_LFR_ROAMING_DFS_CHANNEL, dfs_scan_mode)) {
hdd_err("dfsScanMode value %d is out of range (Min: %d Max: %d)",
- dfsScanMode,
- CFG_ROAMING_DFS_CHANNEL_MIN,
- CFG_ROAMING_DFS_CHANNEL_MAX);
+ dfs_scan_mode,
+ cfg_min(CFG_LFR_ROAMING_DFS_CHANNEL),
+ cfg_max(CFG_LFR_ROAMING_DFS_CHANNEL));
ret = -EINVAL;
goto exit;
}
hdd_debug("Received Command to Set DFS Scan Mode = %d",
- dfsScanMode);
+ dfs_scan_mode);
/* When DFS scanning is disabled, the DFS channels need to be
* removed from the operation of device.
*/
ret = wlan_hdd_enable_dfs_chan_scan(hdd_ctx,
- dfsScanMode != CFG_ROAMING_DFS_CHANNEL_DISABLED);
+ dfs_scan_mode != ROAMING_DFS_CHANNEL_DISABLED);
if (ret < 0) {
/* Some conditions prevented it from disabling DFS channels */
hdd_err("disable/enable DFS channel request was denied");
goto exit;
}
- hdd_ctx->config->allowDFSChannelRoam = dfsScanMode;
sme_update_dfs_scan_mode(hdd_ctx->mac_handle, adapter->session_id,
- dfsScanMode);
+ dfs_scan_mode);
exit:
return ret;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 13e82b5623bae..e4195c1d5dfd5 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1438,6 +1438,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
{
struct hdd_config *config = hdd_ctx->config;
bool arp_offload_enable;
+ bool mawc_enabled;
#ifdef FEATURE_WLAN_TDLS
bool tdls_support;
bool tdls_off_channel;
@@ -1496,7 +1497,9 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
QDF_STATUS_SUCCESS)
value &= cfg->get_peer_info_enabled;
- config->MAWCEnabled &= cfg->is_fw_mawc_capable;
+ ucfg_mlme_is_mawc_enabled(hdd_ctx->psoc, &mawc_enabled);
+ ucfg_mlme_set_mawc_enabled(hdd_ctx->psoc,
+ mawc_enabled & cfg->is_fw_mawc_capable);
hdd_update_tdls_config(hdd_ctx);
sme_update_tgt_services(hdd_ctx->mac_handle, cfg);
}
@@ -3076,7 +3079,8 @@ static int hdd_deactivate_wifi_pos(void)
static void hdd_populate_wifi_pos_cfg(struct hdd_context *hdd_ctx)
{
struct wlan_objmgr_psoc *psoc = hdd_ctx->psoc;
- struct hdd_config *cfg = hdd_ctx->config;
+ uint16_t neighbor_scan_max_chan_time;
+ uint16_t neighbor_scan_min_chan_time;
wifi_pos_set_oem_target_type(psoc, hdd_ctx->target_type);
wifi_pos_set_oem_fw_version(psoc, hdd_ctx->target_fw_version);
@@ -3084,8 +3088,12 @@ static void hdd_populate_wifi_pos_cfg(struct hdd_context *hdd_ctx)
wifi_pos_set_drv_ver_minor(psoc, QWLAN_VERSION_MINOR);
wifi_pos_set_drv_ver_patch(psoc, QWLAN_VERSION_PATCH);
wifi_pos_set_drv_ver_build(psoc, QWLAN_VERSION_BUILD);
- wifi_pos_set_dwell_time_min(psoc, cfg->nNeighborScanMinChanTime);
- wifi_pos_set_dwell_time_max(psoc, cfg->nNeighborScanMaxChanTime);
+ ucfg_mlme_get_neighbor_scan_max_chan_time(psoc,
+ &neighbor_scan_max_chan_time);
+ ucfg_mlme_get_neighbor_scan_min_chan_time(psoc,
+ &neighbor_scan_min_chan_time);
+ wifi_pos_set_dwell_time_min(psoc, neighbor_scan_min_chan_time);
+ wifi_pos_set_dwell_time_max(psoc, neighbor_scan_max_chan_time);
}
#else
static int hdd_activate_wifi_pos(struct hdd_context *hdd_ctx)
@@ -9797,8 +9805,6 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx)
goto exit;
cds_cfg->bandcapability = band_capability;
- cds_cfg->delay_before_vdev_stop =
- hdd_ctx->config->delay_before_vdev_stop;
cds_cfg->num_vdevs = hdd_ctx->config->num_vdevs;
hdd_ra_populate_cds_config(cds_cfg, hdd_ctx);
@@ -14096,9 +14102,11 @@ static int hdd_update_pmo_config(struct hdd_context *hdd_ctx)
#ifdef FEATURE_WLAN_SCAN_PNO
static inline void hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
- struct hdd_config *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;
@@ -14106,7 +14114,9 @@ static inline void hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
pno_cfg->adaptive_dwell_mode = cfg->adaptive_dwell_mode_enabled;
pno_cfg->channel_prediction_full_scan =
cfg->channel_prediction_full_scan;
- mawc_cfg->enable = cfg->MAWCEnabled && cfg->mawc_nlo_enabled;
+
+ 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;
@@ -14114,7 +14124,7 @@ static inline void hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
#else
static inline void
hdd_update_pno_config(struct pno_user_cfg *pno_cfg,
- struct hdd_config *cfg)
+ struct hdd_context *hdd_ctx)
{
}
#endif
@@ -14261,6 +14271,7 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
QDF_STATUS status;
uint8_t scan_bucket_thre;
uint8_t select_5ghz_margin;
+ bool roam_prefer_5ghz;
status = ucfg_mlme_get_select_5ghz_margin(hdd_ctx->psoc,
&select_5ghz_margin);
@@ -14279,7 +14290,8 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
/* convert to ms */
scan_cfg.scan_cache_aging_time =
cfg->scanAgingTimeout * 1000;
- scan_cfg.prefer_5ghz = cfg->nRoamPrefer5GHz;
+ ucfg_mlme_is_roam_prefer_5ghz(hdd_ctx->psoc, &roam_prefer_5ghz);
+ scan_cfg.prefer_5ghz = (uint32_t)roam_prefer_5ghz;
scan_cfg.select_5ghz_margin = select_5ghz_margin;
ucfg_mlme_get_first_scan_bucket_threshold(hdd_ctx->psoc,
&scan_bucket_thre);
@@ -14293,7 +14305,7 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
scan_cfg.enable_mac_spoofing = cfg->enable_mac_spoofing;
scan_cfg.sta_miracast_mcc_rest_time =
cfg->sta_miracast_mcc_rest_time_val;
- hdd_update_pno_config(&scan_cfg.pno_cfg, cfg);
+ 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);
diff --git a/core/hdd/src/wlan_hdd_oemdata.c b/core/hdd/src/wlan_hdd_oemdata.c
index 367eab31b08f8..d3e7aea6065af 100644
--- a/core/hdd/src/wlan_hdd_oemdata.c
+++ b/core/hdd/src/wlan_hdd_oemdata.c
@@ -59,6 +59,8 @@ static int populate_oem_data_cap(struct hdd_adapter *adapter,
uint32_t num_chan;
uint8_t *chan_list;
uint8_t band_capability;
+ uint16_t neighbor_scan_min_chan_time;
+ uint16_t neighbor_scan_max_chan_time;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
config = hdd_ctx->config;
@@ -87,8 +89,12 @@ static int populate_oem_data_cap(struct hdd_adapter *adapter,
data_cap->driver_version.minor = QWLAN_VERSION_MINOR;
data_cap->driver_version.patch = QWLAN_VERSION_PATCH;
data_cap->driver_version.build = QWLAN_VERSION_BUILD;
- data_cap->allowed_dwell_time_min = config->nNeighborScanMinChanTime;
- data_cap->allowed_dwell_time_max = config->nNeighborScanMaxChanTime;
+ ucfg_mlme_get_neighbor_scan_max_chan_time(psoc,
+ &neighbor_scan_max_chan_time);
+ ucfg_mlme_get_neighbor_scan_min_chan_time(psoc,
+ &neighbor_scan_min_chan_time);
+ data_cap->allowed_dwell_time_min = neighbor_scan_min_chan_time;
+ data_cap->allowed_dwell_time_max = neighbor_scan_max_chan_timee;
data_cap->curr_dwell_time_min =
sme_get_neighbor_scan_min_chan_time(hdd_ctx->mac_handle,
adapter->session_id);