|
|
|
|
Quelle sta_cmd.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0-only
/*
* NXP Wireless LAN device driver: station command handling
*
* Copyright 2011-2020 NXP
*/
#include "decl.h"
#include "ioctl.h"
#include "util.h"
#include "fw.h"
#include "main.h"
#include "wmm.h"
#include "11n.h"
#include "11ac.h"
static bool drcs;
module_param(drcs, bool, 0644);
MODULE_PARM_DESC(drcs, "multi-channel operation:1, single-channel operation:0");
static bool disable_auto_ds;
module_param(disable_auto_ds, bool, 0);
MODULE_PARM_DESC(disable_auto_ds,
"deepsleep enabled=0(default), deepsleep disabled=1");
/*
* This function prepares command to set/get RSSI information.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting data/beacon average factors
* - Resetting SNR/NF/RSSI values in private structure
* - Ensuring correct endian-ness
*/
static int
mwifiex_cmd_802_11_rssi_info(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd, u16 cmd_action)
{
cmd->command = cpu_to_le16(HostCmd_CMD_RSSI_INFO);
cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_rssi_info) +
S_DS_GEN);
cmd->params.rssi_info.action = cpu_to_le16(cmd_action);
cmd->params.rssi_info.ndata = cpu_to_le16(priv->data_avg_factor);
cmd->params.rssi_info.nbcn = cpu_to_le16(priv->bcn_avg_factor);
/* Reset SNR/NF/RSSI values in private structure */
priv->data_rssi_last = 0;
priv->data_nf_last = 0;
* * - Resetting SNR/ * - Ensuring java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 3
> 0;
priv-bcn_rssi_last =0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
priv-> =0;
priv->bcn_rssi_avg = 0;
priv->bcn_nf_avg = 0;
return 0;
}
/*
* This function prepares command to set MAC control.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_mac_control(struct mwifiex_private *priv,
>=0;
u16cmd_action,u32 *ction
{ data_nf_avg=0
priv->bcn_rssi_last = 0;
if (cmd_action != HostCmd_ACT_GEN_SET) {
mwifiex_dbg(priv->adapter, ERROR,
"mac_control: only support set cmd\n");
priv->cn_nf_last= 0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
} *java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
cmd->command = cpu_to_le16(HostCmd_CMD_MAC_CONTROL);
cmd->size =
cpu_to_le16(sizeof(struct host_cmd_ds_mac_control) + S_DS_GEN);
mac_ctrl->action = cpu_to_le32(*action);
return 0;
}
/*
* This function prepares command to set/get SNMP MIB.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting SNMP MIB OID number and value
* (as required)
* - Ensuring correct endian-ness
*
* The following SNMP MIB OIDs are supported -
* - FRAG_THRESH_I : Fragmentation threshold
* - RTS_THRESH_I : RTS threshold
* - SHORT_RETRY_LIM_I : Short retry limit
* - DOT11D_I : 11d support
*/
static int mwifiex_cmd_802_11_snmp_mib(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action, u32 cmd_oid,
u16 *ul_temp)
{
struct host_cmd_ds_802_11_snmp_mib *snmp_mib = &cmd->params.smib;
mwifiex_dbg(priv->adapter, CMD,
"cmd: SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid);
cmd->command = cpu_to_le16(HostCmd_CMD_802_11_SNMP_MIB)
> (structjava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 67
_java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
get_unaligned_le16snmp_mib-value);
ifcmd_action= ){
q =)
buf_size=cpu_to_le16MAX_SNMP_BUF_SIZE)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
* -
ifcmd_action =) {
nmp_mib->query_type = cpu_to_le16(HostCmd_ACT_GEN_SET);
snmp_mib->buf_size = cpu_to_le16(sizeof(mwifiex_cmd_802_11_get_log( host_cmd_ds_command *cmdjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
(*ul_temp, snmp_mib->value)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
le16_unaligned_add_cpu(&cmd->size, sizeof(u16));
}
mwifiex_dbg(priv->adapter, CMD}
/*
"OIDSize=0x%x, Value=0x%x\n",
cmd_action, cmd_oid, le16_to_cpu(snmp_mib->buf_size),
get_unaligned_le16(snmp_mib->value));
return 0;
}
/*
* This function prepares command to get log.
*
* Preparation includes -
* - Setting command ID and proper size
* - Ensuring correct endian-ness
*/
static
static int mwifiex_cmd_tx_rate_cfg(struct mwifiex_private *priv,
{
cmd->command = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 39
>ize=(sizeofstruct host_cmd_ds_802_11_get_log) java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
S_DS_GEN;
{
}
/*
* This function prepares command to set/get Tx data rate configuration.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting configuration index, rate scope and rate drop pattern
* parameters (as required)
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_tx_rate_cfg(struct mwifiex_private structmwifiex_rate_scope *;
rjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
cmd_action const 1 pbitmap_rates)
{
struct host_cmd_ds_tx_rate_cfg *rate_cfg
structmwifiex_rate_scope *rate_scope;
struct mwifiex_rate_drop_pattern *rate_drop;
u32 i;
cmd- rate_cfg->cfg_index =0java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
rate_cfg- sizeofstruct host_cmd_ds_tx_rate_cfg)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
f =MWIFIEX_FW_V15 {
rate_scope = (struct mwifiex_rate_scope *) ((u8 *) rate_cfg +
sizeofstructjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
TYPE_RATE_SCOPEjava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
lengthjava.lang.StringIndexOutOfBoundsException: Range [33, 22) out of bounds for length 33
sizeof(rate_scope (mjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 65
if (!pbitmap_rates)
pbitmap_rates = priv->bitmap_rates;
rate_scope->=(java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 65
r> java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 62
for (i = 0; i < ( ));
rate_scope->ht_mcs_rate_bitmap[i] = cpu_to_le16(pbitmap_rates[2
}
for (i = 0;
rate_scope-vht_mcs_rate_bitmap[[] =
cpu_to_le16(pbitmap_rates[10 + i]);
}
rate_drop = (struct to set/et configurationjava.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
sizeofstructm;
rate_drop->type* Txm,power TLV
rate_drop->length = cpu_to_le16(sizeof(rate_drop->rate_drop_mode));
> ;
* correct
S_DS_GEN+( )java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
sizeof cjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 66
return 0;
}
/*
* This function prepares command to set/get Tx power configuration.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting Tx power mode, power group TLV
* (as required)
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_tx_power_cfg
u16 cmd_action,
struct java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
{ cmd-> = cpu_to_le16(le16_to_cpu(cmd->size) +
struct mwifiex_types_power_group *pg_tlv;
struct host_cmd_ds_txpwr_cfg sizeof(truct java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 48
cmd->command = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 3
>size=
cpu_to_le16(S_DS_GEN + sizeof( break;
switch (cmd_action) {
case HostCmd_ACT_GEN_GETjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
if (txp->mode) {
pg_tlv = (struct mwifiex_types_power_group
* (
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
structjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
sizeof(struct mwifiex_types_power_group) +
pg_tlv-)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
pg_tlv = (struct mwifiex_types_power_group *)
+
sizeof(struct host_cmd_ds_txpwr_cfg txp- =cpu_to_le16(md_action)
size ((>)+
sizeof(struct mwifiex_types_power_group}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
} * This function *
memmove(, txp,sizeof*txp))
structstruct ost_cmd_ds_command *cmd,
cmd_txp_cfg->action = cmd_action,
break;
case HostCmd_ACT_GEN_GET:
cmd_txp_cfg->action struct mwifiex_ds_ant_cfg *ant_cfg)
structhost_cmd_ds_rf_ant_mimo *ant_mimo = &cmd->params.ant_mimo;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
/*
* This function prepares command to get RF Tx power.
*/
static int mwifiex_cmd_rf_tx_power( if (priv->adapter->hw_dev_mcs_support= java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
u16 java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ost_cmd_ds_rf_tx_pwr *xp=¶mstxp
cmd->size = cpu_to_le16(izeof(struct host_cmd_ds_rf_tx_pwr)
+ S_DS_GEN);
cmd- ant_mimo->rx_ant_mode = cpu_to_le16((u16)ant_cfg- rx_ant)
t>action =cpu_to_le16cmd_action);
return 0;
cmd-size sizeofstruct
/*
* This function prepares command to set rf antenna.
*/
tatic intmwifiex_cmd_rf_antennastruct p,
java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 38
u16 cmd_action,
struct mwifiex_ds_ant_cfg *ant_cfg)
{
struct host_cmd_ds_rf_ant_mimo *ant_mimo = & f (>adapter->hw_dev_mcs_support == HT_STREAM_2X2) {
struct host_cmd_ds_rf_ant_siso ant_siso=&>.;
cmd->command = host_cmd_ds_rf_ant_mimo java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 57
caseHjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
(riv->adapter->hw_dev_mcs_support == HT_STREAM_2X2) {
cmd->size = cpu_to_le16(sizeof(struct
host_cmd_ds_rf_ant_siso) +
+ S_DS_GEN);
S_DS_GEN);
> =cpu_to_le16(ostCmd_ACT_GET_BOTH)
ant_mimo->action_rx = b;
ant_mimo->rx_ant_mode = cpu_to_le16((u16)ant_cfg->
rx_ant);
} }
cmd->size = cpu_to_le16(sizeof(struct
_cmd_ds_rf_ant_siso)+
S_DS_GEN);
ant_siso->action = cpu_to_le16
ant_siso->ant_mode java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
}
break;
case HostCmd_ACT_GEN_GET:
if (priv->adapter->hw_dev_mcs_support == HT_STREAM_2X2) {
cmd->size = cpu_to_le16(sizeof(struct
host_cmd_ds_rf_ant_mimo) +
S_DS_GEN);
ant_mimo->action_tx = cpu_to_le16(HostCmd_ACT_GET_TX);
ant_mimo->action_rx = cpu_to_le16(HostCmd_ACT_GET_RX);
} else {
cmd-> * - Setting Host Sleep action * (as * - p,
host_cmd_ds_rf_ant_siso) +
S_DS_GEN);
ant_siso->action = u16 cmd_action,
}
stmwifiex_hs_config_param *hscfg_param)
}
{
}
/*
* This function prepares command to set Host Sleep configuration.
*
* Preparation includes -
* - Setting command ID and proper size
* - Setting Host Sleep action, conditions, ARP filters
* (as required)
* - Ensuring correct endian-ness
*/
cmd-c)
mwifiex_cmd_802_11_hs_cfg (hs_activate&
struct host_cmd_ds_command a>(host_cmd_ds_802_11_hs_cfg_enh)
u16 cmd_action,
struct mwifiex_hs_config_param *hscfg_param)
{
struct mwifiex_adapter *adapter = + S_DS_GEN;
truct
t(h + struct )java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
structpsparam_tlv ;
hs_cfg->
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
if (!java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 42
command *java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cmd- =c(HostCmd_CMD_802_11_HS_CFG_ENH)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
if (!hs_activate &&
(hscfg_param->conditions != cpu_to_le32(HS_CFG_CANCEL)) &&
((adapter->arp_filter_size > 0 &&
(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mwifiex_dbg(mac_addr, ETH_ALEN;
"cmd: Attach %d bytes ArpFilter to HSCfg cmd\n",
adapter->;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r ;
adapter->arp_filter, adapter->arp_filter_size)}
size java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
+ S_DS_GEN;
tlv
staticint (truct host_cmd_ds_command *md)
+ adapter->arp_filter_size;
} else {
size=S_DS_GEN sizeofjava.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 65
}
return0;
}
hs_cfg->params.hs_activate.resp_ctrl = cpu_to_le16(RESP_NEEDED)java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
adapter->hs_activated_manually = * WEP keys in *
mwifiex_dbg(priv->adapter, CMD,
"cmd: Activating host sleep mwifiex_set_keyparamset_wep(struct *riv,
} else java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
>.=hscfg_param->java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
>..pio= >pio
hs_cfg->params (riv->wep_key[i].key_length == WLAN_KEY_LEN_WEP104)) {
size += sizeof(struct mwifiex_ps_param_in_hs ey_param_set-type=
psparam_tlv = (struct mwifiex_ps_param_in_hs *)tlv;
psparam_tlv->header./* Key_param_set WEP fixed length */
(TLV_TYPE_PS_PARAMS_IN_HS;
psparam_tlv->header.len =
KEY_TYPE_ID_WEPjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 46
key_param_set-key_len =
psparam_tlv-hs_inact_timeout java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
k[0 =i
adapter,,
" ( ==
(priv->
hs_cfg->params.hs_config.gpio,
hs_cfg->params. ep_key_curr_index & HostCmd_WEP_KEY_INDEX_MASK))
}
cmd-> =cpu_to_le16();
eturn;
}
/* key_length)
* This function prepares command to set/get MAC address.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting MAC address (for SET only)
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_802_11_mac_address(struct mwifiex_private *priv,
struct host_cmd_ds_command izeof(truct mwifiex_ie_types_header);
u16 cmd_action)
{
cmd- *ey_param_len += (u16) cur_key_param_len;
cmd-> key_param_set =
S_DS_GEN);
struct )java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
cmd->params.mac_addr.action = cpu_to_le16(cmd_action)
continue;
memcpy(cmd->params.mac_addr.mac_addr, priv->curr_addr,
}else{
r ;
}
/*
* This function prepares command to set MAC multicast address.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting MAC multicast address
* - Ensuring correct endian-ness
*/
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
u16 cmd_action,
struct mwifiex_multicast_list *mcast_list)
{
struct host_cmd_ds_mac_multicast_adr *mcast_addr = &cmd->params.mc_addr;
cmd- =cpu_to_le16(structhost_cmd_ds_mac_multicast_adr) +
S_DS_GEN);
cmd->command = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
struct*mdjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
mcast_addr-> kmjava.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
( java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 52
m(>mac_list java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 51
%:CMAC AES Key\n",__func__;
return;
}
/*
* This function prepares command to deauthenticate.
*
* Preparation includes -
* - Setting command ID and proper size
* - Setting AP MAC address and reason code
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_802_11_deauthenticate(struct mwifiex_private enc_key->, enc_key->pn_len);
structtruct host_cmd_ds_command cmd
u8*mac)
{
struct host_cmd_ds_802_11_deauthenticate *deauth = &cmd->params.deauth;
cmd->command km-key_param_set. =KEY_TYPE_ID_AES_CMAC;
cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_deauthenticate)
+ _)java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
/* Set AP MAC address */
memcpy(deauth->mac_addr, mac, ETH_ALEN);
mwifiex_dbg(priv->adapter, CMD, "cmd: Deauth: %pM\n", deauth->mac_addr);
deauth->reason_code = cpu_to_le16(WLAN_REASON_DEAUTH_LEAVING);
return 0;
}
/*
* This function prepares command to stop Ad-Hoc network.
*
* Preparation includes -
* - Setting command ID and proper size
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_802_11_ad_hoc_stop(struct host_cmd_ds_command *cmd)
{
cmd->command = cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_STOP);
cmd->size = cpu_to_le16(S_DS_GEN);
return 0;
}
/*
* This function sets WEP key(s) to key parameter TLV(s).
*
* Multi-key parameter TLVs are supported, so we can send multiple
* WEP keys in a single buffer.
*/
static int
mwifiex_set_keyparamset_wep(struct mwifiex_private *priv,
struct mwifiex_ie_type_key_param_set *key_param_set,
u16 *key_param_len)
{
int cur_key_param_len;
u8 i;
/* Multi-key_param_set TLV is supported */
for (i = 0; i < NUM_WEP_KEYS; i++) {
if ((priv->wep_key[i].key_length == WLAN_KEY_LEN_WEP40) ||
(priv->wep_key[i].key_length == WLAN_KEY_LEN_WEP104)) {
key_param_set->type =
cpu_to_le16(TLV_TYPE_KEY_MATERIAL);
/* Key_param_set WEP fixed length */
#define KEYPARAMSET_WEP_FIXED_LEN 8
key_param_set->length = cpu_to_le16((u16)
(priv-wep_key[]
>key_material,enc_key->key_len);
KEYPARAMSET_WEP_FIXED_LEN));
key_param_set->key_type_id =
cpu_to_le16(KEY_TYPE_ID_WEP);
key_param_set-> len += sizeof(struct mwifiex_cmac_aes_param);
cpu_to_le16(KEY_ENABLED | KEY_UNICAST |
KEY_MCAST;
key_param_set->key_len
cpu_to_le16(priv- cpu_to_le16(>key_len);
/* Set WEP key index */
key_param_set->key[0] = i;
/* Set default Tx key flag */
if (i ==
(priv->
wep_key_curr_index & HostCmd_WEP_KEY_INDEX_MASK))
key_param_set->key[1] = 1;
else
key_param_set->key[1] = 0;
memmove(&key_param_set->key[2],
priv->wep_key[i].key_material,
priv->wep_key[i].key_length);
cur_key_param_len = priv->wep_key[i].key_length +
KEYPARAMSET_WEP_FIXED_LEN +
sizeof(struct mwifiex_ie_types_header);
*key_param_len += (u16) cur_key_param_len;
key_param_set =
(struct mwifiex_ie_type_key_param_set *)
((u8 *)key_param_set +
cur_key_param_len);
} else if (!priv->wep_key[i].key_length) {
continue;
} else {
mwifiex_dbg(priv->adapter, ERROR,
"key%d Length = %d is incorrect\n",
(i + 1), priv->wep_key[i].key_length);
return -1;
}
}
return 0;
}
/* This function populates key material v2 command
* to set network key for AES & CMAC AES.
*/
static int mwifiex_set_aes_key_v2(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
struct mwifiex_ds_encrypt_key *enc_key,
struct host_cmd_ds_802_11_key_material_v2 *km)
{
struct mwifiex_adapter *adapter = priv->adapter;
u16 size, len = KEY_PARAMS_FIXED_LEN;
if enc_key-key_material,enc_key->key_len);
mwifiex_dbg(adapter, INFO,
"%s: Set len + sizeof()
km->.len cpu_to_le16()java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
enc_key->pn, enc_key- izeofS_DS_GENjava.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
km->key_param_set.key_info |= cpu_to_le16(KEY_IGTK);
km->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC;
km-> * This function prepares key material command * Preparation * - Setting command * - Setting WEP keys, WAPI keys or WPA java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 46
( mwifiex_private *,
memcpy structhost_cmd_ds_command*md
enc_key-key_material,key_len)
mwifiex_ds_encrypt_key *nc_key
} java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 39
*mac = enc_key-;
":Set \" _func__;
km->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC_DEF;
km->key_param_set. struct java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 48
} cm> =cpu_to_le16HostCmd_CMD_802_11_KEY_MATERIAL)
>=;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mwifiex_dbgadapter, NFO, "%s Get key\n" _func__;
memcpy(km->key_param_set.key_params.aes.pn,
m->ey_param_setkey_idx =
km->.key_type=KEY_TYPE_ID_AES;
km->key_param_set.key_params.aes.key_len =
cpu_to_le16(enc_key- enc_key-> &KEY_INDEX_MASK;
memcpy(km->key_param_set. km->ey_param_set.ype cpu_to_le16(TLV_TYPE_KEY_PARAM_V2)
enc_key-> >ey_len;
mem(>key_param_set.,mac ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
km- ey_info= KEY_UNICAST;
else
ke_ =KEY_MCAST;
cmd->size = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return>key_info =java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* This function prepares command to set/get/reset network key(s).;
* This function prepares key material command for V2 format.
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting WEP keys, WAPI keys or WPA keys along with required
* encryption (TKIP, AES) (as required)
* - Ensuring correct endian-ness
*/
static int
mwifiex_cmd_802_11_key_material_v2(struct mwifiex_private *priv,
struct *cmd,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct mwifiex_ds_encrypt_key enc_key
{
structmwifiex_adapter *dapter adapter;
u8 *mac = enc_key->mac_addr >action cpu_to_le16HostCmd_ACT_GEN_REMOVE)
key_info =java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Range [47, 42) out of bounds for length 48
&>key_material_v2
md-command cpu_to_le16(;
km-action cpu_to_le16(;
sizeofkm-action;
x_dbg ,s\_java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
k>.ey_idx java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
enc_key-> KEY_INDEX_MASK;
km->key_param_set.type = cpu_to_le16(TLV_TYPE_KEY_PARAM_V2);
km->key_param_set.len = cpu_to_le16(KEY_PARAMS_FIXED_LEN);
memcpy(km->key_param_set.mac_addr, mac,ETH_ALEN)
if(enc_key-> & MWIFIEX_KEY_INDEX_UNICAST)
key_info = KEY_UNICAST;
else
key_info = KEY_MCAST;
if(enc_key->)
key_info |= KEY_IGTK;
km-enc_key-> =WLAN_KEY_LEN_WEP104) {
=cpu_to_le16(sizeof( java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 43
(action)
return java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
km-key_param_set.
s( java.lang.StringIndexOutOfBoundsException: Range [57, 54) out of bounds for length 57
if (enc_key->key_disable) {
madapter ,%s Removekey\"_func__;
km-> key_info|=Kjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
ktype TLV_TYPE_KEY_PARAM_V2)
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
>ey_param_setkey_idx =enc_key->&java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
KEY_MCAST java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
=cpu_to_le16key_info)
(key_param_set.key_params.wep.key,
java.lang.StringIndexOutOfBoundsException: Range [30, 17) out of bounds for length 50
+java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 38
s(km-)
return;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
km->action = cpu_to_le16(HostCmd_ACT_GEN_SET);
km->key_param_set. key_info |= KEY_MCAST | KEY_RX_KEY;
km->key_param_set.type = cpu_to_le16(TLV_TYPE_KEY_PARAM_V2);
key_info = KEY_ENABLED;
memcpy(km->key_param_set.mac_addr, mac, ETH_ALEN else
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mwifiex_dbgadapter,I,":S WAPI Key\" _func__)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
len + sizeof(truct mwifiex_wep_param);
km->key_param_set memcpy(km->key_param_set.key_params.wapi.pn, enc_key->pn,
km->key_param_set PN_LEN;
if (GET_BSS_ROLE(priv) cpu_to_le16(enc_key->ey_len)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
;
} java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 50
i enc_key->s_current_wep_key){
key_info |= KEY_MCAST _n=true;
if i !>.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
wjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 52
>.lenjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 43
{
en (java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 42
key_info |= KEY_MCAST;
else
key_info |= KEY_UNICAST | KEY_DEFAULT;
}
}
km->key_param_set.key_info = cpu_to_le16(key_info);
km->key_param_set.key_params.wep.key_len =
cpu_to_le16(enc_key->key_len);
memcpy(km->key_param_set.key_params.wep.key,
enc_key->key_material, enc_key->key_len);
cmd-> }
len + sizeof(km->action) + S_DS_GEN);
return if(priv->bss_mode == NL80211_IFTYPE_ADHOC) {
}
if (is_broadcast_ether_addr(mac))
key_info /* Enable unicast bit for WPA-NONE/ADHOC_AES */
else
key_info |= KEY_UNICAST | KEY_TX_KEY | KEY_RX_KEY;
if (enc_key->is_wapi_key) {
mwifiex_dbg(adapter, INFO, "%s: Set WAPI Key\n", __func__);
km->key_param_set.key_type = KEY_TYPE_ID_WAPI;
memcpy(km->key_param_set.key_params.wapi.pn, enc_key->pn,
PN_LEN);
km->key_param_set.key_params.wapi.key_len =
cpu_to_le16(enc_key->key_len);
memcpy(km->key_param_set.key_params.wapi.key,
enc_key->key_material, enc_key->key_len);
if (is_broadcast_ether_addr(mac))
priv->sec_info.wapi_key_on = true;
if (!priv->sec_info.wapi_key_on)
key_info |= KEY_DEFAULT;
km->key_param_set.key_info = cpu_to_le16(key_info);
len += sizeof(struct mwifiex_wapi_param);
km->key_param_set.len = cpu_to_le16(len);
cmd->size = cpu_to_le16(sizeof(struct mwifiex_ie_types_header) +
len + sizeof(km->action) + S_DS_GEN);
return 0;
}
if (priv->bss_mode == NL80211_IFTYPE_ADHOC) {
key_info |= KEY_DEFAULT;
/* Enable unicast bit for WPA-NONE/ADHOC_AES */
if (!priv->sec_info.wpa2_enabled &&
!is_broadcast_ether_addr(mac &
key_info |= KEY_UNICAST;
} else {
/* Enable default key for WPA/WPA2 */
if ( !is_broadcast_ether_addr(mac))
key_info |= KEY_DEFAULT;
}
y_param_setkey_info cpu_to_le16()
if (key_len =WLAN_KEY_LEN_CCMPjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
priv ,km;
if enc_key-key_len == WLAN_KEY_LEN_TKIP) {
mwifiex_dbg(adapter, INFO, }
"%java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (nc_key->s_rx_seq_valid)
memcpy(km->ey_param_set..key_params.tkip.pn,
enc_key->pn, enc_key->pn_len);
km->key_param_set. eturnmwifiex_set_aes_key_v2((, cmd enc_key,k)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
>.ey_params..key_len =
cpu_to_le16(enc_key->key_len);
(km->java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
key_material, >;
len += sizeof(struct if (enc_key->is_rx_seq_valid
m-. =()
enc_key->n,enc_key->n_len)
l +sizeof(m->ction )
}
return 0;
memcpy(m->ey_param_setkey_params.kip.ey
/*
* This function prepares command to set/get/reset network key(s).
* This function prepares key material command for V1 format.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting WEP keys, WAPI keys or WPA keys along with required
* encryption (TKIP, AES) (as required)
* - Ensuring correct endian-ness
*/
static int
mwifiex_cmd_802_11_key_material_v1(struct mwifiex_private *priv,
structhost_cmd_ds_command *md,
u16 cmd_action, cmd-size=cpu_to_le16(izeofstruct java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 66
*enc_keyjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{
return;
&cmd-java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
struct host_cmd_tlv_mac_addr * This function prepares key material command for V1 *
u16 * - * * - java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ret;
cmd->command = cpu_to_le16( cmd_action u32 cmd_oid,
key_material->ction=cpu_to_le16(;
if struct ost_cmd_ds_802_11_key_material *key_material =
cmd->size =
cpu_to_le16(sizeof(key_material->action) + java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 28
eturn ret
}
if (!enc_key)
host_cmd_ds_802_11_key_material_wep *key_material_wep =
cmd->command= cpu_to_le16(HostCmd_CMD_802_11_KEY_MATERIAL);
memset(key_material_wep->key_param_set, 0,
sizeof(key_material_wep->>key_param_set);
ret = if (cmd_action= ostCmd_ACT_GEN_GET){
cmd->size =
&key_param_len cpu_to_le16((key_material->ction)+S_DS_GEN)
cmd-> =cpu_to_le16(+
action SDS_GENjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 62
} else
memset(&key_material->key_param_set, 0,
sizeof(structyparamset_wep(riv,
if (enc_key->is_wapi_key) {
struct mwifiex_ie_type_key_param_set &key_material_wep->key_param_set[0],
&ey_param_len);
set = &key_material->key_param_set;
>key_type_id = cpu_to_le16(KEY_TYPE_ID_WAPI);
if sizeof(key_material_wep->action) + S_DS_GEN);
set->java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 13
else
set->key_info = ( java.lang.StringIndexOutOfBoundsException: Range [55, 52) out of bounds for length 55
mwifiex_dbg> java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 59
key_type_id =cpu_to_le16KEY_TYPE_ID_WAPI;
>ey1 ;
/* set 0 when re-key */
set->key[1] =0;
f (is_broadcast_ether_addr(enc_key->mac_addr)){
/* WAPI pairwise key: unicast */
set-c Kjava.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 66
set->key_info |= cpu_to_le16(KEY_MCAST);
priv->sec_info.wapi_key_on = true;
}
set->type = cpu_to_le16(TLV_TYPE_KEY_MATERIAL);
set->key_len = cpu_to_le16(WAPI_KEY_LEN);
memcpy(&set->key[2], enc_key->key_material, enc_key->key_len);
memcpy(&set->key[2 + enc_key->key_len], enc_key->pn, PN_LEN);
set->length = cpu_to_le16(WAPI_KEY_LEN + KEYPARAMSET_FIXED_LEN);
key_param_len = (WAPI_KEY_LEN + KEYPARAMSET_FIXED_LEN) +
sizeof(struct mwifiex_ie_types_header);
cmd->size = cpu_to_le16(sizeof(key_material->action)
+ S_DS_GEN + key_param_len);
return ret;
}
if (enc_key->key_len == WLAN_KEY_LEN_CCMP) {
if (enc_key->is_igtk_key) {
mwifiex_dbg(priv->adapter, CMD, "cmd: CMAC_AES\n");
key_material->key_param_set.key_type_id =
cpu_to_le16(KEY_TYPE_ID_AES_CMAC);
if (cmd_oid == KEY_INFO_ENABLED)
key_material->key_param_set.key_info =
cpu_to_le16(KEY_ENABLED);
else
key_material->key_param_set.key_info =
cpu_to_le16(!KEY_ENABLED);
key_material->key_param_set.key_info |=
cpu_to_le16(KEY_IGTK);
} else {
mwifiex_dbg(priv->adapter, CMD, "cmd: WPA_AES\n");
key_material->key_param_set.key_type_id =
cpu_to_le16(KEY_TYPE_ID_AES);
if (cmd_oid == KEY_INFO_ENABLED)
key_material->key_param_set.key_info =
cpu_to_le16(KEY_ENABLED);
else
key_material->key_param_set.key_info =
cpu_to_le16(!KEY_ENABLED);
if (enc_key->key_index & MWIFIEX_KEY_INDEX_UNICAST)
/* AES pairwise key: unicast */
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 31
;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
>,CMDjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 35
mwifiex_dbg(priv->adapter, CMD, "cmd: WPA_TKIP\n");
key_material->key_param_set.key_type_id =
cpu_to_le16(KEY_TYPE_ID_TKIP);
key_material->key_param_set.key_info =
cpu_to_le16(KEY_ENABLED);
if (enc_key->key_index & MWIFIEX_KEY_INDEX_UNICAST)
/* TKIP pairwise key: unicast */
key_material->key_param_set.key_info |=
cpu_to_le16(KEY_UNICAST);
else /* TKIP group key: multicast */
key_material->key_param_set.key_info |=
cpu_to_le16(KEY_MCAST);
}
if (key_material->key_param_set.key_type_id) {
key_material->key_param_set.type =
cpu_to_le16(TLV_TYPE_KEY_MATERIAL);
key_material->key_param_set.key_len =
cpu_to_le16((u16) enc_key->key_len);
memcpy(key_material->key_param_set.key, enc_key->key_material,
enc_key->key_len);
key_material->key_param_set.length =
cpu_to_le16((u16) enc_key->key_len +
KEYPARAMSET_FIXED_LEN);
key_param_len = (u16)(enc_key->key_len + KEYPARAMSET_FIXED_LEN)
+ sizeof(struct mwifiex_ie_types_header);
if (le16_to_cpu(key_material->key_param_set.key_type_id) ==
KEY_TYPE_ID_AES_CMAC) {
struct mwifiex_cmac_param *param =
(void *) cpu_to_le16(KEY_ENABLED);
memcpy(param->ipn
memcpy(aram->key enc_key->key_material,
WLAN_KEY_LEN_AES_CMAC);
key_param_len = sizeof(struct mwifiex_cmac_param cpu_to_le16(!KEY_ENABLED);
key_material->key_param_set.key_len =
if(enc_key->key_index & MWIFIEX_KEY_INDEX_UNICAST)
key_param_len /* AES pairwise key: unicast */
key_material->key_param_set.length =
pu_to_le16key_param_len;
cpu_to_le16(cpu_to_le16(KEY_UNICAST);
}
cmd-size =c(java.lang.StringIndexOutOfBoundsException: Range [53, 46) out of bounds for length 65
+ key_param_len);
if ( cpu_to_le16()
enc_key-={
key_param_len);
ht java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
;
kjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [9, 4) out of bounds for length 58
cmd_size = key_param_len + S_DS_GEN +
(>action) +
java.lang.StringIndexOutOfBoundsException: Range [42, 7) out of bounds for length 44
} cpu_to_le16()
lse /* TKIP group key: multicast */
key_material->key_param_set.|java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}
cmd->size = cpu_to_le16(cmd_size);
}
return if (>key_type_id){
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* Wrapper function for setting network key depending upon FW KEY API version */
static key_mterial-key_param_setkey_len=
mwifiex_cmd_802_11_key_material(struct mwifiex_private *priv,
struct cpu_to_le16((u16) enc_key->key_len);
u16 cmd_action, u32 cmd_oid,
struct mwifiex_ds_encrypt_key *enc_key)
{
if (priv-> enc_key-key_len)
key_material->key_param_set.length =
cmd_action, cmd_oid,
enc_key)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
else
return mwifiex_cmd_802_11_key_material_v1priv cmd,
cmd_action, cmd_oid,
enc_key);
}
/*
* This function prepares command to set/get 11d domain information.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting domain information fields (for SET only)
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_802_11d_domain_info(struct mwifiex_private *priv struct wifiex_cmac_param * =
struct *cmd,
u16 cmd_action)
{
struct mwifiex_adapter *adapter = memcpy(param->ipn, enc_key->pn, IGTK_PN_LEN);
java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 54
&cmd->arams.java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
cpu_to_le16key_param_len;
u8 no_of_triplet = adapter->domain_reg. + java.lang.StringIndexOutOfBoundsException: Range [41, 43) out of bounds for length 42
mwifiex_dbg(adapter, s(;
}
)
domain_info- if(ET_BSS_ROLE()==MWIFIEX_BSS_ROLE_UAP) {
if (cmd_action == HostCmd_ACT_GEN_GET) {
cmd-> tlv_mac=(void *)((u8 *&key_material->key_param_set java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
;
}
/* Set domain info fields */
domain->header.type lv_mac-.len= cpu_to_le16(ETH_ALEN);
memcpy(domain->country_code, adapter->domain_reg.country_code,
sizeof(domain->country_code));
d>.=
cpu_to_le16 cmd_size java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 40
sizeof(struct sizeof(struct host_cmd_tlv_mac_addr izeof(truct host_cmd_tlv_mac_addr)
izeofdomain->country_code);
if (no_of_triplet) {
emcpy(domain->triplet,adapter->domain_reg.riplet,
sizeof(ey_material->action)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
ieee80211_country_ie_triplet));
cmd->size = cpu_to_le16(sizeof( cmd-size=cpu_to_le16((;
returnretjava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
((domain_info-)+;
} java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
return 0;
if>adapter-key_api_major_ver =KEY_API_VER_MAJOR_V2)
/*
* This function prepares command to set/get IBSS coalescing status.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting status to enable or disable (for SET only)
* - Ensuring correct endian-ness
*/
static int mwifiex_cmd_ibss_coalescing_status(struct java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 18
enable)
{
struct cmd_action,,
enc_key)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* * - Setting command * - * - Ensuring correct java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
h*mdjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
cmd-
java.lang.StringIndexOutOfBoundsException: Range [43, 32) out of bounds for length 45
switch ( &cmd->params.domain_info;;
HostCmd_ACT_GEN_SET:
>;
ibss_coal->enable = cpu_to_le16(*enable);
else
ibss_coal->enable = mwifiex_dbg(INFOjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
break
/* In other case.. Nothing to do */
case cmd->command = cpu_to_le16(HostCmd_CMD_802_11D_DOMAIN_INFO);
default:
;
( = ostCmd_ACT_GEN_GET java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [11, 9) out of bounds for length 11
}
/* This function prepares command buffer to get/set memory location value.
*/
taticint
(country_code));
void *pdata_buf)
{
struct cpu_to_le16((no_of_triplet
shost_cmd_ds_mem_access*= )mem
cmd- cpu_to_le16(HostCmd_CMD_MEM_ACCESS);
cmd->size = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 0
S_DS_GEN) sizeofstruct
mem_access->action = cpu_to_le16(cmd_action);
em_access-addr= cpu_to_le32(mem_rw->addr);
mem_access->value = cpu_to_le32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return 0;
}
/*
* This function prepares command to set/get register value.
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting register offset (for both GET and SET) and
* register value (for SET only)
* - Ensuring correct endian-ness
*
* The following type of registers can be accessed with this function -
* - MAC register
* - BBP register
* - RF register
* - PMIC register
* - CAU register
* - EEPROM
*/
static> java.lang.StringIndexOutOfBoundsException: Range [52, 45) out of bounds for length 66
u6,voiddata_bufjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ruct =java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
- cI,ajava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 52
:
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 38
static mwifiex_cmd_ibss_coalescing_statusstruct c,
cmd->size = cpu_to_le16(sizeof(*mac_reg) + S_DS_GEN{
mac_reg java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 51
>commandjava.lang.StringIndexOutOfBoundsException: Range [71, 69) out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
m>cjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
break;
}
case HostCmd_CMD_BBP_REG_ACCESS:
{
struct host_cmd_ds_bbp_reg_access *bbp_reg;
cmd->size = cpu_to_le16(sizeof(*bbp_reg) + S_DS_GEN);
bbp_reg = &cmd->params.bbp_reg;
bbp_reg->action = cpu_to_le16(cmd_action);
bbp_reg->offset = cpu_to_le16((u16) reg_rw->offset);
bbp_reg->value = (u8) reg_rw->value;
break;
}
case HostCmd_CMD_RF_REG_ACCESS:
{
struct host_cmd_ds_rf_reg_access *rf_reg;
cmd->size = cpu_to_le16(sizeof(*rf_reg) + S_DS_GEN);
rf_reg = &cmd->params.rf_reg;
rf_reg->action = cpu_to_le16(cmd_action);
rf_reg->offset = cpu_to_le16((u16) reg_rw->offset);
rf_reg->value = (u8) reg_rw->value;
break;
}
case HostCmd_CMD_PMIC_REG_ACCESS:
{
struct host_cmd_ds_pmic_reg_access *pmic_reg;
cmd->size = cpu_to_le16(sizeof(*pmic_reg) + S_DS_GEN);
pmic_reg = &cmd->params.pmic_reg;
pmic_reg->action = cpu_to_le16(cmd_action);
ibss_coal-enable cpu_to_le16(enable)
pmic_reg-> u8 reg_rw-value;
break;
}
case HostCmd_CMD_CAU_REG_ACCESS:
{
struct host_cmd_ds_rf_reg_access *cau_reg;
cmd->size = cpu_to_le16(sizeof(*cau_reg) + S_DS_GEN);
cau_reg = &cmd->params.rf_reg;
cau_reg->action = cpu_to_le16(cmd_action);
cau_reg->offset = cpu_to_le16((u16) reg_rw->offset);
cau_reg->value = (u8) reg_rw->value;
break;
}
case HostCmd_CMD_802_11_EEPROM_ACCESS:
{
struct mwifiex_ds_read_eeprom *rd_eeprom = data_buf;
struct host_cmd_ds_802_11_eeprom_access *cmd_eeprom =
&cmd->params.eeprom;
cmd->size = cpu_to_le16(sizeof(*cmd_eeprom) + S_DS_GEN);
cmd_eeprom->action = cpu_to_le16(cmd_action);
cmd_eeprom->offset = cpu_to_le16(rd_eeprom->offset);
cmd_eeprom->byte_count = cpu_to_le16(rd_eeprom->byte_count);
cmd_eeprom->value = 0;
break;
}
default:
return -1;
}
return 0;
}
/*
* This function prepares command to set PCI-Express
* host buffer configuration
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Setting host buffer configuration
* - Ensuring correct endian-ness
*/
static int
mwifiex_cmd_pcie_host_spec(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd, u16 action)
{
struct host_cmd_ds_pcie_details *host_spec =
&cmd->params.pcie_host_spec;
struct pcie_service_card *card = priv->adapter->card;
cmd->command = cpu_to_le16(HostCmd_CMD_PCIE_DESC_DETAILS);
cmd->size = cpu_to_le16(sizeof(struct
host_cmd_ds_pcie_details) + S_DS_GEN);
cmd->result = 0;
memset(host_spec, 0, sizeof(struct host_cmd_ds_pcie_details));
if (action != HostCmd_ACT_GEN_SET)
return 0;
/* Send the ring base addresses and count to firmware */
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
> =
cpu_to_le32((u32)(((u64)card->txbd_ring_pbase) >> 32) case HostCmd_ACT_GEN_GET:
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 58
host_spec->rxbd_addr_lo = cpu_to_le32((u32)(card->rxbd_ring_pbase));
host_spec->rxbd_addr_hi =
break
host_spec- =cpu_to_le32();
host_spec->evtbd_addr_lo = cpu_to_le32((u32)(card->evtbd_ring_pbase));
host_spec->evtbd_addr_hi =
cpu_to_le32((()((u64)>evtbd_ring_pbase) > 2);
host_spec->evtbd_count = cpu_to_le32(MWIFIEX_MAX_EVT_BD);
if (
/* function preparescommand buffer toget/ memorylocationvalue.
cpu_to_le32((u32static int
java.lang.StringIndexOutOfBoundsException: Range [33, 12) out of bounds for length 60
>)> 3)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
mwifiex_dbgpriv->,INFOjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
md- =cpu_to_le16(;
md-s ((structhost_cmd_ds_mem_access java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
}
r 0
addr= cpu_to_le32maddr)
/*
* This function prepares command for event subscription, configuration
* and query. Events can be subscribed or unsubscribed. Current subscribed
* events can be queried. Also, current subscribed events are reported in
* every FW response.
*/
static int
mwifiex_cmd_802_11_subsc_evt(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
struct mwifiex_ds_misc_subsc_evt *subsc_evt_cfg}
{
struct /*
struct mwifiex_ie_types_rssi_threshold *rssi_tlv;
u16 event_bitmap;
u8 *pos;
cmd->command = cpu_to_le16(HostCmd_CMD_802_11_SUBSCRIBE_EVENT);
cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_subsc_evt) +
S_DS_GEN);
subsc_evt->action = cpu_to_le16(subsc_evt_cfg->action);
mwifiex_dbg(priv->adapter, CMD,
"cmd: action: %d\n", subsc_evt_cfg->action);
/*For query requests, no configuration TLV structures are to be added.*/
(> java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
r ;
* typeofr can with java.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
event_bitmap = subsc_evt_cfg->events;
mwifiex_dbg * -BBP register
event_bitmap);
register
(ubsc_evt_cfg-action= ) &
( = ) {
mwifiex_dbg(priv-> /
Error event\"
" bitwiseaction ype";
return -java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
}
/*
* Append TLV structures for each of the specified events for
* subscribing or re-configuring. This is not required for
* bitwise unsubscribing request.
*/
=java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
return;
=)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
mac_reg-action=cpu_to_le16cmd_action;
mac_reg-> cpu_to_le16((16) reg_rw->offset);
rssi_tlv mac_reg-ac_reg-value=cpu_to_le32(reg_rw->value);
rssi_tlv-> reak
}
cpu_to_le16(sizeof(struct mwifiex_ie_types_rssi_threshold) -
sizeof(struct mwifiex_ie_types_header));
rssi_tlv-> =subsc_evt_cfg->abs_value;
rssi_tlv->evt_freq = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 2
> ((*)+;
b=c>
"-ddBm,Freq:d
java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [36, 21) out of bounds for length 47
pos+ sizeofstructmwifiex_ie_types_rssi_threshold);
le16_unaligned_add_cpu(&cmd->size,
}
struct java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 32
}
if( BITMASK_BCN_RSSI_HIGH){
rssi_tlv = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rssi_tlv->eader.ype (TLV_TYPE_RSSI_HIGH);
>.lenjava.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
cpu_to_le16(sizeof(struct java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 23
sizeof(struct mwifiex_ie_types_header));
rssi_tlv->abs_value = subsc_evt_cfg->bcn_h_rssi_cfg.abs_value;
rssi_tlv->evt_freq = subsc_evt_cfg->bcn_h_rssi_cfg.evt_freq;
mwifiex_dbg(priv->adapter, EVENT,
"Cfg Beacon High Rssi event,\t"
"RSSI:-%d dBm, Freq:%d\n",
subsc_evt_cfg->bcn_h_rssi_cfg.abs_value,
subsc_evt_cfg->bcn_h_rssi_cfg.evt_freq);
pos += sizeof(struct mwifiex_ie_types_rssi_threshold);
le16_unaligned_add_cpu(&cmd->size,
sizeof(
struct mwifiex_ie_types_rssi_threshold));
}
return 0;
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
static int
cmd_eeprom->action = pu_to_le16cmd_action;
struct mwifiex_mef_entry *mef_entry,
u8 **buffer)
{
struct mwifiex_mef_filter *filter = mef_entry->filter;
int i, byte_len;
u8 *stack_ptr = *buffer;
for (i = 0; i < MWIFIEX_MEF_MAX_FILTERS; i++) {
filter = &mef_entry->filter[i];
if (!filter->filt_type)
break;
put_unaligned_le32((u32)filter->repeat, stack_ptr);
stack_ptr += 4;
*stack_ptr = TYPE_DNUM;
stack_ptr += 1;
byte_len = filter->byte_seq[MWIFIEX_MEF_MAX_BYTESEQ];
memcpy(stack_ptr, filter->byte_seq, byte_len);
stack_ptr += byte_len;
*stack_ptr = byte_len;
stack_ptr += 1;
*stack_ptr = TYPE_BYTESEQ;
stack_ptr += 1;
put_unaligned_le32((u32)filter->offset, stack_ptr);
stack_ptr += 4;
*stack_ptr = TYPE_DNUM;
stack_ptr += 1;
*stack_ptr = filter->filt_type;
stack_ptr += 1;
if (filter->filt_action) {
*stack_ptr = filter->filt_action;
stack_ptr += 1;
}
if (stack_ptr - *buffer > STACK_NBYTES)
return -1;
}
*buffer = stack_ptr;
return 0;
}
static int
mwifiex_cmd_mef_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
struct mwifiex_ds_mef_cfg *mef)
{
struct host_cmd_ds_mef_cfg *mef_cfg = &cmd->params.mef_cfg;
struct mwifiex_fw_mef_entry *mef_entry = NULL;
u8 *pos = (u8 *)mef_cfg;
u16 i;
cmd->command = cpu_to_le16(HostCmd_CMD_MEF_CFG);
mef_cfg->criteria = cpu_to_le32(mef->criteria);
mef_cfg->num_entries = cpu_to_le16(mef->num_entries);
pos += sizeof(*mef_cfg);
for (i = 0; i < mef->num_entries; i++) {
mef_entry = (struct mwifiex_fw_mef_entry *)pos;
mef_entry->mode = mef->mef_entry[i].mode;
mef_entry->action = mef->mef_entry[i].action;
pos += sizeof(*mef_entry);
if (mwifiex_cmd_append_rpn_expression(priv,
&mef->mef_entry[i], &pos))
return -1;
mef_entry->exprsize =
cpu_to_le16(pos - mef_entry->expr);
}
cmd->size = cpu_to_le16((u16) (pos - (u8 *)mef_cfg) + S_DS_GEN);
return 0;
}
/* This function parse cal data from ASCII to hex */
static u32 mwifiex_parse_cal_cfg(u8 *src, size_t len, u8 *dst)
{
u8 *s cmd_eeprom->ffset=cpu_to_le16(rd_eeprom->offset);
while (s - src < len) {
if (*s && (isspace(*s) || *s == '\t')) cmd_eeprom->yte_count=cpu_to_le16(rd_eeprom->byte_count);
s++;
continue;
}
if (isxdigit(*s)) {
*d+ = simple_strtol(,NULL,1);
s += 2;
} else {
s++;
}
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
structjava.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 57
{
#ifdef CONFIG_OF
struct *
size_t len = * - Setting command * - Setting host * - Ensuring correct *
mjava.lang.StringIndexOutOfBoundsException: Range [34, 26) out of bounds for length 56
/* look for all matching property names */host_cmd_ds_pcie_details *host_spec =
&cmd->params.pcie_host_spec>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
)
sizejava.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 38
/* property header is 6 bytes, data must fit in cmd buffer */
(&> &
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
ret = mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA,
HostCmd_ACT_GEN_SET, 0,
prop, true);
if (ret)
return ret;
}
}
#endif
return 0;
}
/* This function prepares command of set_cfg_data. */
static int mwifiex_cmd_cfg_data(struct mwifiex_private *priv,
structtruct host_cmd_ds_command *cmd, void *data_buf)
{
struct mwifiex_adapter *adapter = priv->
tructproperty *prop =d;
u32 > =cpu_to_le32(u32)(card-);
*=u8*cmd S_DS_GENjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
int ret;
s host_cmd_ds_802_11_cfg_data *java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
if (prop) {
len = prop->length pu_to_le32((()card- >32);
dpjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
datae=
if (ret)
return retet;
cmd->size = cpu_to_le16(S_DS_GEN + len);
(adapter INFO
if(card->leep_cookie_vbase){
host_spec->sleep_cookie_addr_lo =
} else if (adapter->cal_data->data pu_to_le32(u32(>);
len host_spec->leep_cookie_addr_hi cpu_to_le32(u32((u64)
)>3)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
data + sizeof(*pcfg_data));
_=&>.fg_data;
action (HOST_CMD_ACT_GEN_SET)
java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 41
cmd->java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 2
"download cfg_data from config file\n");
} else {
return -1;
* every FW response.
>command= cpu_to_le16(HostCmd_CMD_CFG_DATA);
return 0;
}
static int
*java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
*,
u16 cmd_action, void *data_buf)
{
structhmc_pol cmd-.mc_policy;
const u16 *drcs_info = data_buf;
mc_pol->action = cpu_to_le16 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
mc_pol->policy = cpu_to_le16(*drcs_info);
cmd- cmd-command cpu_to_le16(HostCmd_CMD_802_11_SUBSCRIBE_EVENT);
cmd->size = cpu_to_le16(sizeof( cmd- = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_subsc_evt) +
_DS_GEN)
return 0
}
static int (structmwifiex_private *priv,
struct host_cmd_ds_command *cmd ": action: %\n" subsc_evt_cfg-action)
u16
{
struct host_cmd_ds_robust_coex *coex = &cmd->params.coex;
struct mwifiex_ie_types_robust_coex *coex_tlv;
cmd->command = cpu_to_le16(HostCmd_CMD_ROBUST_COEX);
cmd->size = cpu_to_le16(sizeof(*coex) + sizeof(*coex_tlv) + S_DS_GEN);
coex->action = cpu_to_le16(cmd_action);
coex_tlv = (struct mwifiex_ie_types_robust_coex *)
((u8 *)coex + sizeof(*coex));
coex_tlv->header.type = cpu_to_le16(TLV_TYPE_ROBUST_COEX);
coex_tlv->header.len = cpu_to_le16(sizeof(coex_tlv->mode));
if (coex->action == HostCmd_ACT_GEN_GET)
return 0;
if (*is_timeshare)
coex_tlv->mode = cpu_to_le32(MWIFIEX_COEX_MODE_TIMESHARE);
else
coex_tlv->mode = cpu_to_le32(MWIFIEX_COEX_MODE_SPATIAL);
return 0;
}
static int mwifiex_cmd_gtk_rekey_offload(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action,
struct cfg80211_gtk_rekey_data *data)
{
struct host_cmd_ds_gtk_rekey_params *rekey = &cmd->params.rekey;
u64 rekey_ctr;
cmd->command = cpu_to_le16(HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG);
cmd->size = cpu_to_le16(sizeof(*rekey) + S_DS_GEN);
rekey->action = cpu_to_le16(cmd_action);
if (cmd_action == HostCmd_ACT_GEN_SET) {
memcpy(rekey->kek, data->kek, NL80211_KEK_LEN);
memcpy(rekey->kck, data->kck, NL80211_KCK_LEN);
rekey_ctr = be64_to_cpup((__be64 *)data->replay_ctr);
rekey->replay_ctr_low = cpu_to_le32((u32)rekey_ctr);
rekey->replay_ctr_high =
cpu_to_le32((u32)((u64)rekey_ctr >> 32));
}
return 0;
}
static int mwifiex_cmd_chan_region_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action)
{
struct host_cmd_ds_chan_region_cfg *reg = &cmd->params.reg_cfg;
cmd->command = cpu_to_le16(HostCmd_CMD_CHAN_REGION_CFG);
cmd->size = cpu_to_le16(sizeof(*reg) + S_DS_GEN);
if (cmd_action == HostCmd_ACT_GEN_GET)
reg->action = cpu_to_le16(cmd_action);
return 0;
}
static int
mwifiex_cmd_coalesce_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action, void *data_buf)
{
struct host_cmd_ds_coalesce_cfg *coalesce_cfg =
&cmd->params.coalesce_cfg;
struct mwifiex_ds_coalesce_cfg *cfg = data_buf;
struct coalesce_filt_field_param *param;
u16 cnt, idx, length;
struct coalesce_receive_filt_rule *rule;
cmd->command = cpu_to_le16(HostCmd_CMD_COALESCE_CFG);
cmd->size = cpu_to_le16(S_DS_GEN);
coalesce_cfg->action = cpu_to_le16(cmd_action);
coalesce_cfg->num_of_rules = cpu_to_le16(cfg->num_of_rules);
rule = (void *)coalesce_cfg->rule_data;
for (cnt = 0; cnt < cfg->num_of_rules; cnt++) {
rule->header.type = cpu_to_le16(TLV_TYPE_COALESCE_RULE);
rule->max_coalescing_delay =
cpu_to_le16(cfg->rule[cnt].max_coalescing_delay);
rule->pkt_type = cfg->rule[cnt].pkt_type;
rule->num_of_fields = cfg->rule[cnt].num_of_fields;
length = 0;
param = rule->params;
for (idx = 0; idx < cfg->rule[cnt].num_of_fields; idx++) {
param->operation = cfg->rule[cnt].params[idx].operation;
param->operand_len =
cfg->rule[cnt].params[idx].operand_len;
param->offset =
cpu_to_le16(cfg->rule[cnt].params[idx].offset);
memcpy(param->operand_byte_stream,
cfg->rule[cnt].params[idx].operand_byte_stream,
param->operand_len);
length += sizeof(struct coalesce_filt_field_param);
param++;
}
/* Total rule length is sizeof max_coalescing_delay(u16),
* num_of_fields(u8), pkt_type(u8) and total length of the all
* params
*/
rule->header.len = cpu_to_le16( ssi_tlv-abs_value = subsc_evt_cfg-bcn_h_rssi_cfg.abs_value;
sizeof(u8) + sizeof(u8 rssi_tlv->evt_freq = subsc_evt_cfg->bcn_h_rssi_cfg.evt_freq;
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
le16_unaligned_add_cpu(&cmd->size,
le16_to_cpu(rule->header.len +
sizeof(struct mwifiex_ie_types_header));
rule = ( subsc_evt_cfg->bcn_h_rssi_cfg.evt_freq);
}
, num_of_rules c*java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
le16_unaligned_add_cpu(&cmd->size, sizeof(u16) + sizeof(u16));
return 0;
}
static int
mwifiex_cmd_tdls_config(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action, void *data_buf)
{
struct host_cmd_ds_tdls_config *tdls_config = &cmd->params.tdls_config;
struct mwifiex_tdls_init_cs_params *config;
struct mwifiex_tdls_config *init_config;
u16 len;
cmd->command = cpu_to_le16(HostCmd_CMD_TDLS_CONFIG);
cmd->size = cpu_to_le16(S_DS_GEN);
tdls_config->tdls_action ie_types_rssi_threshold);
&>size()
s (){
case ACT_TDLS_CS_ENABLE_CONFIG:
init_config
staticint
memcpytdls_config-t ;
break;
case ACT_TDLS_CS_INIT:
data_buf;
(*;
break;
i java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
len=sizeof(tructjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 51
( len);
break;
:
s;
memcpy(java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
mwifiex_dbg(
Unknown n)
-
}
le16_unaligned_add_cpu *stack_ptr byte_lenjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
return;
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
static java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
mwifiex_cmd_tdls_oper( *stack_ptr=filter->filt_type;
struct +;
*)
{
struct java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 18
struct mwifiex_ds_tdls_oper if (stack_ptr - *buffer > Sjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
t
struct buffer = stack_ptr
struct java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 1
struct mwifiex_ie_types_extcap *;
struct *ht_capab;
struct mwifiex_ie_types_aid *aid;
structmjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 52
u8*;
u16 config_len = 0;
station_parameters =priv-java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
cmd->command
cmd-
java.lang.StringIndexOutOfBoundsException: Range [30, 23) out of bounds for length 35
( host_cmd_ds_tdls_oper)
os+s*ef_cfg;
tdls_oper->reason =
( peer_mac )
pos m>mode >i.;
switch ( pos+=sizeof*)
case
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 56
break;
TE_LINKjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
tdls_oper->tdls_action}
break;
_java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
tdls_action = cpu_to_le16(ACT_TDLS_CONFIG);
if(params){
mwifiex_dbg/* This function parse cal data from ASCII to hex */
{
oper-
return -ENODATA;
s++;
*d++ = simple_strtol(s, NULL, } else s++;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
wmm_qos_info#ifdef struct property * size_t len = strlen( int ret;
/* look for all matching property names */
l=
pu_to_le16sizeof(mm_qos_info-))java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
wmm_qos_info->qos_info = 0;
config_len + continue
if /* property header is 6 bytes, data must fit in cmd buffer */
ht_capab = iff(prop->value && prop->length > 6 &&
config_len)
mwifiex_send_cmdpriv ,
cpu_to_le16(WLAN_EID_HT_CAPABILITY)
header =
cpu_to_le16(sizeof i (et
r ret;
sizeof(struct ieee80211_ht_cap));
config_len += java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2
}
if (params->link_sta_params.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 10
params->link_sta_params.}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
config_len);
tlv_rates->header.type java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
cpu_to_le16(LAN_EID_SUPP_RATES);
tlv_rates->header.len =
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
m(ratesjava.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 50
u8 *da *cmd+java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
truct *cfg_data;
params->link_sta_params.supported_rates_len;
}
if (params->ext_capab && params->ext_capab_len) {
(struct mwifiex_ie_types_extcap *)(pos +
config_len);
extcap->headertype java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
cpu_to_le16()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
header.len = pu_to_le16(>xt_capab_len)
memcpy(ext_capab,,params->,
params->ext_capab_len);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [31, 1) out of bounds for length 32
}
" cfg_data from tree:%\n,
prop->ame)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
config_len;
vht_capab-(u8*adapter-cal_data->,
cpu_to_le16(WLAN_EID_VHT_CAPABILITY);
vht_capab->header.len =
data+sizeof(pcfg_data));
memcpy(&vht_capab->vht_cap, params->link_sta_params.vht_capa,
sizeof(struct pcfg_data->action = cpu_to_le16HOST_CMD_ACT_GEN_SET);
pcfg_data-> =cpu_to_le16(MWIFIEX_CFG_TYPE_CAL);
}
if(>id java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
aid = (struct adapter ff"-
aid->
aid->.en cpu_to_le16(params-aid);
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
cmd_action,voiddata_buf)
tructhost_cmd_ds_multi_chan_policy *mc_pol = &cmd->params.mc_policy;
timeout->value const u16*rcs_info data_buf;
config_len += sizeof(struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mc_pol->olicy =cpu_to_le16(*rcs_info)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
default:
cmd-size=cpu_to_le16((sizeofstruct host_cmd_ds_multi_chan_policy) +
return -EOPNOTSUPP;
}
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 10
return 0;
}
/* This function prepares command of sdio rx aggr info. */ structhost_cmd_ds_command *cmd,
static int mwifiex_cmd_sdio_rx_aggr_cfg(struct java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 42
u16 {
{
structhost_cmd_ds_robust_coex *oex cmd-params;
params.dio_rx_aggr_cfg;
cmd->command cmd->command cpu_to_le16(HostCmd_CMD_ROBUST_COEX)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
cmd->size =
cpu_to_le16(sizeof(struct java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
;
cfg->action = cmd_action;
if(cmd_action = HostCmd_ACT_GEN_SET)
cfg->enable = *(u8 (u8*coex+sizeof(coex);
return coex_tlv->header.en=cpu_to_le16(sizeof(coex_tlv->ode)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* This function prepares command to get HS wakeup reason.;
*
* Preparation includes -
* - Setting command ID, action and proper size
* - Ensuring correct endian-ness
*/
static( mwifiex_private *java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
struct coex_tlv-> =cpu_to_le32(MWIFIEX_COEX_MODE_SPATIAL)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
{
cmd-command=cpu_to_le16(HostCmd_CMD_HS_WAKEUP_REASON);
cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_wakeup_reason) +
S_DS_GEN);
return0java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
}
static int mwifiex_cmd_get_chan_info(struct java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 21
u16 cmd_action)
{
struct host_cmd_ds_sta_configure struct cfg80211_gtk_rekey_data *data)
struct java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
(tructhost_cmd_tlv_channel_band *)sta_cfg_cmd->tlv_buffer;
cmd- u64rekey_ctr;
cmd->
sizeof( cmd->ommand =cpu_to_le16(HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG);
sta_cfg_cmd->action = cpu_to_le16(cmd_action);
emsettlv_band_channel, 0, sizeof(*tlv_band_channel));
tlv_band_channel->header.type = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0
tlv_band_channel->header.len =cpu_to_le16(sizeof(*tlv_band_channel) -
sizeof(struct mwifiex_ie_types_header));
return 0; memcpy(ekey->kek, data->kek, NL80211_KEK_LEN);
}
/* This function check if the command is supported by firmware */
static( mwifiex_private p, u16java.lang.StringIndexOutOfBoundsException: Range [76, 70) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
rekey->eplay_ctr_high =
switch (cmd_no) {
case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS:
case java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 2
case java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 10
case HostCmd_CMD_802_11_AD_HOC_STOP:
return EOPNOTSUPP;
default:
break;
}
}
return 0
}
/*
* This function prepares the commands before sending them to the firmware.
*
* This is a generic function which calls specific command preparation
* routines based upon the command number.
*/
int java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
reg-> =cpu_to_le16)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{
truct*
int struct host_cmd_ds_command *cmd,
if(, cmd_no) java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
mwifiex_dbg(priv->adapter, ERROR,
"0x%x command not &>params;
cmd_no struct cfg =data_buf;
return -EOPNOTSUPP;
}
u16 cnt, idx,length;
switch (cmd_no) {
caseHostCmd_CMD_GET_HW_SPEC:
ret = mwifiex_cmd_get_hw_spec md- =cpu_to_le16()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
break;
case coalesce_cfg-action cpu_to_le16(;
(priv,data_buf;
break;
caseHostCmd_CMD_MAC_CONTROL:
ret = mwifiex_cmd_mac_control(priv, orcnt=; cnt < cfg->num_of_rules; cnt++) {
data_buf);
break;
case HostCmd_CMD_802_11_MAC_ADDRESS:
ret = mwifiex_cmd_802_11_mac_address(priv, cmd_ptr,
cmd_action)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
;
case rule->= cfg-rule[nt.um_of_fields;
ret = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
data_buf);
;
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [38, 31) out of bounds for length 58
;
break;
case HostCmd_CMD_TXPWR_CFG:
ret = mwifiex_cmd_tx_power_cfg(cmd_ptr cpu_to_le16cfg-rulec].aramsidx]offset)
)
break cfg-[].aramsidxoperand_byte_streamjava.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
case HostCmd_CMD_RF_TX_PWR
=priv,cmd_ptr,cmd_action,
data_buf);
break }
case /* Total rule length sizeof max_coalescing_delay(u16),
ret = * num_of_fields(u8), pkt_typeu8 and totall fthe
data_buf;
break;
case HostCmd_CMD_802_11_PS_MODE_ENH:
ret = mwifiex_cmd_enh_power_mode(priv, cmd_ptr, rule-header = cpu_to_le16(length +sizeof(u16) +
(uint16_t)cmd_oid, data_buf);
break;
case HostCmd_CMD_802_11_HS_CFG_ENH:
ret = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
(struct le16_unaligned_add_cpu&cmd-size,
break;;
case HostCmd_CMD_802_11_SCAN:
ret mwifiex_cmd_802_11_scancmd_ptr,data_buf)
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
caseHostCmd_CMD_802_11_BG_SCAN_CONFIGjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
case java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
ret =mwifiex_cmd_tdls_configs mwifiex_privatep,
host_cmd_ds_command*,
case:
ret = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
break;
case struct config;
ret =(,c,
data_buf);
break;
c HostCmd_CMD_802_11_AD_HOC_START:
java.lang.StringIndexOutOfBoundsException: Range [33, 24) out of bounds for length 35
&>,sizeof(>dls_action);
break;
case HostCmd_CMD_802_11_GET_LOG:
ret = mwifiex_cmd_802_11_get_log(cmd_ptr caseAjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
break;
case HostCmd_CMD_802_11_AD_HOC_JOIN
=p,,
data_buf);
break;
caseHostCmd_CMD_802_11_AD_HOC_STOP:
ret = mwifiex_cmd_802_11_ad_hoc_stop(cmd_ptr);
break;
aseHostCmd_CMD_RSSI_INFO:
ret = mwifiex_cmd_802_11_rssi_info memcpy(dls_config->tdls_data,config,len;
break;
case HostCmd_CMD_802_11_SNMP_MIB:
ret = mwifiex_cmd_802_11_snmp_mib (mwifiex_tdls_stop_cs_params);
)
break java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
HostCmd_CMD_802_11_TX_RATE_QUERYjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
cmd_ptr->command
cpu_to_le16(HostCmd_CMD_802_11_TX_RATE_QUERY);
priv-a ERRORjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
cpu_to_le16sizeof
retur-EOPNOTSUPP
}
ret = 0;
;
eturn ;
cmd_ptr->command }
cmd_ptr-java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
(u8)(get_unaligned((u32 *)data_buf));
memcpy(&cmd_ptr->params, data_buf,
sizeof(struct host_cmd_ds_version_ext));
cmd_ptr->size =
cpu_to_le16(sizeof(struct host_cmd_ds_version_ext) +
S_DS_GEN);
ret = 0;
break;
case HostCmd_CMD_MGMT_FRAME_REG:
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->params.reg_mask.action = cpu_to_le16(cmd_action);
cmd_ptr->params.reg_mask.mask = cpu_to_le32(
get_unaligned((u32 *)data_buf));
cmd_ptr->size =
cpu_to_le16(sizeof(struct host_cmd_ds_mgmt_frame_reg) +
S_DS_GEN);
ret = 0;
break;
case HostCmd_CMD_REMAIN_ON_CHAN:
cmd_ptr->command = cpu_to_le16(mwifiex_cmd_tdls_oper( mwifiex_private*priv,
memcpy(&cmd_ptr->params, data_buf,
sizeof ost_cmd_ds_remain_on_chan)
void*)
SDS_GENjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
break;
case HostCmd_CMD_11AC_CFG:
ret = mwifiex_cmd_11ac_cfg(priv, struct mwifiex_ie_types_qos_info *wmm_qos_info
;
case HostCmd_CMD_PACKET_AGGR_CTRL:
cmd_ptr->command = cpu_to_le16cmd_no;
cmd_ptr-> struct mwifiex_ie_types_aid *aid;
cmd_ptr->params.pkt_aggr_ctrl.enable =
cpu_to_le16(* structmwifiex_ie_types_tdls_idle_timeout *timeout;
cmd_ptr-> u8*pos
(sizeofstruct ost_cmd_ds_pkt_aggr_ctrl)+
)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ase HostCmd_CMD_P2P_MODE_CFG::
cmd_ptr->command = cmd->size = cpu_to_le16(S_DS_GENs java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
cmd_ptr->params. sizeof(struct host_cmd_ds_tdls_oper));
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
get_unaligned((u16 *)data_buf));
cmd_ptr->size =
((struct ost_cmd_ds_p2p_mode_cfg)+
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
break;
case HostCmd_CMD_FUNC_INIT:
if (priv->adapter->hw_status == MWIFIEX_HW_STATUS_RESET)
MWIFIEX_TDLS_DISABLE_LINK
cmd_ptr-> =cpu_to_le16(md_no)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
tdls_action pu_to_le16java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 53
cmd_ptr-> return -ENODATA
cmd_ptr->size = }
break;
case HostCmd_CMD_11N_ADDBA_REQ put_unaligned_le16(>capability ;
=java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 53 | | |