瀏覽代碼

qcacmn: Add API to check if scan entry is from hidden AP

Add API to check if scan entry is for a hidden AP.

Change-Id: I51115eb1601754d3d920029687ab6211b351c48a
CRs-Fixed: 2106447
Om Prakash Tripathi 7 年之前
父節點
當前提交
1d1525db36

+ 0 - 3
umac/scan/core/src/wlan_scan_cache_db.h

@@ -33,9 +33,6 @@
 #define SCAN_GET_HASH(addr) \
 	(((const uint8_t *)(addr))[QDF_MAC_ADDR_SIZE - 1] % SCAN_HASH_SIZE)
 
-/* Hidden ssid age time in millisec */
-#define HIDDEN_SSID_TIME (1*60*1000)
-
 /**
  * struct scan_dbs - scan cache data base definition
  * @num_entries: number of scan entries

+ 2 - 0
umac/scan/core/src/wlan_scan_main.h

@@ -74,6 +74,7 @@
 #define SCAN_MAX_SCAN_TIME 30000
 #define SCAN_NUM_PROBES 2
 #define SCAN_NETWORK_IDLE_TIMEOUT 0
+#define HIDDEN_SSID_TIME (1*60*1000)
 #else
 #define MAX_SCAN_CACHE_SIZE 1024
 #define SCAN_ACTIVE_DWELL_TIME 105
@@ -92,6 +93,7 @@
 #define SCAN_MAX_SCAN_TIME 50000
 #define SCAN_NUM_PROBES 0
 #define SCAN_NETWORK_IDLE_TIMEOUT 200
+#define HIDDEN_SSID_TIME (0xFFFFFFFF)
 #endif
 
 #define SCAN_TIMEOUT_GRACE_PERIOD 10

+ 26 - 0
umac/scan/dispatcher/inc/wlan_scan_utils_api.h

@@ -1327,4 +1327,30 @@ util_get_last_scan_time(struct wlan_objmgr_vdev *vdev);
 QDF_STATUS
 util_scan_entry_update_mlme_info(struct wlan_objmgr_pdev *pdev,
 	struct scan_cache_entry *scan_entry);
+
+/**
+ * util_scan_is_hidden_ssid() - function to check if ssid is hidden
+ * @ssid: struct ie_ssid object
+ *
+ * API, function to check if ssid is hidden
+ *
+ * Return: true if ap is hidden, false otherwise
+ */
+bool
+util_scan_is_hidden_ssid(struct ie_ssid *ssid);
+
+/**
+ * util_scan_entry_is_hidden_ap() - function to check if ap is hidden
+ * @scan_entry: scan entry
+ *
+ * API, function to check if ap is hidden
+ *
+ * Return: true if ap is hidden, false otherwise
+ */
+static inline bool
+util_scan_entry_is_hidden_ap(struct scan_cache_entry *scan_entry)
+{
+    return util_scan_is_hidden_ssid(
+			(struct ie_ssid *)scan_entry->ie_list.ssid);
+}
 #endif

+ 1 - 1
umac/scan/dispatcher/src/wlan_scan_utils_api.c

@@ -321,7 +321,7 @@ util_scan_parse_chan_switch_wrapper_ie(struct scan_cache_entry *scan_params,
 	return QDF_STATUS_SUCCESS;
 }
 
-static bool
+bool
 util_scan_is_hidden_ssid(struct ie_ssid *ssid)
 {
 	uint8_t i;