summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-12-24 14:53:36 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-12-24 14:53:36 -0800
commit0e7b3e791c2ce141992bb99069ad048d88bb828c (patch)
tree4b425073477efeccfe315d3b623f948a9228302c
parent8130800f227fbf8b5d00a3a1521da72e5c2db77b (diff)
parentc2500980094b3f9a001ac152f5af2b71b6e746d4 (diff)
Merge "Release 4.0.10.006 QCACLD WLAN Driver"
-rw-r--r--CORE/CLD_TXRX/TLSHIM/tl_shim.c2
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h18
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg80211.h60
-rw-r--r--CORE/HDD/inc/wlan_hdd_hostapd.h76
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h7
-rw-r--r--CORE/HDD/inc/wlan_hdd_trace.h5
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c63
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c19
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c705
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c49
-rw-r--r--CORE/HDD/src/wlan_hdd_ipa.c8
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c156
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c40
-rw-r--r--CORE/HDD/src/wlan_hdd_tdls.c9
-rw-r--r--CORE/HDD/src/wlan_hdd_trace.c4
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c43
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirApi.h7
-rw-r--r--CORE/MAC/inc/sirMacPropExts.h6
-rw-r--r--CORE/MAC/inc/wniCfgAp.h268
-rw-r--r--CORE/MAC/inc/wniCfgSta.h262
-rw-r--r--CORE/MAC/src/cfg/cfgParamName.c1
-rw-r--r--CORE/MAC/src/cfg/cfgUtil/cfg.txt17
-rw-r--r--CORE/MAC/src/pe/lim/limAdmitControl.c3
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c26
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c11
-rw-r--r--CORE/MAC/src/pe/lim/limSerDesUtils.c9
-rw-r--r--CORE/SAP/inc/sapApi.h37
-rw-r--r--CORE/SAP/src/sapApiLinkCntl.c49
-rw-r--r--CORE/SAP/src/sapFsm.c78
-rw-r--r--CORE/SAP/src/sapInternal.h2
-rw-r--r--CORE/SAP/src/sapModule.c47
-rw-r--r--CORE/SERVICES/WMA/wma.c5
-rw-r--r--CORE/SME/inc/csrApi.h6
-rw-r--r--CORE/SME/inc/csrInternal.h24
-rw-r--r--CORE/SME/inc/sme_Api.h14
-rw-r--r--CORE/SME/inc/sme_Trace.h4
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c354
-rw-r--r--CORE/SME/src/csr/csrNeighborRoam.c20
-rw-r--r--CORE/SME/src/csr/csrUtil.c6
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c246
-rw-r--r--CORE/SME/src/sme_common/sme_Trace.c3
-rw-r--r--Kbuild7
-rw-r--r--firmware_bin/WCNSS_cfg.datbin10266 -> 10234 bytes
44 files changed, 1801 insertions, 979 deletions
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
index b20a57a1057f..03d9ec03d6bc 100644
--- a/CORE/CLD_TXRX/TLSHIM/tl_shim.c
+++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
@@ -1755,7 +1755,7 @@ VOS_STATUS WLANTL_Start(void *vos_ctx)
VOS_STATUS WLANTL_Close(void *vos_ctx)
{
struct txrx_tl_shim_ctx *tl_shim;
-#ifdef QCA_LL_TX_FLOW_CT
+#if defined(QCA_LL_TX_FLOW_CT) || defined(QCA_SUPPORT_TXRX_VDEV_PAUSE_LL)
u_int8_t i;
#endif /* QCA_LL_TX_FLOW_CT */
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 8fdea0c50ab7..eb8e88b1d716 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -2609,14 +2609,19 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
* needs to follow STA's channel.
*/
#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME "gEnableCustomConcRule1"
-#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MIN ( 0 )
-#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MAX ( 1 )
-#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_DEFAULT ( 0 )
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MIN (0)
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MAX (1)
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_DEFAULT (0)
+
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME "gEnableCustomConcRule2"
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_MIN (0)
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_MAX (1)
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_DEFAULT (0)
#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ "gEnableStaConnectionIn5Ghz"
-#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_MIN ( 0 )
-#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_MAX ( 1 )
-#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_DEFAULT ( 1 )
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_MIN (0)
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_MAX (1)
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_DEFAULT (1)
#ifdef MDNS_OFFLOAD
/*
@@ -3290,6 +3295,7 @@ typedef struct
bool ipa_uc_sta_offload;
#endif
uint8_t conc_custom_rule1;
+ uint8_t conc_custom_rule2;
uint8_t is_sta_connection_in_5gz_enabled;
#ifdef MDNS_OFFLOAD
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
index d87c4bd512b1..624db7b348fc 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -174,12 +174,22 @@ enum qca_nl80211_vendor_subcmds {
/* Get Concurrency Matrix */
QCA_NL80211_VENDOR_SUBCMD_GET_CONCURRENCY_MATRIX = 42,
+
+ /* Get the security keys for key management offload */
+ QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY = 50,
+
+ /* Send the roaming and authentication info after roaming */
+ QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH = 51,
+
QCA_NL80211_VENDOR_SUBCMD_APFIND = 52,
/* OCB Set Schedule */
QCA_NL80211_VENDOR_SUBCMD_OCB_SET_SCHED = 53,
QCA_NL80211_VENDOR_SUBCMD_DO_ACS = 54,
+
+ /* Get the supported features by the driver */
+ QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES = 55,
};
enum qca_nl80211_vendor_subcmds_index {
@@ -223,6 +233,9 @@ enum qca_nl80211_vendor_subcmds_index {
QCA_NL80211_VENDOR_SUBCMD_TDLS_STATE_CHANGE_INDEX,
/* ACS OBSS Coex*/
QCA_NL80211_VENDOR_SUBCMD_DO_ACS_INDEX,
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+ QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX,
+#endif
};
/* EXT TDLS */
@@ -286,6 +299,8 @@ enum qca_wlan_vendor_attr {
/* used by QCA_NL80211_VENDOR_SUBCMD_STATS_EXT */
QCA_WLAN_VENDOR_ATTR_STATS_EXT = 3,
QCA_WLAN_VENDOR_ATTR_IFINDEX = 4,
+ /* used by QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES */
+ QCA_WLAN_VENDOR_ATTR_FEATURE_FLAGS = 7,
/* keep last */
QCA_WLAN_VENDOR_ATTR_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_MAX =
@@ -838,6 +853,30 @@ enum qca_wlan_vendor_attr_set_no_dfs_flag
QCA_WLAN_VENDOR_ATTR_SET_NO_DFS_FLAG_AFTER_LAST - 1,
};
+/**
+ * enum qca_wlan_vendor_attr_roam_auth - vendor event for roaming
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID: BSSID of the roamed AP
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE: Request IE
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE: Response IE
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED: Authorization Status
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR: Replay Counter
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK: KCK of the PTK
+ * @QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK: KEK of the PTK
+ */
+enum qca_wlan_vendor_attr_roam_auth {
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MAX =
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST - 1
+};
+
/* NL attributes for data used by
* QCA_NL80211_VENDOR_SUBCMD_GET_CONCURRENCY_MATRIX sub command.
*/
@@ -893,6 +932,19 @@ enum qca_wlan_vendor_attr_ocb_set_sched
QCA_WLAN_VENDOR_ATTR_OCB_SET_SCHED_AFTER_LAST - 1,
};
+/**
+ * enum qca_wlan_vendor_features - vendor device/driver features
+ * @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key
+ * management offload, a mechanism where the station's firmware
+ * does the exchange with the AP to establish the temporal keys
+ * after roaming, rather than having the supplicant do it.
+ */
+enum qca_wlan_vendor_features {
+ QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD = 0,
+ /* Additional features need to be added above this */
+ NUM_QCA_WLAN_VENDOR_FEATURES
+};
+
/* Feature defines */
#define WIFI_FEATURE_INFRA 0x0001 /* Basic infrastructure mode */
#define WIFI_FEATURE_INFRA_5G 0x0002 /* Support for 5 GHz Band */
@@ -1016,7 +1068,7 @@ extern void wlan_hdd_cfg80211_update_replayCounterCallback(void *callbackContext
tpSirGtkOffloadGetInfoRspParams pGtkOffloadGetInfoRsp);
#endif
void* wlan_hdd_change_country_code_cb(void *pAdapter);
-void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel);
+void hdd_select_cbmode(hdd_adapter_t *pAdapter, v_U8_t operationChannel);
v_U8_t* wlan_hdd_cfg80211_get_ie_ptr(v_U8_t *pIes, int length, v_U8_t eid);
@@ -1060,4 +1112,10 @@ int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
void wlan_hdd_cfg80211_acs_ch_select_evt(hdd_context_t *pHddCtx,
v_U8_t priChannel, v_U8_t secChannel);
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid,
+ uint8_t *req_rsn_ie, uint32_t req_rsn_length,
+ uint8_t *rsp_rsn_ie, uint32_t rsp_rsn_length,
+ tCsrRoamInfo *roam_info_ptr);
+#endif
#endif
diff --git a/CORE/HDD/inc/wlan_hdd_hostapd.h b/CORE/HDD/inc/wlan_hdd_hostapd.h
index 5bbcb266bfc6..ff499bf9a912 100644
--- a/CORE/HDD/inc/wlan_hdd_hostapd.h
+++ b/CORE/HDD/inc/wlan_hdd_hostapd.h
@@ -112,4 +112,80 @@ hdd_set_sap_auth_offload(hdd_adapter_t *pHostapdAdapter, bool enabled)
}
#endif /* SAP_AUTH_OFFLOAD */
+/**
+ * hdd_is_sta_connection_pending() - This function will check if sta connection
+ * is pending or not.
+ * @hdd_ctx: pointer to hdd context
+ *
+ * This function will return the status of flag is_sta_connection_pending
+ *
+ * Return: true or false
+ */
+static inline bool
+hdd_is_sta_connection_pending(hdd_context_t *hdd_ctx)
+{
+ bool status;
+ spin_lock(&hdd_ctx->sta_update_info_lock);
+ status = hdd_ctx->is_sta_connection_pending;
+ spin_unlock(&hdd_ctx->sta_update_info_lock);
+ return status;
+}
+
+/**
+ * hdd_change_sta_conn_pending_status() - This function will change the value
+ * of is_sta_connection_pending
+ * @hdd_ctx: pointer to hdd context
+ * @value: value to set
+ *
+ * This function will change the value of is_sta_connection_pending
+ *
+ * Return: none
+ */
+static inline void
+hdd_change_sta_conn_pending_status(hdd_context_t *hdd_ctx,
+ bool value)
+{
+ spin_lock(&hdd_ctx->sta_update_info_lock);
+ hdd_ctx->is_sta_connection_pending = value;
+ spin_unlock(&hdd_ctx->sta_update_info_lock);
+}
+
+/**
+ * hdd_is_sap_restart_required() - This function will check if sap restart
+ * is pending or not.
+ * @hdd_ctx: pointer to hdd context.
+ *
+ * This function will return the status of flag is_sap_restart_required.
+ *
+ * Return: true or false
+ */
+static inline bool
+hdd_is_sap_restart_required(hdd_context_t *hdd_ctx)
+{
+ bool status;
+ spin_lock(&hdd_ctx->sap_update_info_lock);
+ status = hdd_ctx->is_sap_restart_required;
+ spin_unlock(&hdd_ctx->sap_update_info_lock);
+ return status;
+}
+
+/**
+ * hdd_change_sap_restart_required_status() - This function will change the
+ * value of is_sap_restart_required
+ * @hdd_ctx: pointer to hdd context
+ * @value: value to set
+ *
+ * This function will change the value of is_sap_restart_required
+ *
+ * Return: none
+ */
+static inline void
+hdd_change_sap_restart_required_status(hdd_context_t *hdd_ctx,
+ bool value)
+{
+ spin_lock(&hdd_ctx->sap_update_info_lock);
+ hdd_ctx->is_sap_restart_required = value;
+ spin_unlock(&hdd_ctx->sap_update_info_lock);
+}
+
#endif // end #if !defined( WLAN_HDD_HOSTAPD_H )
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 80e926ecb265..0f1c1f37e090 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1473,7 +1473,9 @@ struct hdd_context_s
struct work_struct sap_start_work;
bool is_sap_restart_required;
+ bool is_sta_connection_pending;
spinlock_t sap_update_info_lock;
+ spinlock_t sta_update_info_lock;
v_U8_t dev_dfs_cac_status;
@@ -1518,6 +1520,8 @@ struct hdd_context_s
void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *sta_pAdapter);
#endif
+const char* hdd_device_mode_to_string(uint8_t device_mode);
+
VOS_STATUS hdd_get_front_adapter( hdd_context_t *pHddCtx,
hdd_adapter_list_node_t** ppAdapterNode);
@@ -1721,9 +1725,10 @@ void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter);
void wlan_hdd_enable_roaming(hdd_adapter_t *pAdapter);
#endif
int hdd_set_miracast_mode(hdd_adapter_t *pAdapter, tANI_U8 *command);
-VOS_STATUS wlan_hdd_check_con_channel_sap_and_sta(hdd_adapter_t *sta_adapter,
+VOS_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
hdd_adapter_t *ap_adapter,
tCsrRoamProfile *roam_profile,
+ tScanResultHandle *scan_cache,
bool *concurrent_chnl_same);
#ifdef WLAN_FEATURE_MBSSID
void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter);
diff --git a/CORE/HDD/inc/wlan_hdd_trace.h b/CORE/HDD/inc/wlan_hdd_trace.h
index 4208fdedc9e0..7ba56534e4c4 100644
--- a/CORE/HDD/inc/wlan_hdd_trace.h
+++ b/CORE/HDD/inc/wlan_hdd_trace.h
@@ -96,7 +96,10 @@ enum {
TRACE_CODE_HDD_CFG80211_SET_REKEY_DATA,
TRACE_CODE_HDD_UNSUPPORTED_IOCTL,
TRACE_CODE_HDD_SETROAMSCANCHANNELMINTIME_IOCTL,
- TRACE_CODE_HDD_GETROAMSCANCHANNELMINTIME_IOCTL
+ TRACE_CODE_HDD_GETROAMSCANCHANNELMINTIME_IOCTL,
+ TRACE_CODE_HDD_STORE_JOIN_REQ,
+ TRACE_CODE_HDD_CLEAR_JOIN_REQ,
+ TRACE_CODE_HDD_ISSUE_JOIN_REQ,
};
extern void hddTraceDump(void *pMac, tpvosTraceRecord pRecord,
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 76daa2454d2b..2f038c56ffe2 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -63,9 +63,7 @@
#include "wlan_hdd_tdls.h"
#endif
#include "sme_Api.h"
-#ifdef FEATURE_WLAN_FORCE_SAP_SCC
#include "wlan_hdd_hostapd.h"
-#endif /* FEATURE_WLAN_FORCE_SAP_SCC */
#ifdef IPA_OFFLOAD
#include <wlan_hdd_ipa.h>
#endif
@@ -1333,6 +1331,9 @@ static void hdd_SendReAssocEvent(struct net_device *dev,
cfg80211_roamed(dev, chan, pCsrRoamInfo->bssid,
reqRsnIe, reqRsnLength,
rspRsnIe, rspRsnLength,GFP_KERNEL);
+ wlan_hdd_send_roam_auth_event(pHddCtx, pCsrRoamInfo->bssid,
+ reqRsnIe, reqRsnLength, rspRsnIe,
+ rspRsnLength, pCsrRoamInfo);
done:
kfree(rspRsnIe);
}
@@ -1394,9 +1395,7 @@ static void hdd_sap_restart_handle(struct work_struct *work)
}
wlan_hdd_start_sap(sap_adapter);
- spin_lock(&hdd_ctx->sap_update_info_lock);
- hdd_ctx->is_sap_restart_required = false;
- spin_unlock(&hdd_ctx->sap_update_info_lock);
+ hdd_change_sap_restart_required_status(hdd_ctx, false);
vos_ssr_unprotect(__func__);
}
@@ -1525,7 +1524,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
if ((pHddCtx->cfg_ini->WlanMccToSccSwitchMode
!= VOS_MCC_TO_SCC_SWITCH_DISABLE) &&
- (0 == pHddCtx->cfg_ini->conc_custom_rule1)
+ ((0 == pHddCtx->cfg_ini->conc_custom_rule1) &&
+ (0 == pHddCtx->cfg_ini->conc_custom_rule2))
#ifdef FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
&& !VOS_IS_DFS_CH(pHddStaCtx->conn_info.operationChannel)
#endif
@@ -1949,7 +1949,7 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
}
if (pHddCtx->cfg_ini->conc_custom_rule1 &&
- (true == pHddCtx->is_sap_restart_required)) {
+ (true == hdd_is_sap_restart_required(pHddCtx))) {
sap_adapter = hdd_get_adapter(pHddCtx, WLAN_HDD_SOFTAP);
if (sap_adapter == NULL) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
@@ -1979,10 +1979,14 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
FL("Starting SAP on channel [%d] after STA assoc failed"),
default_sap_channel);
}
+ hdd_ap_ctx->sapConfig.vht_channel_width =
+ pHddCtx->cfg_ini->vhtChannelWidth;
+ hdd_ap_ctx->sapConfig.vht_ch_width_orig =
+ pHddCtx->cfg_ini->vhtChannelWidth;
sme_SelectCBMode(WLAN_HDD_GET_HAL_CTX(sap_adapter),
hdd_ap_ctx->sapConfig.SapHw_mode,
hdd_ap_ctx->sapConfig.channel,
- pHddCtx->cfg_ini->vhtChannelWidth);
+ &hdd_ap_ctx->sapConfig.vht_channel_width);
/*
* Create a workqueue and let the workqueue handle the restarting
* sap task. if we directly call sap restart function without
@@ -3816,40 +3820,6 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId,
break;
}
#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
-#ifdef NL80211_KEY_REPLAY_CTR_LEN /* kernel supports key mgmt offload */
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- case eCSR_ROAM_AUTHORIZED_EVENT:
- {
-#ifdef NL80211_KEY_LEN_PTK_KCK
- struct cfg80211_auth_params auth_params;
- if (pRoamInfo != NULL) {
- auth_params.ptk_kck = pRoamInfo->kck;
- auth_params.ptk_kek = pRoamInfo->kek;
- auth_params.key_replay_ctr = pRoamInfo->replay_ctr;
- auth_params.status = NL80211_AUTHORIZED;
- VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_DEBUG,
- pRoamInfo->replay_ctr,NL80211_KEY_REPLAY_CTR_LEN);
- hddLog(VOS_TRACE_LEVEL_DEBUG,
- "LFR3:cfg80211_key_mgmt_auth NL80211_AUTHORIZED");
- cfg80211_key_mgmt_auth(pAdapter->dev, &auth_params, GFP_KERNEL);
- } else {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "LFR3:pRoamInfo is NULL. Not sending Authorized Event");
- halStatus = eHAL_STATUS_FAILURE;
- }
- break;
-#else
- v_U8_t keyReplayCtr [NL80211_KEY_REPLAY_CTR_LEN];
- vos_mem_zero(keyReplayCtr, sizeof(keyReplayCtr));
- hddLog(VOS_TRACE_LEVEL_DEBUG,
- "cfg80211_authorization_event NL80211_AUTHORIZED");
- cfg80211_authorization_event(pAdapter->dev, NL80211_AUTHORIZED,
- keyReplayCtr, GFP_KERNEL);
- break;
-#endif
- }
-#endif
-#endif
default:
break;
}
@@ -4357,6 +4327,7 @@ int iw_set_essid(struct net_device *dev,
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
v_U32_t roamId;
tCsrRoamProfile *pRoamProfile;
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
eMib_dot11DesiredBssType connectedBssType;
eCsrAuthType RSNAuthType;
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
@@ -4375,8 +4346,9 @@ int iw_set_essid(struct net_device *dev,
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION &&
pAdapter->device_mode != WLAN_HDD_P2P_CLIENT) {
- hddLog(LOGW, "%s device mode %d is not allowed.",
- __func__, pAdapter->device_mode);
+ hddLog(LOGW, FL("Device mode %s(%d) is not allowed"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
return -EINVAL;
}
@@ -4498,8 +4470,7 @@ int iw_set_essid(struct net_device *dev,
if ( eCSR_BSS_TYPE_START_IBSS == pRoamProfile->BSSType )
{
- hdd_select_cbmode(pAdapter,
- (WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->AdHocChannel5G);
+ hdd_select_cbmode(pAdapter, pHddCtx->cfg_ini->AdHocChannel5G);
}
status = sme_RoamConnect( hHal,pAdapter->sessionId,
&(pWextState->roamProfile), &roamId);
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 0260b03c6d96..2f0f51da65b9 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3413,6 +3413,13 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MIN,
CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MAX),
+ REG_VARIABLE( CFG_ENABLE_CUSTOM_CONC_RULE2_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, conc_custom_rule2,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
+ CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_DEFAULT,
+ CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_MIN,
+ CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_MAX),
+
REG_VARIABLE( CFG_ENABLE_STA_CONNECTION_IN_5GHZ, WLAN_PARAM_Integer,
hdd_config_t, is_sta_connection_in_5gz_enabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -5457,16 +5464,6 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
hddLog(LOGE, "Could not pass on WNI_CFG_VHT_MAX_MPDU_LENGTH to CCM");
}
}
- if (pConfig->nChannelBondingMode24GHz ||
- pConfig->nChannelBondingMode5GHz) {
- if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_CHANNEL_WIDTH,
- pConfig->vhtChannelWidth, NULL, eANI_BOOLEAN_FALSE) ==
- eHAL_STATUS_FAILURE) {
- fStatus = FALSE;
- hddLog(LOGE,
- "Could not pass WNI_CFG_VHT_CHANNEL_WIDTH on to CCM");
- }
- }
}
#endif
@@ -5995,6 +5992,8 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
#endif
smeConfig->csrConfig.conc_custom_rule1 =
pHddCtx->cfg_ini->conc_custom_rule1;
+ smeConfig->csrConfig.conc_custom_rule2 =
+ pHddCtx->cfg_ini->conc_custom_rule2;
smeConfig->csrConfig.is_sta_connection_in_5gz_enabled =
pHddCtx->cfg_ini->is_sta_connection_in_5gz_enabled;
#ifdef FEATURE_BUS_AUTO_SUSPEND
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index c05b94dbebc8..d32da40f84d0 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -1165,6 +1165,12 @@ static const struct nl80211_vendor_cmd_info wlan_hdd_cfg80211_vendor_events[] =
.vendor_id = QCA_NL80211_VENDOR_ID,
.subcmd = QCA_NL80211_VENDOR_SUBCMD_DO_ACS
},
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+ [QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX] = {
+ .vendor_id = QCA_NL80211_VENDOR_ID,
+ .subcmd = QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH
+ },
+#endif
};
static int is_driver_dfs_capable(struct wiphy *wiphy,
@@ -2474,6 +2480,73 @@ fail:
#endif /* FEATURE_WLAN_EXTSCAN */
+/**
+ * wlan_hdd_cfg80211_set_feature() - Set the bitmask for supported features
+ * @feature_flags: pointer to the byte array of features.
+ * @feature: Feature to be turned ON in the byte array.
+ *
+ * Return: None
+ *
+ * This is called to turn ON or SET the feature flag for the requested feature.
+ */
+#define NUM_BITS_IN_BYTE 8
+void wlan_hdd_cfg80211_set_feature(uint8_t *feature_flags, uint8_t feature)
+{
+ uint32_t index;
+ uint8_t bit_mask;
+
+ index = feature / NUM_BITS_IN_BYTE;
+ bit_mask = 1 << (feature % NUM_BITS_IN_BYTE);
+ feature_flags[index] |= bit_mask;
+}
+
+/**
+ * wlan_hdd_cfg80211_get_features() - Get the Driver Supported features
+ * @wiphy: pointer to wireless wiphy structure.
+ * @wdev: pointer to wireless_dev structure.
+ * @data: Pointer to the data to be passed via vendor interface
+ * @data_len:Length of the data to be passed
+ *
+ * This is called when wlan driver needs to send supported feature set to
+ * supplicant upon a request/query from the supplicant.
+ *
+ * Return: Return the Success or Failure code.
+ */
+static int
+wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ struct sk_buff *skb = NULL;
+ uint8_t feature_flags[(NUM_QCA_WLAN_VENDOR_FEATURES + 7) / 8] = {0};
+ hdd_context_t *pHddCtx = wiphy_priv(wiphy);
+
+ if (pHddCtx->cfg_ini->isRoamOffloadEnabled) {
+ hddLog(LOG1, FL("Key Mgmt Offload is supported"));
+ wlan_hdd_cfg80211_set_feature (feature_flags,
+ QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD);
+ }
+
+ skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(feature_flags) +
+ NLMSG_HDRLEN);
+
+ if (!skb) {
+ hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed"));
+ return -ENOMEM;
+ }
+
+ if (nla_put(skb,
+ QCA_WLAN_VENDOR_ATTR_FEATURE_FLAGS,
+ sizeof(feature_flags), feature_flags))
+ goto nla_put_failure;
+
+ return cfg80211_vendor_cmd_reply(skb);
+
+nla_put_failure:
+ kfree_skb(skb);
+ return -EINVAL;
+}
+
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
static bool put_wifi_rate_stat( tpSirWifiRateStat stats,
@@ -3747,6 +3820,156 @@ static int wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy,
}
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+/**
+ * wlan_hdd_cfg80211_keymgmt_set_key() - Store the Keys in the driver session
+ * @wiphy: pointer to wireless wiphy structure.
+ * @wdev: pointer to wireless_dev structure.
+ * @data: Pointer to the Key data
+ * @data_len:Length of the data passed
+ *
+ * This is called when wlan driver needs to save the keys received via
+ * vendor specific command.
+ *
+ * Return: Return the Success or Failure code.
+ */
+static int wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ uint8_t local_pmk[SIR_ROAM_SCAN_PSK_SIZE];
+ struct net_device *dev = wdev->netdev;
+ hdd_adapter_t *hdd_adapter_ptr = WLAN_HDD_GET_PRIV_PTR(dev);
+ hdd_context_t *hdd_ctx_ptr;
+ int status;
+
+ if ((data == NULL) || (data_len == 0) ||
+ (data_len > SIR_ROAM_SCAN_PSK_SIZE)) {
+ hddLog(LOGE, FL("Invalid data"));
+ return -EINVAL;
+ }
+
+ hdd_ctx_ptr = WLAN_HDD_GET_CTX(hdd_adapter_ptr);
+ if (!hdd_ctx_ptr) {
+ hddLog(LOGE, FL("HDD context is null"));
+ return -EINVAL;
+ }
+
+ status = wlan_hdd_validate_context(hdd_ctx_ptr);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is invalid"));
+ return status;
+ }
+ sme_UpdateRoamKeyMgmtOffloadEnabled(hdd_ctx_ptr->hHal,
+ hdd_adapter_ptr->sessionId,
+ TRUE);
+ vos_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE);
+ vos_mem_copy(local_pmk, data, data_len);
+ sme_RoamSetPSK_PMK(WLAN_HDD_GET_HAL_CTX(hdd_adapter_ptr),
+ hdd_adapter_ptr->sessionId, local_pmk, data_len);
+ return 0;
+}
+
+/**
+ * wlan_hdd_send_roam_auth_event() - Send the roamed and authorized event
+ * @hdd_ctx_ptr: pointer to HDD Context.
+ * @bssid: pointer to bssid of roamed AP.
+ * @req_rsn_ie: Pointer to request RSN IE
+ * @req_rsn_len: Length of the request RSN IE
+ * @rsp_rsn_ie: Pointer to response RSN IE
+ * @rsp_rsn_len: Length of the response RSN IE
+ * @roam_info_ptr: Pointer to the roaming related information
+ *
+ * This is called when wlan driver needs to send the roaming and
+ * authorization information after roaming.
+ *
+ * The information that would be sent is the request RSN IE, response
+ * RSN IE and BSSID of the newly roamed AP.
+ *
+ * If the Authorized status is authenticated, then additional parameters
+ * like PTK's KCK and KEK and Replay Counter would also be passed to the
+ * supplicant.
+ *
+ * The supplicant upon receiving this event would ignore the legacy
+ * cfg80211_roamed call and use the entire information from this event.
+ * The cfg80211_roamed should still co-exist since the kernel will
+ * make use of the parameters even if the supplicant ignores it.
+ *
+ * Return: Return the Success or Failure code.
+ */
+int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid,
+ uint8_t *req_rsn_ie, uint32_t req_rsn_len,
+ uint8_t *rsp_rsn_ie, uint32_t rsp_rsn_len,
+ tCsrRoamInfo *roam_info_ptr)
+{
+ struct sk_buff *skb = NULL;
+ ENTER();
+
+ if (wlan_hdd_validate_context(hdd_ctx_ptr)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid "));
+ return -EINVAL;
+ }
+
+ skb = cfg80211_vendor_event_alloc(hdd_ctx_ptr->wiphy,
+ ETH_ALEN + req_rsn_len + rsp_rsn_len +
+ sizeof(uint8) + SIR_REPLAY_CTR_LEN +
+ SIR_KCK_KEY_LEN + SIR_KCK_KEY_LEN +
+ (7 * NLMSG_HDRLEN),
+ QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX,
+ GFP_KERNEL);
+
+ if (!skb) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("cfg80211_vendor_event_alloc failed"));
+ return -EINVAL;
+ }
+
+ if (nla_put(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID,
+ ETH_ALEN, bssid) ||
+ nla_put(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE,
+ req_rsn_len, req_rsn_ie) ||
+ nla_put(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE,
+ rsp_rsn_len, rsp_rsn_ie)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla put fail"));
+ goto nla_put_failure;
+ }
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Auth Status = %d"),
+ roam_info_ptr->synchAuthStatus);
+ if (roam_info_ptr->synchAuthStatus ==
+ CSR_ROAM_AUTH_STATUS_AUTHENTICATED) {
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Include Auth Params TLV's"));
+ if (nla_put_u8(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
+ TRUE) ||
+ nla_put(skb,
+ QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
+ SIR_REPLAY_CTR_LEN, roam_info_ptr->replay_ctr)
+ || nla_put(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
+ SIR_KCK_KEY_LEN, roam_info_ptr->kck)
+ || nla_put(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK,
+ SIR_KEK_KEY_LEN, roam_info_ptr->kek)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla put fail"));
+ goto nla_put_failure;
+ }
+ } else {
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("No Auth Params TLV's"));
+ if (nla_put_u8(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
+ FALSE)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("nla put fail"));
+ goto nla_put_failure;
+ }
+ }
+
+ cfg80211_vendor_event(skb, GFP_KERNEL);
+ return 0;
+
+nla_put_failure:
+ kfree_skb(skb);
+ return -EINVAL;
+}
+
+
+#endif
+
#ifdef FEATURE_WLAN_TDLS
/* EXT TDLS */
static const struct nla_policy
@@ -5076,6 +5299,23 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = (void *)wlan_hdd_cfg80211_ocb_set_schedule
},
+ {
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
+ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES,
+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+ WIPHY_VENDOR_CMD_NEED_NETDEV,
+ .doit = (void *)wlan_hdd_cfg80211_get_features
+ },
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+ {
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
+ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY,
+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+ WIPHY_VENDOR_CMD_NEED_NETDEV |
+ WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .doit = (void *)wlan_hdd_cfg80211_keymgmt_set_key
+ },
+#endif
};
@@ -5381,29 +5621,6 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE;
#endif
-#ifdef NL80211_KEY_LEN_PMK /* kernel supports key mgmt offload */
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- if (pCfg->isRoamOffloadEnabled) {
- wiphy->flags |= WIPHY_FLAG_HAS_KEY_MGMT_OFFLOAD;
- wiphy->key_mgmt_offload_support |=
- NL80211_KEY_MGMT_OFFLOAD_SUPPORT_PSK;
- wiphy->key_mgmt_offload_support |=
- NL80211_KEY_MGMT_OFFLOAD_SUPPORT_FT_PSK;
- wiphy->key_mgmt_offload_support |=
- NL80211_KEY_MGMT_OFFLOAD_SUPPORT_PMKSA;
- wiphy->key_mgmt_offload_support |=
- NL80211_KEY_MGMT_OFFLOAD_SUPPORT_FT_802_1X;
- wiphy->key_derive_offload_support |=
- NL80211_KEY_DERIVE_OFFLOAD_SUPPORT_IGTK;
- wiphy->key_derive_offload_support |=
- NL80211_KEY_DERIVE_OFFLOAD_SUPPORT_SHA256;
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_DEBUG,
- "%s: LFR3:Driver key mgmt offload capability flags %x",
- __func__,wiphy->key_mgmt_offload_support);
- }
-#endif
-#endif
-
EXIT();
return 0;
}
@@ -5604,8 +5821,9 @@ void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t* pAdapter, u8 key_index,
tANI_U8 *pKeyPtr = NULL;
int n = 0;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__,pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
vos_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
setKey.keyId = key_index; // Store Key ID
@@ -6237,9 +6455,9 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_CHANNEL, pAdapter->sessionId,
channel_type ));
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: device_mode = %d freq = %d",__func__,
- pAdapter->device_mode, chan->center_freq);
+ hddLog(LOG1, FL("Device_mode %s(%d) freq = %d"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode, chan->center_freq);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -6280,9 +6498,9 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device
"%s: Invalid Channel [%d]", __func__, channel);
return -EINVAL;
}
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: set channel to [%d] for device mode =%d",
- __func__, channel,pAdapter->device_mode);
+ hddLog(LOG2, FL("set channel to [%d] for device mode %s(%d)"),
+ channel, hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
}
if( (pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
|| (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
@@ -6336,9 +6554,10 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device
{
(WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->sapConfig.channel =
AUTO_CHANNEL_SELECT;
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: set channel to auto channel (0) for device mode =%d",
- __func__, pAdapter->device_mode);
+ hddLog(LOG2,
+ FL("set channel to auto channel (0) for device mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
}
else
{
@@ -7012,8 +7231,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
#endif
== eSAP_RF_SUBBAND_2_4_GHZ)) &&
(WLAN_HDD_GET_CTX(pHostapdAdapter)->cfg_ini->enableVhtFor24GHzBand
- == FALSE)) ||
- (WLAN_HDD_GET_CTX(pHostapdAdapter)->isVHT80Allowed == FALSE))
+ == FALSE)))
{
pConfig->SapHw_mode = eCSR_DOT11_MODE_11n;
}
@@ -7022,10 +7240,19 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
if ( AUTO_CHANNEL_SELECT != pConfig->channel )
{
+ if ((eCSR_DOT11_MODE_11ac == pConfig->SapHw_mode) ||
+ (eCSR_DOT11_MODE_11ac_ONLY == pConfig->SapHw_mode)) {
+ pConfig->vht_channel_width = pHddCtx->cfg_ini->vhtChannelWidth;
+ if ((pConfig->vht_channel_width == eHT_CHANNEL_WIDTH_80MHZ) &&
+ (pHddCtx->isVHT80Allowed == false)) {
+ pConfig->vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ;
+ }
+ }
+ pConfig->vht_ch_width_orig = pConfig->vht_channel_width;
sme_SelectCBMode(hHal,
pConfig->SapHw_mode,
pConfig->channel,
- WLAN_HDD_GET_CTX(pHostapdAdapter)->cfg_ini->vhtChannelWidth);
+ &pConfig->vht_channel_width);
}
// ht_capab is not what the name conveys,this is used for protection bitmap
pConfig->ht_capab =
@@ -7167,7 +7394,9 @@ static int wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_ADD_BEACON,
pAdapter->sessionId, params->interval));
- hddLog(LOG2, FL("Device mode=%d"), pAdapter->device_mode);
+ hddLog(LOG2, FL("Device mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -7229,7 +7458,9 @@ static int wlan_hdd_cfg80211_set_beacon(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_BEACON,
pAdapter->sessionId, pHddStaCtx->conn_info.authType));
- hddLog(LOG1, FL("Device_mode = %d"), pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -7308,7 +7539,9 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy,
return -EOPNOTSUPP;
}
- hddLog(LOG1, FL("Device_mode = %d"), pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) {
@@ -7346,9 +7579,7 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy,
vos_flush_work(&pHddCtx->sap_start_work);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
FL("Canceled the pending restart work"));
- spin_lock(&pHddCtx->sap_update_info_lock);
- pHddCtx->is_sap_restart_required = false;
- spin_unlock(&pHddCtx->sap_update_info_lock);
+ hdd_change_sap_restart_required_status(pHddCtx, false);
}
hdd_hostapd_stop(dev);
@@ -7461,8 +7692,9 @@ static int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
return status;
}
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "%s: pAdapter = %p, device mode = %d",
- __func__, pAdapter, pAdapter->device_mode);
+ hddLog(LOG2, FL("pAdapter = %p, device mode %s(%d)"),
+ pAdapter, hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
if (vos_max_concurrent_connections_reached()) {
hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections"));
@@ -7533,7 +7765,9 @@ static int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CHANGE_BEACON,
pAdapter->sessionId, pAdapter->device_mode));
- hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d"), pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -7587,8 +7821,9 @@ static int __wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CHANGE_BSS,
pAdapter->sessionId, params->ap_isolate));
- hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d, ap_isolate = %d"),
- pAdapter->device_mode, params->ap_isolate);
+ hddLog(LOG1, FL("Device_mode %s(%d), ap_isolate = %d"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode, params->ap_isolate);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
ret = wlan_hdd_validate_context(pHddCtx);
@@ -7740,8 +7975,9 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
TRACE_CODE_HDD_CFG80211_CHANGE_IFACE,
pAdapter->sessionId, type));
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Device_mode = %d, IFTYPE = 0x%x"),
- pAdapter->device_mode, type);
+ hddLog(LOG1, FL("Device_mode %s(%d), IFTYPE = 0x%x"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode, type);
if (vos_max_concurrent_connections_reached()) {
hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections"));
@@ -8500,8 +8736,9 @@ static int __wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
return status;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__, pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
if (CSR_MAX_NUM_KEY <= key_index)
{
@@ -8845,7 +9082,9 @@ static int __wlan_hdd_cfg80211_get_key(
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_GET_KEY,
pAdapter->sessionId, params.cipher));
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Device_mode = %d"), pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
memset(&params, 0, sizeof(params));
@@ -8937,8 +9176,9 @@ static int wlan_hdd_cfg80211_del_key( struct wiphy *wiphy,
ENTER();
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "%s: device_mode = %d",
- __func__,pAdapter->device_mode);
+ hddLog(LOG2, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
if (CSR_MAX_NUM_KEY <= key_index)
{
@@ -9016,40 +9256,6 @@ static int wlan_hdd_cfg80211_del_key( struct wiphy *wiphy,
return status;
}
-#ifdef NL80211_KEY_LEN_PMK /* kernel supports key mgmt offload */
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-static int wlan_hdd_cfg80211_key_mgmt_set_pmk(struct wiphy *wiphy,
- struct net_device *ndev,
- const u8 *pmk, size_t pmk_len)
-{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(ndev);
- hdd_wext_state_t *pWextState;
- hdd_station_ctx_t *pHddStaCtx;
-
- ENTER();
- pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
-
- if (pmk) {
- tANI_U8 localPmk [SIR_ROAM_SCAN_PSK_SIZE];
- if ((pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
-#ifdef FEATURE_WLAN_ESE
- && (!pWextState->isESEConnection)
-#endif
- ) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: calling sme_RoamSetPSK_PMK \n", __func__);
- vos_mem_copy(localPmk, pmk, SIR_ROAM_SCAN_PSK_SIZE);
- sme_RoamSetPSK_PMK(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId, localPmk, pmk_len);
- return VOS_STATUS_SUCCESS;
- }
- }
- return VOS_STATUS_SUCCESS;
-}
-#endif
-#endif
-
/*
* FUNCTION: __wlan_hdd_cfg80211_set_default_key
* This function is used to set the default tx key index
@@ -9071,7 +9277,8 @@ static int __wlan_hdd_cfg80211_set_default_key( struct wiphy *wiphy,
TRACE_CODE_HDD_CFG80211_SET_DEFAULT_KEY,
pAdapter->sessionId, key_index));
- hddLog(LOG1, FL("Device_mode = %d key_index = %d"),
+ hddLog(LOG1, FL("Device_mode %s(%d) key_index = %d"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode, key_index);
if (CSR_MAX_NUM_KEY <= key_index) {
@@ -9888,9 +10095,9 @@ v_BOOL_t hdd_isConnectionInProgress( hdd_context_t *pHddCtx )
if( pAdapter )
{
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: Adapter with device mode %d exists",
- __func__, pAdapter->device_mode);
+ hddLog(LOG1, FL("Adapter with device mode %s(%d) exists"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
if (((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
(WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
(WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)) &&
@@ -9991,8 +10198,9 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
TRACE_CODE_HDD_CFG80211_SCAN,
pAdapter->sessionId, request->n_channels));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__, pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
status = wlan_hdd_validate_context(pHddCtx);
@@ -10393,12 +10601,13 @@ int wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
return ret;
}
-void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel)
+void hdd_select_cbmode(hdd_adapter_t *pAdapter, v_U8_t operationChannel)
{
v_U8_t iniDot11Mode =
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->dot11Mode;
+ v_U32_t vht_channel_width =
+ (WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->vhtChannelWidth;
eHddDot11Mode hddDot11Mode = iniDot11Mode;
-
hddLog(LOG1, FL("Channel Bonding Mode Selected is %u"),
iniDot11Mode);
switch ( iniDot11Mode )
@@ -10424,8 +10633,157 @@ void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel)
sme_SelectCBMode((WLAN_HDD_GET_CTX(pAdapter)->hHal),
hdd_cfg_xlate_to_csr_phy_mode(hddDot11Mode),
operationChannel,
- WLAN_HDD_GET_CTX(pAdapter)->cfg_ini->vhtChannelWidth);
+ &vht_channel_width);
+}
+
+/**
+ * wlan_hdd_sta_sap_concur_handle() - This function will handle Station and sap
+ * concurrency.
+ * @hdd_ctx: pointer to hdd context.
+ * @sta_adapter: pointer to station adapter.
+ * @roam_profile: pointer to station's roam profile.
+ *
+ * This function will find the AP to which station is likely to make the
+ * the connection, if that AP's channel happens to be different than
+ * SAP's channel then this function will stop the SAP.
+ *
+ * Return: true or false based on function's overall success.
+ */
+static bool wlan_hdd_sta_sap_concur_handle(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *sta_adapter,
+ tCsrRoamProfile *roam_profile)
+{
+ hdd_adapter_t *ap_adapter = hdd_get_adapter(hdd_ctx,
+ WLAN_HDD_SOFTAP);
+ bool are_cc_channels_same = false;
+ tScanResultHandle scan_cache = NULL;
+ VOS_STATUS status;
+
+ if ((ap_adapter != NULL) &&
+ test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags)) {
+ status =
+ wlan_hdd_check_custom_con_channel_rules(sta_adapter, ap_adapter,
+ roam_profile, &scan_cache,
+ &are_cc_channels_same);
+ sme_ScanResultPurge(WLAN_HDD_GET_HAL_CTX(sta_adapter),
+ scan_cache);
+ /*
+ * are_cc_channels_same will be false incase if SAP and STA
+ * channel is different or STA channel is zero.
+ * incase if STA channel is zero then lets stop the AP and
+ * restart flag set, so later whenever STA channel is defined
+ * we can restart our SAP in that channel.
+ */
+ if (false == are_cc_channels_same) {
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("Stop AP due to mismatch with STA channel"));
+ wlan_hdd_stop_sap(ap_adapter);
+ hdd_change_sap_restart_required_status(hdd_ctx, true);
+ return false;
+ } else {
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("sap channels are same"));
+ }
+ }
+ return true;
+}
+
+#ifdef FEATURE_WLAN_CH_AVOID
+/**
+ * wlan_hdd_sta_p2pgo_concur_handle() - This function will handle Station and GO
+ * concurrency.
+ * @hdd_ctx: pointer to hdd context.
+ * @sta_adapter: pointer to station adapter.
+ * @roam_profile: pointer to station's roam profile.
+ * @roam_id: reference to roam_id variable being passed.
+ *
+ * This function will find the AP to which station is likely to make the
+ * the connection, if that AP's channel happens to be different than our
+ * P2PGO's channel then this function will send avoid frequency event to
+ * framework to make P2PGO stop and also caches station's connect request.
+ *
+ * Return: true or false based on function's overall success.
+ */
+static bool wlan_hdd_sta_p2pgo_concur_handle(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *sta_adapter,
+ tCsrRoamProfile *roam_profile,
+ uint32_t *roam_id)
+{
+ hdd_adapter_t *p2pgo_adapter = hdd_get_adapter(hdd_ctx,
+ WLAN_HDD_P2P_GO);
+ bool are_cc_channels_same = false;
+ tScanResultHandle scan_cache = NULL;
+ uint32_t p2pgo_channel_num, freq;
+ tHddAvoidFreqList hdd_avoid_freq_list;
+ VOS_STATUS status;
+
+ if ((p2pgo_adapter != NULL) &&
+ test_bit(SOFTAP_BSS_STARTED, &p2pgo_adapter->event_flags)) {
+ status =
+ wlan_hdd_check_custom_con_channel_rules(sta_adapter, p2pgo_adapter,
+ roam_profile, &scan_cache,
+ &are_cc_channels_same);
+ /*
+ * are_cc_channels_same will be false incase if P2PGO and STA
+ * channel is different or STA channel is zero.
+ */
+ if (false == are_cc_channels_same) {
+ if (true == hdd_is_sta_connection_pending(hdd_ctx)) {
+ MTRACE(vos_trace(VOS_MODULE_ID_HDD,
+ TRACE_CODE_HDD_CLEAR_JOIN_REQ,
+ sta_adapter->sessionId, *roam_id));
+ sme_clear_joinreq_param(WLAN_HDD_GET_HAL_CTX(sta_adapter),
+ sta_adapter->sessionId);
+ hdd_change_sta_conn_pending_status(hdd_ctx, false);
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("===>Clear pending join req"));
+ }
+ MTRACE(vos_trace(VOS_MODULE_ID_HDD,
+ TRACE_CODE_HDD_STORE_JOIN_REQ,
+ sta_adapter->sessionId, *roam_id));
+ /* store the scan cache here */
+ sme_store_joinreq_param(WLAN_HDD_GET_HAL_CTX(sta_adapter),
+ roam_profile,
+ scan_cache,
+ roam_id,
+ sta_adapter->sessionId);
+ hdd_change_sta_conn_pending_status(hdd_ctx, true);
+ /*
+ * fill frequency avoidance event and send it up
+ * so, p2pgo stop event should get trigger from upper layer
+ */
+ p2pgo_channel_num =
+ WLAN_HDD_GET_AP_CTX_PTR(p2pgo_adapter)->sapConfig.channel;
+ if (p2pgo_channel_num <= ARRAY_SIZE(hdd_channels_2_4_GHZ)) {
+ freq = ieee80211_channel_to_frequency(p2pgo_channel_num,
+ IEEE80211_BAND_2GHZ);
+ } else {
+ freq = ieee80211_channel_to_frequency(p2pgo_channel_num,
+ IEEE80211_BAND_5GHZ);
+ }
+ vos_mem_zero(&hdd_avoid_freq_list,
+ sizeof(hdd_avoid_freq_list));
+ hdd_avoid_freq_list.avoidFreqRangeCount = 1;
+ hdd_avoid_freq_list.avoidFreqRange[0].startFreq = freq;
+ hdd_avoid_freq_list.avoidFreqRange[0].endFreq = freq;
+ wlan_hdd_send_avoid_freq_event(hdd_ctx,
+ &hdd_avoid_freq_list);
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("===>Sending chnl_avoid ch[%d] freq[%d]"),
+ p2pgo_channel_num, freq);
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("===>Stop GO due to mismatch with STA channel"));
+ return false;
+ } else {
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("===>p2pgo channels are same"));
+ sme_ScanResultPurge(WLAN_HDD_GET_HAL_CTX(sta_adapter),
+ scan_cache);
+ }
+ }
+ return true;
}
+#endif
/*
* FUNCTION: wlan_hdd_cfg80211_connect_start
@@ -10440,8 +10798,6 @@ int wlan_hdd_cfg80211_connect_start( hdd_adapter_t *pAdapter,
v_U32_t roamId;
tCsrRoamProfile *pRoamProfile;
eCsrAuthType RSNAuthType;
- hdd_adapter_t *ap_adapter = NULL;
- bool are_cc_channels_same = 0;
ENTER();
@@ -10574,6 +10930,7 @@ int wlan_hdd_cfg80211_connect_start( hdd_adapter_t *pAdapter,
pRoamProfile->ChannelInfo.ChannelList = NULL;
pRoamProfile->ChannelInfo.numOfChannels = 0;
}
+
if ( (WLAN_HDD_IBSS == pAdapter->device_mode) && operatingChannel)
{
/*
@@ -10623,39 +10980,33 @@ int wlan_hdd_cfg80211_connect_start( hdd_adapter_t *pAdapter,
pRoamProfile->pAddIEScan = &pAdapter->scan_info.scanAddIE.addIEdata[0];
pRoamProfile->nAddIEScanLength = pAdapter->scan_info.scanAddIE.length;
}
+ /*
+ * Custom concurrency rule1: As per this rule if station is trying to
+ * connect to some AP in 2.4Ghz and SAP is already in started state then
+ * SAP should restart in station's channel.
+ */
if (pHddCtx->cfg_ini->conc_custom_rule1 &&
(WLAN_HDD_INFRA_STATION == pAdapter->device_mode)) {
- ap_adapter = hdd_get_adapter(pHddCtx, WLAN_HDD_SOFTAP);
-
- if ((ap_adapter != NULL) &&
- test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags)) {
- status =
- wlan_hdd_check_con_channel_sap_and_sta(pAdapter, ap_adapter,
- pRoamProfile,
- &are_cc_channels_same);
- /*
- * are_cc_channels_same will be false incase if SAP and STA
- * channel is different or STA channel is zero.
- * incase if STA channel is zero then lets stop the AP and
- * restart flag set, so later whenever STA channel is defined
- * we can restart our SAP in that channel.
- */
- if (FALSE == are_cc_channels_same) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- FL("Stop AP due to mismatch with STA channel"));
- wlan_hdd_stop_sap(ap_adapter);
- spin_lock(&pHddCtx->sap_update_info_lock);
- pHddCtx->is_sap_restart_required = true;
- spin_unlock(&pHddCtx->sap_update_info_lock);
- } else {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- FL("channels are same"));
- }
- } else {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_LOW,
- FL("extracted ap adapter is null"));
+
+ wlan_hdd_sta_sap_concur_handle (pHddCtx, pAdapter, pRoamProfile);
+ }
+#ifdef FEATURE_WLAN_CH_AVOID
+ /*
+ * Custom concurrency rule2: As per this rule if station is trying to
+ * connect to some AP in 5Ghz and P2PGO is already in started state then
+ * P2PGO should restart in station's channel.
+ */
+ if (pHddCtx->cfg_ini->conc_custom_rule2 &&
+ (WLAN_HDD_INFRA_STATION == pAdapter->device_mode)) {
+ if (false ==
+ wlan_hdd_sta_p2pgo_concur_handle(pHddCtx, pAdapter,
+ pRoamProfile, &roamId)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("P2PGO - STA chnl diff, cached join req"));
+ return 0;
}
}
+#endif
status = sme_RoamConnect( WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId, pRoamProfile, &roamId);
@@ -11392,8 +11743,9 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CONNECT,
pAdapter->sessionId, pAdapter->device_mode));
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: device_mode = %d",__func__,pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION &&
pAdapter->device_mode != WLAN_HDD_P2P_CLIENT) {
@@ -11418,41 +11770,6 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
hdd_stop_auto_suspend_attempt(pHddCtx);
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- /* Supplicant indicate its decision to offload key management
- * by setting the third bit in flags in case of Secure connection
- * so if the supplicant does not support this then LFR3.0 shall
- * be disabled.if supplicant indicates support for offload
- * of key management then we shall enable LFR3.0.Note that
- * supplicant set the bit in flags means driver already indicated
- * its capability to handle the key management and LFR3.0 is
- * enabled in INI and FW also has the capability to handle
- * key management offload as part of LFR3.0
- */
-
-#ifdef NL80211_KEY_LEN_PMK /* if kernel supports key mgmt offload */
- VOS_TRACE( VOS_MODULE_ID_HDD,
- VOS_TRACE_LEVEL_ERROR,
- "%s: LFR3:Supplicant association request flags %x",
- __func__, req->flags);
- if (!(req->flags & ASSOC_REQ_OFFLOAD_KEY_MGMT)) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Supplicant does not support key mgmt offload for this AP"));
- sme_UpdateRoamKeyMgmtOffloadEnabled(pHddCtx->hHal,
- pAdapter->sessionId,
- FALSE);
- } else {
- sme_UpdateRoamKeyMgmtOffloadEnabled(pHddCtx->hHal,
- pAdapter->sessionId,
- TRUE);
- }
-#else
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Kernel does not support key mgmt offload"));
- sme_UpdateRoamKeyMgmtOffloadEnabled(pHddCtx->hHal, pAdapter->sessionId, FALSE);
-#endif /* #ifdef NL80211_KEY_LEN_PMK */
-
-#endif
if (vos_max_concurrent_connections_reached()) {
hddLog(VOS_TRACE_LEVEL_ERROR, FL("Reached max concurrent connections"));
return -ECONNREFUSED;
@@ -11514,30 +11831,6 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
hddLog(VOS_TRACE_LEVEL_ERROR, FL("connect failed"));
return status;
}
-#ifdef NL80211_KEY_LEN_PMK /* kernel supports key mgmt offload */
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- if ((eHAL_STATUS_SUCCESS == status) && (req->psk)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: psk = %p", __func__, req->psk);
- /* since PMK is available only in cfg80211_connect(), we save it
- * even before we know connection succeeded or not */
- if (pHddCtx->cfg_ini->isRoamOffloadEnabled) {
- hdd_wext_state_t *pWextState =
- WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- tANI_U8 localPsk [SIR_ROAM_SCAN_PSK_SIZE];
- if ((pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_PSK)
-#ifdef FEATURE_WLAN_ESE
- && (!pWextState->isESEConnection)
-#endif
- ) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("calling sme_RoamSetPSK"));
- vos_mem_copy(localPsk, req->psk, SIR_ROAM_SCAN_PSK_SIZE);
- sme_RoamSetPSK_PMK(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId, localPsk, SIR_ROAM_SCAN_PSK_SIZE);
- }
- }
- }
-#endif
-#endif
pHddCtx->isAmpAllowed = VOS_FALSE;
EXIT();
return status;
@@ -11642,8 +11935,9 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_DISCONNECT,
pAdapter->sessionId, reason));
- hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode (%d) reason code(%d)"),
- pAdapter->device_mode, reason);
+ hddLog(LOG1, FL("Device_mode %s(%d) reason code(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode, reason);
status = wlan_hdd_validate_context(pHddCtx);
@@ -11857,8 +12151,9 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_JOIN_IBSS,
pAdapter->sessionId, pAdapter->device_mode));
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: device_mode = %d",__func__,pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
status = wlan_hdd_validate_context(pHddCtx);
@@ -12065,7 +12360,9 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
return status;
}
- hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d"), pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
if (NULL == pWextState) {
hddLog(VOS_TRACE_LEVEL_ERROR, FL("Data Storage Corruption"));
return -EIO;
@@ -14765,8 +15062,7 @@ static int wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"acl policy: = %d"
"no acl entries = %d", params->acl_policy, params->n_acl_entries);
- if (WLAN_HDD_SOFTAP == pAdapter->device_mode)
- {
+ if (WLAN_HDD_SOFTAP == pAdapter->device_mode) {
pConfig = &pAdapter->sessionCtx.ap.sapConfig;
/* default value */
@@ -14836,12 +15132,10 @@ static int wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
"%s: SAP Set Mac Acl fail", __func__);
return -EINVAL;
}
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid device_mode = %d",
- __func__, pAdapter->device_mode);
+ } else {
+ hddLog(LOGE, FL("Invalid device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
return -EINVAL;
}
@@ -16646,9 +16940,4 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops =
.set_ap_chanwidth = wlan_hdd_cfg80211_set_ap_channel_width,
#endif
.dump_survey = wlan_hdd_cfg80211_dump_survey,
-#ifdef NL80211_KEY_LEN_PMK /* kernel supports key mgmt offload */
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- .key_mgmt_set_pmk = wlan_hdd_cfg80211_key_mgmt_set_pmk,
-#endif
-#endif
};
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index 3bd80a90479b..f89191f623e1 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -777,6 +777,46 @@ end:
}
#endif /* SAP_AUTH_OFFLOAD */
+/**
+ * hdd_issue_stored_joinreq() - This function will trigger stations's
+ * cached connect request to proceed.
+ * @hdd_ctx: pointer to hdd context.
+ * @sta_adapter: pointer to station adapter.
+ *
+ * This function will call SME to release station's stored/cached connect
+ * request to proceed.
+ *
+ * Return: none.
+ */
+static void hdd_issue_stored_joinreq(hdd_adapter_t *sta_adapter,
+ hdd_context_t *hdd_ctx)
+{
+ tHalHandle hal_handle;
+ uint32_t roam_id;
+
+ if (NULL == sta_adapter) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Invalid station adapter, ignore issueing join req"));
+ return;
+ }
+ hal_handle = WLAN_HDD_GET_HAL_CTX(sta_adapter);
+
+ if (true == hdd_is_sta_connection_pending(hdd_ctx)) {
+ MTRACE(vos_trace(VOS_MODULE_ID_HDD,
+ TRACE_CODE_HDD_ISSUE_JOIN_REQ,
+ sta_adapter->sessionId, roam_id));
+ if (VOS_STATUS_SUCCESS !=
+ sme_issue_stored_joinreq(hal_handle,
+ &roam_id,
+ sta_adapter->sessionId)) {
+ /* change back to NotAssociated */
+ hdd_connSetConnectionState(sta_adapter,
+ eConnectionState_NotConnected);
+ }
+ hdd_change_sta_conn_pending_status(hdd_ctx, false);
+ }
+}
+
VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCallback)
{
hdd_adapter_t *pHostapdAdapter;
@@ -1090,6 +1130,15 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
pHddApCtx->dfs_cac_block_tx = TRUE;
pHddCtx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE;
}
+ if (pHddCtx->cfg_ini->conc_custom_rule2 &&
+ (WLAN_HDD_P2P_GO == pHostapdAdapter->device_mode)) {
+
+ hdd_adapter_t *sta_adapter = hdd_get_adapter(pHddCtx,
+ WLAN_HDD_INFRA_STATION);
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("P2PGO is going down now"));
+ hdd_issue_stored_joinreq(sta_adapter, pHddCtx);
+ }
goto stopbss;
case eSAP_DFS_CAC_START:
diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c
index 1fa668901e4e..07abf2d02ffe 100644
--- a/CORE/HDD/src/wlan_hdd_ipa.c
+++ b/CORE/HDD/src/wlan_hdd_ipa.c
@@ -2813,9 +2813,11 @@ int hdd_ipa_send_mcc_scc_msg(hdd_context_t *hdd_ctx, bool mcc_mode)
pAdapter = adapter_node->pAdapter;
if (pAdapter->device_mode == WLAN_HDD_INFRA_STATION ||
pAdapter->device_mode == WLAN_HDD_SOFTAP) {
- hddLog(VOS_TRACE_LEVEL_INFO,
- "MCC->SCC: Flush TxRx queue(d_mode=%d)",
- pAdapter->device_mode);
+ hddLog(LOG1,
+ "MCC->SCC: Flush TxRx queue(d_mode %s(%d))",
+ hdd_device_mode_to_string(
+ pAdapter->device_mode),
+ pAdapter->device_mode);
hdd_deinit_tx_rx(pAdapter);
}
status = hdd_get_next_adapter(
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 8573ce6b46a2..f6825a9773d6 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -388,7 +388,9 @@ static int hdd_is_auto_suspend_allowed(hdd_context_t *hdd_ctx)
case WLAN_HDD_P2P_CLIENT:
case WLAN_HDD_IBSS:
default:
- hddLog(LOG1, FL("Auto suspend denied %d"), adapter->device_mode);
+ hddLog(LOG1, FL("Auto suspend denied device_mode %s(%d)"),
+ hdd_device_mode_to_string(adapter->device_mode),
+ adapter->device_mode);
perm = HDD_AUTO_SUSPEND_DENIED;
break;
}
@@ -666,6 +668,31 @@ static inline void hdd_deinit_auto_suspend_timer(hdd_context_t *hdd_ctx) {}
can extract it from driver debug symbol and crashdump for post processing */
tANI_U8 g_wlan_driver_version[ ] = QWLAN_VERSIONSTR;
+/**
+ * hdd_device_mode_to_string() - return string conversion of device mode
+ * @device_mode: device mode
+ *
+ * This utility function helps log string conversion of device mode.
+ *
+ * Return: string conversion of device mode, if match found;
+ * "Unknown" otherwise.
+ */
+const char* hdd_device_mode_to_string(uint8_t device_mode)
+{
+ switch (device_mode) {
+ CASE_RETURN_STRING(WLAN_HDD_INFRA_STATION);
+ CASE_RETURN_STRING(WLAN_HDD_SOFTAP);
+ CASE_RETURN_STRING(WLAN_HDD_P2P_CLIENT);
+ CASE_RETURN_STRING(WLAN_HDD_P2P_GO);
+ CASE_RETURN_STRING(WLAN_HDD_MONITOR);
+ CASE_RETURN_STRING(WLAN_HDD_FTM);
+ CASE_RETURN_STRING(WLAN_HDD_IBSS);
+ CASE_RETURN_STRING(WLAN_HDD_P2P_DEVICE);
+ CASE_RETURN_STRING(WLAN_HDD_OCB);
+ default:
+ return "Unknown";
+ }
+}
#ifdef FEATURE_GREEN_AP
@@ -4292,29 +4319,28 @@ int wlan_hdd_set_mc_rate(hdd_adapter_t *pAdapter, int targetRate)
hdd_config_t *pConfig = NULL;
if (pHddCtx == NULL) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is null", __func__);
+ hddLog(LOGE, FL("HDD context is null"));
return -EINVAL;
}
+
if ((WLAN_HDD_IBSS != pAdapter->device_mode) &&
(WLAN_HDD_SOFTAP != pAdapter->device_mode) &&
- (WLAN_HDD_INFRA_STATION != pAdapter->device_mode))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Received SETMCRATE command in invalid mode %d"
- "SETMCRATE command is only allowed in STA, IBSS or SOFTAP mode",
- __func__, pAdapter->device_mode);
+ (WLAN_HDD_INFRA_STATION != pAdapter->device_mode)) {
+ hddLog(LOGE, FL("Received SETMCRATE cmd in invalid device mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
+ hddLog(LOGE,
+ FL("SETMCRATE cmd is allowed only in STA, IBSS or SOFTAP mode"));
return -EINVAL;
}
+
pConfig = pHddCtx->cfg_ini;
- rateUpdate = (tSirRateUpdateInd *)vos_mem_malloc(sizeof(tSirRateUpdateInd));
- if (NULL == rateUpdate)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: SETMCRATE indication alloc fail", __func__);
- return -EFAULT;
+ rateUpdate = vos_mem_malloc(sizeof(tSirRateUpdateInd));
+ if (NULL == rateUpdate) {
+ hddLog(LOGE, FL("SETMCRATE indication alloc fail"));
+ return -ENOMEM;
}
- vos_mem_zero(rateUpdate, sizeof(tSirRateUpdateInd ));
+ vos_mem_zero(rateUpdate, sizeof(tSirRateUpdateInd));
rateUpdate->nss = (pConfig->enable2x2 == 0) ? 0 : 1;
rateUpdate->dev_mode = pAdapter->device_mode;
rateUpdate->mcastDataRate24GHz = targetRate;
@@ -4323,14 +4349,14 @@ int wlan_hdd_set_mc_rate(hdd_adapter_t *pAdapter, int targetRate)
rateUpdate->bcastDataRate = -1;
memcpy(rateUpdate->bssid, pAdapter->macAddressCurrent.bytes,
sizeof(rateUpdate->bssid));
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: MC Target rate %d, mac = %pM, dev_mode = %d",
- __func__, rateUpdate->mcastDataRate24GHz, rateUpdate->bssid,
+ hddLog(LOG1, FL("MC Target rate %d, mac = %pM, dev_mode %s(%d)"),
+ rateUpdate->mcastDataRate24GHz, rateUpdate->bssid,
+ hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode);
+
status = sme_SendRateUpdateInd(pHddCtx->hHal, rateUpdate);
if (eHAL_STATUS_SUCCESS != status) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: SETMCRATE failed", __func__);
+ hddLog(LOGE, FL("SETMCRATE failed"));
vos_mem_free(rateUpdate);
return -EFAULT;
}
@@ -10017,9 +10043,7 @@ VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
vos_flush_work(&pHddCtx->sap_start_work);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
FL("Canceled the pending SAP restart work"));
- spin_lock(&pHddCtx->sap_update_info_lock);
- pHddCtx->is_sap_restart_required = false;
- spin_unlock(&pHddCtx->sap_update_info_lock);
+ hdd_change_sap_restart_required_status(pHddCtx, false);
}
//Any softap specific cleanup here...
if (pAdapter->device_mode == WLAN_HDD_P2P_GO) {
@@ -10491,7 +10515,8 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx)
/* Temporary set log level as error
* TX Flow control feature settled down, will lower log level */
hddLog(VOS_TRACE_LEVEL_ERROR,
- "MODE %d, CH %d, LWM %d, HWM %d, TXQDEP %d",
+ "MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode,
targetChannel,
pAdapter->tx_flow_low_watermark,
@@ -10515,8 +10540,9 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx)
WLANTL_SetAdapterMaxQDepth(pHddCtx->pvosContext,
pAdapter->sessionId,
pHddCtx->cfg_ini->TxHbwFlowMaxQueueDepth);
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "SCC: MODE %d, CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hddLog(LOGE,
+ "SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode,
targetChannel,
pAdapter->tx_flow_low_watermark,
@@ -10540,7 +10566,8 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx)
/* Temporary set log level as error
* TX Flow control feature settled down, will lower log level */
hddLog(VOS_TRACE_LEVEL_ERROR,
- "SCC: MODE %d, CH %d, LWM %d, HWM %d, TXQDEP %d",
+ "SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hdd_device_mode_to_string(preAdapterContext->device_mode),
preAdapterContext->device_mode,
targetChannel,
preAdapterContext->tx_flow_low_watermark,
@@ -10583,8 +10610,9 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx)
pHddCtx->cfg_ini->TxHbwFlowMaxQueueDepth);
/* Temporary set log level as error
* TX Flow control feature settled down, will lower log level */
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "MCC: MODE %d, CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hddLog(LOGE,
+ "MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hdd_device_mode_to_string(pAdapter5->device_mode),
pAdapter5->device_mode,
channel5,
pAdapter5->tx_flow_low_watermark,
@@ -10607,8 +10635,9 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx)
pHddCtx->cfg_ini->TxLbwFlowMaxQueueDepth);
/* Temporary set log level as error
* TX Flow control feature settled down, will lower log level */
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "MCC: MODE %d, CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hddLog(LOGE,
+ "MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+ hdd_device_mode_to_string(pAdapter2_4->device_mode),
pAdapter2_4->device_mode,
channel24,
pAdapter2_4->tx_flow_low_watermark,
@@ -12053,8 +12082,10 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
tSmeThermalParams thermalParam;
tSirTxPowerLimit *hddtxlimit;
#ifdef FEATURE_WLAN_CH_AVOID
+#ifdef CONFIG_CNSS
int unsafeChannelIndex;
#endif
+#endif
tANI_U8 rtnl_lock_enable;
tANI_U8 reg_netdev_notifier_done = FALSE;
hdd_adapter_t *dot11_adapter = NULL;
@@ -12387,6 +12418,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
}
#ifdef FEATURE_WLAN_CH_AVOID
+#ifdef CONFIG_CNSS
cnss_get_wlan_unsafe_channel(pHddCtx->unsafe_channel_list,
&(pHddCtx->unsafe_channel_count),
sizeof(v_U16_t) * NUM_20MHZ_RF_CHANNELS);
@@ -12402,10 +12434,10 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
__func__, pHddCtx->unsafe_channel_list[unsafeChannelIndex]);
}
-
/* Plug in avoid channel notification callback */
sme_AddChAvoidCallback(pHddCtx->hHal,
hdd_ch_avoid_cb);
+#endif
#endif /* FEATURE_WLAN_CH_AVOID */
status = hdd_post_voss_start_config( pHddCtx );
@@ -13705,13 +13737,13 @@ static VOS_STATUS wlan_hdd_framework_restart(hdd_context_t *pHddCtx)
status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
do
{
- if( (status == VOS_STATUS_SUCCESS) &&
+ if ((status == VOS_STATUS_SUCCESS) &&
pAdapterNode &&
- pAdapterNode->pAdapter)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "restarting the driver(intf:\'%s\' mode:%d :try %d)",
+ pAdapterNode->pAdapter) {
+ hddLog(LOGP,
+ "restarting the driver(intf:\'%s\' mode:%s(%d) :try %d)",
pAdapterNode->pAdapter->dev->name,
+ hdd_device_mode_to_string(pAdapterNode->pAdapter->device_mode),
pAdapterNode->pAdapter->device_mode,
pHddCtx->hdd_restart_retries + 1);
/*
@@ -14567,6 +14599,7 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
tHalHandle hHal;
hdd_ap_ctx_t *pHddApCtx;
v_U16_t intf_ch = 0;
+ v_U32_t vht_channel_width = 0;
if ((pHddCtx->cfg_ini->WlanMccToSccSwitchMode == VOS_MCC_TO_SCC_SWITCH_DISABLE)
|| !(vos_concurrent_open_sessions_running()
@@ -14588,8 +14621,10 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
#ifdef WLAN_FEATURE_MBSSID
intf_ch = WLANSAP_CheckCCIntf(pHddApCtx->sapContext);
+ vht_channel_width = wlan_sap_get_vht_ch_width(pHddApCtx->sapContext);
#else
intf_ch = WLANSAP_CheckCCIntf(pHddCtx->pvosContext);
+ vht_channel_width = wlan_sap_get_vht_ch_width(pHddApCtx->pvosContext);
#endif
if (intf_ch == 0)
return;
@@ -14598,14 +14633,19 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
sme_SelectCBMode(hHal,
pHddApCtx->sapConfig.SapHw_mode,
pHddApCtx->sapConfig.channel,
- pHddCtx->cfg_ini->vhtChannelWidth);
+ &vht_channel_width);
+#ifdef WLAN_FEATURE_MBSSID
+ wlan_sap_set_vht_ch_width(pHddApCtx->sapContext, vht_channel_width);
+#else
+ wlan_sap_set_vht_ch_width(pHddApCtx->pvosContext, vht_channel_width);
+#endif
wlan_hdd_restart_sap(ap_adapter);
}
#endif
/**
- * wlan_hdd_check_con_channel_sap_and_sta() - This function checks the sap's
- * and sta's operating channel.
+ * wlan_hdd_check_custom_con_channel_rules() - This function checks the sap's
+ * and sta's operating channel.
* @sta_adapter: Describe the first argument to foobar.
* @ap_adapter: Describe the second argument to foobar.
* @roam_profile: Roam profile of AP to which STA wants to connect.
@@ -14619,31 +14659,39 @@ void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *data)
*
* Return: VOS_STATUS_SUCCESS or VOS_STATUS_E_FAILURE.
*/
-VOS_STATUS wlan_hdd_check_con_channel_sap_and_sta(hdd_adapter_t *sta_adapter,
+VOS_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
hdd_adapter_t *ap_adapter,
tCsrRoamProfile *roam_profile,
+ tScanResultHandle *scan_cache,
bool *concurrent_chnl_same)
{
hdd_ap_ctx_t *hdd_ap_ctx;
uint8_t channel_id;
VOS_STATUS status;
+ device_mode_t device_mode = ap_adapter->device_mode;
+ *concurrent_chnl_same = true;
hdd_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(ap_adapter);
status =
sme_get_ap_channel_from_scan_cache(WLAN_HDD_GET_HAL_CTX(sta_adapter),
roam_profile,
+ scan_cache,
&channel_id);
if ((VOS_STATUS_SUCCESS == status)) {
- if (channel_id < SIR_11A_CHANNEL_BEGIN) {
- if (hdd_ap_ctx->sapConfig.channel != channel_id) {
- *concurrent_chnl_same = FALSE;
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_MED,
- FL("channels are different"));
- }
- } else {
- *concurrent_chnl_same = TRUE;
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_MED,
- FL("selected ap's channel in 5Ghz"));
+ if ((WLAN_HDD_SOFTAP == device_mode) &&
+ (channel_id < SIR_11A_CHANNEL_BEGIN)) {
+ if (hdd_ap_ctx->sapConfig.channel != channel_id) {
+ *concurrent_chnl_same = false;
+ hddLog(VOS_TRACE_LEVEL_INFO_MED,
+ FL("channels are different"));
+ }
+ } else if ((WLAN_HDD_P2P_GO == device_mode) &&
+ (channel_id >= SIR_11A_CHANNEL_BEGIN)) {
+ if (hdd_ap_ctx->sapConfig.channel != channel_id) {
+ *concurrent_chnl_same = false;
+ hddLog(VOS_TRACE_LEVEL_INFO_MED,
+ FL("channels are different"));
+ }
}
} else {
/*
@@ -14652,8 +14700,8 @@ VOS_STATUS wlan_hdd_check_con_channel_sap_and_sta(hdd_adapter_t *sta_adapter,
* SAP's channel and STA's channel. Return the status as failure so
* caller function could know that scan look up is failed.
*/
- *concurrent_chnl_same = FALSE;
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ *concurrent_chnl_same = false;
+ hddLog(VOS_TRACE_LEVEL_ERROR,
FL("Finding AP from scan cache failed"));
return VOS_STATUS_E_FAILURE;
}
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 8ed75afc3d75..f0fa7fb393fe 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -681,8 +681,9 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
hdd_roc_req_t* phdd_roc_req;
VOS_STATUS status;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__, pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
hddLog( LOG1,
@@ -1113,20 +1114,14 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel( struct wiphy *wiphy,
* The remain on channel callback will make sure the remain_on_chan
* expired event is sent.
*/
- if ( ( WLAN_HDD_INFRA_STATION == pAdapter->device_mode ) ||
- ( WLAN_HDD_P2P_CLIENT == pAdapter->device_mode ) ||
- ( WLAN_HDD_P2P_DEVICE == pAdapter->device_mode )
- )
- {
-
+ if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
+ (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
+ (WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)) {
tANI_U8 sessionId = pAdapter->sessionId;
sme_CancelRemainOnChannel( WLAN_HDD_GET_HAL_CTX( pAdapter ),
sessionId );
- }
- else if ( (WLAN_HDD_SOFTAP== pAdapter->device_mode) ||
- (WLAN_HDD_P2P_GO == pAdapter->device_mode)
- )
- {
+ } else if ((WLAN_HDD_SOFTAP== pAdapter->device_mode) ||
+ (WLAN_HDD_P2P_GO == pAdapter->device_mode)) {
WLANSAP_CancelRemainOnChannel(
#ifdef WLAN_FEATURE_MBSSID
WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
@@ -1134,11 +1129,10 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel( struct wiphy *wiphy,
(WLAN_HDD_GET_CTX(pAdapter))->pvosContext);
#endif
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Invalid device_mode = %d",
- __func__, pAdapter->device_mode);
+ } else {
+ hddLog(LOGE, FL("Invalid device_mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
return -EIO;
}
rc = wait_for_completion_timeout(&pAdapter->cancel_rem_on_chan_var,
@@ -1230,8 +1224,9 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
return status;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d type: %d",
- __func__, pAdapter->device_mode, type);
+ hddLog(LOG1, FL("Device_mode %s(%d) type: %d"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode, type);
#ifdef WLAN_FEATURE_P2P_DEBUG
if ((type == SIR_MAC_MGMT_FRAME) &&
@@ -2185,8 +2180,9 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev)
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_DEL_VIRTUAL_INTF,
pAdapter->sessionId, pAdapter->device_mode));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__,pVirtAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode %s(%d)"),
+ hdd_device_mode_to_string(pVirtAdapter->device_mode),
+ pVirtAdapter->device_mode);
status = wlan_hdd_validate_context(pHddCtx);
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 657d0879f119..ad5970047f22 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -793,14 +793,13 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
}
pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
- if (NULL == pHddTdlsCtx)
- {
+ if (NULL == pHddTdlsCtx) {
/* TDLS context can be null and might have been freed up during
* cleanup for STA adapter
*/
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- FL("pHddTdlsCtx is NULL, adapter device mode: %d"),
- pAdapter->device_mode);
+ hddLog(LOG2, FL("pHddTdlsCtx is NULL, adapter device mode %s(%d)"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
return;
}
diff --git a/CORE/HDD/src/wlan_hdd_trace.c b/CORE/HDD/src/wlan_hdd_trace.c
index f7d683e6522a..f4a25b49b50e 100644
--- a/CORE/HDD/src/wlan_hdd_trace.c
+++ b/CORE/HDD/src/wlan_hdd_trace.c
@@ -99,6 +99,10 @@ static tANI_U8 *hddTraceGetEventString(tANI_U32 code)
(TRACE_CODE_HDD_SETROAMSCANCHANNELMINTIME_IOCTL);
CASE_RETURN_STRING
(TRACE_CODE_HDD_GETROAMSCANCHANNELMINTIME_IOCTL);
+ CASE_RETURN_STRING(TRACE_CODE_HDD_STORE_JOIN_REQ);
+ CASE_RETURN_STRING(TRACE_CODE_HDD_CLEAR_JOIN_REQ);
+ CASE_RETURN_STRING(TRACE_CODE_HDD_ISSUE_JOIN_REQ);
+
default:
return ("UNKNOWN");
break;
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 851b4e083692..be434a43f056 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -4908,13 +4908,6 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
#ifdef WLAN_FEATURE_11AC
smeconfig.csrConfig.nVhtChannelWidth = vhtchanwidth;
- if (0 != ccmCfgSetInt(phddctx->hHal,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- vhtchanwidth, NULL, eANI_BOOLEAN_FALSE)) {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: could not set VHT SUPPORTED CHAN WIDTH",
- __func__);
- }
#endif
sme_UpdateConfig(hal, &smeconfig);
phddctx->cfg_ini->dot11Mode = hdd_dot11mode;
@@ -7815,21 +7808,18 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
if(( sub_cmd == WE_MCC_CONFIG_CREDENTIAL ) ||
(sub_cmd == WE_MCC_CONFIG_PARAMS ))
{
- if(( pAdapter->device_mode == WLAN_HDD_INFRA_STATION )||
- ( pAdapter->device_mode == WLAN_HDD_P2P_CLIENT ))
- {
+ if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) {
pStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
staId = pStaCtx->conn_info.staId[0];
- }
- else if (( pAdapter->device_mode == WLAN_HDD_P2P_GO ) ||
- ( pAdapter->device_mode == WLAN_HDD_SOFTAP ))
- {
+ } else if ((pAdapter->device_mode == WLAN_HDD_P2P_GO) ||
+ (pAdapter->device_mode == WLAN_HDD_SOFTAP)) {
pAPCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
staId = pAPCtx->uBCStaId;
- }
- else
- {
- hddLog(LOGE, "%s: Device mode %d not recognised", __FUNCTION__, pAdapter->device_mode);
+ } else {
+ hddLog(LOGE, FL("Device mode %s(%d) not recognised"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode);
return 0;
}
}
@@ -9655,13 +9645,14 @@ int hdd_setBand(struct net_device *dev, u8 ui_band)
long lrc;
/* STA already connected on current band, So issue disconnect
- * first, then change the band*/
+ * first, then change the band */
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s STA (Device mode=%d) connected in band %u, Changing band to %u, Issuing Disconnect"
- "Set HDD connState to eConnectionState_NotConnected",
- __func__, pAdapter->device_mode,
- currBand, band);
+ hddLog(LOG1,
+ FL("STA Device mode %s(%d) connected band %u, Changing band to %u, Issuing Disconnect"),
+ hdd_device_mode_to_string(pAdapter->device_mode),
+ pAdapter->device_mode, currBand, band);
+ hddLog(LOG1,
+ FL("Set HDD connState to eConnectionState_NotConnected"));
pHddStaCtx->conn_info.connState = eConnectionState_NotConnected;
INIT_COMPLETION(pAdapter->disconnect_comp_var);
@@ -11074,6 +11065,10 @@ static const struct iw_priv_args we_private_args[] = {
{ WE_SET_SMPS_PARAM,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
0, "set_smps_param" },
+ { WLAN_SET_DOT11P_CHANNEL_SCHED,
+ IW_PRIV_TYPE_BYTE
+ | sizeof(struct dot11p_channel_sched),
+ 0, "set_dot11p" },
#ifdef DEBUG
{ WE_SET_FW_CRASH_INJECT,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index f771025acbfa..78c45d52a5ec 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 10
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 005
+#define QWLAN_VERSION_BUILD 006
-#define QWLAN_VERSIONSTR "4.0.10.005"
+#define QWLAN_VERSIONSTR "4.0.10.006"
#define AR6320_REV1_VERSION 0x5000000
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 7ccbc50bc85a..2134f81af470 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -627,6 +627,7 @@ typedef struct sSirSmeStartBssReq
tSirMacSSid ssId;
tANI_U8 channelId;
ePhyChanBondState cbMode;
+ tANI_U8 vht_channel_width;
tANI_U8 privacy;
tANI_U8 apUapsdEnable;
@@ -1095,8 +1096,9 @@ typedef struct sSirSmeJoinRsp
tANI_U16 length;
tANI_U8 sessionId; // Session ID
tANI_U16 transactionId; // Transaction ID for cmd
- tSirResultCodes statusCode;
- tAniAuthType authType;
+ tSirResultCodes statusCode;
+ tAniAuthType authType;
+ tANI_U32 vht_channel_width;
tANI_U16 protStatusCode; //It holds reasonCode when join fails due to deauth/disassoc frame.
//Otherwise it holds status code.
tANI_U16 aid;
@@ -4582,6 +4584,7 @@ typedef struct sSirChanChangeRequest
tANI_U16 messageLen;
tANI_U8 targetChannel;
tANI_U8 cbMode;
+ tANI_U8 vht_channel_width;
tANI_U8 bssid[VOS_MAC_ADDR_SIZE];
}tSirChanChangeRequest, *tpSirChanChangeRequest;
diff --git a/CORE/MAC/inc/sirMacPropExts.h b/CORE/MAC/inc/sirMacPropExts.h
index 05bfb429a8f1..4f86a1714c47 100644
--- a/CORE/MAC/inc/sirMacPropExts.h
+++ b/CORE/MAC/inc/sirMacPropExts.h
@@ -65,6 +65,12 @@
#define IS_DOT11_MODE_11B(dot11Mode) \
((dot11Mode == WNI_CFG_DOT11_MODE_11B) ? TRUE : FALSE)
+#define WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ 0
+#define WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ 1
+#define WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ 2
+#define WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ 3
+
+
/// Proprietary IE definition
typedef struct sSirMacPropIE
{
diff --git a/CORE/MAC/inc/wniCfgAp.h b/CORE/MAC/inc/wniCfgAp.h
index d0b19fa522f2..2a12bd8a6c8a 100644
--- a/CORE/MAC/inc/wniCfgAp.h
+++ b/CORE/MAC/inc/wniCfgAp.h
@@ -221,131 +221,130 @@
#define WNI_CFG_VHT_TX_MCS_MAP 174
#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE 175
#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE 176
-#define WNI_CFG_VHT_CHANNEL_WIDTH 177
-#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1 178
-#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2 179
-#define WNI_CFG_VHT_BASIC_MCS_SET 180
-#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT 181
-#define WNI_CFG_VHT_SS_UNDER_UTIL 182
-#define WNI_CFG_VHT_40MHZ_UTILIZATION 183
-#define WNI_CFG_VHT_80MHZ_UTILIZATION 184
-#define WNI_CFG_VHT_160MHZ_UTILIZATION 185
-#define WNI_CFG_MAX_AMSDU_LENGTH 186
-#define WNI_CFG_MPDU_DENSITY 187
-#define WNI_CFG_NUM_BUFF_ADVERT 188
-#define WNI_CFG_MAX_RX_AMPDU_FACTOR 189
-#define WNI_CFG_SHORT_GI_20MHZ 190
-#define WNI_CFG_SHORT_GI_40MHZ 191
-#define WNI_CFG_RIFS_ENABLED 192
-#define WNI_CFG_MAX_PS_POLL 193
-#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE 194
-#define WNI_CFG_RSSI_FILTER_PERIOD 195
-#define WNI_CFG_MIN_RSSI_THRESHOLD 196
-#define WNI_CFG_NTH_BEACON_FILTER 197
-#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE 198
-#define WNI_CFG_SCAN_IN_POWERSAVE 199
-#define WNI_CFG_IGNORE_DTIM 200
-#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE 201
-#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE 202
-#define WNI_CFG_WOWLAN_DEAUTH_ENABLE 203
-#define WNI_CFG_WOWLAN_DISASSOC_ENABLE 204
-#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON 205
-#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD 206
-#define WNI_CFG_BA_TIMEOUT 207
-#define WNI_CFG_BA_THRESHOLD_HIGH 208
-#define WNI_CFG_MAX_BA_BUFFERS 209
-#define WNI_CFG_MAX_BA_SESSIONS 210
-#define WNI_CFG_BA_AUTO_SETUP 211
-#define WNI_CFG_ADDBA_REQ_DECLINE 212
-#define WNI_CFG_DEL_ALL_RX_BA_SESSIONS_2_4_G_BTC 213
-#define WNI_CFG_BG_SCAN_CHANNEL_LIST 214
-#define WNI_CFG_MAX_MEDIUM_TIME 215
-#define WNI_CFG_MAX_MPDUS_IN_AMPDU 216
-#define WNI_CFG_IBSS_AUTO_BSSID 217
-#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG 218
-#define WNI_CFG_PROBE_REQ_ADDNIE_DATA 219
-#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG 220
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1 221
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2 222
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3 223
-#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG 224
-#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA 225
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG 226
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA 227
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG 228
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA 229
-#define WNI_CFG_WPS_ENABLE 230
-#define WNI_CFG_WPS_STATE 231
-#define WNI_CFG_WPS_PROBE_REQ_FLAG 232
-#define WNI_CFG_WPS_VERSION 233
-#define WNI_CFG_WPS_REQUEST_TYPE 234
-#define WNI_CFG_WPS_CFG_METHOD 235
-#define WNI_CFG_WPS_UUID 236
-#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY 237
-#define WNI_CFG_WPS_PIMARY_DEVICE_OUI 238
-#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY 239
-#define WNI_CFG_WPS_ASSOCIATION_STATE 240
-#define WNI_CFG_WPS_CONFIGURATION_ERROR 241
-#define WNI_CFG_WPS_DEVICE_PASSWORD_ID 242
-#define WNI_CFG_WPS_ASSOC_METHOD 243
-#define WNI_CFG_LOW_GAIN_OVERRIDE 244
-#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE 245
-#define WNI_CFG_RPE_POLLING_THRESHOLD 246
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 247
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 248
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 249
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 250
-#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 251
-#define WNI_CFG_SINGLE_TID_RC 252
-#define WNI_CFG_RRM_ENABLED 253
-#define WNI_CFG_RRM_OPERATING_CHAN_MAX 254
-#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX 255
-#define WNI_CFG_TX_PWR_CTRL_ENABLE 256
-#define WNI_CFG_MCAST_BCAST_FILTER_SETTING 257
-#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 258
-#define WNI_CFG_DYNAMIC_PS_POLL_VALUE 259
-#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 260
-#define WNI_CFG_TELE_BCN_WAKEUP_EN 261
-#define WNI_CFG_TELE_BCN_TRANS_LI 262
-#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 263
-#define WNI_CFG_TELE_BCN_MAX_LI 264
-#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 265
-#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 266
-#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 267
-#define WNI_CFG_ASSOC_STA_LIMIT 268
-#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL 269
-#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL 270
-#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND 271
-#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD 272
-#define WNI_CFG_ENABLE_CLOSE_LOOP 273
-#define WNI_CFG_ENABLE_LTE_COEX 274
-#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT 275
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT 276
-#define WNI_CFG_ENABLE_MC_ADDR_LIST 277
-#define WNI_CFG_ENABLE_UC_FILTER 278
-#define WNI_CFG_ENABLE_LPWR_IMG_TRANSITION 279
-#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED 280
-#define WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP 281
-#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT 282
-#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK 283
-#define WNI_CFG_TDLS_BUF_STA_ENABLED 284
-#define WNI_CFG_TDLS_PUAPSD_INACT_TIME 285
-#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD 286
-#define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES 287
-#define WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL 288
-#define WNI_CFG_ENABLE_ADAPT_RX_DRAIN 289
-#define WNI_CFG_FLEX_CONNECT_POWER_FACTOR 290
-#define WNI_CFG_ANTENNA_DIVESITY 291
-#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT 292
-#define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY 293
-#define WNI_CFG_CURRENT_RSSI 294
-#define WNI_CFG_RTT3_ENABLE 295
-#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL 296
-#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED 297
-#define WNI_CFG_IBSS_ATIM_WIN_SIZE 298
-#define WNI_CFG_DFS_MASTER_ENABLED 299
-#define WNI_CFG_VHT_ENABLE_TXBF_20MHZ 300
-#define WNI_CFG_TDLS_WMM_MODE_ENABLED 301
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1 177
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2 178
+#define WNI_CFG_VHT_BASIC_MCS_SET 179
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT 180
+#define WNI_CFG_VHT_SS_UNDER_UTIL 181
+#define WNI_CFG_VHT_40MHZ_UTILIZATION 182
+#define WNI_CFG_VHT_80MHZ_UTILIZATION 183
+#define WNI_CFG_VHT_160MHZ_UTILIZATION 184
+#define WNI_CFG_MAX_AMSDU_LENGTH 185
+#define WNI_CFG_MPDU_DENSITY 186
+#define WNI_CFG_NUM_BUFF_ADVERT 187
+#define WNI_CFG_MAX_RX_AMPDU_FACTOR 188
+#define WNI_CFG_SHORT_GI_20MHZ 189
+#define WNI_CFG_SHORT_GI_40MHZ 190
+#define WNI_CFG_RIFS_ENABLED 191
+#define WNI_CFG_MAX_PS_POLL 192
+#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE 193
+#define WNI_CFG_RSSI_FILTER_PERIOD 194
+#define WNI_CFG_MIN_RSSI_THRESHOLD 195
+#define WNI_CFG_NTH_BEACON_FILTER 196
+#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE 197
+#define WNI_CFG_SCAN_IN_POWERSAVE 198
+#define WNI_CFG_IGNORE_DTIM 199
+#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE 200
+#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE 201
+#define WNI_CFG_WOWLAN_DEAUTH_ENABLE 202
+#define WNI_CFG_WOWLAN_DISASSOC_ENABLE 203
+#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON 204
+#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD 205
+#define WNI_CFG_BA_TIMEOUT 206
+#define WNI_CFG_BA_THRESHOLD_HIGH 207
+#define WNI_CFG_MAX_BA_BUFFERS 208
+#define WNI_CFG_MAX_BA_SESSIONS 209
+#define WNI_CFG_BA_AUTO_SETUP 210
+#define WNI_CFG_ADDBA_REQ_DECLINE 211
+#define WNI_CFG_DEL_ALL_RX_BA_SESSIONS_2_4_G_BTC 212
+#define WNI_CFG_BG_SCAN_CHANNEL_LIST 213
+#define WNI_CFG_MAX_MEDIUM_TIME 214
+#define WNI_CFG_MAX_MPDUS_IN_AMPDU 215
+#define WNI_CFG_IBSS_AUTO_BSSID 216
+#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG 217
+#define WNI_CFG_PROBE_REQ_ADDNIE_DATA 218
+#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG 219
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1 220
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2 221
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3 222
+#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG 223
+#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA 224
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG 225
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA 226
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG 227
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA 228
+#define WNI_CFG_WPS_ENABLE 229
+#define WNI_CFG_WPS_STATE 230
+#define WNI_CFG_WPS_PROBE_REQ_FLAG 231
+#define WNI_CFG_WPS_VERSION 232
+#define WNI_CFG_WPS_REQUEST_TYPE 233
+#define WNI_CFG_WPS_CFG_METHOD 234
+#define WNI_CFG_WPS_UUID 235
+#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY 236
+#define WNI_CFG_WPS_PIMARY_DEVICE_OUI 237
+#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY 238
+#define WNI_CFG_WPS_ASSOCIATION_STATE 239
+#define WNI_CFG_WPS_CONFIGURATION_ERROR 240
+#define WNI_CFG_WPS_DEVICE_PASSWORD_ID 241
+#define WNI_CFG_WPS_ASSOC_METHOD 242
+#define WNI_CFG_LOW_GAIN_OVERRIDE 243
+#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE 244
+#define WNI_CFG_RPE_POLLING_THRESHOLD 245
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 246
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 247
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 248
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 249
+#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 250
+#define WNI_CFG_SINGLE_TID_RC 251
+#define WNI_CFG_RRM_ENABLED 252
+#define WNI_CFG_RRM_OPERATING_CHAN_MAX 253
+#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX 254
+#define WNI_CFG_TX_PWR_CTRL_ENABLE 255
+#define WNI_CFG_MCAST_BCAST_FILTER_SETTING 256
+#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 257
+#define WNI_CFG_DYNAMIC_PS_POLL_VALUE 258
+#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 259
+#define WNI_CFG_TELE_BCN_WAKEUP_EN 260
+#define WNI_CFG_TELE_BCN_TRANS_LI 261
+#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 262
+#define WNI_CFG_TELE_BCN_MAX_LI 263
+#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 264
+#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 265
+#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 266
+#define WNI_CFG_ASSOC_STA_LIMIT 267
+#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL 268
+#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL 269
+#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND 270
+#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD 271
+#define WNI_CFG_ENABLE_CLOSE_LOOP 272
+#define WNI_CFG_ENABLE_LTE_COEX 273
+#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT 274
+#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT 275
+#define WNI_CFG_ENABLE_MC_ADDR_LIST 276
+#define WNI_CFG_ENABLE_UC_FILTER 277
+#define WNI_CFG_ENABLE_LPWR_IMG_TRANSITION 278
+#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED 279
+#define WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP 280
+#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT 281
+#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK 282
+#define WNI_CFG_TDLS_BUF_STA_ENABLED 283
+#define WNI_CFG_TDLS_PUAPSD_INACT_TIME 284
+#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD 285
+#define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES 286
+#define WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL 287
+#define WNI_CFG_ENABLE_ADAPT_RX_DRAIN 288
+#define WNI_CFG_FLEX_CONNECT_POWER_FACTOR 289
+#define WNI_CFG_ANTENNA_DIVESITY 290
+#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT 291
+#define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY 292
+#define WNI_CFG_CURRENT_RSSI 293
+#define WNI_CFG_RTT3_ENABLE 294
+#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL 295
+#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED 296
+#define WNI_CFG_IBSS_ATIM_WIN_SIZE 297
+#define WNI_CFG_DFS_MASTER_ENABLED 298
+#define WNI_CFG_VHT_ENABLE_TXBF_20MHZ 299
+#define WNI_CFG_TDLS_WMM_MODE_ENABLED 300
/*
* String parameter lengths
@@ -1657,19 +1656,6 @@
#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_APMAX 780
#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_APDEF 780
-#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMIN 0
-#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMAX 3
-#define WNI_CFG_VHT_CHANNEL_WIDTH_STADEF 0
-
-#define WNI_CFG_VHT_CHANNEL_WIDTH_APMIN 0
-#define WNI_CFG_VHT_CHANNEL_WIDTH_APMAX 3
-#define WNI_CFG_VHT_CHANNEL_WIDTH_APDEF 0
-
-#define WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ 0
-#define WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ 1
-#define WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ 2
-#define WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ 3
-
#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMIN 0
#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMAX 256
#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STADEF 0
@@ -2548,10 +2534,10 @@
#define WNI_CFG_TDLS_WMM_MODE_ENABLED_APMAX 1
#define WNI_CFG_TDLS_WMM_MODE_ENABLED_APDEF 0
-#define CFG_PARAM_MAX_NUM 302
-#define CFG_AP_IBUF_MAX_SIZE 250
+#define CFG_PARAM_MAX_NUM 301
+#define CFG_AP_IBUF_MAX_SIZE 249
#define CFG_AP_SBUF_MAX_SIZE 3238
-#define CFG_STA_IBUF_MAX_SIZE 245
+#define CFG_STA_IBUF_MAX_SIZE 244
#define CFG_STA_SBUF_MAX_SIZE 3204
#define CFG_SEM_MAX_NUM 19
diff --git a/CORE/MAC/inc/wniCfgSta.h b/CORE/MAC/inc/wniCfgSta.h
index 6dea1a502425..0e5339333e7b 100644
--- a/CORE/MAC/inc/wniCfgSta.h
+++ b/CORE/MAC/inc/wniCfgSta.h
@@ -215,131 +215,130 @@
#define WNI_CFG_VHT_TX_MCS_MAP 174
#define WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE 175
#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE 176
-#define WNI_CFG_VHT_CHANNEL_WIDTH 177
-#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1 178
-#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2 179
-#define WNI_CFG_VHT_BASIC_MCS_SET 180
-#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT 181
-#define WNI_CFG_VHT_SS_UNDER_UTIL 182
-#define WNI_CFG_VHT_40MHZ_UTILIZATION 183
-#define WNI_CFG_VHT_80MHZ_UTILIZATION 184
-#define WNI_CFG_VHT_160MHZ_UTILIZATION 185
-#define WNI_CFG_MAX_AMSDU_LENGTH 186
-#define WNI_CFG_MPDU_DENSITY 187
-#define WNI_CFG_NUM_BUFF_ADVERT 188
-#define WNI_CFG_MAX_RX_AMPDU_FACTOR 189
-#define WNI_CFG_SHORT_GI_20MHZ 190
-#define WNI_CFG_SHORT_GI_40MHZ 191
-#define WNI_CFG_RIFS_ENABLED 192
-#define WNI_CFG_MAX_PS_POLL 193
-#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE 194
-#define WNI_CFG_RSSI_FILTER_PERIOD 195
-#define WNI_CFG_MIN_RSSI_THRESHOLD 196
-#define WNI_CFG_NTH_BEACON_FILTER 197
-#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE 198
-#define WNI_CFG_SCAN_IN_POWERSAVE 199
-#define WNI_CFG_IGNORE_DTIM 200
-#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE 201
-#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE 202
-#define WNI_CFG_WOWLAN_DEAUTH_ENABLE 203
-#define WNI_CFG_WOWLAN_DISASSOC_ENABLE 204
-#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON 205
-#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD 206
-#define WNI_CFG_BA_TIMEOUT 207
-#define WNI_CFG_BA_THRESHOLD_HIGH 208
-#define WNI_CFG_MAX_BA_BUFFERS 209
-#define WNI_CFG_MAX_BA_SESSIONS 210
-#define WNI_CFG_BA_AUTO_SETUP 211
-#define WNI_CFG_ADDBA_REQ_DECLINE 212
-#define WNI_CFG_DEL_ALL_RX_BA_SESSIONS_2_4_G_BTC 213
-#define WNI_CFG_BG_SCAN_CHANNEL_LIST 214
-#define WNI_CFG_MAX_MEDIUM_TIME 215
-#define WNI_CFG_MAX_MPDUS_IN_AMPDU 216
-#define WNI_CFG_IBSS_AUTO_BSSID 217
-#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG 218
-#define WNI_CFG_PROBE_REQ_ADDNIE_DATA 219
-#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG 220
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1 221
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2 222
-#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3 223
-#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG 224
-#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA 225
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG 226
-#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA 227
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG 228
-#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA 229
-#define WNI_CFG_WPS_ENABLE 230
-#define WNI_CFG_WPS_STATE 231
-#define WNI_CFG_WPS_PROBE_REQ_FLAG 232
-#define WNI_CFG_WPS_VERSION 233
-#define WNI_CFG_WPS_REQUEST_TYPE 234
-#define WNI_CFG_WPS_CFG_METHOD 235
-#define WNI_CFG_WPS_UUID 236
-#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY 237
-#define WNI_CFG_WPS_PIMARY_DEVICE_OUI 238
-#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY 239
-#define WNI_CFG_WPS_ASSOCIATION_STATE 240
-#define WNI_CFG_WPS_CONFIGURATION_ERROR 241
-#define WNI_CFG_WPS_DEVICE_PASSWORD_ID 242
-#define WNI_CFG_WPS_ASSOC_METHOD 243
-#define WNI_CFG_LOW_GAIN_OVERRIDE 244
-#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE 245
-#define WNI_CFG_RPE_POLLING_THRESHOLD 246
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 247
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 248
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 249
-#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 250
-#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 251
-#define WNI_CFG_SINGLE_TID_RC 252
-#define WNI_CFG_RRM_ENABLED 253
-#define WNI_CFG_RRM_OPERATING_CHAN_MAX 254
-#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX 255
-#define WNI_CFG_TX_PWR_CTRL_ENABLE 256
-#define WNI_CFG_MCAST_BCAST_FILTER_SETTING 257
-#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 258
-#define WNI_CFG_DYNAMIC_PS_POLL_VALUE 259
-#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 260
-#define WNI_CFG_TELE_BCN_WAKEUP_EN 261
-#define WNI_CFG_TELE_BCN_TRANS_LI 262
-#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 263
-#define WNI_CFG_TELE_BCN_MAX_LI 264
-#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 265
-#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 266
-#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 267
-#define WNI_CFG_ASSOC_STA_LIMIT 268
-#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL 269
-#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL 270
-#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND 271
-#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD 272
-#define WNI_CFG_ENABLE_CLOSE_LOOP 273
-#define WNI_CFG_ENABLE_LTE_COEX 274
-#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT 275
-#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT 276
-#define WNI_CFG_ENABLE_MC_ADDR_LIST 277
-#define WNI_CFG_ENABLE_UC_FILTER 278
-#define WNI_CFG_ENABLE_LPWR_IMG_TRANSITION 279
-#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED 280
-#define WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP 281
-#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT 282
-#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK 283
-#define WNI_CFG_TDLS_BUF_STA_ENABLED 284
-#define WNI_CFG_TDLS_PUAPSD_INACT_TIME 285
-#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD 286
-#define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES 287
-#define WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL 288
-#define WNI_CFG_ENABLE_ADAPT_RX_DRAIN 289
-#define WNI_CFG_FLEX_CONNECT_POWER_FACTOR 290
-#define WNI_CFG_ANTENNA_DIVESITY 291
-#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT 292
-#define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY 293
-#define WNI_CFG_CURRENT_RSSI 294
-#define WNI_CFG_RTT3_ENABLE 295
-#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL 296
-#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED 297
-#define WNI_CFG_IBSS_ATIM_WIN_SIZE 298
-#define WNI_CFG_DFS_MASTER_ENABLED 299
-#define WNI_CFG_VHT_ENABLE_TXBF_20MHZ 300
-#define WNI_CFG_TDLS_WMM_MODE_ENABLED 301
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1 177
+#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT2 178
+#define WNI_CFG_VHT_BASIC_MCS_SET 179
+#define WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT 180
+#define WNI_CFG_VHT_SS_UNDER_UTIL 181
+#define WNI_CFG_VHT_40MHZ_UTILIZATION 182
+#define WNI_CFG_VHT_80MHZ_UTILIZATION 183
+#define WNI_CFG_VHT_160MHZ_UTILIZATION 184
+#define WNI_CFG_MAX_AMSDU_LENGTH 185
+#define WNI_CFG_MPDU_DENSITY 186
+#define WNI_CFG_NUM_BUFF_ADVERT 187
+#define WNI_CFG_MAX_RX_AMPDU_FACTOR 188
+#define WNI_CFG_SHORT_GI_20MHZ 189
+#define WNI_CFG_SHORT_GI_40MHZ 190
+#define WNI_CFG_RIFS_ENABLED 191
+#define WNI_CFG_MAX_PS_POLL 192
+#define WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE 193
+#define WNI_CFG_RSSI_FILTER_PERIOD 194
+#define WNI_CFG_MIN_RSSI_THRESHOLD 195
+#define WNI_CFG_NTH_BEACON_FILTER 196
+#define WNI_CFG_BROADCAST_FRAME_FILTER_ENABLE 197
+#define WNI_CFG_SCAN_IN_POWERSAVE 198
+#define WNI_CFG_IGNORE_DTIM 199
+#define WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE 200
+#define WNI_CFG_WOWLAN_CHANNEL_SWITCH_ENABLE 201
+#define WNI_CFG_WOWLAN_DEAUTH_ENABLE 202
+#define WNI_CFG_WOWLAN_DISASSOC_ENABLE 203
+#define WNI_CFG_WOWLAN_MAX_MISSED_BEACON 204
+#define WNI_CFG_WOWLAN_MAX_SLEEP_PERIOD 205
+#define WNI_CFG_BA_TIMEOUT 206
+#define WNI_CFG_BA_THRESHOLD_HIGH 207
+#define WNI_CFG_MAX_BA_BUFFERS 208
+#define WNI_CFG_MAX_BA_SESSIONS 209
+#define WNI_CFG_BA_AUTO_SETUP 210
+#define WNI_CFG_ADDBA_REQ_DECLINE 211
+#define WNI_CFG_DEL_ALL_RX_BA_SESSIONS_2_4_G_BTC 212
+#define WNI_CFG_BG_SCAN_CHANNEL_LIST 213
+#define WNI_CFG_MAX_MEDIUM_TIME 214
+#define WNI_CFG_MAX_MPDUS_IN_AMPDU 215
+#define WNI_CFG_IBSS_AUTO_BSSID 216
+#define WNI_CFG_PROBE_REQ_ADDNIE_FLAG 217
+#define WNI_CFG_PROBE_REQ_ADDNIE_DATA 218
+#define WNI_CFG_PROBE_RSP_ADDNIE_FLAG 219
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1 220
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA2 221
+#define WNI_CFG_PROBE_RSP_ADDNIE_DATA3 222
+#define WNI_CFG_ASSOC_RSP_ADDNIE_FLAG 223
+#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA 224
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_FLAG 225
+#define WNI_CFG_PROBE_REQ_ADDNP2PIE_DATA 226
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG 227
+#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA 228
+#define WNI_CFG_WPS_ENABLE 229
+#define WNI_CFG_WPS_STATE 230
+#define WNI_CFG_WPS_PROBE_REQ_FLAG 231
+#define WNI_CFG_WPS_VERSION 232
+#define WNI_CFG_WPS_REQUEST_TYPE 233
+#define WNI_CFG_WPS_CFG_METHOD 234
+#define WNI_CFG_WPS_UUID 235
+#define WNI_CFG_WPS_PRIMARY_DEVICE_CATEGORY 236
+#define WNI_CFG_WPS_PIMARY_DEVICE_OUI 237
+#define WNI_CFG_WPS_DEVICE_SUB_CATEGORY 238
+#define WNI_CFG_WPS_ASSOCIATION_STATE 239
+#define WNI_CFG_WPS_CONFIGURATION_ERROR 240
+#define WNI_CFG_WPS_DEVICE_PASSWORD_ID 241
+#define WNI_CFG_WPS_ASSOC_METHOD 242
+#define WNI_CFG_LOW_GAIN_OVERRIDE 243
+#define WNI_CFG_ENABLE_PHY_AGC_LISTEN_MODE 244
+#define WNI_CFG_RPE_POLLING_THRESHOLD 245
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC0_REG 246
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC1_REG 247
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC2_REG 248
+#define WNI_CFG_RPE_AGING_THRESHOLD_FOR_AC3_REG 249
+#define WNI_CFG_NO_OF_ONCHIP_REORDER_SESSIONS 250
+#define WNI_CFG_SINGLE_TID_RC 251
+#define WNI_CFG_RRM_ENABLED 252
+#define WNI_CFG_RRM_OPERATING_CHAN_MAX 253
+#define WNI_CFG_RRM_NON_OPERATING_CHAN_MAX 254
+#define WNI_CFG_TX_PWR_CTRL_ENABLE 255
+#define WNI_CFG_MCAST_BCAST_FILTER_SETTING 256
+#define WNI_CFG_BTC_DHCP_BT_SLOTS_TO_BLOCK 257
+#define WNI_CFG_DYNAMIC_PS_POLL_VALUE 258
+#define WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT 259
+#define WNI_CFG_TELE_BCN_WAKEUP_EN 260
+#define WNI_CFG_TELE_BCN_TRANS_LI 261
+#define WNI_CFG_TELE_BCN_TRANS_LI_IDLE_BCNS 262
+#define WNI_CFG_TELE_BCN_MAX_LI 263
+#define WNI_CFG_TELE_BCN_MAX_LI_IDLE_BCNS 264
+#define WNI_CFG_BTC_A2DP_DHCP_BT_SUB_INTERVALS 265
+#define WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD 266
+#define WNI_CFG_ASSOC_STA_LIMIT 267
+#define WNI_CFG_SAP_CHANNEL_SELECT_START_CHANNEL 268
+#define WNI_CFG_SAP_CHANNEL_SELECT_END_CHANNEL 269
+#define WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND 270
+#define WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD 271
+#define WNI_CFG_ENABLE_CLOSE_LOOP 272
+#define WNI_CFG_ENABLE_LTE_COEX 273
+#define WNI_CFG_AP_KEEP_ALIVE_TIMEOUT 274
+#define WNI_CFG_GO_KEEP_ALIVE_TIMEOUT 275
+#define WNI_CFG_ENABLE_MC_ADDR_LIST 276
+#define WNI_CFG_ENABLE_UC_FILTER 277
+#define WNI_CFG_ENABLE_LPWR_IMG_TRANSITION 278
+#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED 279
+#define WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP 280
+#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT 281
+#define WNI_CFG_TDLS_QOS_WMM_UAPSD_MASK 282
+#define WNI_CFG_TDLS_BUF_STA_ENABLED 283
+#define WNI_CFG_TDLS_PUAPSD_INACT_TIME 284
+#define WNI_CFG_TDLS_RX_FRAME_THRESHOLD 285
+#define WNI_CFG_PMF_SA_QUERY_MAX_RETRIES 286
+#define WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL 287
+#define WNI_CFG_ENABLE_ADAPT_RX_DRAIN 288
+#define WNI_CFG_FLEX_CONNECT_POWER_FACTOR 289
+#define WNI_CFG_ANTENNA_DIVESITY 290
+#define WNI_CFG_GO_LINK_MONITOR_TIMEOUT 291
+#define WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY 292
+#define WNI_CFG_CURRENT_RSSI 293
+#define WNI_CFG_RTT3_ENABLE 294
+#define WNI_CFG_DEBUG_P2P_REMAIN_ON_CHANNEL 295
+#define WNI_CFG_TDLS_OFF_CHANNEL_ENABLED 296
+#define WNI_CFG_IBSS_ATIM_WIN_SIZE 297
+#define WNI_CFG_DFS_MASTER_ENABLED 298
+#define WNI_CFG_VHT_ENABLE_TXBF_20MHZ 299
+#define WNI_CFG_TDLS_WMM_MODE_ENABLED 300
/*
* String parameter lengths
@@ -1142,15 +1141,6 @@
#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX 780
#define WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STADEF 780
-#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMIN 0
-#define WNI_CFG_VHT_CHANNEL_WIDTH_STAMAX 3
-#define WNI_CFG_VHT_CHANNEL_WIDTH_STADEF 0
-
-#define WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ 0
-#define WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ 1
-#define WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ 2
-#define WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ 3
-
#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMIN 0
#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STAMAX 256
#define WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1_STADEF 0
@@ -1629,8 +1619,8 @@
#define WNI_CFG_TDLS_WMM_MODE_ENABLED_STAMAX 1
#define WNI_CFG_TDLS_WMM_MODE_ENABLED_STADEF 0
-#define CFG_PARAM_MAX_NUM 302
-#define CFG_STA_IBUF_MAX_SIZE 245
+#define CFG_PARAM_MAX_NUM 301
+#define CFG_STA_IBUF_MAX_SIZE 244
#define CFG_STA_SBUF_MAX_SIZE 3204
#define CFG_SEM_MAX_NUM 19
diff --git a/CORE/MAC/src/cfg/cfgParamName.c b/CORE/MAC/src/cfg/cfgParamName.c
index f2df54750757..d2620d168cfb 100644
--- a/CORE/MAC/src/cfg/cfgParamName.c
+++ b/CORE/MAC/src/cfg/cfgParamName.c
@@ -212,7 +212,6 @@ unsigned char *gCfgParamName[] = {
(unsigned char *)"VHT_TX_MCS_MAP",
(unsigned char *)"VHT_RX_HIGHEST_SUPPORTED_DATA_RATE",
(unsigned char *)"VHT_TX_HIGHEST_SUPPORTED_DATA_RATE",
- (unsigned char *)"VHT_CHANNEL_WIDTH",
(unsigned char *)"VHT_CHANNEL_CENTER_FREQ_SEGMENT1",
(unsigned char *)"VHT_CHANNEL_CENTER_FREQ_SEGMENT2",
(unsigned char *)"VHT_BASIC_MCS_SET",
diff --git a/CORE/MAC/src/cfg/cfgUtil/cfg.txt b/CORE/MAC/src/cfg/cfgUtil/cfg.txt
index 131f66345d79..4bc436e15a89 100644
--- a/CORE/MAC/src/cfg/cfgUtil/cfg.txt
+++ b/CORE/MAC/src/cfg/cfgUtil/cfg.txt
@@ -2757,23 +2757,6 @@ LIM
0 780 780
*
-* VHT Operation Information
-* Channel Width set to zero for 20/40MHz.
-* set to 1 for 80MHz. 2->160Mhz, 3->80+80MHz
-*
-WNI_CFG_VHT_CHANNEL_WIDTH I 4 19
-V RW NP
-LIM
-0 3 0
-V RW NP
-LIM
-0 3 0
-
-#ENUM 20_40MHZ 0
-#ENUM 80MHZ 1
-#ENUM 160MHZ 2
-#ENUM 80_PLUS_80MHZ 3
-*
* Channel center freq Seg1
*
WNI_CFG_VHT_CHANNEL_CENTER_FREQ_SEGMENT1 I 4 19
diff --git a/CORE/MAC/src/pe/lim/limAdmitControl.c b/CORE/MAC/src/pe/lim/limAdmitControl.c
index bf613ef14ee3..803b99b92389 100644
--- a/CORE/MAC/src/pe/lim/limAdmitControl.c
+++ b/CORE/MAC/src/pe/lim/limAdmitControl.c
@@ -1030,7 +1030,8 @@ limSendHalMsgDelTs(
goto err;
}
pDelTsParam->sessionId = psessionEntry->smeSessionId;
- pDelTsParam->userPrio = delts.tsinfo.traffic.userPrio;
+ pDelTsParam->userPrio = delts.wmeTspecPresent?
+ delts.tspec.tsinfo.traffic.userPrio: delts.tsinfo.traffic.userPrio;
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
if (pMac->roam.configParam.isRoamOffloadEnabled &&
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 376c5cc23a06..9f45f99d5a9f 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -795,12 +795,11 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
tANI_U32 centerChan;
tANI_U32 chanWidth;
- if (wlan_cfgGetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,
- &chanWidth) != eSIR_SUCCESS)
- {
- limLog(pMac, LOGP,
- FL("Unable to retrieve Channel Width from CFG"));
- }
+ chanWidth = pSmeStartBssReq->vht_channel_width;
+
+ VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
+ FL("vht_channel_width %u"),
+ pSmeStartBssReq->vht_channel_width);
if(channelNumber <= RF_CHAN_14 &&
chanWidth != eHT_CHANNEL_WIDTH_20MHZ)
@@ -853,8 +852,6 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
}
}
- if(chanWidth == eHT_CHANNEL_WIDTH_20MHZ)
- psessionEntry->htSupportedChannelWidthSet = 0;
}
psessionEntry->htSecondaryChannelOffset = limGetHTCBState(pSmeStartBssReq->cbMode);
#endif
@@ -6012,21 +6009,18 @@ limProcessSmeChannelChangeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg)
if (psessionEntry->currentOperChannel !=
pChannelChangeReq->targetChannel)
{
- limLog(pMac, LOGW,FL("switch old chnl %d --> new chnl %d "),
+ limLog(pMac, LOGE,
+ FL("switch old chnl %d --> new chnl %d and CH width - %d"),
psessionEntry->currentOperChannel,
- pChannelChangeReq->targetChannel);
+ pChannelChangeReq->targetChannel,
+ pChannelChangeReq->vht_channel_width);
#ifdef WLAN_FEATURE_11AC
if(psessionEntry->vhtCapability)
{
- if (wlan_cfgGetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,
- &chanWidth) != eSIR_SUCCESS)
- {
- limLog(pMac, LOGP,
- FL("Unable to retrieve Channel Width from CFG"));
- }
+ chanWidth = pChannelChangeReq->vht_channel_width;
if(chanWidth == eHT_CHANNEL_WIDTH_20MHZ || chanWidth == eHT_CHANNEL_WIDTH_40MHZ)
{
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index cb0f3b56ea8c..b2dbba39f890 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -461,6 +461,17 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOG1(limLog(pMac, LOG1, FL("AssocRsp=%d"), psessionEntry->assocRspLen);)
#endif
+ if (WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ ==
+ psessionEntry->apChanWidth) {
+ pSirSmeJoinRsp->vht_channel_width = eHT_CHANNEL_WIDTH_80MHZ;
+ } else if ((WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ ==
+ psessionEntry->apChanWidth) &&
+ (psessionEntry->htSecondaryChannelOffset)) {
+ pSirSmeJoinRsp->vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ;
+ } else {
+ pSirSmeJoinRsp->vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ;
+ }
+
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
if (psessionEntry->cc_switch_mode != VOS_MCC_TO_SCC_SWITCH_DISABLE) {
pSirSmeJoinRsp->HTProfile.htSupportedChannelWidthSet =
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index 09be983cd5e2..8ce25480d7b6 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -504,6 +504,9 @@ limStartBssReqSerDes(tpAniSirGlobal pMac, tpSirSmeStartBssReq pStartBssReq, tANI
pBuf += sizeof( tANI_U32 );
len -= sizeof( tANI_U32 );
+ pStartBssReq->vht_channel_width = *pBuf++;
+ len--;
+
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
@@ -917,8 +920,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf)
}
// Extract cbMode
- pJoinReq->cbMode = *pBuf++;
- len--;
+ pJoinReq->cbMode = (ePhyChanBondState)limGetU32(pBuf);
+ pBuf += sizeof(ePhyChanBondState);
+ len -= sizeof(ePhyChanBondState);
+
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
{
limLog(pMac, LOGE, FL("remaining len %d is too short"), len);
diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h
index add56382c0f9..9bf4f8728fb3 100644
--- a/CORE/SAP/inc/sapApi.h
+++ b/CORE/SAP/inc/sapApi.h
@@ -451,6 +451,8 @@ typedef struct sap_Config {
v_MACADDR_t self_macaddr; //self macaddress or BSSID
v_U8_t channel; /* Operation channel */
+ v_U32_t vht_channel_width;
+ v_U32_t vht_ch_width_orig;
v_U8_t max_num_sta; /* maximum number of STAs in station table */
v_U8_t dtim_period; /* dtim interval */
v_U8_t num_accept_mac;
@@ -2143,6 +2145,41 @@ WLANSAP_Set_Dfs_Target_Chnl(tHalHandle hHal,
/*==========================================================================
+ FUNCTION wlan_sap_get_vht_ch_width
+
+ DESCRIPTION Returns the SAP VHT channel width.
+
+ DEPENDENCIES NA.
+
+ PARAMETERS
+ IN
+ ctx: Pointer to vos Context or Sap Context based on MBSSID
+
+ RETURN VALUE VHT channnel width
+
+ SIDE EFFECTS
+============================================================================*/
+v_U32_t wlan_sap_get_vht_ch_width(v_PVOID_t ctx);
+
+/*==========================================================================
+ FUNCTION wlan_sap_set_vht_ch_width
+
+ DESCRIPTION Sets the SAP VHT channel width.
+
+ DEPENDENCIES NA.
+
+ PARAMETERS
+ IN
+ ctx: Pointer to vos Context or Sap Context based on MBSSID
+ vht_channel_width - VHT channel width
+
+ RETURN VALUE NONE
+
+ SIDE EFFECTS
+============================================================================*/
+void wlan_sap_set_vht_ch_width(v_PVOID_t ctx, v_U32_t vht_channel_width);
+
+/*==========================================================================
FUNCTION WLANSAP_UpdateSapConfigAddIE
DESCRIPTION
diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c
index ab82a867b59c..1750b7064d0e 100644
--- a/CORE/SAP/src/sapApiLinkCntl.c
+++ b/CORE/SAP/src/sapApiLinkCntl.c
@@ -140,7 +140,6 @@ WLANSAP_ScanCallback
v_U8_t operChannel = 0;
VOS_STATUS sapstatus;
tpAniSirGlobal pMac = NULL;
- v_U32_t vhtChannelWidth;
#ifdef SOFTAP_CHANNEL_RANGE
v_U32_t event;
#endif
@@ -233,22 +232,10 @@ WLANSAP_ScanCallback
{
psapContext->channel = operChannel;
}
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(halHandle,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth = pMac->roam.configParam.nVhtChannelWidth;
- }
sme_SelectCBMode(halHandle,
psapContext->csrRoamProfile.phyMode,
- psapContext->channel, vhtChannelWidth);
+ psapContext->channel, &psapContext->vht_channel_width);
#ifdef SOFTAP_CHANNEL_RANGE
if(psapContext->channelList != NULL)
{
@@ -319,7 +306,6 @@ WLANSAP_PreStartBssAcsScanCallback
#ifdef SOFTAP_CHANNEL_RANGE
v_U32_t operatingBand;
#endif
- v_U32_t vhtChannelWidth;
tpAniSirGlobal pMac = PMAC_STRUCT(halHandle);
if ( eCSR_SCAN_SUCCESS == scanStatus)
@@ -428,22 +414,10 @@ WLANSAP_PreStartBssAcsScanCallback
psapContext->channel = operChannel;
}
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(halHandle,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth = pMac->roam.configParam.nVhtChannelWidth;
- }
-
sme_SelectCBMode(halHandle,
psapContext->csrRoamProfile.phyMode,
- psapContext->channel, vhtChannelWidth);
+ psapContext->channel,
+ &psapContext->vht_channel_width);
/* determine secondary channel for 11n mode */
if ((eCSR_DOT11_MODE_11n == psapContext->csrRoamProfile.phyMode) ||
@@ -578,7 +552,6 @@ WLANSAP_RoamCallback
eHalStatus halStatus = eHAL_STATUS_SUCCESS;
tHalHandle hHal = VOS_GET_HAL_CB(sapContext->pvosGCtx);
tpAniSirGlobal pMac = NULL;
- v_U32_t vhtChannelWidth;
if (NULL == hHal)
{
@@ -1106,23 +1079,9 @@ WLANSAP_RoamCallback
*/
if (pMac->sap.SapDfsInfo.target_channel)
{
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(hHal,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth =
- pMac->roam.configParam.nVhtChannelWidth;
- }
-
sme_SelectCBMode(hHal, phyMode,
pMac->sap.SapDfsInfo.target_channel,
- vhtChannelWidth);
+ &sapContext->vht_channel_width);
}
/*
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index e87a1c7d719a..745d95278e3e 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -1385,7 +1385,7 @@ static v_U8_t sapRandomChannelSel(ptSapContext sapContext)
if (pMac->sap.SapDfsInfo.orig_chanWidth == 0)
{
pMac->sap.SapDfsInfo.orig_chanWidth =
- pMac->roam.configParam.nVhtChannelWidth;
+ sapContext->vht_ch_width_orig;
chanWidth = pMac->sap.SapDfsInfo.orig_chanWidth;
}
else
@@ -2017,7 +2017,6 @@ sapGotoChannelSel
tHalHandle hHal;
#ifndef FEATURE_WLAN_MCC_TO_SCC_SWITCH
tANI_U8 channel;
- tANI_U32 vhtChannelWidth = 0;
#endif
hHal = (tHalHandle)vos_get_context( VOS_MODULE_ID_SME, sapContext->pvosGCtx);
@@ -2063,23 +2062,8 @@ sapGotoChannelSel
{ /*if a valid channel is returned then use concurrent channel.
Else take whatever comes from configuartion*/
sapContext->channel = channel;
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(hHal,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth =
- PMAC_STRUCT(hHal)->roam.configParam.nVhtChannelWidth;
- }
- sme_SelectCBMode(hHal,
- sapContext->csrRoamProfile.phyMode,
- channel, vhtChannelWidth);
-
+ sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode,
+ channel, &sapContext->vht_channel_width);
}
#endif
}
@@ -3210,7 +3194,6 @@ sapFsm
v_U8_t temp_chan;
tSapDfsNolInfo *pNol;
#endif
- v_U32_t vhtChannelWidth;
if (NULL == hHal)
{
@@ -3369,22 +3352,10 @@ sapFsm
"%s: Override Chosen Ch:%d to %d due to CC Intf!!",
__func__,sapContext->channel, con_ch);
sapContext->channel = con_ch;
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(hHal,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth =
- pMac->roam.configParam.nVhtChannelWidth;
- }
- sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode,
- sapContext->channel, vhtChannelWidth);
-
+ sme_SelectCBMode(hHal,
+ sapContext->csrRoamProfile.phyMode,
+ sapContext->channel,
+ &sapContext->vht_channel_width);
}
}
#endif
@@ -3432,21 +3403,9 @@ sapFsm
sapContext->channel, ch);
sapContext->channel = ch;
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(hHal,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth =
- pMac->roam.configParam.nVhtChannelWidth;
- }
- sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode,
- sapContext->channel, vhtChannelWidth);
+ sme_SelectCBMode(hHal, sapContext->csrRoamProfile.phyMode,
+ sapContext->channel,
+ &sapContext->vht_channel_width);
}
if (sapContext->channel > 14 &&
(sapContext->csrRoamProfile.phyMode ==
@@ -3478,6 +3437,8 @@ sapFsm
sapContext->csrRoamProfile.ChannelInfo.numOfChannels = 1;
sapContext->csrRoamProfile.ChannelInfo.ChannelList = &sapContext->csrRoamProfile.operationChannel;
sapContext->csrRoamProfile.operationChannel = (tANI_U8)sapContext->channel;
+ sapContext->csrRoamProfile.vht_channel_width =
+ sapContext->vht_channel_width;
VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: notify hostapd about channel selection: %d",
__func__, sapContext->channel);
@@ -3540,22 +3501,9 @@ sapFsm
}
else if (pMac->sap.SapDfsInfo.target_channel)
{
- if (eHAL_STATUS_SUCCESS != ccmCfgGetInt(hHal,
- WNI_CFG_VHT_CHANNEL_WIDTH,
- &vhtChannelWidth))
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Get WNI_CFG_VHT_CHANNEL_WIDTH failed"));
- /*
- * In case of failure, take the vht channel width from
- * original ini value
- */
- vhtChannelWidth =
- pMac->roam.configParam.nVhtChannelWidth;
- }
sme_SelectCBMode(hHal, phyMode,
pMac->sap.SapDfsInfo.target_channel,
- vhtChannelWidth);
+ &sapContext->vht_channel_width);
}
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++)
diff --git a/CORE/SAP/src/sapInternal.h b/CORE/SAP/src/sapInternal.h
index ed60927bcaec..d9e0b1c5320a 100644
--- a/CORE/SAP/src/sapInternal.h
+++ b/CORE/SAP/src/sapInternal.h
@@ -233,6 +233,8 @@ typedef struct sSapContext {
v_U8_t pStaAddIE[MAX_ASSOC_IND_IE_LEN];
v_U8_t *channelList;
tSapChannelListInfo SapChnlList;
+ v_U32_t vht_channel_width;
+ v_U32_t vht_ch_width_orig;
// session to scan
tANI_BOOLEAN isScanSessionOpen;
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index ff64687110a3..e8490ce4cf2f 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -603,6 +603,49 @@ v_U16_t WLANSAP_CheckCCIntf(v_PVOID_t Ctx)
#endif
/*==========================================================================
+ FUNCTION wlan_sap_get_vht_ch_width
+
+ DESCRIPTION Returns the SAP VHT channel width.
+
+ DEPENDENCIES NA.
+
+ PARAMETERS
+ IN
+ ctx: Pointer to vos Context or Sap Context based on MBSSID
+
+ RETURN VALUE VHT channnel width
+
+ SIDE EFFECTS
+============================================================================*/
+v_U32_t wlan_sap_get_vht_ch_width(v_PVOID_t ctx) {
+ ptSapContext sap_ctx = VOS_GET_SAP_CB(ctx);
+
+ return sap_ctx->vht_channel_width;
+}
+
+/*==========================================================================
+ FUNCTION wlan_sap_set_vht_ch_width
+
+ DESCRIPTION Sets the SAP VHT channel width.
+
+ DEPENDENCIES NA.
+
+ PARAMETERS
+ IN
+ ctx: Pointer to vos Context or Sap Context based on MBSSID
+ vht_channel_width - VHT channel width
+
+ RETURN VALUE NONE
+
+ SIDE EFFECTS
+============================================================================*/
+void wlan_sap_set_vht_ch_width(v_PVOID_t ctx, v_U32_t vht_channel_width) {
+ ptSapContext sap_ctx = VOS_GET_SAP_CB(ctx);
+
+ sap_ctx->vht_channel_width = vht_channel_width;
+}
+
+/*==========================================================================
FUNCTION WLANSAP_SetScanAcsChannelParams
DESCRIPTION
@@ -794,6 +837,8 @@ WLANSAP_StartBss
/* Channel selection is auto or configured */
pSapCtx->channel = pConfig->channel;
+ pSapCtx->vht_channel_width = pConfig->vht_channel_width;
+ pSapCtx->vht_ch_width_orig = pConfig->vht_ch_width_orig;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
pSapCtx->cc_switch_mode = pConfig->cc_switch_mode;
#endif
@@ -2982,6 +3027,8 @@ WLANSAP_ChannelChangeRequest(v_PVOID_t pSapCtx, tANI_U8 tArgetChannel)
*/
cbMode = pMac->sap.SapDfsInfo.new_cbMode;
vhtChannelWidth = pMac->sap.SapDfsInfo.new_chanWidth;
+ sme_SelectCBMode(hHal, phyMode, tArgetChannel, &vhtChannelWidth);
+ sapContext->vht_channel_width = vhtChannelWidth;
halStatus = sme_RoamChannelChangeReq(hHal, sapContext->bssid,
tArgetChannel,
phyMode, cbMode, vhtChannelWidth);
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 0611194bd8a8..1751cb7aecd6 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -23698,7 +23698,10 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
case WDA_OCB_SET_SCHED_REQUEST:
wma_ocb_set_sched_req(wma_handle,
(sir_ocb_set_sched_request_t *)(msg->bodyptr));
- vos_mem_free(msg->bodyptr);
+ /* no need to vos_mem_free(msg->bodyptr) here. This synchronous
+ * request is waiting on completion in
+ * iw_set_dot11p_channel_sched()
+ * which will clean up the request buffer. */
break;
#ifdef FEATURE_BUS_AUTO_SUSPEND
case WDA_WLAN_AUTO_SUSPEND_IND:
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index ac2ad9baf42d..65f60f423bf6 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -522,9 +522,6 @@ typedef enum
// Channel sw update notification
eCSR_ROAM_DFS_CHAN_SW_NOTIFY,
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- eCSR_ROAM_AUTHORIZED_EVENT
-#endif
}eRoamCmdStatus;
@@ -913,6 +910,7 @@ typedef struct tagCsrRoamProfile
eCsrCBChoice CBMode; //up, down or auto
tCsrChannelInfo ChannelInfo;
tANI_U8 operationChannel;
+ tANI_U32 vht_channel_width;
tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
// during connect this specifies ACs U-APSD is to be setup
// for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
@@ -992,6 +990,7 @@ typedef struct tagCsrRoamConnectedProfile
tCsrEncryptionList mcEncryptionInfo;
eCsrCBChoice CBMode; //up, down or auto
tANI_U8 operationChannel;
+ tANI_U32 vht_channel_width;
tANI_U16 beaconInterval;
tCsrKeys Keys;
// meaningless on connect. It's an OUT param from CSR's point of view
@@ -1239,6 +1238,7 @@ typedef struct tagCsrConfigParam
tANI_BOOLEAN obssEnabled;
v_U8_t conc_custom_rule1;
+ v_U8_t conc_custom_rule2;
v_U8_t is_sta_connection_in_5gz_enabled;
/* 802.11p enable */
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index e3d805c42f6c..fe3c26008f53 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -342,6 +342,7 @@ typedef struct tagCsrRoamStartBssParams
tSirMacRateSet operationalRateSet;
tSirMacRateSet extendedRateSet;
tANI_U8 operationChn;
+ tANI_U8 vht_channel_width;
eCsrCfgDot11Mode uCfgDot11Mode;
tANI_U8 privacy;
tANI_BOOLEAN fwdWPSPBCProbeReq;
@@ -671,6 +672,7 @@ typedef struct tagCsrConfig
#endif
tANI_BOOLEAN obssEnabled;
v_U8_t conc_custom_rule1;
+ v_U8_t conc_custom_rule2;
v_U8_t is_sta_connection_in_5gz_enabled;
}tCsrConfig;
@@ -900,6 +902,17 @@ typedef struct tagCsrRoamOffloadSynchStruct
} tCsrRoamOffloadSynchStruct;
#endif
+typedef struct tagCsrRoamStoredProfile
+{
+ tANI_U32 session_id;
+ tCsrRoamProfile profile;
+ tScanResultHandle bsslist_handle;
+ eCsrRoamReason reason;
+ tANI_U32 roam_id;
+ tANI_BOOLEAN imediate_flag;
+ tANI_BOOLEAN clear_flag;
+} tCsrRoamStoredProfile;
+
typedef struct tagCsrRoamSession
{
tANI_U8 sessionId; // Session ID
@@ -993,6 +1006,7 @@ typedef struct tagCsrRoamSession
uint8_t join_bssid_count; /* This count represents the number of
* bssid's we are trying to join.
*/
+ tCsrRoamStoredProfile stored_roam_profile;
} tCsrRoamSession;
typedef struct tagCsrRoamStruct
@@ -1520,5 +1534,15 @@ eHalStatus csrScanSaveRoamOffloadApToScanCache(tpAniSirGlobal pMac,
tSirRoamOffloadSynchInd *pRoamOffloadSynchInd);
void csrProcessHOFailInd(tpAniSirGlobal pMac, void *pMsgBuf);
#endif
+bool csr_store_joinreq_param(tpAniSirGlobal mac_ctx,
+ tCsrRoamProfile *profile,
+ tScanResultHandle scan_cache,
+ uint32_t *roam_id,
+ uint32_t session_id);
+bool csr_clear_joinreq_param(tpAniSirGlobal mac_ctx,
+ tANI_U32 session_id);
+eHalStatus csr_issue_stored_joinreq(tpAniSirGlobal mac_ctx,
+ uint32_t *roam_id,
+ uint32_t session_id);
#endif
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 78d4a5b5d4c2..d00ebe731197 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -580,7 +580,19 @@ eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultF
VOS_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hHal,
tCsrRoamProfile *profile,
+ tScanResultHandle *scan_cache,
tANI_U8 *ap_chnl_id);
+bool sme_store_joinreq_param(tHalHandle hal_handle,
+ tCsrRoamProfile *profile,
+ tScanResultHandle scan_cache,
+ uint32_t *roam_id,
+ uint32_t session_id);
+bool sme_clear_joinreq_param(tHalHandle hal_handle,
+ uint32_t session_id);
+VOS_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle,
+ uint32_t *roam_id,
+ uint32_t session_id);
+
/* ---------------------------------------------------------------------------
\fn sme_ScanFlushResult
\brief a wrapper function to request CSR to clear scan results.
@@ -3465,7 +3477,7 @@ eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
* SME API to determine the channel bonding mode
*/
VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
- tANI_U8 channel, tANI_U32 vhtChannelWidth);
+ tANI_U8 channel, tANI_U32 *vht_channel_width);
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
/*--------------------------------------------------------------------------
diff --git a/CORE/SME/inc/sme_Trace.h b/CORE/SME/inc/sme_Trace.h
index 799cf3b5b278..4ebddca289a4 100644
--- a/CORE/SME/inc/sme_Trace.h
+++ b/CORE/SME/inc/sme_Trace.h
@@ -139,6 +139,10 @@ enum {
#ifdef FEATURE_BUS_AUTO_SUSPEND
TRACE_CODE_SME_RX_HDD_CONFIG_AUTO_SUSPENDIND,
#endif
+ TRACE_CODE_SME_RX_HDD_STORE_JOIN_REQ,
+ TRACE_CODE_SME_RX_HDD_CLEAR_JOIN_REQ,
+ TRACE_CODE_SME_RX_HDD_ISSUE_JOIN_REQ,
+
};
void smeTraceInit(tpAniSirGlobal pMac);
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 75970b95bfcb..f87ba2db9e3a 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -247,7 +247,10 @@ void csrRoamRemoveEntryFromPeStatsReqList(tpAniSirGlobal pMac, tCsrPeStatsReqInf
tListElem * csrRoamFindInPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 statsMask);
eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac);
static tANI_U32 csrFindIbssSession( tpAniSirGlobal pMac );
-static tANI_U32 csr_find_sap_session(tpAniSirGlobal pMac);
+static uint32_t csr_find_sap_session(tpAniSirGlobal pMac);
+static uint32_t csr_find_p2pgo_session(tpAniSirGlobal pMac);
+static bool csr_is_conn_allow_2g_band(tpAniSirGlobal pMac, uint32_t chnl);
+static bool csr_is_conn_allow_5g_band(tpAniSirGlobal pMac, uint32_t chnl);
static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc );
static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId );
static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId,
@@ -1937,6 +1940,8 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
pMac->roam.configParam.obssEnabled = pParam->obssEnabled;
pMac->roam.configParam.conc_custom_rule1 =
pParam->conc_custom_rule1;
+ pMac->roam.configParam.conc_custom_rule2 =
+ pParam->conc_custom_rule2;
pMac->roam.configParam.is_sta_connection_in_5gz_enabled =
pParam->is_sta_connection_in_5gz_enabled;
@@ -2099,6 +2104,8 @@ eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->conc_custom_rule1 =
pMac->roam.configParam.conc_custom_rule1;
+ pParam->conc_custom_rule2 =
+ pMac->roam.configParam.conc_custom_rule2;
pParam->is_sta_connection_in_5gz_enabled =
pMac->roam.configParam.is_sta_connection_in_5gz_enabled;
status = eHAL_STATUS_SUCCESS;
@@ -4115,30 +4122,6 @@ eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrR
}
}
- if (CSR_IS_INFRA_AP(pProfile) || CSR_IS_WDS_AP(pProfile) ||
- CSR_IS_IBSS(pProfile)) {
-#ifdef WLAN_FEATURE_11AC
- /* cbMode = 1 in cfg.ini is mapped to
- PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3
- in function csrConvertCBIniValueToPhyCBState()
- So, max value for cbMode in 40MHz mode
- is 3 (MAC\src\include\sirParams.h) */
- if (cfgCb) {
- if (cfgCb > PHY_DOUBLE_CHANNEL_HIGH_PRIMARY) {
- if (!WDA_getFwWlanFeatCaps(DOT11AC)) {
- cfgCb = csrGetHTCBStateFromVHTCBState(cfgCb);
- }
- }
- ccmCfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,
- pMac->roam.configParam.nVhtChannelWidth, NULL,
- eANI_BOOLEAN_FALSE);
- }
- else
-#endif
- /* WNI_CFG_CHANNEL_BONDING_MODE can be removed since it is not used */
- ccmCfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, cfgCb, NULL,
- eANI_BOOLEAN_FALSE);
- }
//Rate
//Fixed Rate
if(pBssDesc)
@@ -5808,6 +5791,8 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
{
roamInfo.fReassocReq = roamInfo.fReassocRsp = eANI_BOOLEAN_TRUE;
}
+ pSession->connectedProfile.vht_channel_width =
+ pJoinRsp->vht_channel_width;
pSession->connectedInfo.staId = ( tANI_U8 )pJoinRsp->staId;
roamInfo.staId = ( tANI_U8 )pJoinRsp->staId;
roamInfo.ucastSig = ( tANI_U8 )pJoinRsp->ucastSig;
@@ -5899,10 +5884,17 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
pMac->roam.configParam.doBMPSWorkaround = 1;
}
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
- if (pSession->roamOffloadSynchParams.bRoamSynchInProgress)
- {
+ if (pSession->roamOffloadSynchParams.bRoamSynchInProgress) {
roamInfo.roamSynchInProgress = 1;
- roamInfo.synchAuthStatus = pSession->roamOffloadSynchParams.authStatus;
+ roamInfo.synchAuthStatus =
+ pSession->roamOffloadSynchParams.authStatus;
+ vos_mem_copy(roamInfo.kck, pSession->roamOffloadSynchParams.kck,
+ SIR_KCK_KEY_LEN);
+ vos_mem_copy(roamInfo.kek, pSession->roamOffloadSynchParams.kek,
+ SIR_KEK_KEY_LEN);
+ vos_mem_copy(roamInfo.replay_ctr,
+ pSession->roamOffloadSynchParams.replay_ctr,
+ SIR_REPLAY_CTR_LEN);
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
FL("LFR3:csrRoamCallCallback:eCSR_ROAM_RESULT_ASSOCIATED"));
}
@@ -6612,6 +6604,7 @@ eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile,
}
#endif /* FEATURE_WLAN_WAPI */
pDstProfile->CBMode = pSrcProfile->CBMode;
+ pDstProfile->vht_channel_width = pSrcProfile->vht_channel_width;
/*Save the WPS info*/
pDstProfile->bWPSAssociation = pSrcProfile->bWPSAssociation;
pDstProfile->bOSENAssociation = pSrcProfile->bOSENAssociation;
@@ -12034,7 +12027,6 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
{
operationChannel = pProfile->ChannelInfo.ChannelList[0];
}
-
cfgDot11Mode = csrRoamGetPhyModeBandForBss( pMac, pProfile, operationChannel, &eBand );
if( ( (pProfile->csrPersona == VOS_P2P_CLIENT_MODE) ||
@@ -12181,6 +12173,7 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
}
pParam->operationChn = channel;
pParam->sirNwType = nwType;
+ pParam->vht_channel_width = pProfile->vht_channel_width;
}
static void csrRoamGetBssStartParmsFromBssDesc( tpAniSirGlobal pMac, tSirBssDescription *pBssDesc,
@@ -13139,8 +13132,6 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
tANI_U8 wpaRsnIE[DOT11F_IE_RSN_MAX_LEN]; //RSN MAX is bigger than WPA MAX
tANI_U32 ucDot11Mode = 0;
tANI_U8 txBFCsnValue = 0;
- tANI_U32 sap_session_id;
- tCsrRoamSession *sap_session;
if(!pSession)
{
@@ -13229,7 +13220,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
pBuf++;
//CBMode
*pBuf = (tANI_U8)pSession->bssParams.cbMode;
- pBuf++;
+ pBuf += sizeof(ePhyChanBondState);
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
FL("CSR PERSONA=%d CSR CbMode %d"), pProfile->csrPersona, pSession->bssParams.cbMode);
@@ -13796,7 +13787,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
/*
* conc_custom_rule1:
* If SAP comes up first and STA comes up later then SAP
- * need to follow STA's channel. In following if condition
+ * need to follow STA's channel in 2.4Ghz. In following if condition
* we are adding sanity check, just to make sure that if this rule
* is enabled then don't allow STA to connect on 5gz channel and also
* by this time SAP's channel should be the same as STA's channel.
@@ -13809,23 +13800,30 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
status = eHAL_STATUS_FAILURE;
break;
}
- if (!CSR_IS_CHANNEL_5GHZ(pBssDescription->channelId)) {
- sap_session_id = csr_find_sap_session(pMac);
- if (CSR_SESSION_ID_INVALID != sap_session_id) {
- sap_session = CSR_GET_SESSION(pMac, sap_session_id);
- if ((0 != sap_session->bssParams.operationChn) &&
- (sap_session->bssParams.operationChn !=
- pBssDescription->channelId)) {
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- FL("Can't allow STA to connect, channels not same"));
+ if (!CSR_IS_CHANNEL_5GHZ(pBssDescription->channelId) &&
+ (false == csr_is_conn_allow_2g_band(pMac,
+ pBssDescription->channelId))) {
+ status = eHAL_STATUS_FAILURE;
+ break;
+ }
+ }
- status = eHAL_STATUS_FAILURE;
- break;
- }
- }
+ /*
+ * conc_custom_rule2:
+ * If P2PGO comes up first and STA comes up later then P2PGO
+ * need to follow STA's channel in 5Ghz. In following if condition
+ * we are just adding sanity check to make sure that by this time
+ * P2PGO's channel is same as STA's channel.
+ */
+ if (pMac->roam.configParam.conc_custom_rule2) {
+ if (!CSR_IS_CHANNEL_24GHZ(pBssDescription->channelId) &&
+ (false == csr_is_conn_allow_5g_band(pMac,
+ pBssDescription->channelId))) {
+ status = eHAL_STATUS_FAILURE;
+ break;
}
}
+
status = palSendMBMessage(pMac->hHdd, pMsg );
if(!HAL_STATUS_SUCCESS(status))
{
@@ -14633,6 +14631,9 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
cbMode = (ePhyChanBondState)pal_cpu_to_be32(pParam->cbMode);
vos_mem_copy(pBuf, (tANI_U8 *)&cbMode, sizeof(ePhyChanBondState));
pBuf += sizeof(ePhyChanBondState);
+ /*set vht channel width*/
+ *pBuf = pParam->vht_channel_width;
+ pBuf++;
// Set privacy
*pBuf = pParam->privacy;
@@ -18254,27 +18255,11 @@ csrRoamChannelChangeReq(tpAniSirGlobal pMac, tCsrBssid bssid,
vos_mem_set((void *)pMsg, sizeof( tSirChanChangeRequest ), 0);
-#ifdef WLAN_FEATURE_11AC
- // cbMode = 1 in cfg.ini is mapped to PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3
- // in function csrConvertCBIniValueToPhyCBState()
- // So, max value for cbMode in 40MHz mode is 3 (MAC\src\include\sirParams.h)
- if (cbMode) {
- if (cbMode > PHY_DOUBLE_CHANNEL_HIGH_PRIMARY) {
- if (!WDA_getFwWlanFeatCaps(DOT11AC)) {
- cbMode = csrGetHTCBStateFromVHTCBState(cbMode);
- }
- }
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED,
- FL("sapdfs: channel width is [%d]"), vhtChannelWidth);
- ccmCfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH,
- vhtChannelWidth, NULL, eANI_BOOLEAN_FALSE);
- }
-#endif
-
pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_CHANNEL_CHANGE_REQ);
pMsg->messageLen = sizeof(tSirChanChangeRequest);
pMsg->targetChannel = targetChannel;
pMsg->cbMode = cbMode;
+ pMsg->vht_channel_width = vhtChannelWidth;
vos_mem_copy(pMsg->bssid, bssid, VOS_MAC_ADDR_SIZE);
status = palSendMBMessage(pMac->hHdd, pMsg);
@@ -18744,9 +18729,9 @@ void csrInitOperatingClasses(tHalHandle hHal)
*
* Return: sap session id.
*/
-static tANI_U32 csr_find_sap_session(tpAniSirGlobal mac_ctx)
+static uint32_t csr_find_sap_session(tpAniSirGlobal mac_ctx)
{
- tANI_U32 i, session_id = CSR_SESSION_ID_INVALID;
+ uint32_t i, session_id = CSR_SESSION_ID_INVALID;
tCsrRoamSession *session_ptr;
for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
if (CSR_IS_SESSION_VALID( mac_ctx, i)){
@@ -18760,3 +18745,240 @@ static tANI_U32 csr_find_sap_session(tpAniSirGlobal mac_ctx)
}
return session_id;
}
+
+/**
+ * csr_find_p2pgo_session() - This function will find the p2pgo session from all
+ * sessions.
+ * @mac_ctx: pointer to mac context.
+ *
+ * This function is written to find the p2pgo session id.
+ *
+ * Return: p2pgo session id.
+ */
+static uint32_t csr_find_p2pgo_session(tpAniSirGlobal mac_ctx)
+{
+ uint32_t i, session_id = CSR_SESSION_ID_INVALID;
+ tCsrRoamSession *session_ptr;
+ for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
+ if (CSR_IS_SESSION_VALID( mac_ctx, i)){
+ session_ptr = CSR_GET_SESSION(mac_ctx, i);
+ if (VOS_P2P_GO_MODE == session_ptr->bssParams.bssPersona) {
+ /* Found it */
+ session_id = i;
+ break;
+ }
+ }
+ }
+ return session_id;
+}
+
+/**
+ * csr_is_conn_allow_2g_band() - This function will check if station's conn
+ * is allowed in 2.4Ghz band.
+ * @mac_ctx: pointer to mac context.
+ * @chnl: station's channel.
+ *
+ * This function will check if station's connection is allowed in 5Ghz band
+ * after comparing it with SAP's operating channel. If SAP's operating
+ * channel and Station's channel is different than this function will return
+ * false else true.
+ *
+ * Return: true or false.
+ */
+static bool csr_is_conn_allow_2g_band(tpAniSirGlobal mac_ctx, uint32_t chnl)
+{
+ uint32_t sap_session_id;
+ tCsrRoamSession *sap_session;
+
+ if (0 == chnl) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("channel is zero, connection not allowed"));
+
+ return false;
+ }
+
+ sap_session_id = csr_find_sap_session(mac_ctx);
+ if (CSR_SESSION_ID_INVALID != sap_session_id) {
+ sap_session = CSR_GET_SESSION(mac_ctx, sap_session_id);
+ if ((0 != sap_session->bssParams.operationChn) &&
+ (sap_session->bssParams.operationChn != chnl)) {
+
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("Can't allow STA to connect, channels not same"));
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * csr_is_conn_allow_5g_band() - This function will check if station's conn
+ * is allowed in 5Ghz band.
+ * @mac_ctx: pointer to mac context.
+ * @chnl: station's channel.
+ *
+ * This function will check if station's connection is allowed in 5Ghz band
+ * after comparing it with P2PGO's operating channel. If P2PGO's operating
+ * channel and Station's channel is different than this function will return
+ * false else true.
+ *
+ * Return: true or false.
+ */
+static bool csr_is_conn_allow_5g_band(tpAniSirGlobal mac_ctx, uint32_t chnl)
+{
+ uint32_t p2pgo_session_id;
+ tCsrRoamSession *p2pgo_session;
+
+ if (0 == chnl) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("channel is zero, connection not allowed"));
+ return false;
+ }
+
+ p2pgo_session_id = csr_find_p2pgo_session(mac_ctx);
+ if (CSR_SESSION_ID_INVALID != p2pgo_session_id) {
+ p2pgo_session = CSR_GET_SESSION(mac_ctx, p2pgo_session_id);
+ if ((0 != p2pgo_session->bssParams.operationChn) &&
+ (eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED !=
+ p2pgo_session->connectState) &&
+ (p2pgo_session->bssParams.operationChn != chnl)) {
+
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("Can't allow STA to connect, channels not same"));
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * csr_clear_joinreq_param() - This function will clear station's params
+ * for stored join request to csr.
+ * @hal_handle: pointer to hal context.
+ * @session_id: station's session id.
+ *
+ * This function will clear station's allocated memory for cached join
+ * request.
+ *
+ * Return: true or false based on function's overall success.
+ */
+bool csr_clear_joinreq_param(tpAniSirGlobal mac_ctx,
+ uint32_t session_id)
+{
+ tCsrRoamSession *sta_session;
+ tScanResultList *bss_list;
+
+ if (NULL == mac_ctx) {
+ return false;
+ }
+
+ sta_session = CSR_GET_SESSION(mac_ctx, session_id);
+ if (NULL == sta_session) {
+ return false;
+ }
+
+ /* Release the memory allocated by previous join request */
+ bss_list =
+ (tScanResultList *)&sta_session->stored_roam_profile.bsslist_handle;
+ if (NULL != bss_list) {
+ csrScanResultPurge(mac_ctx,
+ sta_session->stored_roam_profile.bsslist_handle);
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
+ FL("bss list is released for session %d"), session_id);
+ sta_session->stored_roam_profile.bsslist_handle = NULL;
+ }
+ sta_session->stored_roam_profile.bsslist_handle = NULL;
+ csrReleaseProfile(mac_ctx, &sta_session->stored_roam_profile.profile);
+ sta_session->stored_roam_profile.reason = 0;
+ sta_session->stored_roam_profile.roam_id = 0;
+ sta_session->stored_roam_profile.imediate_flag = false;
+ sta_session->stored_roam_profile.clear_flag = false;
+ return true;
+}
+
+/**
+ * csr_store_joinreq_param() - This function will store station's join
+ * request to that station's session.
+ * @mac_ctx: pointer to mac context.
+ * @profile: pointer to station's roam profile.
+ * @scan_cache: pointer to station's scan cache.
+ * @roam_id: reference to roam_id variable being passed.
+ * @session_id: station's session id.
+ *
+ * This function will store station's join request to one of the
+ * csr structure and add it to station's session.
+ *
+ * Return: true or false based on function's overall success.
+ */
+bool csr_store_joinreq_param(tpAniSirGlobal mac_ctx,
+ tCsrRoamProfile *profile,
+ tScanResultHandle scan_cache,
+ uint32_t *roam_id,
+ uint32_t session_id)
+{
+ tCsrRoamSession *sta_session;
+
+ if (NULL == mac_ctx) {
+ return false;
+ }
+
+ sta_session = CSR_GET_SESSION(mac_ctx, session_id);
+ if (NULL == sta_session) {
+ return false;
+ }
+
+ sta_session->stored_roam_profile.session_id = session_id;
+ csrRoamCopyProfile(mac_ctx, &sta_session->stored_roam_profile.profile,
+ profile);
+ /* new bsslist_handle's memory will be relased later */
+ sta_session->stored_roam_profile.bsslist_handle = scan_cache;
+ sta_session->stored_roam_profile.reason = eCsrHddIssued;
+ sta_session->stored_roam_profile.roam_id = *roam_id;
+ sta_session->stored_roam_profile.imediate_flag = false;
+ sta_session->stored_roam_profile.clear_flag = false;
+
+ return true;
+}
+
+/**
+ * csr_issue_stored_joinreq() - This function will issues station's stored
+ * the join request.
+ * @mac_ctx: pointer to mac context.
+ * @roam_id: reference to roam_id variable being passed.
+ * @session_id: station's session id.
+ *
+ * This function will issue station's stored join request, from this point
+ * onwards the flow will be just like normal connect request.
+ *
+ * Return: eHAL_STATUS_SUCCESS or eHAL_STATUS_FAILURE.
+ */
+eHalStatus csr_issue_stored_joinreq(tpAniSirGlobal mac_ctx,
+ uint32_t *roam_id,
+ uint32_t session_id)
+{
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+ tCsrRoamSession *sta_session;
+ uint32_t new_roam_id;
+
+ sta_session = CSR_GET_SESSION(mac_ctx, session_id);
+ if (NULL == sta_session) {
+ return eHAL_STATUS_FAILURE;
+ }
+ new_roam_id = GET_NEXT_ROAM_ID(&mac_ctx->roam);
+ *roam_id = new_roam_id;
+ status = csrRoamIssueConnect(mac_ctx,
+ sta_session->stored_roam_profile.session_id,
+ &sta_session->stored_roam_profile.profile,
+ sta_session->stored_roam_profile.bsslist_handle,
+ sta_session->stored_roam_profile.reason,
+ new_roam_id,
+ sta_session->stored_roam_profile.imediate_flag,
+ sta_session->stored_roam_profile.clear_flag);
+ if (!HAL_STATUS_SUCCESS(status)) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("CSR failed to issue connect cmd with status = 0x%08X"),
+ status);
+ csr_clear_joinreq_param(mac_ctx, session_id);
+ }
+ return status;
+}
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index 8cbea8ce5e76..59d8bc506a2b 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -5128,29 +5128,9 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac,
vos_mem_free(pMac->roam.pReassocResp);
pMac->roam.pReassocResp = NULL;
}
- if (eSIR_ROAM_AUTH_STATUS_AUTHENTICATED ==
- pSession->roamOffloadSynchParams.authStatus) {
- if (pSession->connectedProfile.AuthType !=
- eCSR_AUTH_TYPE_OPEN_SYSTEM) {
- vos_mem_copy(roamInfo.kck,
- pSession->roamOffloadSynchParams.kck,
- SIR_KCK_KEY_LEN);
- vos_mem_copy(roamInfo.kek,
- pSession->roamOffloadSynchParams.kek,
- SIR_KEK_KEY_LEN);
- vos_mem_copy(roamInfo.replay_ctr,
- pSession->roamOffloadSynchParams.replay_ctr,
- SIR_REPLAY_CTR_LEN);
- VOS_TRACE(VOS_MODULE_ID_SME,
- VOS_TRACE_LEVEL_DEBUG,
- "LFR3:Send authorized event to supplicant");
- csrRoamCallCallback(pMac, sessionId,
- &roamInfo, 0, eCSR_ROAM_AUTHORIZED_EVENT, 0);
- }
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"LFR3:Send SynchCnf auth status authenticated");
csrRoamOffloadSendSynchCnf( pMac, sessionId);
- }
} else
#endif
csrRoamOffloadScan(pMac, sessionId,
diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c
index 79a4868538f7..ff2e4d05dd60 100644
--- a/CORE/SME/src/csr/csrUtil.c
+++ b/CORE/SME/src/csr/csrUtil.c
@@ -839,7 +839,8 @@ v_U16_t csrCheckConcurrentChannelOverlap(tpAniSirGlobal pMac, v_U16_t sap_ch,
* if conc_custom_rule1 is defined then we don't want p2pgo to
* follow SAP's channel or SAP to follow P2PGO's channel.
*/
- if (0 == pMac->roam.configParam.conc_custom_rule1) {
+ if (0 == pMac->roam.configParam.conc_custom_rule1 &&
+ 0 == pMac->roam.configParam.conc_custom_rule2) {
if (sap_ch == 0) {
sap_ch = pSession->connectedProfile.operationChannel;
csrGetChFromHTProfile(pMac,
@@ -2070,7 +2071,8 @@ csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
{
tANI_U32 sessionId = 0;
tANI_U8 automotive_support_enable =
- pMac->roam.configParam.conc_custom_rule1;
+ (pMac->roam.configParam.conc_custom_rule1 |
+ pMac->roam.configParam.conc_custom_rule2);
tVOS_CON_MODE bss_persona;
eCsrConnectState connect_state;
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 53a7ac9a5b62..416f7470eac2 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -3170,6 +3170,7 @@ eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultF
*/
VOS_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hHal,
tCsrRoamProfile *profile,
+ tScanResultHandle *scan_cache,
tANI_U8 *ap_chnl_id)
{
eHalStatus status = eHAL_STATUS_FAILURE;
@@ -3224,7 +3225,7 @@ VOS_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hHal,
if (eHAL_STATUS_SUCCESS == status) {
csr_get_bssdescr_from_scan_handle(filtered_scan_result,
&first_ap_profile);
- csrScanResultPurge(pMac, filtered_scan_result);
+ *scan_cache = filtered_scan_result;
if (0 != first_ap_profile.channelId) {
*ap_chnl_id = first_ap_profile.channelId;
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
@@ -3258,6 +3259,119 @@ VOS_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hHal,
return ret_status;
}
+/**
+ * sme_store_joinreq_param() - This function will pass station's join
+ * request to store to csr.
+ * @hal_handle: pointer to hal context.
+ * @profile: pointer to station's roam profile.
+ * @scan_cache: pointer to station's scan cache.
+ * @roam_id: reference to roam_id variable being passed.
+ * @session_id: station's session id.
+ *
+ * This function will pass station's join request further down to csr
+ * to store it. this stored parameter will be used later.
+ *
+ * Return: true or false based on function's overall success.
+ */
+bool sme_store_joinreq_param(tHalHandle hal_handle,
+ tCsrRoamProfile *profile,
+ tScanResultHandle scan_cache,
+ uint32_t *roam_id,
+ uint32_t session_id)
+{
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle);
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ bool ret_status = true;
+
+ MTRACE(vos_trace(VOS_MODULE_ID_SME,
+ TRACE_CODE_SME_RX_HDD_STORE_JOIN_REQ,
+ session_id, 0));
+ status = sme_AcquireGlobalLock( &mac_ctx->sme );
+ if (HAL_STATUS_SUCCESS(status)) {
+ if (false == csr_store_joinreq_param(mac_ctx, profile, scan_cache,
+ roam_id, session_id)) {
+ ret_status = false;
+ }
+ sme_ReleaseGlobalLock(&mac_ctx->sme);
+ } else {
+ ret_status = false;
+ }
+
+ return ret_status;
+}
+
+/**
+ * sme_clear_joinreq_param() - This function will pass station's clear
+ * the join request to csr.
+ * @hal_handle: pointer to hal context.
+ * @session_id: station's session id.
+ *
+ * This function will pass station's clear join request further down to csr
+ * to cleanup.
+ *
+ * Return: true or false based on function's overall success.
+ */
+bool sme_clear_joinreq_param(tHalHandle hal_handle,
+ uint32_t session_id)
+{
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle);
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ bool ret_status = true;
+
+ MTRACE(vos_trace(VOS_MODULE_ID_SME,
+ TRACE_CODE_SME_RX_HDD_CLEAR_JOIN_REQ,
+ session_id, 0));
+ status = sme_AcquireGlobalLock( &mac_ctx->sme );
+ if (HAL_STATUS_SUCCESS(status)) {
+ if (false == csr_clear_joinreq_param(mac_ctx,
+ session_id)) {
+ ret_status = false;
+ }
+ sme_ReleaseGlobalLock(&mac_ctx->sme);
+ } else {
+ ret_status = false;
+ }
+
+ return ret_status;
+}
+
+/**
+ * sme_issue_stored_joinreq() - This function will issues station's stored
+ * the join request to csr.
+ * @hal_handle: pointer to hal context.
+ * @roam_id: reference to roam_id variable being passed.
+ * @session_id: station's session id.
+ *
+ * This function will issue station's stored join request further down to csr
+ * to proceed forward.
+ *
+ * Return: VOS_STATUS_SUCCESS or VOS_STATUS_E_FAILURE.
+ */
+VOS_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle,
+ uint32_t *roam_id,
+ uint32_t session_id)
+{
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal_handle);
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ VOS_STATUS ret_status = VOS_STATUS_SUCCESS;
+
+ MTRACE(vos_trace(VOS_MODULE_ID_SME,
+ TRACE_CODE_SME_RX_HDD_ISSUE_JOIN_REQ,
+ session_id, 0));
+ status = sme_AcquireGlobalLock( &mac_ctx->sme );
+ if (HAL_STATUS_SUCCESS(status)) {
+ if (!HAL_STATUS_SUCCESS(csr_issue_stored_joinreq(mac_ctx,
+ roam_id,
+ session_id))) {
+ ret_status = VOS_STATUS_E_FAILURE;
+ }
+ sme_ReleaseGlobalLock(&mac_ctx->sme);
+ } else {
+ csr_clear_joinreq_param(mac_ctx, session_id);
+ ret_status = VOS_STATUS_E_FAILURE;
+ }
+ return ret_status;
+}
/* ---------------------------------------------------------------------------
\fn sme_ScanFlushResult
\brief a wrapper function to request CSR to clear scan results.
@@ -11493,7 +11607,7 @@ static const char* sme_CBMode2String( tANI_U32 mode)
*/
static VOS_STATUS sme_AdjustCBMode(tAniSirGlobal* pMac,
tSmeConfigParams *smeConfig,
- tANI_U8 channel)
+ tANI_U8 channel, tANI_U32 *vht_channel_width)
{
const tANI_U8 step = 4;
@@ -11615,11 +11729,16 @@ static VOS_STATUS sme_AdjustCBMode(tAniSirGlobal* pMac,
break;
}
+ if (eCSR_INI_SINGLE_CHANNEL_CENTERED == newMode) {
+ *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ;
+ } else {
+ *vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ;
+ }
+
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_WARN,
FL("bonding mode adjust: %s to %s"),
sme_CBMode2String(mode),
sme_CBMode2String(newMode));
-
}
/* check for mode change */
@@ -11639,7 +11758,7 @@ static VOS_STATUS sme_AdjustCBMode(tAniSirGlobal* pMac,
* SME API to determine the channel bonding mode
*/
VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
- tANI_U8 channel, tANI_U32 vhtChannelWidth)
+ tANI_U8 channel, tANI_U32 *vht_channel_width)
{
tSmeConfigParams smeConfig;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -11659,62 +11778,55 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: Incorrect PhyMode, CB mode is not selected", __func__);
+ *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ;
return VOS_STATUS_SUCCESS;
}
/* If channel bonding mode is not required */
if ( !pMac->roam.configParam.channelBondingMode5GHz
&& !pMac->roam.configParam.channelBondingMode24GHz) {
+ *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ;
return VOS_STATUS_SUCCESS;
}
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: channel - %d, channel_width - %d\n", __func__, channel,
+ *vht_channel_width);
vos_mem_zero(&smeConfig, sizeof (tSmeConfigParams));
sme_GetConfigParam(pMac, &smeConfig);
-#ifdef WLAN_FEATURE_11AC
if ((eCSR_DOT11_MODE_11ac == eCsrPhyMode ||
eCSR_DOT11_MODE_11ac_ONLY == eCsrPhyMode) &&
- (eHT_CHANNEL_WIDTH_80MHZ == vhtChannelWidth))
- {
- if (pMac->roam.configParam.channelBondingMode5GHz) {
- if ( channel== 36 || channel == 52 || channel == 100 ||
- channel == 116 || channel == 149 )
- {
+ (eHT_CHANNEL_WIDTH_80MHZ == *vht_channel_width)) {
+ if (pMac->roam.configParam.channelBondingMode5GHz) {
+ if (channel== 36 || channel == 52 || channel == 100 ||
+ channel == 116 || channel == 149) {
smeConfig.csrConfig.channelBondingMode5GHz =
eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
- }
- else if ( channel == 40 || channel == 56 || channel == 104 ||
- channel == 120 || channel == 153 )
- {
+ } else if (channel == 40 || channel == 56 || channel == 104 ||
+ channel == 120 || channel == 153) {
smeConfig.csrConfig.channelBondingMode5GHz =
eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
- }
- else if ( channel == 44 || channel == 60 || channel == 108 ||
- channel == 124 || channel == 157 )
- {
+ } else if (channel == 44 || channel == 60 || channel == 108 ||
+ channel == 124 || channel == 157) {
smeConfig.csrConfig.channelBondingMode5GHz =
eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
- }
- else if ( channel == 48 || channel == 64 || channel == 112 ||
- channel == 128 || channel == 144 || channel == 161 )
- {
+ } else if (channel == 48 || channel == 64 || channel == 112 ||
+ channel == 128 || channel == 144 || channel == 161) {
smeConfig.csrConfig.channelBondingMode5GHz =
eCSR_INI_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
- }
- else if ( channel == 165 || channel == 140 )
- {
+ } else if (channel == 165 || channel == 140) {
smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
- }
- else if ( channel == 132 )
- {
+ eCSR_INI_SINGLE_CHANNEL_CENTERED;
+ *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ;
+ } else if (channel == 132) {
smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
- }
- else if ( channel == 136 )
- {
+ eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
+ *vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ;
+ } else if (channel == 136) {
smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY;
+ eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY;
+ *vht_channel_width = eHT_CHANNEL_WIDTH_40MHZ;
}
}
/*TODO: Set HT40+ / HT40- for channel 5-7 based on ACS */
@@ -11729,37 +11841,28 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
smeConfig.csrConfig.channelBondingMode24GHz =
eCSR_INI_SINGLE_CHANNEL_CENTERED;
}
-
- }
-#endif
-
- if ((eCSR_DOT11_MODE_11n == eCsrPhyMode ||
+ } else if ((eCSR_DOT11_MODE_11n == eCsrPhyMode ||
eCSR_DOT11_MODE_11n_ONLY == eCsrPhyMode) ||
- ((eCSR_DOT11_MODE_11ac == eCsrPhyMode ||
+ ((eCSR_DOT11_MODE_11ac == eCsrPhyMode ||
eCSR_DOT11_MODE_11ac_ONLY == eCsrPhyMode) &&
- (eHT_CHANNEL_WIDTH_40MHZ == vhtChannelWidth)))
- {
- if (pMac->roam.configParam.channelBondingMode5GHz) {
- if ( channel== 40 || channel == 48 || channel == 56 ||
+ (eHT_CHANNEL_WIDTH_40MHZ == *vht_channel_width))) {
+ if (pMac->roam.configParam.channelBondingMode5GHz) {
+ if (channel== 40 || channel == 48 || channel == 56 ||
channel == 64 || channel == 104 || channel == 112 ||
channel == 120 || channel == 128 || channel == 136 ||
- channel == 153 || channel == 161 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY;
- }
- else if ( channel== 36 || channel == 44 || channel == 52 ||
+ channel == 153 || channel == 161) {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ eCSR_INI_DOUBLE_CHANNEL_HIGH_PRIMARY;
+ } else if (channel== 36 || channel == 44 || channel == 52 ||
channel == 60 || channel == 100 || channel == 108 ||
channel == 116 || channel == 124 || channel == 132 ||
- channel == 149 || channel == 157 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
- }
- else if ( channel == 165 || channel == 140)
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
+ channel == 149 || channel == 157) {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
+ } else if (channel == 165 || channel == 140) {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ eCSR_INI_SINGLE_CHANNEL_CENTERED;
+ *vht_channel_width = eHT_CHANNEL_WIDTH_20MHZ;
}
}
@@ -11784,16 +11887,15 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
value here.
for 802.11g only phy mode also channel bonding should be zero.
*/
- if ( eCSR_DOT11_MODE_11a == eCsrPhyMode ||
- eCSR_DOT11_MODE_abg == eCsrPhyMode)
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
- } else if ( eCSR_DOT11_MODE_11g_ONLY == eCsrPhyMode)
- smeConfig.csrConfig.channelBondingMode24GHz =
- eCSR_INI_SINGLE_CHANNEL_CENTERED;
-
- if ((eHT_CHANNEL_WIDTH_20MHZ == vhtChannelWidth) &&
+ if (eCSR_DOT11_MODE_11a == eCsrPhyMode ||
+ eCSR_DOT11_MODE_abg == eCsrPhyMode) {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ eCSR_INI_SINGLE_CHANNEL_CENTERED;
+ } else if (eCSR_DOT11_MODE_11g_ONLY == eCsrPhyMode)
+ smeConfig.csrConfig.channelBondingMode24GHz =
+ eCSR_INI_SINGLE_CHANNEL_CENTERED;
+
+ if ((eHT_CHANNEL_WIDTH_20MHZ == *vht_channel_width) &&
(eCSR_DOT11_MODE_11ac == eCsrPhyMode ||
eCSR_DOT11_MODE_11ac_ONLY == eCsrPhyMode)) {
if (channel <= 14) {
@@ -11805,7 +11907,7 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
}
}
- sme_AdjustCBMode(pMac, &smeConfig, channel);
+ sme_AdjustCBMode(pMac, &smeConfig, channel, vht_channel_width);
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s cbmode selected=%d", (channel <= 14) ? "2G" : "5G",
@@ -12976,8 +13078,6 @@ eHalStatus sme_RoamChannelChangeReq(tHalHandle hHal, tCsrBssid bssid,
status = sme_AcquireGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
- sme_SelectCBMode(hHal, phyMode, targetChannel, vhtChannelWidth);
-
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
FL("sapdfs: requested CBmode=%d & new negotiated CBmode=%d"),
cbMode, pMac->roam.configParam.channelBondingMode5GHz);
diff --git a/CORE/SME/src/sme_common/sme_Trace.c b/CORE/SME/src/sme_common/sme_Trace.c
index a7a0ef04827d..6ebaf18ffd3f 100644
--- a/CORE/SME/src/sme_common/sme_Trace.c
+++ b/CORE/SME/src/sme_common/sme_Trace.c
@@ -147,6 +147,9 @@ static tANI_U8* smeTraceGetRxMsgString( tANI_U32 code )
#ifdef FEATURE_BUS_AUTO_SUSPEND
CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_CONFIG_AUTO_SUSPENDIND);
#endif
+ CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_STORE_JOIN_REQ);
+ CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_CLEAR_JOIN_REQ);
+ CASE_RETURN_STRING(TRACE_CODE_SME_RX_HDD_ISSUE_JOIN_REQ);
default:
return( "UNKNOWN" );
diff --git a/Kbuild b/Kbuild
index 988b7bbc1f73..4030f73a81ad 100644
--- a/Kbuild
+++ b/Kbuild
@@ -919,7 +919,6 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
-DWLAN_FEATURE_LINK_LAYER_STATS \
-DWLAN_LOGGING_SOCK_SVC_ENABLE \
-DFEATURE_WLAN_EXTSCAN \
- -DQCA_LL_TX_FLOW_CT \
-DFEATURE_WLAN_LFR \
-DFEATURE_WLAN_CH144 \
-DQCA_PKT_PROTO_TRACE
@@ -955,8 +954,10 @@ endif
CDEFINES += -DOSIF_NEED_RX_PEER_ID \
-DQCA_SUPPORT_TXRX_LOCAL_PEER_ID
ifeq ($(CONFIG_ROME_IF),pci)
-CDEFINES += -DQCA_LL_TX_FLOW_CT \
- -DQCA_SUPPORT_TXRX_VDEV_PAUSE_LL \
+ifneq ($(CONFIG_MOBILE_ROUTER),y)
+CDEFINES += -DQCA_LL_TX_FLOW_CT
+endif
+CDEFINES += -DQCA_SUPPORT_TXRX_VDEV_PAUSE_LL \
-DQCA_SUPPORT_TXRX_VDEV_LL_TXQ
endif
diff --git a/firmware_bin/WCNSS_cfg.dat b/firmware_bin/WCNSS_cfg.dat
index 328912272d65..51e843ae470a 100644
--- a/firmware_bin/WCNSS_cfg.dat
+++ b/firmware_bin/WCNSS_cfg.dat
Binary files differ