qcacld-3.0: Remove vdev chk_frame structure

Chk frame member of the tdls_mgmt_req is declared locally inside of
the local function wlan_cfg80211_tdls_mgmt and address is copied
in the mgmt request, and posted to scheduler thread.
But, the validity of the chk frame variable is lost once returned
from the wlan_cfg80211_tdls_mgmt function. And the chk_frame
is used when processing the tdls_mgmt_req in scheduler thread.
And the stale data of chk_frame can be used.

Hence, make the chk_frame as a variable instead pointer inside
tdls_action_frame_request request.

Change-Id: Ib2a8a81e8f6db5550b1d0abee31d9f7ea5dacd9b
CRs-Fixed: 2402124
This commit is contained in:
Bala Venkatesh
2019-02-20 20:48:03 +05:30
committed by nshrivas
parent 373f731a6b
commit 2ee149738c
4 changed files with 20 additions and 38 deletions

View File

@@ -975,24 +975,20 @@ struct tdls_send_mgmt {
/**
* struct tdls_validate_action_req - tdls validate mgmt request
* @vdev: vdev object
* @action_code: action code
* @peer_mac: peer mac address
* @dialog_token: dialog code
* @status_code: status code to add
* @len: len of the frame
* @responder: whether to respond or not
* @max_sta_failed: mgmt failure reason
*/
struct tdls_validate_action_req {
struct wlan_objmgr_vdev *vdev;
uint8_t action_code;
uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
uint8_t dialog_token;
uint8_t status_code;
size_t len;
int responder;
int max_sta_failed;
};
/**
@@ -1010,7 +1006,7 @@ struct tdls_get_all_peers {
/**
* struct tdls_send_action_frame_request - tdls send mgmt request
* @vdev: vdev object
* @chk_frame: frame validation structure
* @chk_frame: This struct used to validate mgmt frame
* @session_id: session id
* @vdev_id: vdev id
* @cmd_buf: cmd buffer
@@ -1020,7 +1016,7 @@ struct tdls_get_all_peers {
*/
struct tdls_action_frame_request {
struct wlan_objmgr_vdev *vdev;
struct tdls_validate_action_req *chk_frame;
struct tdls_validate_action_req chk_frame;
uint8_t session_id;
uint8_t vdev_id;
const uint8_t *cmd_buf;