qcacld-3.0: Fix implicit tdls connection issue
Fix implicit tdls connection issue. Correct usage of qdf_mem_set. DUT could receive multicast frames after tdls connection tear down, add check condition of frames with multicast dest address in tdls_update_rx_pkt_cnt. Change-Id: Ia1d7bbf2c129e9aebc98f7fcdea263b745c221ec CRs-Fixed: 2375043
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -229,8 +229,8 @@ static void tdls_ct_sampling_tx_rx(struct tdls_vdev_priv_obj *tdls_vdev,
|
|||||||
qdf_mem_copy(mac_table, tdls_vdev->ct_peer_table,
|
qdf_mem_copy(mac_table, tdls_vdev->ct_peer_table,
|
||||||
(sizeof(struct tdls_conn_tracker_mac_table)) * mac_entries);
|
(sizeof(struct tdls_conn_tracker_mac_table)) * mac_entries);
|
||||||
|
|
||||||
qdf_mem_set(tdls_vdev->ct_peer_table, 0,
|
qdf_mem_set(tdls_vdev->ct_peer_table,
|
||||||
(sizeof(struct tdls_conn_tracker_mac_table)) * mac_entries);
|
(sizeof(struct tdls_conn_tracker_mac_table)) * mac_entries, 0);
|
||||||
|
|
||||||
tdls_vdev->valid_mac_entries = 0;
|
tdls_vdev->valid_mac_entries = 0;
|
||||||
|
|
||||||
@@ -250,7 +250,8 @@ static void tdls_ct_sampling_tx_rx(struct tdls_vdev_priv_obj *tdls_vdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
void tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
||||||
struct qdf_mac_addr *mac_addr)
|
struct qdf_mac_addr *mac_addr,
|
||||||
|
struct qdf_mac_addr *dest_mac_addr)
|
||||||
{
|
{
|
||||||
struct tdls_vdev_priv_obj *tdls_vdev_obj;
|
struct tdls_vdev_priv_obj *tdls_vdev_obj;
|
||||||
struct tdls_soc_priv_obj *tdls_soc_obj;
|
struct tdls_soc_priv_obj *tdls_soc_obj;
|
||||||
@@ -268,6 +269,9 @@ void tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
|||||||
if (qdf_is_macaddr_group(mac_addr))
|
if (qdf_is_macaddr_group(mac_addr))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (qdf_is_macaddr_group(dest_mac_addr))
|
||||||
|
return;
|
||||||
|
|
||||||
if (qdf_mem_cmp(vdev->vdev_mlme.macaddr, mac_addr,
|
if (qdf_mem_cmp(vdev->vdev_mlme.macaddr, mac_addr,
|
||||||
QDF_MAC_ADDR_SIZE) == 0)
|
QDF_MAC_ADDR_SIZE) == 0)
|
||||||
return;
|
return;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -58,6 +58,7 @@ void tdls_implicit_enable(struct tdls_vdev_priv_obj *tdls_vdev);
|
|||||||
* tdls_update_rx_pkt_cnt() - Update rx packet count
|
* tdls_update_rx_pkt_cnt() - Update rx packet count
|
||||||
* @vdev: vdev object manager
|
* @vdev: vdev object manager
|
||||||
* @mac_addr: mac address of the data
|
* @mac_addr: mac address of the data
|
||||||
|
* @dest_mac_addr: dest mac address of the data
|
||||||
*
|
*
|
||||||
* Increase the rx packet count, if the sender is not bssid and the packet is
|
* Increase the rx packet count, if the sender is not bssid and the packet is
|
||||||
* not broadcast and multicast packet
|
* not broadcast and multicast packet
|
||||||
@@ -70,7 +71,8 @@ void tdls_implicit_enable(struct tdls_vdev_priv_obj *tdls_vdev);
|
|||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
void tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
||||||
struct qdf_mac_addr *mac_addr);
|
struct qdf_mac_addr *mac_addr,
|
||||||
|
struct qdf_mac_addr *dest_mac_addr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tdls_update_tx_pkt_cnt() - update tx packet
|
* tdls_update_tx_pkt_cnt() - update tx packet
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -196,11 +196,13 @@ QDF_STATUS ucfg_tdls_set_operating_mode(
|
|||||||
* ucfg_tdls_update_rx_pkt_cnt() - update rx pkt count
|
* ucfg_tdls_update_rx_pkt_cnt() - update rx pkt count
|
||||||
* @vdev: tdls vdev object
|
* @vdev: tdls vdev object
|
||||||
* @mac_addr: peer mac address
|
* @mac_addr: peer mac address
|
||||||
|
* @dest_mac_addr: dest mac address
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void ucfg_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
void ucfg_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
||||||
struct qdf_mac_addr *mac_addr);
|
struct qdf_mac_addr *mac_addr,
|
||||||
|
struct qdf_mac_addr *dest_mac_addr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_tdls_update_tx_pkt_cnt() - update tx pkt count
|
* ucfg_tdls_update_tx_pkt_cnt() - update tx pkt count
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -937,13 +937,14 @@ QDF_STATUS ucfg_tdls_set_operating_mode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ucfg_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
void ucfg_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
|
||||||
struct qdf_mac_addr *mac_addr)
|
struct qdf_mac_addr *mac_addr,
|
||||||
|
struct qdf_mac_addr *dest_mac_addr)
|
||||||
{
|
{
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
status = wlan_objmgr_vdev_try_get_ref(vdev, WLAN_TDLS_NB_ID);
|
status = wlan_objmgr_vdev_try_get_ref(vdev, WLAN_TDLS_NB_ID);
|
||||||
if (status != QDF_STATUS_SUCCESS)
|
if (status != QDF_STATUS_SUCCESS)
|
||||||
return;
|
return;
|
||||||
tdls_update_rx_pkt_cnt(vdev, mac_addr);
|
tdls_update_rx_pkt_cnt(vdev, mac_addr, dest_mac_addr);
|
||||||
|
|
||||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -1992,7 +1992,7 @@ QDF_STATUS hdd_rx_packet_cbk(void *adapter_context,
|
|||||||
struct sk_buff *next = NULL;
|
struct sk_buff *next = NULL;
|
||||||
struct hdd_station_ctx *sta_ctx = NULL;
|
struct hdd_station_ctx *sta_ctx = NULL;
|
||||||
unsigned int cpu_index;
|
unsigned int cpu_index;
|
||||||
struct qdf_mac_addr *mac_addr;
|
struct qdf_mac_addr *mac_addr, *dest_mac_addr;
|
||||||
bool wake_lock = false;
|
bool wake_lock = false;
|
||||||
uint8_t pkt_type = 0;
|
uint8_t pkt_type = 0;
|
||||||
bool track_arp = false;
|
bool track_arp = false;
|
||||||
@@ -2081,9 +2081,11 @@ QDF_STATUS hdd_rx_packet_cbk(void *adapter_context,
|
|||||||
QDF_DP_TRACE_RX_PACKET_RECORD,
|
QDF_DP_TRACE_RX_PACKET_RECORD,
|
||||||
0, QDF_RX));
|
0, QDF_RX));
|
||||||
|
|
||||||
|
dest_mac_addr = (struct qdf_mac_addr *)(skb->data);
|
||||||
mac_addr = (struct qdf_mac_addr *)(skb->data+QDF_MAC_ADDR_SIZE);
|
mac_addr = (struct qdf_mac_addr *)(skb->data+QDF_MAC_ADDR_SIZE);
|
||||||
|
|
||||||
ucfg_tdls_update_rx_pkt_cnt(adapter->vdev, mac_addr);
|
ucfg_tdls_update_rx_pkt_cnt(adapter->vdev, mac_addr,
|
||||||
|
dest_mac_addr);
|
||||||
|
|
||||||
skb->dev = adapter->dev;
|
skb->dev = adapter->dev;
|
||||||
skb->protocol = eth_type_trans(skb, skb->dev);
|
skb->protocol = eth_type_trans(skb, skb->dev);
|
||||||
|
Reference in New Issue
Block a user