wlan: Retry Auth if AP gives MAX_ASSOC_STA_REACHED

This is IOT issue with the AP who has 5G prefer feature.
The AP rejects with eSIR_MAC_MAX_ASSOC_STA_REACHED_STATUS
in AUTH frame when the 2.4G STA tries AUTH process for
the first 2 times. If STA tries the 3rd time in 2.4G,
then the AUTH process will success.

Change-Id: I8afa43cb9728f73172f543bfb9aac65b0b225aa2
CRs-Fixed: 1111136
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index c485114..b95f9b2 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3907,6 +3907,13 @@
                VAR_FLAGS_OPTIONAL,
                (void *) CFG_MDNS_RESPONSE_TYPE_SRV_TGT_DEFAULT ),
 #endif /* MDNS_OFFLOAD */
+
+  REG_VARIABLE( CFG_STA_AUTH_RETRIES_FOR_CODE17_NAME, WLAN_PARAM_Integer,
+               hdd_config_t, sta_auth_retries_for_code17,
+               VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+               CFG_STA_AUTH_RETRIES_FOR_CODE17_DEFAULT,
+               CFG_STA_AUTH_RETRIES_FOR_CODE17_MIN,
+               CFG_STA_AUTH_RETRIES_FOR_CODE17_MAX ),
 };
 
 /*
@@ -4546,6 +4553,9 @@
            pHddCtx->cfg_ini->enable_lfr_mbb);
 #endif
 
+  VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+        "Name = [sta_auth_retries_for_code17] Value = [%u] ",
+         pHddCtx->cfg_ini->sta_auth_retries_for_code17);
 }
 
 
@@ -6531,6 +6541,8 @@
    smeConfig->csrConfig.edca_be_aifs =
                         pHddCtx->cfg_ini->edca_be_aifs;
 
+   smeConfig->csrConfig.sta_auth_retries_for_code17 =
+                        pHddCtx->cfg_ini->sta_auth_retries_for_code17;
 
    sme_set_mgmt_frm_via_wq5((tHalHandle)(pHddCtx->hHal),
            pHddCtx->cfg_ini->sendMgmtPktViaWQ5);