mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacld-3.0: add support for IBSS+STA concurrency
Make necessary changes to support IBSS+STA concurrency for SCC and 2G+5G MCC. Don't support intraband MCC due to known limitation for this specific concurrency. Change-Id: I325b5f51abeee3da0a75f90723c8b882f71dbef2 CRs-Fixed: 953788
This commit is contained in:
parent
64740919bf
commit
2c68f23ccc
6 changed files with 42 additions and 21 deletions
|
|
@ -1817,10 +1817,10 @@ next_action_two_connection_table[CDS_MAX_ONE_CONNECTION_MODE][CDS_MAX_BAND] = {
|
|||
[CDS_SAP_24_2x2] = {CDS_NOP, CDS_DBS_DOWNGRADE},
|
||||
[CDS_SAP_5_1x1] = {CDS_DBS, CDS_NOP},
|
||||
[CDS_SAP_5_2x2] = {CDS_DBS_DOWNGRADE, CDS_NOP},
|
||||
[CDS_IBSS_24_1x1] = {CDS_NOP, CDS_NOP},
|
||||
[CDS_IBSS_24_2x2] = {CDS_NOP, CDS_NOP},
|
||||
[CDS_IBSS_5_1x1] = {CDS_NOP, CDS_NOP},
|
||||
[CDS_IBSS_5_2x2] = {CDS_NOP, CDS_NOP},
|
||||
[CDS_IBSS_24_1x1] = {CDS_NOP, CDS_DBS},
|
||||
[CDS_IBSS_24_2x2] = {CDS_NOP, CDS_DBS_DOWNGRADE},
|
||||
[CDS_IBSS_5_1x1] = {CDS_DBS, CDS_NOP},
|
||||
[CDS_IBSS_5_2x2] = {CDS_DBS_DOWNGRADE, CDS_NOP},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3351,11 +3351,17 @@ static void cds_soc_set_pcl(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode)
|
|||
void cds_incr_active_session(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode,
|
||||
uint8_t session_id)
|
||||
{
|
||||
/*
|
||||
* Need to aquire mutex as entire functionality in this function
|
||||
* is in critical section
|
||||
*/
|
||||
cdf_mutex_acquire(&hdd_ctx->hdd_conc_list_lock);
|
||||
switch (mode) {
|
||||
case CDF_STA_MODE:
|
||||
case CDF_P2P_CLIENT_MODE:
|
||||
case CDF_P2P_GO_MODE:
|
||||
case CDF_SAP_MODE:
|
||||
case CDF_IBSS_MODE:
|
||||
hdd_ctx->no_of_active_sessions[mode]++;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -3368,7 +3374,6 @@ void cds_incr_active_session(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode,
|
|||
* Let us set the PCL to the FW before updating the connection
|
||||
* info structure about the new connection.
|
||||
*/
|
||||
cdf_mutex_acquire(&hdd_ctx->hdd_conc_list_lock);
|
||||
if (mode == CDF_STA_MODE) {
|
||||
/* Set PCL of STA to the FW */
|
||||
cds_soc_set_pcl(hdd_ctx, mode);
|
||||
|
|
@ -3503,7 +3508,6 @@ void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
|||
{
|
||||
CDF_STATUS cdf_status;
|
||||
|
||||
cdf_mutex_acquire(&hdd_ctx->hdd_conc_list_lock);
|
||||
cds_decr_active_session(hdd_ctx, mode, session_id);
|
||||
/*
|
||||
* After the removal of this connection, we need to check if
|
||||
|
|
@ -3519,6 +3523,7 @@ void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
|||
* given to the FW. After setting the PCL, we need to restore
|
||||
* the entry that we have saved before.
|
||||
*/
|
||||
cdf_mutex_acquire(&hdd_ctx->hdd_conc_list_lock);
|
||||
cds_set_pcl_for_existing_combo(hdd_ctx, CDS_STA_MODE);
|
||||
/* do we need to change the HW mode */
|
||||
if (cds_need_opportunistic_upgrade(hdd_ctx)) {
|
||||
|
|
@ -3552,11 +3557,17 @@ void cds_decr_session_set_pcl(hdd_context_t *hdd_ctx,
|
|||
void cds_decr_active_session(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode,
|
||||
uint8_t session_id)
|
||||
{
|
||||
/*
|
||||
* Need to aquire mutex as entire functionality in this function
|
||||
* is in critical section
|
||||
*/
|
||||
cdf_mutex_acquire(&hdd_ctx->hdd_conc_list_lock);
|
||||
switch (mode) {
|
||||
case CDF_STA_MODE:
|
||||
case CDF_P2P_CLIENT_MODE:
|
||||
case CDF_P2P_GO_MODE:
|
||||
case CDF_SAP_MODE:
|
||||
case CDF_IBSS_MODE:
|
||||
if (hdd_ctx->no_of_active_sessions[mode])
|
||||
hdd_ctx->no_of_active_sessions[mode]--;
|
||||
break;
|
||||
|
|
@ -3566,6 +3577,7 @@ void cds_decr_active_session(hdd_context_t *hdd_ctx, tCDF_CON_MODE mode,
|
|||
cds_info("No.# of active sessions for mode %d = %d",
|
||||
mode, hdd_ctx->no_of_active_sessions[mode]);
|
||||
cds_decr_connection_count(hdd_ctx, session_id);
|
||||
cdf_mutex_release(&hdd_ctx->hdd_conc_list_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -814,8 +814,8 @@ static void hdd_send_association_event(struct net_device *dev,
|
|||
#endif
|
||||
} else if (eConnectionState_IbssConnected == /* IBss Associated */
|
||||
pHddStaCtx->conn_info.connState) {
|
||||
cds_incr_active_session(pHddCtx, pAdapter->device_mode,
|
||||
pAdapter->sessionId);
|
||||
cds_update_connection_info(pHddCtx,
|
||||
pAdapter->sessionId);
|
||||
memcpy(wrqu.ap_addr.sa_data, pHddStaCtx->conn_info.bssId.bytes,
|
||||
ETH_ALEN);
|
||||
pr_info("wlan: new IBSS connection to " MAC_ADDRESS_STR "\n",
|
||||
|
|
@ -2427,7 +2427,14 @@ static void hdd_roam_ibss_indication_handler(hdd_adapter_t *pAdapter,
|
|||
pHddCtx->wiphy,
|
||||
bss);
|
||||
}
|
||||
|
||||
if (eCSR_ROAM_RESULT_IBSS_STARTED == roamResult) {
|
||||
cds_incr_active_session(pHddCtx, pAdapter->device_mode,
|
||||
pAdapter->sessionId);
|
||||
} else if (eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS == roamResult ||
|
||||
eCSR_ROAM_RESULT_IBSS_COALESCED == roamResult) {
|
||||
cds_update_connection_info(pHddCtx,
|
||||
pAdapter->sessionId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ static struct ieee80211_iface_combination
|
|||
/* ADHOC */
|
||||
{
|
||||
.limits = wlan_hdd_adhoc_iface_limit,
|
||||
.num_different_channels = 1,
|
||||
.num_different_channels = 2,
|
||||
.max_interfaces = 2,
|
||||
.n_limits = ARRAY_SIZE(wlan_hdd_adhoc_iface_limit),
|
||||
},
|
||||
|
|
@ -5857,7 +5857,8 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|||
|
||||
if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
|
||||
(pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) ||
|
||||
(pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)) {
|
||||
(pAdapter->device_mode == WLAN_HDD_P2P_DEVICE) ||
|
||||
(pAdapter->device_mode == WLAN_HDD_IBSS)) {
|
||||
hdd_wext_state_t *pWextState =
|
||||
WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
|
||||
|
|
|
|||
|
|
@ -5811,6 +5811,7 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx,
|
|||
csr_roam_call_callback(mac_ctx, session_id, NULL,
|
||||
cmd->u.roamCmd.roamId, eCSR_ROAM_IBSS_LEAVE,
|
||||
eCSR_ROAM_RESULT_IBSS_STOP);
|
||||
session->connectState = eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED;
|
||||
break;
|
||||
case eCsrForcedDisassocMICFailure:
|
||||
csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE,
|
||||
|
|
|
|||
|
|
@ -1905,7 +1905,8 @@ csr_isconcurrentsession_valid(tpAniSirGlobal mac_ctx, uint32_t cur_sessionid,
|
|||
}
|
||||
break;
|
||||
case CDF_IBSS_MODE:
|
||||
if ((bss_persona == CDF_IBSS_MODE) && (connect_state !=
|
||||
if ((bss_persona == CDF_IBSS_MODE) &&
|
||||
(connect_state ==
|
||||
eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SME,
|
||||
CDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -2231,6 +2232,7 @@ CDF_STATUS csr_validate_mcc_beacon_interval(tpAniSirGlobal pMac, uint8_t channel
|
|||
break;
|
||||
|
||||
case CDF_SAP_MODE:
|
||||
case CDF_IBSS_MODE:
|
||||
break;
|
||||
|
||||
case CDF_P2P_GO_MODE:
|
||||
|
|
|
|||
|
|
@ -2924,8 +2924,13 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
|||
tSetBssKeyParams key_info;
|
||||
struct sir_hw_mode_params hw_mode = {0};
|
||||
|
||||
WMA_LOGD("%s: add_bss->sessionId = %d", __func__, add_bss->sessionId);
|
||||
vdev_id = add_bss->sessionId;
|
||||
vdev = wma_find_vdev_by_addr(wma, add_bss->selfMacAddr, &vdev_id);
|
||||
if (!vdev) {
|
||||
WMA_LOGE("%s: vdev not found for vdev id %d.",
|
||||
__func__, vdev_id);
|
||||
goto send_fail_resp;
|
||||
}
|
||||
WMA_LOGD("%s: add_bss->sessionId = %d", __func__, vdev_id);
|
||||
pdev = cds_get_context(CDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
|
|
@ -2934,13 +2939,6 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
|||
}
|
||||
wma_set_bss_rate_flags(&wma->interfaces[vdev_id], add_bss);
|
||||
|
||||
vdev = wma_find_vdev_by_id(wma, vdev_id);
|
||||
if (!vdev) {
|
||||
WMA_LOGE("%s: vdev not found for vdev id %d.",
|
||||
__func__, vdev_id);
|
||||
goto send_fail_resp;
|
||||
}
|
||||
|
||||
/* only change vdev type to ibss during 1st time join_ibss handling */
|
||||
|
||||
if (false == wma_is_vdev_in_ibss_mode(wma, vdev_id)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue