qcacld-3.0: Remove sta adapter number check when add monitor iface

1. Permit to add monitor iface even wlan0 down per customer requirement.
2. Don't need check sta adapter number when add monitor iface, monitor
iface doesn't depend on sta adapter number, sta adapter num is different
for mlo/non-mlo, dual sta/single sta.

Change-Id: I83494ba504288ee21abb2c5d287713fe86f8efe9
CRs-Fixed: 3447188
Bu işleme şunda yer alıyor:
Jianmin Zhu
2023-03-28 09:25:54 +08:00
işlemeyi yapan: Madan Koyyalamudi
ebeveyn dea51e434d
işleme 36214adc39
2 değiştirilmiş dosya ile 0 ekleme ve 51 silme

Dosyayı Görüntüle

@@ -9741,52 +9741,9 @@ bool policy_mgr_is_sta_mon_concurrency(struct wlan_objmgr_psoc *psoc)
return false;
}
#ifdef WLAN_FEATURE_11BE_MLO
static QDF_STATUS
policy_mgr_check_num_of_sta_sessions(struct wlan_objmgr_psoc *psoc) {
uint8_t num_open_session = 0;
/* Ensure there are only 3 station interface when 11be mlo is enabled */
if (policy_mgr_mode_specific_num_open_sessions(
psoc,
QDF_STA_MODE,
&num_open_session) != QDF_STATUS_SUCCESS)
return QDF_STATUS_E_INVAL;
if (num_open_session > 3) {
policy_mgr_err("cannot add monitor mode, due to %u sta interfaces",
num_open_session);
return QDF_STATUS_E_INVAL;
}
return QDF_STATUS_SUCCESS;
}
#else
static QDF_STATUS
policy_mgr_check_num_of_sta_sessions(struct wlan_objmgr_psoc *psoc) {
uint8_t num_open_session = 0;
/* Ensure there is only one station interface for legacy mode */
if (policy_mgr_mode_specific_num_open_sessions(
psoc,
QDF_STA_MODE,
&num_open_session) != QDF_STATUS_SUCCESS)
return QDF_STATUS_E_INVAL;
if (num_open_session > 1) {
policy_mgr_err("cannot add monitor mode, due to %u sta interfaces",
num_open_session);
return QDF_STATUS_E_INVAL;
}
return QDF_STATUS_SUCCESS;
}
#endif
QDF_STATUS policy_mgr_check_mon_concurrency(struct wlan_objmgr_psoc *psoc)
{
uint8_t num_open_session = 0;
QDF_STATUS status = QDF_STATUS_SUCCESS;
if (policy_mgr_mode_specific_num_open_sessions(
psoc,
@@ -9809,10 +9766,6 @@ QDF_STATUS policy_mgr_check_mon_concurrency(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_E_INVAL;
}
status = policy_mgr_check_num_of_sta_sessions(psoc);
if (QDF_IS_STATUS_ERROR(status))
return status;
num_open_session = policy_mgr_mode_specific_connection_count(
psoc,
PM_P2P_CLIENT_MODE,

Dosyayı Görüntüle

@@ -19723,10 +19723,6 @@ wlan_hdd_add_monitor_check(struct hdd_context *hdd_ctx,
QDF_STATUS status;
struct hdd_adapter_create_param params = {0};
/* if no interface is up do not add monitor mode */
if (!hdd_is_any_interface_open(hdd_ctx))
return -EINVAL;
sta_adapter = hdd_get_adapter(hdd_ctx, QDF_STA_MODE);
if (!sta_adapter) {
hdd_err("No station adapter");