Browse Source

qcacld-3.0: Alias vdev_id to session_id in hdd_adapter

Currently struct hdd_adapter uses the legacy term session_id. To align
with converged naming it is desirable to change this to vdev_id, but
due to the large number of places where session_id is used it will be
difficult to modify all occurences at once. In order to allow changes
to "trickle in" replace the session_id field with a union that
contains both a session_id and a vdev_id field. This will allow
vdev_id and session_id to both be used to access the same data item.

Subsequent changes can then replace references to session_id with
vdev_id, and then once all references have been converted, replace the
union with a single vdev_id field.

Change-Id: Id92b1a7bb9721564ba01184809fec98be2143545
CRs-Fixed: 2392986
Jeff Johnson 6 years ago
parent
commit
19f4af5b3a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      core/hdd/inc/wlan_hdd_main.h

+ 5 - 2
core/hdd/inc/wlan_hdd_main.h

@@ -1111,6 +1111,7 @@ struct hdd_context;
  * struct hdd_adapter - hdd vdev/net_device context
  * @vdev: object manager vdev context
  * @vdev_lock: lock to protect vdev context access
+ * @vdev_id: Unique identifier assigned to the vdev
  * @event_flags: a bitmap of hdd_adapter_flags
  */
 struct hdd_adapter {
@@ -1127,6 +1128,10 @@ struct hdd_adapter {
 	struct hdd_context *hdd_ctx;
 	struct wlan_objmgr_vdev *vdev;
 	qdf_spinlock_t vdev_lock;
+	union {
+	uint8_t vdev_id;
+	uint8_t session_id;
+	};
 
 	void *txrx_vdev;
 
@@ -1171,8 +1176,6 @@ struct hdd_adapter {
 	/* estimated link speed */
 	uint32_t estimated_linkspeed;
 
-	uint8_t session_id;
-
 	/* QDF event for session close */
 	qdf_event_t qdf_session_close_event;