qcacmn: store vdev_id in tx desc instead of vdev pointer
In tx desc store vdev_id to avoid unprotected access of vdev memory. In tx path pass VDEV as argument to all APIs In completion path get vdev from peer as vdev reference in peer is protected with reference, in places where peer is invalid get vdev object using vdev_id stored in tx desc with a reference count Change-Id: I364ebb51143218872c0bc6f856772ab1df00bb17
This commit is contained in:

committed by
snandini

parent
a7bc8640bb
commit
926912fe86
@@ -7108,7 +7108,8 @@ static bool dp_pdev_get_filter_non_data(struct cdp_pdev *pdev_handle)
|
||||
}
|
||||
|
||||
#ifdef MESH_MODE_SUPPORT
|
||||
void dp_peer_set_mesh_mode(struct cdp_vdev *vdev_hdl, uint32_t val)
|
||||
static
|
||||
void dp_vdev_set_mesh_mode(struct cdp_vdev *vdev_hdl, uint32_t val)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_hdl;
|
||||
|
||||
@@ -7124,7 +7125,8 @@ void dp_peer_set_mesh_mode(struct cdp_vdev *vdev_hdl, uint32_t val)
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void dp_peer_set_mesh_rx_filter(struct cdp_vdev *vdev_hdl, uint32_t val)
|
||||
static
|
||||
void dp_vdev_set_mesh_rx_filter(struct cdp_vdev *vdev_hdl, uint32_t val)
|
||||
{
|
||||
struct dp_vdev *vdev = (struct dp_vdev *)vdev_hdl;
|
||||
|
||||
@@ -8569,11 +8571,11 @@ dp_set_vdev_param(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
|
||||
break;
|
||||
#ifdef MESH_MODE_SUPPORT
|
||||
case CDP_MESH_RX_FILTER:
|
||||
dp_peer_set_mesh_rx_filter((struct cdp_vdev *)vdev,
|
||||
dp_vdev_set_mesh_rx_filter((struct cdp_vdev *)vdev,
|
||||
val.cdp_vdev_param_mesh_rx_filter);
|
||||
break;
|
||||
case CDP_MESH_MODE:
|
||||
dp_peer_set_mesh_mode((struct cdp_vdev *)vdev,
|
||||
dp_vdev_set_mesh_mode((struct cdp_vdev *)vdev,
|
||||
val.cdp_vdev_param_mesh_mode);
|
||||
break;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user