Browse Source

qcacmn: Add wireless device to vdev os interface

Add os structure about wireless device to vdev os interface pointer.

Change-Id: I4df915fc5dca0412707d9b894bf5be9bf24042c0
CRs-Fixed: 2014555
Wu Gao 8 years ago
parent
commit
6c44a1c866
2 changed files with 19 additions and 9 deletions
  1. 15 6
      os_if/linux/wlan_osif_priv.h
  2. 4 3
      umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h

+ 15 - 6
os_if/linux/wlan_osif_priv.h

@@ -23,16 +23,25 @@
 struct osif_scan_pdev;
 
 /**
- *  struct pdev_osif_priv - OS private strcutre
- *  wiphy: wiphy handle
- *  legacy_osif_priv: legacy osif private handle
- *  scan_priv: Scan related data used by cfg80211 scan
-*/
-
+ *  struct pdev_osif_priv - OS private structure
+ *  @wiphy:            wiphy handle
+ *  @legacy_osif_priv: legacy osif private handle
+ *  @scan_priv:        Scan related data used by cfg80211 scan
+ */
 struct pdev_osif_priv {
 	struct wiphy *wiphy;
 	void *legacy_osif_priv;
 	struct osif_scan_pdev *osif_scan;
 };
 
+/**
+ *  struct vdev_osif_priv - OS private structure of vdev
+ *  @wdev:             wireless device handle
+ *  @legacy_osif_priv: legacy osif private handle
+ */
+struct vdev_osif_priv {
+	struct wireless_dev *wdev;
+	void *legacy_osif_priv;
+};
+
 #endif

+ 4 - 3
umac/cmn_services/obj_mgr/inc/wlan_objmgr_vdev_obj.h

@@ -230,7 +230,7 @@ struct wlan_vdev_create_params {
 	enum tQDF_ADAPTER_MODE opmode;
 	uint8_t macaddr[WLAN_MACADDR_LEN];
 	uint32_t flags;
-	void *osifp;
+	struct vdev_osif_priv *osifp;
 	uint8_t mataddr[WLAN_MACADDR_LEN];
 };
 
@@ -286,7 +286,7 @@ struct wlan_objmgr_vdev_mlme {
  *  @osdev:  OS specific pointer
  */
 struct wlan_objmgr_vdev_nif {
-	void *osdev;
+	struct vdev_osif_priv *osdev;
 };
 
 /**
@@ -1365,7 +1365,8 @@ static inline struct wlan_objmgr_peer *wlan_vdev_get_bsspeer(
  *
  * Return: ospriv - private pointer
  */
-static inline void *wlan_vdev_get_ospriv(struct wlan_objmgr_vdev *vdev)
+static inline struct vdev_osif_priv *wlan_vdev_get_ospriv(
+	struct wlan_objmgr_vdev *vdev)
 {
 	/* This API is invoked with lock acquired, do not add log prints */
 	return vdev->vdev_nif.osdev;