|
@@ -626,10 +626,12 @@ void hdd_start_complete(int ret)
|
|
|
*/
|
|
|
static void hdd_set_rps_cpu_mask(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
hdd_send_rps_ind(adapter);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#ifdef QCA_HL_NETDEV_FLOW_CONTROL
|
|
@@ -2623,7 +2625,7 @@ exit:
|
|
|
|
|
|
bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
struct hdd_ap_ctx *ap_ctx;
|
|
|
bool dfs_disable_channel_switch = false;
|
|
|
|
|
@@ -2640,7 +2642,7 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
|
|
|
|
|
|
if ((QDF_SAP_MODE == adapter->device_mode ||
|
|
@@ -2656,6 +2658,7 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
|
|
|
cds_get_context(QDF_MODULE_ID_SOC),
|
|
|
adapter->vdev_id);
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return true;
|
|
@@ -3334,17 +3337,21 @@ static enum policy_mgr_con_mode wlan_hdd_get_mode_for_non_connected_vdev(
|
|
|
*/
|
|
|
static bool hdd_is_chan_switch_in_progress(void)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if ((adapter->device_mode == QDF_SAP_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_GO_MODE) &&
|
|
|
qdf_atomic_read(&adapter->ch_switch_in_progress)) {
|
|
|
hdd_debug("channel switch progress for vdev_id %d",
|
|
|
adapter->vdev_id);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return true;
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return false;
|
|
@@ -5887,9 +5894,9 @@ void hdd_cleanup_conn_info(struct hdd_adapter *adapter)
|
|
|
|
|
|
void hdd_sta_destroy_ctx_all(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter_dev_held(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->device_mode == QDF_STA_MODE)
|
|
|
hdd_cleanup_conn_info(adapter);
|
|
|
dev_put(adapter->dev);
|
|
@@ -5950,13 +5957,17 @@ static void hdd_cleanup_adapter(struct hdd_context *hdd_ctx,
|
|
|
static QDF_STATUS hdd_check_for_existing_macaddr(struct hdd_context *hdd_ctx,
|
|
|
tSirMacAddr mac_addr)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (!qdf_mem_cmp(adapter->mac_addr.bytes,
|
|
|
mac_addr, sizeof(tSirMacAddr))) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
@@ -6454,12 +6465,14 @@ static void wlan_hdd_cfg80211_scan_block_cb(struct work_struct *work)
|
|
|
static u8 hdd_get_mode_specific_interface_count(struct hdd_context *hdd_ctx,
|
|
|
enum QDF_OPMODE mode)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
u8 intf_count = 0;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->device_mode == mode)
|
|
|
intf_count++;
|
|
|
+
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
return intf_count;
|
|
|
}
|
|
@@ -7272,27 +7285,31 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
|
|
|
*/
|
|
|
void hdd_deinit_all_adapters(struct hdd_context *hdd_ctx, bool rtnl_held)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
hdd_deinit_adapter(hdd_ctx, adapter, rtnl_held);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ }
|
|
|
|
|
|
hdd_exit();
|
|
|
}
|
|
|
|
|
|
QDF_STATUS hdd_stop_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
|
if (hdd_ctx->sap_pre_cac_work.fn)
|
|
|
cds_flush_work(&hdd_ctx->sap_pre_cac_work);
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
hdd_stop_adapter(hdd_ctx, adapter);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ }
|
|
|
|
|
|
hdd_exit();
|
|
|
|
|
@@ -7434,7 +7451,7 @@ static void hdd_adapter_abort_tx_flow(struct hdd_adapter *adapter)
|
|
|
|
|
|
QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
bool value;
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
|
|
@@ -7443,7 +7460,7 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
ucfg_mlme_get_sap_internal_restart(hdd_ctx->psoc, &value);
|
|
|
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
hdd_info("[SSR] reset adapter with device mode %s(%d)",
|
|
|
qdf_opmode_str(adapter->device_mode),
|
|
|
adapter->device_mode);
|
|
@@ -7496,6 +7513,7 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
hdd_set_disconnect_status(adapter, false);
|
|
|
hdd_debug("Flush any mgmt references held by peer");
|
|
|
hdd_stop_adapter(hdd_ctx, adapter);
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
hdd_exit();
|
|
@@ -7505,17 +7523,22 @@ QDF_STATUS hdd_reset_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
|
|
|
bool hdd_is_any_interface_open(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
if (hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) {
|
|
|
hdd_info("FTM mode, don't close the module");
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags) ||
|
|
|
- test_bit(SME_SESSION_OPENED, &adapter->event_flags))
|
|
|
+ test_bit(SME_SESSION_OPENED, &adapter->event_flags)) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return true;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return false;
|
|
@@ -8200,17 +8223,19 @@ static void hdd_delete_sta(struct hdd_adapter *adapter)
|
|
|
|
|
|
QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
eConnectionState conn_state;
|
|
|
bool value;
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (!hdd_is_interface_up(adapter) &&
|
|
|
- adapter->device_mode != QDF_NDI_MODE)
|
|
|
+ adapter->device_mode != QDF_NDI_MODE) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
continue;
|
|
|
+ }
|
|
|
|
|
|
hdd_debug("[SSR] start adapter with device mode %s(%d)",
|
|
|
qdf_opmode_str(adapter->device_mode),
|
|
@@ -8340,14 +8365,19 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
* applicable to all interfaces
|
|
|
*/
|
|
|
wlan_hdd_cfg80211_register_frames(adapter);
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
- if (!hdd_is_interface_up(adapter))
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
+ if (!hdd_is_interface_up(adapter)) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
continue;
|
|
|
+ }
|
|
|
|
|
|
if (adapter->device_mode == QDF_P2P_GO_MODE)
|
|
|
hdd_stop_p2p_go(adapter);
|
|
|
+
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
hdd_exit();
|
|
@@ -8542,15 +8572,19 @@ QDF_STATUS hdd_adapter_iterate(hdd_adapter_iterate_cb cb, void *context)
|
|
|
struct hdd_adapter *hdd_get_adapter_by_rand_macaddr(
|
|
|
struct hdd_context *hdd_ctx, tSirMacAddr mac_addr)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if ((adapter->device_mode == QDF_STA_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_CLIENT_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_DEVICE_MODE) &&
|
|
|
ucfg_p2p_check_random_mac(hdd_ctx->psoc,
|
|
|
- adapter->vdev_id, mac_addr))
|
|
|
+ adapter->vdev_id, mac_addr)) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return adapter;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
@@ -8559,12 +8593,17 @@ struct hdd_adapter *hdd_get_adapter_by_rand_macaddr(
|
|
|
struct hdd_adapter *hdd_get_adapter_by_macaddr(struct hdd_context *hdd_ctx,
|
|
|
tSirMacAddr mac_addr)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (!qdf_mem_cmp(adapter->mac_addr.bytes,
|
|
|
- mac_addr, sizeof(tSirMacAddr)))
|
|
|
+ mac_addr, sizeof(tSirMacAddr))) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return adapter;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
@@ -8573,11 +8612,16 @@ struct hdd_adapter *hdd_get_adapter_by_macaddr(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter *hdd_get_adapter_by_vdev(struct hdd_context *hdd_ctx,
|
|
|
uint32_t vdev_id)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
- if (adapter->vdev_id == vdev_id)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
+ if (adapter->vdev_id == vdev_id) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return adapter;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
@@ -8586,13 +8630,17 @@ struct hdd_adapter *hdd_get_adapter_by_vdev(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter *hdd_adapter_get_by_reference(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter *reference)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter == reference) {
|
|
|
dev_hold(adapter->dev);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
break;
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return adapter;
|
|
@@ -8606,11 +8654,16 @@ void hdd_adapter_put(struct hdd_adapter *adapter)
|
|
|
struct hdd_adapter *hdd_get_adapter_by_iface_name(struct hdd_context *hdd_ctx,
|
|
|
const char *iface_name)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
- if (!qdf_str_cmp(adapter->dev->name, iface_name))
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
+ if (!qdf_str_cmp(adapter->dev->name, iface_name)) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return adapter;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
@@ -8629,11 +8682,16 @@ struct hdd_adapter *hdd_get_adapter_by_iface_name(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter *hdd_get_adapter(struct hdd_context *hdd_ctx,
|
|
|
enum QDF_OPMODE mode)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
- if (adapter->device_mode == mode)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
+ if (adapter->device_mode == mode) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return adapter;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
@@ -8662,15 +8720,19 @@ enum QDF_OPMODE hdd_get_device_mode(uint32_t vdev_id)
|
|
|
uint32_t hdd_get_operating_chan_freq(struct hdd_context *hdd_ctx,
|
|
|
enum QDF_OPMODE mode)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
uint32_t oper_chan_freq = 0;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (mode == adapter->device_mode) {
|
|
|
oper_chan_freq =
|
|
|
hdd_get_adapter_home_channel(adapter);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
break;
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return oper_chan_freq;
|
|
@@ -8679,11 +8741,11 @@ uint32_t hdd_get_operating_chan_freq(struct hdd_context *hdd_ctx,
|
|
|
static inline QDF_STATUS hdd_unregister_wext_all_adapters(struct hdd_context *
|
|
|
hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->device_mode == QDF_STA_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_CLIENT_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_DEVICE_MODE ||
|
|
@@ -8691,6 +8753,7 @@ static inline QDF_STATUS hdd_unregister_wext_all_adapters(struct hdd_context *
|
|
|
adapter->device_mode == QDF_P2P_GO_MODE) {
|
|
|
hdd_unregister_wext(adapter->dev);
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
hdd_exit();
|
|
@@ -8700,11 +8763,11 @@ static inline QDF_STATUS hdd_unregister_wext_all_adapters(struct hdd_context *
|
|
|
|
|
|
QDF_STATUS hdd_abort_mac_scan_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->device_mode == QDF_STA_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_CLIENT_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_DEVICE_MODE ||
|
|
@@ -8714,6 +8777,7 @@ QDF_STATUS hdd_abort_mac_scan_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
adapter->vdev_id, INVALID_SCAN_ID,
|
|
|
true);
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
hdd_exit();
|
|
@@ -8730,10 +8794,10 @@ QDF_STATUS hdd_abort_mac_scan_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
*/
|
|
|
static QDF_STATUS hdd_abort_sched_scan_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
int err;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->device_mode == QDF_STA_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_CLIENT_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_DEVICE_MODE ||
|
|
@@ -8743,6 +8807,7 @@ static QDF_STATUS hdd_abort_sched_scan_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
if (err)
|
|
|
hdd_err("Unable to stop scheduled scan");
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
@@ -9097,11 +9162,16 @@ QDF_STATUS hdd_post_cds_enable_config(struct hdd_context *hdd_ctx)
|
|
|
|
|
|
struct hdd_adapter *hdd_get_first_valid_adapter(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
- if (adapter && adapter->magic == WLAN_HDD_ADAPTER_MAGIC)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
+ if (adapter && adapter->magic == WLAN_HDD_ADAPTER_MAGIC) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return adapter;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
@@ -9372,10 +9442,12 @@ static void hdd_display_periodic_stats(struct hdd_context *hdd_ctx,
|
|
|
*/
|
|
|
static void hdd_clear_rps_cpu_mask(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter)
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
hdd_send_rps_disable_ind(adapter);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#ifdef CLD_PM_QOS
|
|
@@ -10053,7 +10125,8 @@ void hdd_send_mscs_action_frame(struct hdd_context *hdd_ctx,
|
|
|
|
|
|
static void __hdd_bus_bw_work_handler(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter = NULL, *con_sap_adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL,
|
|
|
+ *con_sap_adapter = NULL;
|
|
|
uint64_t tx_packets = 0, rx_packets = 0, tx_bytes = 0;
|
|
|
uint64_t fwd_tx_packets = 0, fwd_rx_packets = 0;
|
|
|
uint64_t fwd_tx_packets_diff = 0, fwd_rx_packets_diff = 0;
|
|
@@ -10069,19 +10142,22 @@ static void __hdd_bus_bw_work_handler(struct hdd_context *hdd_ctx)
|
|
|
if (hdd_ctx->is_wiphy_suspended)
|
|
|
return;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
/*
|
|
|
* Validate magic so we don't end up accessing
|
|
|
* an invalid adapter.
|
|
|
*/
|
|
|
- if (adapter->magic != WLAN_HDD_ADAPTER_MAGIC)
|
|
|
+ if (adapter->magic != WLAN_HDD_ADAPTER_MAGIC) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
continue;
|
|
|
+ }
|
|
|
|
|
|
if ((adapter->device_mode == QDF_STA_MODE ||
|
|
|
adapter->device_mode == QDF_P2P_CLIENT_MODE) &&
|
|
|
WLAN_HDD_GET_STATION_CTX_PTR(adapter)->conn_info.conn_state
|
|
|
!= eConnectionState_Associated) {
|
|
|
|
|
|
+ dev_put(adapter->dev);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -10089,6 +10165,7 @@ static void __hdd_bus_bw_work_handler(struct hdd_context *hdd_ctx)
|
|
|
adapter->device_mode == QDF_P2P_GO_MODE) &&
|
|
|
WLAN_HDD_GET_AP_CTX_PTR(adapter)->ap_active == false) {
|
|
|
|
|
|
+ dev_put(adapter->dev);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -10146,6 +10223,7 @@ static void __hdd_bus_bw_work_handler(struct hdd_context *hdd_ctx)
|
|
|
adapter->prev_tx_bytes = adapter->stats.tx_bytes;
|
|
|
qdf_spin_unlock_bh(&hdd_ctx->bus_bw_lock);
|
|
|
connected = true;
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
if (!connected) {
|
|
@@ -10551,7 +10629,7 @@ hdd_display_netif_queue_history_compact(struct hdd_context *hdd_ctx)
|
|
|
char temp_str[20 * WLAN_REASON_TYPE_MAX];
|
|
|
char *comb_log_str;
|
|
|
uint32_t comb_log_str_size;
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
|
|
|
comb_log_str_size = (ADAP_NETIFQ_LOG_LEN * WLAN_MAX_VDEVS) + 1;
|
|
|
comb_log_str = qdf_mem_malloc(comb_log_str_size);
|
|
@@ -10560,7 +10638,7 @@ hdd_display_netif_queue_history_compact(struct hdd_context *hdd_ctx)
|
|
|
|
|
|
bytes_written = 0;
|
|
|
|
|
|
- hdd_for_each_adapter_dev_held(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
curr_time = qdf_system_ticks();
|
|
|
total = curr_time - adapter->start_time;
|
|
|
delta = curr_time - adapter->last_time;
|
|
@@ -10719,14 +10797,14 @@ void
|
|
|
wlan_hdd_display_netif_queue_history(struct hdd_context *hdd_ctx,
|
|
|
enum qdf_stats_verbosity_level verb_lvl)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
|
|
|
if (verb_lvl == QDF_STATS_VERBOSITY_LEVEL_LOW) {
|
|
|
hdd_display_netif_queue_history_compact(hdd_ctx);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- hdd_for_each_adapter_dev_held(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->vdev_id == CDP_INVALID_VDEV_ID) {
|
|
|
dev_put(adapter->dev);
|
|
|
continue;
|
|
@@ -10745,9 +10823,9 @@ wlan_hdd_display_netif_queue_history(struct hdd_context *hdd_ctx,
|
|
|
*/
|
|
|
void wlan_hdd_clear_netif_queue_history(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
qdf_mem_zero(adapter->queue_oper_stats,
|
|
|
sizeof(adapter->queue_oper_stats));
|
|
|
qdf_mem_zero(adapter->queue_oper_history,
|
|
@@ -10756,6 +10834,7 @@ void wlan_hdd_clear_netif_queue_history(struct hdd_context *hdd_ctx)
|
|
|
adapter->start_time = adapter->last_time = qdf_system_ticks();
|
|
|
adapter->total_pause_time = 0;
|
|
|
adapter->total_unpause_time = 0;
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -11014,7 +11093,7 @@ hdd_store_sap_restart_channel(uint8_t restart_chan, uint8_t *restart_chan_store)
|
|
|
*/
|
|
|
void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
uint32_t i;
|
|
|
bool found = false;
|
|
|
uint8_t restart_chan_store[SAP_MAX_NUM_SESSION] = {0};
|
|
@@ -11027,7 +11106,7 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
|
|
|
bool is_vendor_acs_support =
|
|
|
cfg_default(CFG_USER_AUTO_CHANNEL_SELECTION);
|
|
|
|
|
|
- hdd_for_each_adapter_dev_held(hdd_ctxt, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctxt, adapter, next_adapter) {
|
|
|
if (!(adapter->device_mode == QDF_SAP_MODE &&
|
|
|
adapter->session.ap.sap_config.acs_cfg.acs_mode)) {
|
|
|
hdd_debug_rl("skip device mode:%d acs:%d",
|
|
@@ -11141,6 +11220,8 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
|
|
|
hdd_switch_sap_channel(adapter, restart_chan,
|
|
|
true);
|
|
|
dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return;
|
|
|
}
|
|
|
else {
|
|
@@ -11149,6 +11230,8 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
|
|
|
hdd_ctxt->radio_index,
|
|
|
WLAN_SVC_LTE_COEX_IND, NULL, 0);
|
|
|
dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -11326,7 +11409,7 @@ wlan_hdd_get_adapter_by_vdev_id_from_objmgr(struct hdd_context *hdd_ctx,
|
|
|
void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx = NULL;
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
int i, num_adapters;
|
|
|
uint8_t vdev_id[WLAN_MAX_VDEVS];
|
|
|
struct ieee80211_mgmt *mgmt =
|
|
@@ -11352,7 +11435,8 @@ void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind)
|
|
|
}
|
|
|
} else if (SME_SESSION_ID_BROADCAST == frame_ind->sessionId) {
|
|
|
num_adapters = 0;
|
|
|
- hdd_for_each_adapter_dev_held(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter,
|
|
|
+ next_adapter) {
|
|
|
vdev_id[num_adapters] = adapter->vdev_id;
|
|
|
num_adapters++;
|
|
|
/* dev_put has to be done here */
|
|
@@ -14165,7 +14249,7 @@ static void hdd_state_info_dump(char **buf_ptr, uint16_t *size)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx;
|
|
|
struct hdd_station_ctx *hdd_sta_ctx;
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
uint16_t len = 0;
|
|
|
char *buf = *buf_ptr;
|
|
|
|
|
@@ -14183,7 +14267,7 @@ static void hdd_state_info_dump(char **buf_ptr, uint16_t *size)
|
|
|
"\n is_scheduler_suspended %d",
|
|
|
hdd_ctx->is_scheduler_suspended);
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter->dev)
|
|
|
len += scnprintf(buf + len, *size - len,
|
|
|
"\n device name: %s", adapter->dev->name);
|
|
@@ -14201,6 +14285,7 @@ static void hdd_state_info_dump(char **buf_ptr, uint16_t *size)
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
*size -= len;
|
|
@@ -15111,13 +15196,13 @@ wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter,
|
|
|
enum wlan_cm_rso_control_requestor rso_op_requestor)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(cur_adapter);
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
struct hdd_station_ctx *sta_ctx;
|
|
|
|
|
|
if (!policy_mgr_is_sta_active_connection_exists(hdd_ctx->psoc))
|
|
|
return;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
|
|
|
if (cur_adapter->vdev_id != adapter->vdev_id &&
|
|
@@ -15129,6 +15214,7 @@ wlan_hdd_disable_roaming(struct hdd_adapter *cur_adapter,
|
|
|
REASON_DRIVER_DISABLED,
|
|
|
rso_op_requestor);
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -15137,13 +15223,13 @@ wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter,
|
|
|
enum wlan_cm_rso_control_requestor rso_op_requestor)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(cur_adapter);
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
struct hdd_station_ctx *sta_ctx;
|
|
|
|
|
|
if (!policy_mgr_is_sta_active_connection_exists(hdd_ctx->psoc))
|
|
|
return;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
|
|
|
if (cur_adapter->vdev_id != adapter->vdev_id &&
|
|
@@ -15155,6 +15241,7 @@ wlan_hdd_enable_roaming(struct hdd_adapter *cur_adapter,
|
|
|
REASON_DRIVER_ENABLED,
|
|
|
rso_op_requestor);
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -15276,7 +15363,7 @@ void wlan_hdd_auto_shutdown_cb(void)
|
|
|
|
|
|
void wlan_hdd_auto_shutdown_enable(struct hdd_context *hdd_ctx, bool enable)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
bool ap_connected = false, sta_connected = false;
|
|
|
mac_handle_t mac_handle;
|
|
|
|
|
@@ -15299,12 +15386,16 @@ void wlan_hdd_auto_shutdown_enable(struct hdd_context *hdd_ctx, bool enable)
|
|
|
|
|
|
/* To enable shutdown timer check conncurrency */
|
|
|
if (policy_mgr_concurrent_open_sessions_running(hdd_ctx->psoc)) {
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter,
|
|
|
+ next_adapter) {
|
|
|
if (adapter->device_mode == QDF_STA_MODE) {
|
|
|
if (WLAN_HDD_GET_STATION_CTX_PTR(adapter)->
|
|
|
conn_info.conn_state ==
|
|
|
eConnectionState_Associated) {
|
|
|
sta_connected = true;
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -15313,9 +15404,13 @@ void wlan_hdd_auto_shutdown_enable(struct hdd_context *hdd_ctx, bool enable)
|
|
|
if (WLAN_HDD_GET_AP_CTX_PTR(adapter)->
|
|
|
ap_active == true) {
|
|
|
ap_connected = true;
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -15339,11 +15434,11 @@ hdd_get_con_sap_adapter(struct hdd_adapter *this_sap_adapter,
|
|
|
bool check_start_bss)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(this_sap_adapter);
|
|
|
- struct hdd_adapter *adapter, *con_sap_adapter;
|
|
|
+ struct hdd_adapter *adapter, *con_sap_adapter, *next_adapter = NULL;
|
|
|
|
|
|
con_sap_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (adapter && ((adapter->device_mode == QDF_SAP_MODE) ||
|
|
|
(adapter->device_mode == QDF_P2P_GO_MODE)) &&
|
|
|
adapter != this_sap_adapter) {
|
|
@@ -15351,13 +15446,20 @@ hdd_get_con_sap_adapter(struct hdd_adapter *this_sap_adapter,
|
|
|
if (test_bit(SOFTAP_BSS_STARTED,
|
|
|
&adapter->event_flags)) {
|
|
|
con_sap_adapter = adapter;
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
break;
|
|
|
}
|
|
|
} else {
|
|
|
con_sap_adapter = adapter;
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return con_sap_adapter;
|
|
@@ -15377,24 +15479,35 @@ static inline bool hdd_adapter_is_ap(struct hdd_adapter *adapter)
|
|
|
|
|
|
bool hdd_is_any_adapter_connected(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter;
|
|
|
+ struct hdd_adapter *adapter, *next_adapter = NULL;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
if (hdd_adapter_is_sta(adapter) &&
|
|
|
WLAN_HDD_GET_STATION_CTX_PTR(adapter)->
|
|
|
conn_info.conn_state == eConnectionState_Associated) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
if (hdd_adapter_is_ap(adapter) &&
|
|
|
WLAN_HDD_GET_AP_CTX_PTR(adapter)->ap_active) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
if (adapter->device_mode == QDF_NDI_MODE &&
|
|
|
WLAN_HDD_GET_STATION_CTX_PTR(adapter)->
|
|
|
- conn_info.conn_state == eConnectionState_NdiConnected)
|
|
|
+ conn_info.conn_state == eConnectionState_NdiConnected) {
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return true;
|
|
|
+ }
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return false;
|
|
@@ -17568,7 +17681,7 @@ int hdd_enable_disable_ca_event(struct hdd_context *hdd_ctx, uint8_t set_value)
|
|
|
|
|
|
bool hdd_is_roaming_in_progress(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
- struct hdd_adapter *adapter = NULL;
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
uint8_t vdev_id;
|
|
|
|
|
|
if (!hdd_ctx) {
|
|
@@ -17579,7 +17692,7 @@ bool hdd_is_roaming_in_progress(struct hdd_context *hdd_ctx)
|
|
|
if (!policy_mgr_is_sta_active_connection_exists(hdd_ctx->psoc))
|
|
|
return false;
|
|
|
|
|
|
- hdd_for_each_adapter(hdd_ctx, adapter) {
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
vdev_id = adapter->vdev_id;
|
|
|
if (adapter->device_mode == QDF_STA_MODE &&
|
|
|
(MLME_IS_ROAM_SYNCH_IN_PROGRESS(hdd_ctx->psoc, vdev_id) ||
|
|
@@ -17588,8 +17701,12 @@ bool hdd_is_roaming_in_progress(struct hdd_context *hdd_ctx)
|
|
|
vdev_id))) {
|
|
|
hdd_debug("Roaming is in progress on:vdev_id:%d",
|
|
|
adapter->vdev_id);
|
|
|
+ dev_put(adapter->dev);
|
|
|
+ if (next_adapter)
|
|
|
+ dev_put(next_adapter->dev);
|
|
|
return true;
|
|
|
}
|
|
|
+ dev_put(adapter->dev);
|
|
|
}
|
|
|
|
|
|
return false;
|