diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index c86244bbad..735a473b88 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -352,8 +352,6 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_ENABLE_BEACON_RECEPTION_STATS);
gen->enable_remove_time_stamp_sync_cmd =
cfg_get(psoc, CFG_REMOVE_TIME_STAMP_SYNC_CMD);
- gen->enable_change_channel_bandwidth =
- cfg_get(psoc, CFG_CHANGE_CHANNEL_BANDWIDTH);
gen->disable_4way_hs_offload =
cfg_get(psoc, CFG_DISABLE_4WAY_HS_OFFLOAD);
}
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h
index 2adc345ff2..9fdcbbe3c9 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h
@@ -595,36 +595,6 @@
1, \
"Enable to remove time stamp sync cmd")
-/*
- *
- * gEnableChangeChannelBandWidth Enable/Disable change
- * channel&bandwidth in the mission mode
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * 0 not allow change channel&bandwidth by setMonChan
- * 1 allow change channel&bandwidth by setMonChan
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: External
- *
- *
- */
-#ifdef FEATURE_MONITOR_MODE_SUPPORT
-#define CFG_CHANGE_CHANNEL_BANDWIDTH_DEFAULT true
-#else
-#define CFG_CHANGE_CHANNEL_BANDWIDTH_DEFAULT false
-#endif
-
-#define CFG_CHANGE_CHANNEL_BANDWIDTH CFG_INI_BOOL( \
- "gEnableChangeChannelBandWidth", \
- CFG_CHANGE_CHANNEL_BANDWIDTH_DEFAULT, \
- "enable change channel bw")
-
/*
*
* disable_4way_hs_offload - Enable/Disable 4 way handshake offload to firmware
@@ -674,6 +644,5 @@
CFG(CFG_ITO_REPEAT_COUNT) \
CFG(CFG_ENABLE_BEACON_RECEPTION_STATS) \
CFG(CFG_REMOVE_TIME_STAMP_SYNC_CMD) \
- CFG(CFG_CHANGE_CHANNEL_BANDWIDTH)
#endif /* __CFG_MLME_GENERIC_H */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index 6baab17d9f..1edb893868 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -2036,16 +2036,6 @@ QDF_STATUS wlan_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value);
-/**
- * wlan_mlme_is_change_channel_bandwidth_enabled() - get the
- * enable_change_channel_bandwidth flag
- * @psoc: psoc context
- *
- * Return: true if enabled
- */
-bool
-wlan_mlme_is_change_channel_bandwidth_enabled(struct wlan_objmgr_psoc *psoc);
-
/**
* wlan_mlme_get_sta_miracast_mcc_rest_time() - Get STA/MIRACAST MCC rest time
*
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index a34aa65dbc..f05b23ef37 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -1140,7 +1140,6 @@ struct wlan_mlme_generic {
bool enable_beacon_reception_stats;
bool enable_remove_time_stamp_sync_cmd;
bool data_stall_recovery_fw_support;
- bool enable_change_channel_bandwidth;
bool disable_4way_hs_offload;
bool as_enabled;
};
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 0ed24805f3..401633fd7f 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -2609,19 +2609,6 @@ ucfg_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value)
return wlan_mlme_set_11d_enabled(psoc, value);
}
-/**
- * ucfg_mlme_is_change_channel_bandwidth_enabled() - ucfg api to get the
- * enable_change_channel_bandwidth flag
- * @psoc: psoc context
- *
- * Return: true if enabled
- */
-static inline bool
-ucfg_mlme_is_change_channel_bandwidth_enabled(struct wlan_objmgr_psoc *psoc)
-{
- return wlan_mlme_is_change_channel_bandwidth_enabled(psoc);
-}
-
/**
* ucfg_mlme_get_opr_rate_set() - Get operational rate set
* @psoc: pointer to psoc object
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 4a9c6c7e84..f447f72960 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -2618,18 +2618,6 @@ wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value)
return QDF_STATUS_SUCCESS;
}
-bool
-wlan_mlme_is_change_channel_bandwidth_enabled(struct wlan_objmgr_psoc *psoc)
-{
- struct wlan_mlme_psoc_ext_obj *mlme_obj;
-
- mlme_obj = mlme_get_psoc_ext_obj(psoc);
- if (!mlme_obj)
- return cfg_default(CFG_CHANGE_CHANNEL_BANDWIDTH);
-
- return mlme_obj->cfg.gen.enable_change_channel_bandwidth;
-}
-
QDF_STATUS
wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value)
{
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 4735f2d354..0367a3aff5 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -17524,10 +17524,6 @@ void hdd_select_cbmode(struct hdd_adapter *adapter, uint32_t oper_freq,
{
uint32_t sec_ch_freq = 0;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- struct hdd_station_ctx *station_ctx =
- WLAN_HDD_GET_STATION_CTX_PTR(adapter);
- eConnectionState connstate;
- bool cbmode_select = false;
/*
* CDS api expects secondary channel for calculating
@@ -17545,16 +17541,7 @@ void hdd_select_cbmode(struct hdd_adapter *adapter, uint32_t oper_freq,
wlan_reg_set_channel_params_for_freq(hdd_ctx->pdev, oper_freq,
sec_ch_freq, ch_params);
- if (adapter->device_mode == QDF_STA_MODE &&
- ucfg_mlme_is_change_channel_bandwidth_enabled(hdd_ctx->psoc)) {
- connstate = station_ctx->conn_info.conn_state;
- if (!(eConnectionState_Associated == connstate ||
- eConnectionState_Connecting == connstate)) {
- cbmode_select = true;
- }
- }
-
- if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE || cbmode_select)
+ if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
hdd_mon_select_cbmode(adapter, oper_freq, ch_params);
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 1fe3be5318..686b7fd28e 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -6847,25 +6847,14 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct hdd_mon_set_ch_info *ch_info = &sta_ctx->ch_info;
QDF_STATUS status;
- mac_handle_t mac_handle = hdd_ctx->mac_handle;
struct qdf_mac_addr bssid;
struct csr_roam_profile roam_profile;
struct ch_params ch_params;
- eConnectionState connstate;
- if (hdd_get_conparam() != QDF_GLOBAL_MONITOR_MODE &&
- adapter->device_mode != QDF_STA_MODE) {
- hdd_err("Not supported, device is not in monitor mode or sta mission mode");
+ if (hdd_get_conparam() != QDF_GLOBAL_MONITOR_MODE) {
+ hdd_err("Not supported, device is not in monitor mode");
return -EINVAL;
}
- if (adapter->device_mode == QDF_STA_MODE &&
- ucfg_mlme_is_change_channel_bandwidth_enabled(hdd_ctx->psoc)) {
- connstate = sta_ctx->conn_info.conn_state;
- if (eConnectionState_Associated == connstate ||
- eConnectionState_Connecting == connstate) {
- return -EINVAL;
- }
- }
/* Validate Channel */
if (!WLAN_REG_IS_24GHZ_CH(chan) && !WLAN_REG_IS_5GHZ_CH(chan)) {
@@ -6901,17 +6890,7 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, uint32_t chan,
roam_profile.ch_params.ch_width = bandwidth;
hdd_select_cbmode(adapter, wlan_chan_to_freq(chan),
&roam_profile.ch_params);
- if (ucfg_mlme_is_change_channel_bandwidth_enabled(hdd_ctx->psoc) &&
- (!sme_find_session_by_bssid(mac_handle, adapter->mac_addr.bytes))) {
- status = sme_create_mon_session(mac_handle,
- adapter->mac_addr.bytes,
- adapter->vdev_id);
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("Status: %d Failed to create session.",
- status);
- return qdf_status_to_os_return(status);
- }
- }
+
qdf_mem_copy(bssid.bytes, adapter->mac_addr.bytes,
QDF_MAC_ADDR_SIZE);
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index 2a6b9e8d3b..0d8b76abf0 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -2709,6 +2709,7 @@ void hdd_print_netdev_txq_status(struct net_device *dev)
int hdd_set_mon_rx_cb(struct net_device *dev)
{
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
int ret;
QDF_STATUS qdf_status;
struct ol_txrx_desc_type sta_desc = {0};
@@ -2734,6 +2735,14 @@ int hdd_set_mon_rx_cb(struct net_device *dev)
goto exit;
}
+ qdf_status = sme_create_mon_session(hdd_ctx->mac_handle,
+ adapter->mac_addr.bytes,
+ adapter->vdev_id);
+ if (QDF_STATUS_SUCCESS != qdf_status) {
+ hdd_err("sme_create_mon_session() failed to register. Status= %d [0x%08X]",
+ qdf_status, qdf_status);
+ }
+
exit:
ret = qdf_status_to_os_return(qdf_status);
return ret;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index de07fe8bc0..96a168e457 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -1103,7 +1103,6 @@ static inline void csr_roaming_report_diag_event(
{}
#endif
-bool csr_find_session_by_bssid(struct mac_context *mac_ctx, uint8_t *bssid);
QDF_STATUS csr_get_channels_and_power(struct mac_context *mac);
bool csr_nonscan_active_ll_is_list_empty(
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index 05a6ed0367..f2e698a25b 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -3536,16 +3536,6 @@ static inline int sme_add_key_krk(mac_handle_t mac_handle, uint8_t session_id,
}
#endif
-/**
- * sme_find_session_by_bssid() - checks whether has session
- * with given bssid
- * @mac_handle: Opaque handle to the global MAC context
- * @bssid: bssid
- * Return: true - if has the session
- * false - if not has the session
- */
-bool sme_find_session_by_bssid(mac_handle_t mac_handle, uint8_t *bssid);
-
/**
* sme_get_roam_scan_stats() - Send roam scan stats cmd to wma
* @mac_handle: handle returned by mac_open
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 1a3642d0aa..c09add45dd 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -15324,16 +15324,6 @@ uint8_t sme_get_mcs_idx(uint16_t raw_rate, enum tx_rate_info rate_flags,
nss, dcm, guard_interval, mcs_rate_flags);
}
-bool sme_find_session_by_bssid(mac_handle_t mac_handle, uint8_t *bssid)
-{
- struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
- bool ret;
-
- ret = csr_find_session_by_bssid(mac_ctx, bssid);
-
- return ret;
-}
-
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
QDF_STATUS sme_get_sta_cxn_info(mac_handle_t mac_handle, uint32_t session_id,
char *buf, uint32_t buf_sz)
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 82e5eb759a..83bee95ca4 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -20903,26 +20903,6 @@ csr_find_session_by_type(struct mac_context *mac_ctx, enum QDF_OPMODE type)
}
return session_id;
}
-/**
- * csr_find_session_by_bssid() - This function will find given bssid from
- * all sessions.
- * @mac_ctx: pointer to mac context.
- * @bssid: session bssid
- * Return: false or true.
- **/
-bool
-csr_find_session_by_bssid(struct mac_context *mac_ctx, uint8_t *bssid)
-{
- struct pe_session *session_entry;
- uint8_t session_id; /* PE session_id */
-
- session_entry = pe_find_session_by_bssid(mac_ctx,
- bssid, &session_id);
- if (session_entry)
- return true;
- else
- return false;
-}
/**
* csr_is_conn_allow_2g_band() - This function will check if station's conn