qcacld-3.0: Add an attribute to set wfc state via set wifi config
Currently there is no attribute to set the wifi calling state from user space to fw. With this change add an attribute to set wifi config vendor command to configure wifi calling state to fw via platform driver. Change-Id: I982e9a7245b9e5108cd6cbcb4162daa4b4b6a412 CRs-Fixed: 3345705
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
2b2c0a0436
incheckning
ffd332217a
@@ -7872,6 +7872,8 @@ const struct nla_policy wlan_hdd_wifi_config_policy[
|
||||
.type = NLA_U8 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_BEAMFORMER_PERIODIC_SOUNDING] = {
|
||||
.type = NLA_U8 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_WFC_STATE] = {
|
||||
.type = NLA_U8 },
|
||||
};
|
||||
|
||||
static const struct nla_policy
|
||||
@@ -10461,6 +10463,39 @@ static int hdd_set_beamformer_periodic_sounding(struct hdd_adapter *adapter,
|
||||
set_val, PDEV_CMD);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_set_wfc_state() - Set wfc state
|
||||
* @adapter: hdd adapter
|
||||
* @attr: pointer to nla attr
|
||||
*
|
||||
* Return: 0 on success, negative on failure
|
||||
*/
|
||||
static int hdd_set_wfc_state(struct hdd_adapter *adapter,
|
||||
const struct nlattr *attr)
|
||||
{
|
||||
uint8_t cfg_val;
|
||||
enum pld_wfc_mode set_val;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
int errno;
|
||||
|
||||
errno = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (errno)
|
||||
return errno;
|
||||
|
||||
cfg_val = nla_get_u8(attr);
|
||||
|
||||
hdd_debug_rl("set wfc state %d", cfg_val);
|
||||
if (cfg_val == 0)
|
||||
set_val = PLD_WFC_MODE_OFF;
|
||||
else if (cfg_val == 1)
|
||||
set_val = PLD_WFC_MODE_ON;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
return pld_set_wfc_mode(hdd_ctx->parent_dev, set_val);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* typedef independent_setter_fn - independent attribute handler
|
||||
* @adapter: The adapter being configured
|
||||
@@ -10587,6 +10622,9 @@ static const struct independent_setters independent_setters[] = {
|
||||
hdd_config_udp_qos_upgrade_be_bk},
|
||||
{QCA_WLAN_VENDOR_ATTR_CONFIG_BEAMFORMER_PERIODIC_SOUNDING,
|
||||
hdd_set_beamformer_periodic_sounding},
|
||||
|
||||
{QCA_WLAN_VENDOR_ATTR_CONFIG_WFC_STATE,
|
||||
hdd_set_wfc_state},
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_ELNA
|
||||
|
Referens i nytt ärende
Block a user