소스 검색

qcacld-3.0: Not advertise wiphy_wowlan_support when registering wiphy

If WoW not support, not advertise wiphy_wowlan_support when
registering wiphy device. To make sure wiphy_suspend can follow
the flow of WoW not support.

Both function wlan_hdd_cfg80211_init() and hdd_wiphy_init() set
wiphy->wowlan. Change I4bbaec9ba4268099507567b4e03cee51ee1d11f7
already fixed it in function hdd_wiphy_init(). This change fixed
it in function wlan_hdd_cfg80211_init().

And, not advertise wiphy_wowlan_support even kernel version less
than 3.11.

Change-Id: Ia68d1a8bae85d9ec891b81634b9704e8500587cd
CRs-Fixed: 2989891
Yu Ouyang 3 년 전
부모
커밋
580e7eac43
2개의 변경된 파일22개의 추가작업 그리고 18개의 파일을 삭제
  1. 7 5
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 15 13
      core/hdd/src/wlan_hdd_main.c

+ 7 - 5
core/hdd/src/wlan_hdd_cfg80211.c

@@ -17015,14 +17015,16 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 #endif
 			| WIPHY_FLAG_OFFCHAN_TX;
 
+	if (ucfg_pmo_get_suspend_mode(hdd_ctx->psoc) == PMO_SUSPEND_WOW) {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
-	wiphy->wowlan = &wowlan_support_cfg80211_init;
+		wiphy->wowlan = &wowlan_support_cfg80211_init;
 #else
-	wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT;
-	wiphy->wowlan.n_patterns = WOWL_MAX_PTRNS_ALLOWED;
-	wiphy->wowlan.pattern_min_len = 1;
-	wiphy->wowlan.pattern_max_len = WOWL_PTRN_MAX_SIZE;
+		wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT;
+		wiphy->wowlan.n_patterns = WOWL_MAX_PTRNS_ALLOWED;
+		wiphy->wowlan.pattern_min_len = 1;
+		wiphy->wowlan.pattern_max_len = WOWL_PTRN_MAX_SIZE;
 #endif
+	}
 
 #ifdef FEATURE_WLAN_TDLS
 	wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS

+ 15 - 13
core/hdd/src/wlan_hdd_main.c

@@ -9264,24 +9264,26 @@ static int hdd_wiphy_init(struct hdd_context *hdd_ctx)
 		return ret_val;
 	}
 
+	if (ucfg_pmo_get_suspend_mode(hdd_ctx->psoc) == PMO_SUSPEND_WOW) {
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
-	if (ucfg_pmo_get_suspend_mode(hdd_ctx->psoc) == PMO_SUSPEND_WOW)
 		wiphy->wowlan = &wowlan_support_reg_init;
 #else
-	wiphy->wowlan.flags = WIPHY_WOWLAN_ANY |
-			      WIPHY_WOWLAN_MAGIC_PKT |
-			      WIPHY_WOWLAN_DISCONNECT |
-			      WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
-			      WIPHY_WOWLAN_GTK_REKEY_FAILURE |
-			      WIPHY_WOWLAN_EAP_IDENTITY_REQ |
-			      WIPHY_WOWLAN_4WAY_HANDSHAKE |
-			      WIPHY_WOWLAN_RFKILL_RELEASE;
-
-	wiphy->wowlan.n_patterns = (WOW_MAX_FILTER_LISTS *
+		wiphy->wowlan.flags = WIPHY_WOWLAN_ANY |
+				      WIPHY_WOWLAN_MAGIC_PKT |
+				      WIPHY_WOWLAN_DISCONNECT |
+				      WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
+				      WIPHY_WOWLAN_GTK_REKEY_FAILURE |
+				      WIPHY_WOWLAN_EAP_IDENTITY_REQ |
+				      WIPHY_WOWLAN_4WAY_HANDSHAKE |
+				      WIPHY_WOWLAN_RFKILL_RELEASE;
+
+		wiphy->wowlan.n_patterns = (WOW_MAX_FILTER_LISTS *
 				    WOW_MAX_FILTERS_PER_LIST);
-	wiphy->wowlan.pattern_min_len = WOW_MIN_PATTERN_SIZE;
-	wiphy->wowlan.pattern_max_len = WOW_MAX_PATTERN_SIZE;
+		wiphy->wowlan.pattern_min_len = WOW_MIN_PATTERN_SIZE;
+		wiphy->wowlan.pattern_max_len = WOW_MAX_PATTERN_SIZE;
 #endif
+	}
+
 	ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc,
 					    &channel_bonding_mode);
 	if (hdd_ctx->obss_scan_offload) {