qcacld-3.0: Add support to reset def_link during dynamic mac addr update

Dynamic mac address update is a special case, where the
(sta)connection can change without the vdevs corresponding
to an interface. The tx/rx happens on the def_link of the
dp_intf, which does not get reset in case of dynamic mac
addr update. Due to this, all the tx of packets might be
attempted on an invalid dp_link, leading to drop of all
the packets queued for TX.

Add support to reset the def_link of an interface during
dynamic mac address update.

Change-Id: I1e87c083f39b56525f69c225117bcce538931dbb
CRs-Fixed: 3570440
This commit is contained in:
Rakesh Pillai
2023-07-25 03:25:06 -07:00
committed by Rahul Choudhary
parent 5a47621879
commit 273eee3139
7 changed files with 39 additions and 15 deletions

View File

@@ -76,15 +76,17 @@ QDF_STATUS ucfg_dp_update_link_mac_addr(struct wlan_objmgr_vdev *vdev,
bool is_link_switch);
/**
* ucfg_dp_update_inf_mac() - update DP interface MAC address
* ucfg_dp_update_intf_mac() - update DP interface MAC address
* @psoc: psoc handle
* @cur_mac: Current MAC address
* @new_mac: new MAC address
* @vdev: objmgr vdev handle to set the def_link in dp_intf
*
*/
void ucfg_dp_update_inf_mac(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *cur_mac,
struct qdf_mac_addr *new_mac);
void ucfg_dp_update_intf_mac(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *cur_mac,
struct qdf_mac_addr *new_mac,
struct wlan_objmgr_vdev *vdev);
/**
* ucfg_dp_destroy_intf() - DP module interface deletion

View File

@@ -103,11 +103,13 @@ QDF_STATUS ucfg_dp_update_link_mac_addr(struct wlan_objmgr_vdev *vdev,
return status;
}
void ucfg_dp_update_inf_mac(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *cur_mac,
struct qdf_mac_addr *new_mac)
void ucfg_dp_update_intf_mac(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *cur_mac,
struct qdf_mac_addr *new_mac,
struct wlan_objmgr_vdev *vdev)
{
struct wlan_dp_intf *dp_intf;
struct wlan_dp_link *dp_link;
struct wlan_dp_psoc_context *dp_ctx;
dp_ctx = dp_psoc_get_priv(psoc);
@@ -126,6 +128,21 @@ void ucfg_dp_update_inf_mac(struct wlan_objmgr_psoc *psoc,
qdf_copy_macaddr(&dp_intf->mac_addr, new_mac);
/*
* update of dp_intf mac address happens only during dynamic mac
* address update. This is a special case, where the connection
* can change without vdevs getting deleted.
* Hence its expected to reset the def_link in dp_intf to the
* def_link used by UMAC, for the next connection.
*/
dp_link = dp_get_vdev_priv_obj(vdev);
dp_info("Try def_link update for dp_intf %pK from %pK to %pK (intf %pK id %d)",
dp_intf, dp_intf->def_link, dp_link,
dp_link ? dp_link->dp_intf : NULL,
dp_link ? dp_link->link_id : 255);
if (dp_link && dp_link->dp_intf == dp_intf)
dp_intf->def_link = dp_link;
wlan_dp_set_vdev_direct_link_cfg(psoc, dp_intf);
}