diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index 86e4e02e1f51..3725b46c7393 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -783,12 +783,10 @@ int wlan_hdd_send_mode_change_event(void); * wlan_hdd_restore_channels() - Restore the channels which were cached * and disabled in wlan_hdd_disable_channels api. * @hdd_ctx: Pointer to the HDD context - * @notify_sap_event: Indicates if SAP event needs to be notified * * Return: 0 on success, Error code on failure */ -int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, - bool notify_sap_event); +int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx); /* * wlan_hdd_send_sta_authorized_event: Function to send station authorized diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index f8254fd10da2..a1d6483163cc 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -4831,8 +4831,7 @@ static struct ieee80211_channel *wlan_hdd_get_wiphy_channel( return wiphy_channel; } -int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, - bool notify_sap_event) +int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx) { struct hdd_cache_channels *cache_chann; struct wiphy *wiphy; @@ -4888,10 +4887,8 @@ int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, } qdf_mutex_release(&hdd_ctx->cache_channel_lock); - if (notify_sap_event) - ucfg_reg_notify_sap_event(hdd_ctx->pdev, false); - else - ucfg_reg_restore_cached_channels(hdd_ctx->pdev); + + ucfg_reg_restore_cached_channels(hdd_ctx->pdev); status = sme_update_channel_list(hdd_ctx->mac_handle); if (status) hdd_err("Can't Restore channel list"); @@ -4963,7 +4960,7 @@ int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) } qdf_mutex_release(&hdd_ctx->cache_channel_lock); - status = ucfg_reg_notify_sap_event(hdd_ctx->pdev, true); + ucfg_reg_disable_cached_channels(hdd_ctx->pdev); status = sme_update_channel_list(hdd_ctx->mac_handle); hdd_exit(); @@ -4975,8 +4972,7 @@ int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx) return 0; } -int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx, - bool notify_sap_event) +int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx) { return 0; } diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index a767b78b5492..b3fbc9acbf22 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -6674,7 +6674,7 @@ static int hdd_parse_disable_chan_cmd(struct hdd_adapter *adapter, uint8_t *ptr) * Restore and Free the cache channels when the command is * received with num channels as 0 */ - wlan_hdd_restore_channels(hdd_ctx, false); + wlan_hdd_restore_channels(hdd_ctx); return 0; } diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index c957d9077eb3..deffda607878 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -1421,7 +1421,7 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter) if (adapter->device_mode == QDF_SAP_MODE && !hdd_ctx->config->disable_channel) - wlan_hdd_restore_channels(hdd_ctx, true); + wlan_hdd_restore_channels(hdd_ctx); /* Mark the indoor channel (passive) to enable */ if (indoor_chnl_marking && adapter->device_mode == QDF_SAP_MODE) {