Browse Source

qcacld-3.0: Add support for PNO scan in connected state

qcacld-2.0 to qcacld-3.0 propagation

Add changes to support PNO scan in connected state to find better Ap's
based on rssi threshold, band and rssi preference.

Change-Id: I17f1830c07821b577473fc2d8f50c0867572fe0c
CRs-Fixed: 2012702
Padma, Santhosh Kumar 7 years ago
parent
commit
4b302b6791
1 changed files with 21 additions and 0 deletions
  1. 21 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 21 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -11899,6 +11899,26 @@ hdd_wiphy_set_max_sched_scans(struct wiphy *wiphy, uint8_t max_scans)
 }
 #endif /* KERNEL_VERSION(4, 12, 0) */
 
+/**
+ * wlan_hdd_cfg80211_add_connected_pno_support() - Set connected PNO support
+ * @wiphy: Pointer to wireless phy
+ *
+ * This function is used to set connected PNO support to kernel
+ *
+ * Return: None
+ */
+#if defined(CFG80211_REPORT_BETTER_BSS_IN_SCHED_SCAN)
+static void wlan_hdd_cfg80211_add_connected_pno_support(struct wiphy *wiphy)
+{
+	wiphy_ext_feature_set(wiphy,
+		NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI);
+}
+#else
+static void wlan_hdd_cfg80211_add_connected_pno_support(struct wiphy *wiphy)
+{
+}
+#endif
+
 #if ((LINUX_VERSION_CODE > KERNEL_VERSION(4, 4, 0)) || \
 	defined(CFG80211_MULTI_SCAN_PLAN_BACKPORT)) && \
 	defined(FEATURE_WLAN_SCAN_PNO)
@@ -12102,6 +12122,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 	wlan_hdd_cfg80211_set_wiphy_fils_feature(wiphy);
 
 	hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg);
+	wlan_hdd_cfg80211_add_connected_pno_support(wiphy);
 
 #if  defined QCA_WIFI_FTM
 	if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) {