qcacld-3.0: Use link info pointer to cleanup VDEV ROC
To obtain VDEV reference to cleanup the ROC, change the function argument of wlan_hdd_cleanup_remain_on_channel_ctx() API to take link info pointer instead of adapter. Existing references are changed to deflink. Change-Id: I032c04d18f6d3e962ee767e621d418ad71609139 CRs-Fixed: 3462405
This commit is contained in:

committed by
Rahul Choudhary

parent
d4e9094d48
commit
bc9576374d
@@ -127,8 +127,17 @@ void hdd_clean_up_interface(struct hdd_context *hdd_ctx,
|
||||
int wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
|
||||
int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
|
||||
|
||||
|
||||
void wlan_hdd_cleanup_remain_on_channel_ctx(struct hdd_adapter *adapter);
|
||||
/**
|
||||
* wlan_hdd_cleanup_remain_on_channel_ctx - Cleanup ROC on VDEV
|
||||
* @link_info: pointer to link_info struct in adapter
|
||||
*
|
||||
* This function is used to cleanup the ROC on the vdev
|
||||
* pointed in the @link_info
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(struct wlan_hdd_link_info *link_info);
|
||||
|
||||
/**
|
||||
* wlan_hdd_set_power_save() - hdd set power save
|
||||
|
@@ -7092,7 +7092,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
|
||||
WLAN_CONTROL_PATH);
|
||||
|
||||
wlan_hdd_cleanup_actionframe(adapter->deflink);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter->deflink);
|
||||
mutex_lock(&hdd_ctx->sap_lock);
|
||||
if (test_bit(SOFTAP_BSS_STARTED, &adapter->deflink->link_flags)) {
|
||||
struct hdd_hostapd_state *hostapd_state =
|
||||
|
@@ -8624,7 +8624,7 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx,
|
||||
|
||||
wlan_hdd_scan_abort(adapter);
|
||||
wlan_hdd_cleanup_actionframe(adapter->deflink);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter->deflink);
|
||||
status = wlan_hdd_flush_pmksa_cache(adapter->deflink);
|
||||
|
||||
hdd_deregister_hl_netdev_fc_timer(adapter);
|
||||
@@ -8734,7 +8734,7 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx,
|
||||
}
|
||||
|
||||
if (adapter->device_mode == QDF_P2P_GO_MODE) {
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter->deflink);
|
||||
hdd_abort_ongoing_sta_connection(hdd_ctx);
|
||||
}
|
||||
|
||||
@@ -9000,7 +9000,7 @@ static void hdd_reset_scan_operation(struct hdd_context *hdd_ctx,
|
||||
case QDF_P2P_DEVICE_MODE:
|
||||
case QDF_NDI_MODE:
|
||||
wlan_hdd_scan_abort(adapter);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter->deflink);
|
||||
if (adapter->device_mode == QDF_STA_MODE) {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
@@ -9014,7 +9014,7 @@ static void hdd_reset_scan_operation(struct hdd_context *hdd_ctx,
|
||||
}
|
||||
break;
|
||||
case QDF_P2P_GO_MODE:
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(adapter->deflink);
|
||||
break;
|
||||
case QDF_SAP_MODE:
|
||||
qdf_atomic_set(&adapter->deflink->session.ap.acs_in_progress, 0);
|
||||
|
@@ -88,16 +88,12 @@ int wlan_hdd_check_remain_on_channel(struct hdd_adapter *adapter)
|
||||
}
|
||||
|
||||
/* Clean up RoC context at hdd_stop_adapter*/
|
||||
void wlan_hdd_cleanup_remain_on_channel_ctx(struct hdd_adapter *adapter)
|
||||
void
|
||||
wlan_hdd_cleanup_remain_on_channel_ctx(struct wlan_hdd_link_info *link_info)
|
||||
{
|
||||
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);
|
||||
vdev = hdd_objmgr_get_vdev_by_user(link_info, WLAN_OSIF_P2P_ID);
|
||||
if (!vdev)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user