소스 검색

qcacld-3.0: Send scan period received from vendor command to firmware

Scan period is configured through the DRIVER command
SETROAMSCANPERIOD currently. Add provision to set the same through
the roam subcmd and the attr QCA_ATTR_ROAM_CONTROL_SCAN_PERIOD

Change-Id: I3dd56f56ac8bc4ba48a88f8df292e9d4d5545fed
CRs-Fixed: 2509656
Srinivas Dasari 5 년 전
부모
커밋
dab7ef7fd0
2개의 변경된 파일24개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
  2. 16 0
      mlme/dispatcher/src/wlan_mlme_ucfg_api.c

+ 8 - 0
mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -3878,4 +3878,12 @@ ucfg_mlme_get_peer_phymode(struct wlan_objmgr_psoc *psoc, uint8_t *mac,
  * Return: True if full_roam_scan_period is in expected range, false otherwise.
  */
 bool ucfg_mlme_validate_full_roam_scan_period(uint32_t full_roam_scan_period);
+
+/**
+ * ucfg_mlme_validate_scan_period() - Validate if scan period is in valid range
+ * @value: Scan period in msec
+ *
+ * Return: True if roam_scan_period is in expected range, false otherwise.
+ */
+bool ucfg_mlme_validate_scan_period(uint32_t roam_scan_period);
 #endif /* _WLAN_MLME_UCFG_API_H_ */

+ 16 - 0
mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -1682,3 +1682,19 @@ bool ucfg_mlme_validate_full_roam_scan_period(uint32_t full_roam_scan_period)
 
 	return is_valid;
 }
+
+bool ucfg_mlme_validate_scan_period(uint32_t roam_scan_period)
+{
+	bool is_valid = true;
+
+	if (!cfg_in_range(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD,
+			  roam_scan_period)) {
+		mlme_legacy_err("Roam scan period value %d msec is out of range (Min: %d msec Max: %d msec)",
+				roam_scan_period,
+				cfg_min(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD),
+				cfg_max(CFG_LFR_EMPTY_SCAN_REFRESH_PERIOD));
+		is_valid = false;
+	}
+
+	return is_valid;
+}