qcacld-3.0: Remove wlan_hdd_check_remain_on_channel() API

The wlan_hdd_check_remain_on_channel() is a wrapper API around
wlan_hdd_cancel_existing_remain_on_channel() with an additional
opmode check. Perform this opmode check to caller.

The wlan_hdd_cancel_existing_remain_on_channel() reimplements
wlan_hdd_cleanup_remain_on_channel_ctx(), so remove this API
and move existing callers to wlan_hdd_cleanup_remain_on_channel_ctx().

Change-Id: Ia23f4f22d6fb8ed5009ad973fd63012b259d308f
CRs-Fixed: 3462426
此提交包含在:
Vinod Kumar Pirla
2023-02-24 02:40:29 -08:00
提交者 Rahul Choudhary
父節點 a1e6ae1e71
當前提交 d46e086cc6
共有 4 個檔案被更改,包括 11 行新增38 行删除

查看文件

@@ -77,9 +77,6 @@ void hdd_indicate_mgmt_frame_to_user(struct hdd_adapter *adapter,
int8_t rx_rssi, int8_t rx_rssi,
enum rxmgmt_flags rx_flags); enum rxmgmt_flags rx_flags);
int wlan_hdd_check_remain_on_channel(struct hdd_adapter *adapter);
void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *adapter);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params, u64 *cookie); struct cfg80211_mgmt_tx_params *params, u64 *cookie);

查看文件

@@ -14359,8 +14359,8 @@ static int __wlan_hdd_cfg80211_set_probable_oper_channel(struct wiphy *wiphy,
return -EINVAL; return -EINVAL;
} }
if (0 != wlan_hdd_check_remain_on_channel(adapter)) if (QDF_P2P_GO_MODE != adapter->device_mode)
hdd_warn("Remain On Channel Pending"); wlan_hdd_cleanup_remain_on_channel_ctx(adapter->deflink);
if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, ch_freq, if (wlan_hdd_change_hw_mode_for_given_chnl(adapter, ch_freq,
POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN)) { POLICY_MGR_UPDATE_REASON_SET_OPER_CHAN)) {
@@ -20980,6 +20980,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
int errno; int errno;
uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
bool eht_capab; bool eht_capab;
struct wlan_hdd_link_info *link_info = adapter->deflink;
hdd_enter(); hdd_enter();
@@ -21001,7 +21002,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD, qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CHANGE_IFACE, TRACE_CODE_HDD_CFG80211_CHANGE_IFACE,
adapter->deflink->vdev_id, type); link_info->vdev_id, type);
status = hdd_nl_to_qdf_iface_type(type, &new_mode); status = hdd_nl_to_qdf_iface_type(type, &new_mode);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
@@ -21042,13 +21043,12 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
} }
} else if (hdd_is_ap_mode(new_mode)) { } else if (hdd_is_ap_mode(new_mode)) {
if (new_mode == QDF_P2P_GO_MODE) if (new_mode == QDF_P2P_GO_MODE)
wlan_hdd_cancel_existing_remain_on_channel wlan_hdd_cleanup_remain_on_channel_ctx(link_info);
(adapter);
hdd_stop_adapter(hdd_ctx, adapter); hdd_stop_adapter(hdd_ctx, adapter);
hdd_deinit_adapter(hdd_ctx, adapter, true); hdd_deinit_adapter(hdd_ctx, adapter, true);
memset(&adapter->deflink->session, 0, memset(&link_info->session, 0,
sizeof(adapter->deflink->session)); sizeof(link_info->session));
adapter->device_mode = new_mode; adapter->device_mode = new_mode;
status = ucfg_mlme_get_ap_random_bssid_enable( status = ucfg_mlme_get_ap_random_bssid_enable(

查看文件

@@ -7965,11 +7965,13 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
if (adapter->device_mode == QDF_P2P_GO_MODE) { if (adapter->device_mode == QDF_P2P_GO_MODE) {
struct hdd_adapter *p2p_adapter; struct hdd_adapter *p2p_adapter;
struct wlan_hdd_link_info *p2p_link_info;
p2p_adapter = hdd_get_adapter(hdd_ctx, QDF_P2P_DEVICE_MODE); p2p_adapter = hdd_get_adapter(hdd_ctx, QDF_P2P_DEVICE_MODE);
if (p2p_adapter) { if (p2p_adapter) {
hdd_debug("Cancel active p2p device ROC before GO starting"); hdd_debug("Cleanup active p2p device ROC before GO starting");
wlan_hdd_cancel_existing_remain_on_channel(p2p_adapter); p2p_link_info = p2p_adapter->deflink;
wlan_hdd_cleanup_remain_on_channel_ctx(p2p_link_info);
} }
} }

查看文件

@@ -61,32 +61,6 @@
#define MS_TO_TU_MUS(x) ((x) * 1024) #define MS_TO_TU_MUS(x) ((x) * 1024)
#define MAX_MUS_VAL (INT_MAX / 1024) #define MAX_MUS_VAL (INT_MAX / 1024)
void wlan_hdd_cancel_existing_remain_on_channel(struct hdd_adapter *adapter)
{
struct wlan_objmgr_vdev *vdev;
if (!adapter) {
hdd_err("null adapter");
return;
}
vdev = hdd_objmgr_get_vdev_by_user(adapter->deflink, WLAN_OSIF_P2P_ID);
if (!vdev) {
hdd_err("vdev is NULL");
return;
}
ucfg_p2p_cleanup_roc_by_vdev(vdev);
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_P2P_ID);
}
int wlan_hdd_check_remain_on_channel(struct hdd_adapter *adapter)
{
if (QDF_P2P_GO_MODE != adapter->device_mode)
wlan_hdd_cancel_existing_remain_on_channel(adapter);
return 0;
}
/* Clean up RoC context at hdd_stop_adapter*/ /* Clean up RoC context at hdd_stop_adapter*/
void void
wlan_hdd_cleanup_remain_on_channel_ctx(struct wlan_hdd_link_info *link_info) wlan_hdd_cleanup_remain_on_channel_ctx(struct wlan_hdd_link_info *link_info)