qcacld-3.0: Defer power-save for certain APs during initial connection
Few APs create interoperability issues when STA goes to power-save mode
right after initial connection.
In order to resolve these issues, defer the power-save for few seconds
when connected to those APs.
Change-Id: I3f6b642fb4e481dcb8e14f6da141f4cfa9d6b167
CRs-Fixed: 2046014
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index ed4697c..7c71c7f 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -11104,6 +11104,27 @@
return NULL;
}
+bool wlan_hdd_is_ap_supports_immediate_power_save(uint8_t *ies, int length)
+{
+ uint8_t *vendor_ie;
+
+ if (length < 2) {
+ hdd_debug("bss size is less than expected");
+ return true;
+ }
+ if (!ies) {
+ hdd_debug("invalid IE pointer");
+ return true;
+ }
+ vendor_ie = wlan_hdd_get_vendor_oui_ie_ptr(VENDOR1_AP_OUI_TYPE,
+ VENDOR1_AP_OUI_TYPE_SIZE, ies, length);
+ if (vendor_ie) {
+ hdd_debug("AP can't support immediate powersave. defer it");
+ return false;
+ }
+ return true;
+}
+
/*
* FUNCTION: wlan_hdd_validate_operation_channel
* called by wlan_hdd_cfg80211_start_bss() and