diff --git a/src/wlan_cfg80211_tdls.c b/src/wlan_cfg80211_tdls.c index e3e532791263..b1e376c4a0e9 100644 --- a/src/wlan_cfg80211_tdls.c +++ b/src/wlan_cfg80211_tdls.c @@ -128,16 +128,6 @@ void hdd_notify_tdls_reset_adapter(struct wlan_objmgr_vdev *vdev) ucfg_tdls_notify_reset_adapter(vdev); } -static void hdd_notify_sta_connect_callback(struct wlan_objmgr_vdev *vdev) -{ - if (!vdev) { - cfg80211_err("vdev is NULL"); - return; - } - - wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID); -} - void hdd_notify_sta_connect(uint8_t session_id, bool tdls_chan_swit_prohibited, @@ -161,22 +151,7 @@ hdd_notify_sta_connect(uint8_t session_id, notify_info.vdev = vdev; notify_info.tdls_chan_swit_prohibited = tdls_chan_swit_prohibited; notify_info.tdls_prohibited = tdls_prohibited; - notify_info.callback = hdd_notify_sta_connect_callback; - status = ucfg_tdls_notify_sta_connect(¬ify_info); - if (QDF_IS_STATUS_ERROR(status)) { - cfg80211_err("ucfg_tdls_notify_sta_connect failed"); - wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID); - } -} - -static void hdd_notify_sta_disconnect_callback(struct wlan_objmgr_vdev *vdev) -{ - if (!vdev) { - cfg80211_err("vdev is NULL"); - return; - } - - wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID); + ucfg_tdls_notify_sta_connect(¬ify_info); } void hdd_notify_sta_disconnect(uint8_t session_id, @@ -204,12 +179,7 @@ void hdd_notify_sta_disconnect(uint8_t session_id, notify_info.tdls_prohibited = false; notify_info.vdev = vdev; notify_info.user_disconnect = user_disconnect; - notify_info.callback = hdd_notify_sta_disconnect_callback; - status = ucfg_tdls_notify_sta_disconnect(¬ify_info); - if (QDF_IS_STATUS_ERROR(status)) { - cfg80211_err("ucfg_tdls_notify_sta_disconnect failed"); - wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID); - } + ucfg_tdls_notify_sta_disconnect(¬ify_info); } int wlan_cfg80211_tdls_add_peer(struct wlan_objmgr_pdev *pdev, struct net_device *dev, const uint8_t *mac)