qcacld-3.0: Move allocation of tdls private to tdls component

Presently osif tdls memory is freed as part of the osif_priv
when the vdev is logically destroyed. There is case seen
wherein the  tdls is holding vdev reference and in the other
thread the  interface down is received and the osif_priv is
freed resulting in the tdls osif priv also, if the other thread
tries to dereference the tdls os priv it will result
null pointer exception.

Move the tdls osif priv memory creation/deletion to the tdls component.

Change-Id: I3782f6304bee5a6eaab4d9122a569ba56fd29947
CRs-Fixed: 2436379
This commit is contained in:
Arun Kumar Khandavalli
2019-04-24 18:34:18 +05:30
zatwierdzone przez nshrivas
rodzic f151174be6
commit 43fdd25d72
8 zmienionych plików z 67 dodań i 34 usunięć

Wyświetl plik

@@ -87,24 +87,24 @@ enum qca_wlan_vendor_tdls_trigger_mode_vdev_map {
};
/**
* wlan_cfg80211_tdls_priv_init() - API to initialize tdls os private
* @osif_priv: vdev os private
* wlan_cfg80211_tdls_osif_priv_init() - API to initialize tdls os private
* @vdev: vdev object
*
* API to initialize tdls os private
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_cfg80211_tdls_priv_init(struct vdev_osif_priv *osif_priv);
QDF_STATUS wlan_cfg80211_tdls_osif_priv_init(struct wlan_objmgr_vdev *vdev);
/**
* wlan_cfg80211_tdls_priv_deinit() - API to deinitialize tdls os private
* @osif_priv: vdev os private
* wlan_cfg80211_tdls_osif_priv_deinit() - API to deinitialize tdls os private
* @vdev: vdev object
*
* API to deinitialize tdls os private
*
* Return: None
*/
void wlan_cfg80211_tdls_priv_deinit(struct vdev_osif_priv *osif_priv);
void wlan_cfg80211_tdls_osif_priv_deinit(struct wlan_objmgr_vdev *vdev);
/**
* wlan_cfg80211_tdls_add_peer() - process cfg80211 add TDLS peer request
@@ -272,13 +272,13 @@ void hdd_notify_teardown_tdls_links(struct wlan_objmgr_vdev *vdev);
#else /* FEATURE_WLAN_TDLS */
static inline
QDF_STATUS wlan_cfg80211_tdls_priv_init(struct vdev_osif_priv *osif_priv)
QDF_STATUS wlan_cfg80211_tdls_osif_priv_init(struct wlan_objmgr_vdev *vdev)
{
return QDF_STATUS_SUCCESS;
}
static inline
void wlan_cfg80211_tdls_priv_deinit(struct vdev_osif_priv *osif_priv)
void wlan_cfg80211_tdls_osif_priv_deinit(struct wlan_objmgr_vdev *vdev)
{
}