summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cds/src/cds_concurrency.c33
-rw-r--r--core/hdd/inc/wlan_hdd_main.h1
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c1
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c5
-rw-r--r--core/hdd/src/wlan_hdd_main.c1
5 files changed, 34 insertions, 7 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 53da1abc8f28..5bdf05f62e5f 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -2160,6 +2160,8 @@ static bool cds_current_concurrency_is_mcc(void)
* @chain_mask: Chain mask
* @vdev_id: vdev id
* @in_use: Flag to indicate if the index is in use or not
+ * @update_conn: Flag to indicate if mode change event should
+ * be sent or not
*
* Updates the index value of the concurrent connection list
*
@@ -2173,7 +2175,8 @@ static void cds_update_conc_list(uint32_t conn_index,
enum cds_chain_mode chain_mask,
uint32_t original_nss,
uint32_t vdev_id,
- bool in_use)
+ bool in_use,
+ bool update_conn)
{
cds_context_type *cds_ctx;
bool mcc_mode;
@@ -2205,7 +2208,13 @@ static void cds_update_conc_list(uint32_t conn_index,
if (cds_ctx->ol_txrx_update_mac_id_cb)
cds_ctx->ol_txrx_update_mac_id_cb(vdev_id, mac);
- if (cds_ctx->mode_change_cb)
+ /*
+ * For STA and P2P client mode, the mode change event sent as part
+ * of the callback causes delay in processing M1 frame at supplicant
+ * resulting in cert test case failure. The mode change event is sent
+ * as part of add key for STA and P2P client mode.
+ */
+ if (cds_ctx->mode_change_cb && update_conn)
cds_ctx->mode_change_cb();
/* IPA only cares about STA or SAP mode */
@@ -4642,6 +4651,7 @@ QDF_STATUS cds_incr_connection_count(uint32_t vdev_id)
enum cds_con_mode mode;
uint8_t chan;
uint32_t nss = 0;
+ bool update_conn = true;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx) {
@@ -4683,6 +4693,8 @@ QDF_STATUS cds_incr_connection_count(uint32_t vdev_id)
cds_err("Error in getting nss");
}
+ if (mode == CDS_STA_MODE || mode == CDS_P2P_CLIENT_MODE)
+ update_conn = false;
/* add the entry */
cds_update_conc_list(conn_index,
@@ -4691,7 +4703,7 @@ QDF_STATUS cds_incr_connection_count(uint32_t vdev_id)
cds_get_bw(wma_conn_table_entry->chan_width),
wma_conn_table_entry->mac_id,
chain_mask,
- nss, vdev_id, true);
+ nss, vdev_id, true, update_conn);
cds_debug("Add at idx:%d vdev %d mac=%d",
conn_index, vdev_id,
wma_conn_table_entry->mac_id);
@@ -4777,7 +4789,7 @@ QDF_STATUS cds_update_connection_info(uint32_t vdev_id)
cds_get_bw(wma_conn_table_entry->chan_width),
wma_conn_table_entry->mac_id,
chain_mask,
- nss, vdev_id, true);
+ nss, vdev_id, true, true);
return QDF_STATUS_SUCCESS;
}
@@ -8885,7 +8897,7 @@ QDF_STATUS cds_update_connection_info_utfw(
cds_update_conc_list(conn_index,
cds_get_mode(type, sub_type),
channelid, HW_MODE_20_MHZ,
- mac_id, chain_mask, 0, vdev_id, true);
+ mac_id, chain_mask, 0, vdev_id, true, true);
return QDF_STATUS_SUCCESS;
}
@@ -8899,6 +8911,8 @@ QDF_STATUS cds_incr_connection_count_utfw(
uint32_t conn_index = 0;
hdd_context_t *hdd_ctx;
cds_context_type *cds_ctx;
+ bool update_conn = true;
+ enum cds_con_mode mode;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx) {
@@ -8921,10 +8935,15 @@ QDF_STATUS cds_incr_connection_count_utfw(
}
cds_debug("--> filling entry at index[%d]", conn_index);
+ mode = cds_get_mode(type, sub_type);
+ if (mode == CDS_STA_MODE || mode == CDS_P2P_CLIENT_MODE)
+ update_conn = false;
+
cds_update_conc_list(conn_index,
- cds_get_mode(type, sub_type),
+ mode,
channelid, HW_MODE_20_MHZ,
- mac_id, chain_mask, 0, vdev_id, true);
+ mac_id, chain_mask, 0, vdev_id, true,
+ update_conn);
return QDF_STATUS_SUCCESS;
}
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 288f06a5ef1e..c0e88d3846b0 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1636,6 +1636,7 @@ struct hdd_adapter_s {
qdf_mutex_t ns_offload_info_lock;
#endif
struct hdd_apf_context apf_context;
+ bool send_mode_change;
};
#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 6fda307295b1..cb5183af4ab0 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1841,6 +1841,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
sme_ps_disable_auto_ps_timer(WLAN_HDD_GET_HAL_CTX
(pAdapter),
pAdapter->sessionId);
+ pAdapter->send_mode_change = true;
}
wlan_hdd_clear_link_layer_stats(pAdapter);
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 196d65a8fa47..857734d8b73f 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -15384,6 +15384,11 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
return -EINVAL;
}
+ if (pAdapter->send_mode_change) {
+ wlan_hdd_send_mode_change_event();
+ pAdapter->send_mode_change = false;
+ }
+
/* in case of IBSS as there was no information available about WEP keys during
* IBSS join, group key intialized with NULL key, so re-initialize group key
* with correct value*/
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 486ee8c02d96..ad16ef466bf0 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3255,6 +3255,7 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx,
adapter->offloads_configured = false;
adapter->isLinkUpSvcNeeded = false;
adapter->higherDtimTransition = true;
+ adapter->send_mode_change = true;
/* Init the net_device structure */
strlcpy(pWlanDev->name, name, IFNAMSIZ);