qcacld-3.0: Support disabling mac addr update from wlan_mac.bin
As for msm-4.14, it has kernel panic with API request_firmware if not provide wlan_mac.bin. So in order to fix search wlan_mac.bin failure issue, export one feature flag to disable updating wlan mac address from wlan_mac.bin, which should be feasible for different target Change-Id: I6a50288c90229e6edbc10b543aec443828310d68 CRs-Fixed: 2850309
This commit is contained in:
1
Kbuild
1
Kbuild
@@ -3777,6 +3777,7 @@ endif
|
||||
|
||||
cppflags-$(CONFIG_FEATURE_STA_MODE_VOTE_LINK) += -DFEATURE_STA_MODE_VOTE_LINK
|
||||
cppflags-$(CONFIG_WLAN_ENABLE_GPIO_WAKEUP) += -DWLAN_ENABLE_GPIO_WAKEUP
|
||||
cppflags-$(CONFIG_WLAN_MAC_ADDR_UPDATE_DISABLE) += -DWLAN_MAC_ADDR_UPDATE_DISABLE
|
||||
|
||||
KBUILD_CPPFLAGS += $(cppflags-y)
|
||||
|
||||
|
@@ -51,6 +51,7 @@
|
||||
#include <wma_api.h>
|
||||
#include "wlan_hdd_object_manager.h"
|
||||
|
||||
#ifndef WLAN_MAC_ADDR_UPDATE_DISABLE
|
||||
/**
|
||||
* get_next_line() - find and locate the new line pointer
|
||||
* @str: pointer to string
|
||||
@@ -180,45 +181,6 @@ static QDF_STATUS update_mac_from_string(struct hdd_context *hdd_ctx,
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_set_power_save_offload_config() - set power save offload configuration
|
||||
* @hdd_ctx: the pointer to hdd context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
uint32_t listen_interval = 0;
|
||||
char *power_usage = NULL;
|
||||
|
||||
power_usage = ucfg_mlme_get_power_usage(hdd_ctx->psoc);
|
||||
if (!power_usage) {
|
||||
hdd_err("invalid power usage");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(power_usage, "Min") == 0)
|
||||
ucfg_mlme_get_bmps_min_listen_interval(hdd_ctx->psoc,
|
||||
&listen_interval);
|
||||
else if (strcmp(power_usage, "Max") == 0)
|
||||
ucfg_mlme_get_bmps_max_listen_interval(hdd_ctx->psoc,
|
||||
&listen_interval);
|
||||
/*
|
||||
* Based on Mode Set the LI
|
||||
* Otherwise default LI value of 1 will
|
||||
* be taken
|
||||
*/
|
||||
if (listen_interval) {
|
||||
/*
|
||||
* setcfg for listenInterval.
|
||||
* Make sure CFG is updated because PE reads this
|
||||
* from CFG at the time of assoc or reassoc
|
||||
*/
|
||||
ucfg_mlme_set_sap_listen_interval(hdd_ctx->psoc,
|
||||
listen_interval);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_update_mac_config() - update MAC address from cfg file
|
||||
* @hdd_ctx: the pointer to hdd context
|
||||
@@ -338,6 +300,51 @@ config_exit:
|
||||
release_firmware(fw);
|
||||
return qdf_status;
|
||||
}
|
||||
#else
|
||||
QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_set_power_save_offload_config() - set power save offload configuration
|
||||
* @hdd_ctx: the pointer to hdd context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void hdd_set_power_save_offload_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
uint32_t listen_interval = 0;
|
||||
char *power_usage = NULL;
|
||||
|
||||
power_usage = ucfg_mlme_get_power_usage(hdd_ctx->psoc);
|
||||
if (!power_usage) {
|
||||
hdd_err("invalid power usage");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(power_usage, "Min") == 0)
|
||||
ucfg_mlme_get_bmps_min_listen_interval(hdd_ctx->psoc,
|
||||
&listen_interval);
|
||||
else if (strcmp(power_usage, "Max") == 0)
|
||||
ucfg_mlme_get_bmps_max_listen_interval(hdd_ctx->psoc,
|
||||
&listen_interval);
|
||||
/*
|
||||
* Based on Mode Set the LI
|
||||
* Otherwise default LI value of 1 will
|
||||
* be taken
|
||||
*/
|
||||
if (listen_interval) {
|
||||
/*
|
||||
* setcfg for listenInterval.
|
||||
* Make sure CFG is updated because PE reads this
|
||||
* from CFG at the time of assoc or reassoc
|
||||
*/
|
||||
ucfg_mlme_set_sap_listen_interval(hdd_ctx->psoc,
|
||||
listen_interval);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
/**
|
||||
|
Reference in New Issue
Block a user