Browse Source

qcacmn: Pass valid arguments to hdd_wmm_is_acm_allowed

Currently pointer of the vdev object is sent to the callback
hdd_wmm_is_acm_allowed to get the adapter. But this can't
be used to get the adapter. Instead pass the vdev id to get the
adapter.

Change-Id: I3cb2f58d09a263c77a3696a36e863cc4137c7821
CRs-Fixed: 2341799
Bala Venkatesh 6 years ago
parent
commit
f327b8c30f

+ 3 - 1
umac/tdls/core/src/wlan_tdls_cmds_process.c

@@ -664,6 +664,7 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 	struct tdls_peer *curr_peer;
 	struct tdls_peer *temp_peer;
 	QDF_STATUS status;
+	uint8_t vdev_id;
 
 	struct tdls_validate_action_req *tdls_validate =
 		tdls_mgmt_req->chk_frame;
@@ -723,7 +724,8 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 	}
 
 	/*  call hdd_wmm_is_acm_allowed() */
-	if (!tdls_soc->tdls_wmm_cb(&tdls_vdev->vdev)) {
+	vdev_id = wlan_vdev_get_id(tdls_validate->vdev);
+	if (!tdls_soc->tdls_wmm_cb(vdev_id)) {
 		tdls_debug("admission ctrl set to VI, send the frame with least AC (BK) for action %d",
 			   tdls_validate->action_code);
 		tdls_mgmt_req->use_default_ac = false;

+ 1 - 1
umac/tdls/dispatcher/inc/wlan_tdls_public_structs.h

@@ -553,7 +553,7 @@ typedef void (*tdls_rx_callback)(void *user_data,
  *
  * Return: true or false
  */
-typedef bool (*tdls_wmm_check)(struct wlan_objmgr_vdev **vdev);
+typedef bool (*tdls_wmm_check)(uint8_t vdev_id);
 
 
 /* This callback is used to report state change of peer to wpa_supplicant */