qcacmn: Add support to dynamic MAC address update

Currently, MAC address update is supported only when interface is down.
Because of this framework needs to issue interface down and interface
up to update the MAC address.

This is resulting in connection time increase when MAC address
randomization is enabled for every new connection.

To optimize the connection time, add support to update the MAC address
without bringing the interface to down state.

Change-Id: Ic3eff6a9571f885292021b2c178d26b0eace5042
CRs-Fixed: 3063475
This commit is contained in:
Bapiraju Alla
2021-10-12 00:14:14 +05:30
کامیت شده توسط Madan Koyyalamudi
والد a50a68c40d
کامیت ca4b3fabf6
16فایلهای تغییر یافته به همراه407 افزوده شده و 0 حذف شده

مشاهده پرونده

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1205,6 +1206,41 @@ static void target_if_vdev_register_tx_fils(
}
#endif
#ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
static QDF_STATUS
target_if_vdev_mgr_set_mac_address_send(struct qdf_mac_addr mac_addr,
struct qdf_mac_addr mld_addr,
struct wlan_objmgr_vdev *vdev)
{
struct set_mac_addr_params params = {0};
struct wmi_unified *wmi_handle;
wmi_handle = target_if_vdev_mgr_wmi_handle_get(vdev);
if (!wmi_handle) {
mlme_err("Failed to get WMI handle!");
return QDF_STATUS_E_INVAL;
}
params.vdev_id = wlan_vdev_get_id(vdev);
params.mac_addr = mac_addr;
params.mld_addr = mld_addr;
return wmi_unified_send_set_mac_addr(wmi_handle, &params);
}
static void target_if_vdev_register_set_mac_address(
struct wlan_lmac_if_mlme_tx_ops *mlme_tx_ops)
{
mlme_tx_ops->vdev_send_set_mac_addr =
target_if_vdev_mgr_set_mac_address_send;
}
#else
static void target_if_vdev_register_set_mac_address(
struct wlan_lmac_if_mlme_tx_ops *mlme_tx_ops)
{
}
#endif
QDF_STATUS
target_if_vdev_mgr_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
{
@@ -1273,5 +1309,6 @@ target_if_vdev_mgr_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
target_if_wake_lock_deinit;
mlme_tx_ops->vdev_mgr_rsp_timer_stop =
target_if_vdev_mgr_rsp_timer_stop;
target_if_vdev_register_set_mac_address(mlme_tx_ops);
return QDF_STATUS_SUCCESS;
}