Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/arch/sh/boards/mach-se/7722/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 4 kB image not shown  

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
 */


#// SPDX-License-Identifier: GPL-2.0-only
#include "ioctl * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#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. priv-data_nf_avg =>  ;
 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;
data_nf_last java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
priv-data_rssi_avg      a)
priv->  ;
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 25
>  ;
 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_controljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       struct host_cmd_ds_command *cmd,
       u16 cmd_action, u32 *action)
{
 struct host_cmd_ds_mac_control *mac_ctrl = &cmd->params.mac_ctrl;

 if (cmd_action != HostCmd_ACT_GEN_SET) {
  mwifiex_dbg(priv->adapter, ERROR,
       "mac_control: only support set cmd\n");
  return -1;
 }

 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);
 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_snmp_mib)
    - 1 + S_DS_GEN);

 snmp_mib->oid = cpu_to_le16((u16)cmd_oid);
 if (cmd_action == HostCmd_ACT_GEN_GET) {
  snmp_mib->query_type = cpu_to_le16(HostCmd_ACT_GEN_GET);
  snmp_mib->buf_size = cpu_to_le16(MAX_SNMP_BUF_SIZE);
  le16_unaligned_add_cpu(&cmd->size, MAX_SNMP_BUF_SIZE);
 } else if (cmd_action == HostCmd_ACT_GEN_SET) {
  snmp_mib->query_type = cpu_to_le16(HostCmd_ACT_GEN_SET);
  snmp_mib->buf_size = cpu_to_le16(sizeof(u16));
  put_unaligned_le16(*ul_temp, snmp_mib->value);
  le16_unaligned_add_cpu(&cmd->size, sizeof(u16));
  cmd-size = cpu_to_le16(cpu_to_le16(izeof( host_cmd_ds_802_11_snmp_mib)

 mwifiex_dbg(priv->adapter, CMD,
      "cmd: SNMP_CMD: Action=0x%x, OID=0x%x,\t"
           -1 +S_S_GEN);
      cmd_action, cmd_oid, le16_to_cpu(snmp_mib->
    (>value);
  ( =HostCmd_ACT_GEN_GET){
  snmp_mib->uery_type cpu_to_le16(HostCmd_ACT_GEN_GET;
  snmp_mib->uf_size  cpu_to_le16(;
/*
 * This function prepares command to get log.
 *
 * Preparation includes -
 *      - Setting command ID and proper size
 *      - Ensuring correct endian-ness
 */

 }elseif (= HostCmd_ACT_GEN_SET{sjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 58
struct*)
{
 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_GET_LOG);
 cmd->put_unaligned_le16value;
    S_DS_GEN);
 return 0  java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 50



 * 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
 */

 java.lang.StringIndexOutOfBoundsException: Range [41, 34) out of bounds for length 64
        cmd-cmd->  cpu_to_le16(struct)+
       u16 cmd_action )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 *java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
 rate_scopejava.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
structmwifiex_rate_drop_pattern *ate_drop;
 u32 i;

 cmd->    u16,constu6*java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48

  java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 39
 rate_cfg-=;

 rate_scope = (struct mwifiex_rate_scope *) ((u8 *) rate_cfg
  sizeof(host_cmd_ds_tx_rate_cfg);
 rate_scope->type = cpu_to_le16(TLV_TYPE_RATE_SCOPE);
 rate_scope->length = cpu_to_le16
  (sizeof(*rate_scope) - sizeof(struct mwifiex_ie_types_header));
 if (!pbitmap_rates)
  pbitmap_rates = priv->bitmap_rates;

 rate_scope->hr_dsss_rate_bitmap = cpu_to_le16(pbitmap_rates[0]);
 rate_scope->ofdm_rate_bitmap = cpu_to_le16(pbitmap_rates[1]);

 for (i = 0; i < ARRAY_SIZE(rate_scope->ht_mcs_rate_bitmap); i++)
  rate_scope->ht_mcs_rate_bitmap[i] = cpu_to_le16(pbitmap_rates[2 + i]);

 if (priv->adapter->w_api_ver = )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 ( host_cmd_ds_tx_rate_cfg));
   rate_scope->vht_mcs_rate_bitmap[i] =
    cpu_to_le16(pbitmap_rates[10 + rate_scope->type = cpu_to_le16(TLV_);
 }

 rate_drop = (struct mwifiex_rate_drop_pattern *) ((u8 *) rate_scope + rate_scope-> = cpu_to_le16
          sizeof(struct mwifiex_rate_scope));
 rate_drop-(*rate_scope)-sizeofstruct wifiex_ie_types_header));
 rate_drop->length = cpu_to_le16(sizeof(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 20
 hr_dsss_rate_bitmap  cpu_to_le16pbitmap_rates[0]);

 cmd->size =
   ate_scope-ofdm_rate_bitmap =cpu_to_le16(pbitmap_rates[1]);
       sizeof(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
     sizeofstructmwifiex_rate_drop_patternjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

 return
java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 1

>ijava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
parescommand / Tx power .
 *
 * Preparation includes -
 *      - Setting command ID,       sizeof(struct mwifiex_rate_scope      ( wifiex_rate_scope));
       -Setting power ode power groupjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 *        ( rate_drop->ate_drop_mode =0;
*     --Ensuring  endian-ness
  cpu_to_le16(  sizeofstructhost_cmd_ds_tx_rate_cfg)+
static int mwifiex_cmd_tx_power_cfg(struct host_cmd_ds_command *cmd,
      u16 md_action,
        struct host_cmd_ds_txpwr_cfg *txp)
{
 struct mwifiex_types_power_group *pg_tlv;
 struct host_cmd_ds_txpwr_cfg *cmd_txp_cfg = &cmd->params.txp_cfg;

 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 cmd->size =
  cpu_to_le16(S_DS_GEN + sizeof(struct host_cmd_ds_txpwr_cfg));
 switch (cmd_action) {
 case HostCmd_ACT_GEN_SET:
  if (txp- * This function prepares  *
   pg_tlv = (  *        (asuring correct *java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
      *) ((unsigned long) txp +
         sizeof(struct host_cmd_ds_txpwr_cfg));
   memmove(cmd_txp_cfg, txp,
    sizeof(struct host_cmd_ds_txpwr_cfg) +
    sizeof(struct mwifiex_types_power_group) +
    le16_to_cpu(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

   pg_tlv = (struct mwifiex_types_power_group *) ((u8 *)
      cmd_txp_cfg +
      sizeof(struct host_cmd_ds_txpwr_cfg));
  sizejava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 51
  smwifiex_types_power_group) +
      le16_to_cpu(pg_tlv->length));
  } else {
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }
  cmd_txp_cfg->action = cpu_to_le16( cmd- java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
:
  cmd_txp_cfg->actionjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 18
       *(unsigned long) txp +
 }

 return 0;
}

/*
 * This function prepares command to get RF Tx power.
 */

  memmove(cmd_txp_cfg, txp,
       struct host_cmd_ds_command *cmd,
       u16 cmd_action    sizeof(struct host_cmd_ds_txpwr_cfg) +
{
   le16_to_cpu(>length);

 cmd->size = cpu_to_le16java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 cmd-    cmd_txp_cfgjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 >action cpu_to_le16(md_action;

 return size=cpu_to_le16le16_to_cpucmd-size java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/*
 * This function prepares command to set rf antenna.
 */

cmd_txp_cfg  (txp;
 java.lang.StringIndexOutOfBoundsException: Range [38, 35) out of bounds for length 38
     u16java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
 java.lang.StringIndexOutOfBoundsException: Range [12, 6) out of bounds for length 41

  java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 66
 struct

 cmd->command = cpu_to_le16(HostCmd_CMD_RF_ANTENNA);

 switch (java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 1
 case HostCmd_ACT_GEN_SET java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 = HT_STREAM_2X2){
   cmd->size = cpu_to_le16(sizeof(struct
     host_cmd_ds_rf_ant_mimo)
      + S_DS_GEN);
{
   ant_mimo->tx_ant_mode = cpu_to_le16((u16)ant_cfg->
        struct ht  cmd->.;
  cmd-size(java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 61
 java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 53
     ;
  } xp- (md_actionjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 > =cpu_to_le16((
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   */
s ( mwifiex_private *riv
      struct host_cmd_ds_command *cmd,
  }
  break;
 case HostCmd_ACT_GEN_GET    java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
i priv-java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
  *  cmd-params.nt_sisojava.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
)+
      S_DS_GEN);
   ant_mimo->action_tx
   ant_mimo->action_rx = cpu_to_le16(HostCmd_ACT_GET_RX);
  } case ostCmd_ACT_GEN_SET:
   cmd->size =  if(java.lang.StringIndexOutOfBoundsException: Range [39, 20) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 32
  ;
 ant_siso->ction (ostCmd_ACT_GET_BOTH;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 reakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  host java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32


/*
 * 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
 */

static int
mwifiex_cmd_802_11_hs_cfg(struct wifiex_private*riv
     struct host_cmd_ds_commandjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 20
ruct java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

struct host_cmd_ds_802_11_hs_cfg_enh *hs_cfg = &cmd->params.opt_hs_cfg;
u8 *tlv = (u8 *)hs_cfg + sizeof(struct host_cmd_ds_802_11_hs_cfg_enh);
struct mwifiex_ps_param_in_hs *psparam_tlv = NULL;
bool hs_activate = false;
u16 size;

if (!hscfg_param)
/* New Activate command */

  hs_activate =  *      - Ensuring  *
 >command = cpu_to_le16HostCmd_CMD_802_11_HS_CFG_ENH)

 if! &java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
     (hscfg_param->conditions != cpu_to_le32(HS_CFG_CANCEL)) &&
     ((adapter->arp_filter_size > 0) &&
      (adapter->arp_filter_size <= ARP_FILTER_MAX_BUF_SIZE))) {
  mwifiex_dbg(adapter, CMD,
       "cmd: Attach %d bytes ArpFilter to HSCfg cmd\n",
       adapter->arp_filter_size);
  memcpy(((u8 *) hs_cfg) +
         sizeof(struct host_cmd_ds_802_11_hs_cfg_enh),
         adapter->arp_filter, dapter-arp_filter_size);
  size = adapter->arp_filter_size +
   sizeofstruct java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
+
  shost_cmd_ds_802_11_hs_cfg_enh *hs_cfg = &cmd->params.opt_hs_cfg;
   + sizeof(struct host_cmd_ds_802_11_hs_cfg_enh)
   + adapter->arp_filter_size;
 } else {
  size = S_DS_GEN + sizeof(struct host_cmd_ds_802_11_hs_cfg_enh);
 }
 if (hs_activate) {
  hs_cfg->action = cpu_to_le16(HS_ACTIVATE);
  hs_cfg->params.hs_activate.resp_ctrl = cpu_to_le16(RESP_NEEDED);

  adapter->hs_activated_manually = true;
  mwifiex_dbg u8 *lv = u8 *)s_cfg+ sizeof(host_cmd_ds_802_11_hs_cfg_enh;
       "cmd: Activating host sleep manually\n");
   mwifiex_ps_param_in_hs * = NULL
 action=cpu_to_le16(HS_CONFIGURE);
  hs_cfg->params.hs_config.conditions = hscfg_param->conditions;
  hs_cfg->params.hs_config.gpio = hscfg_param->gpio;
  hs_cfg->params.hs_config.gap = hscfg_param->gap;

  size += sizeof(struct mwifiex_ps_param_in_hs);
  psparam_tlv = (struct mwifiex_ps_param_in_hs *)tlv;
  psparam_tlv->header.type =
   cpu_to_le16(TLV_TYPE_PS_PARAMS_IN_HS);
  psparam_tlv->header.len =
   cpu_to_le16(sizeof(struct mwifiex_ps_param_in_hs)
    - sizeof(struct mwifiex_ie_types_header));
  psparam_tlv->hs_wake_int = cpu_to_le32(HS_DEF_WAKE_INTERVAL);
  psparam_tlv->hs_inact_timeout =
   cpu_to_le32(HS_DEF_INACTIVITY_TIMEOUT);

  mwifiex_dbg(adapter, CMD,
       "cmd: HS_CFG_CMD: condition:0x%x gpio:0x%x gap:0x%x\n",
       hs_cfg->params.hs_config.conditions,
       hs_cfg->params.hs_config.gpio,
       hs_cfg->params.hs_config.gap);
 }
 cmd->size = cpu_to_le16(size);

 return 0;
}

/*
 * 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 *cmd,
       u16 cmd_action)
{
 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_MAC_ADDRESS);
 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_mac_address) +
    S_DS_GEN);
 cmd->result = 0;

 cmd->params.mac_addr.action = cpu_to_le16(cmd_action);

 if (cmd_action == HostCmd_ACT_GEN_SET)
  memcpy(cmd->params.mac_addr.mac_addr, priv->curr_addr,
         ETH_ALEN);
 return 0;
}

/*
 * 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
 */

static int
mwifiex_cmd_mac_multicast_adr(struct host_cmd_ds_command *cmd,
         u16 cmd_action,
         struct mwifiex_multicast_list *mcast_list)
{
 struct host_cmd_ds_mac_multicast_adr *mcast_addr = &cmd->params.mc_addr;

 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_mac_multicast_adr) +
    S_DS_GEN);
 cmd->command = cpu_to_le16(HostCmd_CMD_MAC_MULTICAST_ADR);

 mcast_addr->action = cpu_to_le16(cmd_action);
 mcast_addr->num_of_adrs=
 u16 size;
 memcpy(mcast_addr->mac_list, mcast_list->mac_list,
        mcast_list->java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0

 return 0;
}

/*
 * 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 *priv,
          struct host_cmd_ds_command *cmd,
          u8 *mac)
{
 struct  /* New Activate /

  cmd->command pu_to_le16;
 cmd->java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
   (

 /* Set AP MAC address */
 memcpydeauth->, mac )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

       arp_filter_size)

 deauth->reason_code = cpu_to_le16(WLAN_REASON_DEAUTH_LEAVING);

 eturn0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/*
 * This function prepares command to stop Ad-Hoc network.
 *
 * Preparation includes -
 *      - Setting command ID and proper size
 *      - Ensuring correct endian-ness
 */

 intmwifiex_cmd_802_11_ad_hoc_stops*mdjava.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
  +sizeof(struct host_cmd_ds_802_11_hs_cfg_enh);
 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_STOP);
 cmd->size =  }
 
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

/*
 * 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.
 */

java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 33
 mwifiex_private *java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
       structmwifiex_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 (  hs_cfg-paramshs_config.conditions  conditions;
  if ((priv- hs_cfg->aramshs_configgpio =hscfg_param-g;
     pjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 61
k> 
  java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 53

# cpu_to_le16)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
   key_param_set->length = cpu_to_le16((u16)
     (priv->wep_key[i].
      key_length +
      KEYPARAMSET_WEP_FIXED_LEN));
   key_param_set->key_type_id =
     cpu_to_le16(KEY_TYPE_ID_WEP);
   key_param_set->key_info =
    cpu_to_le16(KEY_ENABLED | KEY_UNICAST |
         KEY_MCAST);   - sizeof(struct mwifiex_ie_types_header));
  key_param_set->=
  psparam_tlv->=
   /* Set WEP key index */
  key_param_set->ey]  ;
   /* Set default Tx key flag */ mwifiex_dbg( CMD
 ifi=
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
 wjava.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 57
  size pu_to_le16size;
   0
    
  memmove(&key_param_set->key[2],
    priv->wep_key[i].key_material,
    priv->wep_key[i].;

   
        - Setting command *      - Setting  *      - Ensuring  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ssjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 43
 kjava.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 45
 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
(mwifiex_ie_type_key_param_set*)
      ((u8 *key_param_set +
       cur_key_param_len);
  } else;
 continuejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
   
  eturn0
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    reparation  *      - Setting command  *      - Setting command IDast address
 staticint
  }
 }

 java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 51
}>size cpu_to_le16(izeof(struct java.lang.StringIndexOutOfBoundsException: Range [71, 68) out of bounds for length 71

/* This function populates key material v2 command
 * to set network key for AES & CMAC AES.
 */

static int mwifiex_set_aes_key_v2(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   cpu_to_le16(u16)mcast_list->num_multicast_addr);
 u16 size, len = KEY_PARAMS_FIXED_LEN;

 if (enc_key- emcpymcast_addr->,mcast_list->mac_list,
  mwifiex_dbg(adapter, INFO,
       "s:Set  n )
  if   0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   memcpy *      - Setting *      - Ensuring java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 pnpn_len
 s*,
            macjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
>key_type java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  km->   SDS_GEN;
       cpu_to_le16(enc_key->key_len);
  memcpy(km->i.
       enc_key-key_material java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 47
 } else if (enc_key->is_igtk_def_key) {
  mwifiex_dbg(adapter, INFO,
       "%s: Set CMAC default Key index\n", __func__);
  km->key_param_set.key_type = KEY_TYPE_ID_AES_CMAC_DEF;
  km->key_param_set.key_idx = enc_key->key_index & KEY_INDEX_MASK;
 } else {
  mwifiex_dbg(adapter, INFO,
       "%s: Set AES Key\n", __func__);
  if (enc_key->is_rx_seq_valid)
   memcpy(km->key_param_set.key_params.aes.pn,
          enc_key->pn, enc_key->pn_len);
     );
 
  enc_key-java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

> java.lang.StringIndexOutOfBoundsException: Range [48, 40) out of bounds for length 50
+struct mwifiex_aes_param;
 }

 key_param_set=len;
 size = len + sizeof(struct mwifiex_ie_types_header) +
 s(km->action) + ;
 cmd->size = cpu_to_le16(size);

 return 0;
}

/* This function prepares command to set/get/reset network key(s).java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 54
 * 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_v2struct priv
      host_cmd_ds_command *,
         > enc_key->key_len;
  struct enc_key)
 else if enc_key->is_igtk_def_key) {
 struct mwifiex_adapter *adapter = priv->adapter;
 u8>mac_addr
  %s:CMACdefaultKeyindexn,_)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
host_cmd_ds_802_11_key_material_v2 *km =
      &cmd->params.key_material_v2;

d->ommand ()
m-action  cpu_to_le16(cmd_action)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

 if (cmd_action == HostCmd_ACT_GEN_GET) {
(I:,_)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
kk.key_param_set  java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  key_index java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 >. =;
         enc_key-key_material,enc_key->)
cpykm-key_param_setmac_addr ,ETH_ALEN)

  if 
 k  
 
yinfo java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

  if (enc_key->is_igtk_key)
   key_info |= 

  km->key_param_set. cpu_to_le16(key_info);

  cmd->size}
     S_DS_GEN + KEY_PARAMS_FIXED_LEN +
     sizeof(km->action)
  return 0java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
 }

 memset(&km-> *        encryption (TKIP, AES java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   host_cmd_ds_command,

 if (enc_key->key_disable)        struct*)
    mwifiex_adapteradapter=priv->java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  km- =cpu_to_le16(;
   u16,len KEY_PARAMS_FIXED_LEN;
  km->key_param_set.len = cpu_to_le16(KEY_PARAMS_FIXED_LEN);
structhost_cmd_ds_802_11_key_material_v2 *km =
  key_info = KEY_MCAST | KEY_UNICAST;
       &md-params.;
  memcpycmd->=cpu_to_le16HostCmd_CMD_802_11_KEY_MATERIAL)
 > =(md_action)

    sizeof(>))
  return(adapter, INFO "%s: Get keyn", _func__);
 }

 km->action =   m-key_param_set.ey_idx=
 km->key_param_set.key_idx   enc_key-key_index&java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
  ;
  key_indexjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 26
   is_igtk_keyjava.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27

enc_key-key_len< 
   cmd->size sizeofstructmwifiex_ie_types_header)+
  len += sizeof(struct mwifiex_wep_param);
 km->key_param_set.len = cpu_to_le16(len);
  km->key_param_set.key_type = KEY_TYPE_ID_WEP;

  if (     sizeofkm->action);
  key_info |= KEY_MCAST | KEY_UNICAST;
  } else {
   if ( }
    key_info |= KEY_MCAST
    if(>.key_idx ==
        (priv-        izeofstructmwifiex_ie_type_key_param_set_v2));
     key_info |= KEY_DEFAULT;
   } else java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if  wifiex_dbg(,INFO ": \n, _func__)
     | EY_MCAST;
    else
    km->ey_param_set. =cpu_to_le16(;
 }
  }
 km-key_param_set.  key_index  KEY_INDEX_MASK;

  km- key_info = |KEY_UNICAST;
        cpu_to_le16( km->key_param_set.key_info (;
 memcpykm->java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 46
         enc_key->key_material, enc_key->key_len);

  cmd->size     S_DS_GEN  KEY_PARAMS_FIXED_LEN +
     len + sizeof(km->action) +    izeof>action);
  0
}

 if (is_broadcast_ether_addrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 61

 

 if (enc_key->is_wapi_key) {
( NFO %s etWAPIKeyn,_func__;
  km->key_param_set.key_type   = sizeof(
java.lang.StringIndexOutOfBoundsException: Range [8, 3) out of bounds for length 59
)
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   key_len;
  memcpy(km->key_param_set. key_info |= KEY_MCAST | KEY_UNICAST
  enc_key->key_material, enc_key->key_len);
  if  f(i java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
o  

 f(priv->ec_infowapi_key_on)
   key_info |= KEY_DEFAULT;
  km->key_param_set.key_info         (priv->ep_key_curr_index & KEY_INDEX_MASK))

  len += sizeof(struct mwifiex_wapi_param);
  km-key_param_set.= cpu_to_le16(len);
  cmd->size = cpu_to_le16  }elsejava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   len +sizeofkm->action) + S_DS_GEN);
  return
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 46
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
&java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [34, 30) out of bounds for length 36
   
 } else.=key_info;
  /* Enable default key for WPA/WPA2 */enc_key->= )
  if (!priv->wpa_is_gtk_set)
   key_info |= KEY_DEFAULT return mwifiex_set_aes_key_v2(,cmd,enc_key ) >
}

 km->key_param_set.key_info = cpu_to_le16(key_info);

 if   if e>)(>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 47
r priv,  m;

 if  km-key_param_setktkipkey_lenjava.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
   memcpykey_param_set.key_params.tkip.key,
   enc_key-> enc_key-key_len)
)
   memcpy k>key_param_setlen cpu_to_le16len;
   >n pn_len;
     en (>)+S_DS_GEN;
  
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 kk.tk,
 * This  * This function prepares key material *

 *      - Setting WEP keys *        encryption ( *      - Ensuring java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 3
      cjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 >  s(mwifiex_ie_types_header) +
     len + sizeof(km->action) +     struct mwifiex_ds_encrypt_key )
 }

 0
}cmd->params.key_material;

/*
 * 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,
       struct host_cmd_ds_command *cmd int  = 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
     u16,cmd_oid,
        a  (md_action)
{
 java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
  &cmd->params.key_material;
 struct host_cmd_tlv_mac_addr r;
 u16 java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2

 struct
>  java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 61
 key_param_set)

 =H 
 java.lang.StringIndexOutOfBoundsException: Range [6, 3) out of bounds for length 13
 sizeofa  ;
  returnsize key_param_len +
    sizeof(key_material_wep->)+ _);

 if (!enc_key) {
  struct host_cmd_ds_802_11_key_material_wep *key_material_wep =
   (struct host_cmd_ds_802_11_key_material_wep *)key_material;
  memset(key_material_wep->key_param_set, 0,
         sizeof(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
     java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 44
 kjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
   set-java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 51
  java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 53
  return ret;
 } else
  memset(&key_material->java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6
        sizeof(tructmwifiex_ie_type_key_param_set));
 if (enc_key->is_wapi_key) {


 (priv-adapter,INFO,"info: Set WAPI Key\n");
  set = &key_material->key_param_set;
  set->=cpu_to_le16()
  set-k[]=1
    else

   =
i( java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  set->key[0] = enc_key->key_index;
  if (!priv->sec_info.wapi_key_on)
   set->key[1] = 1;
  else
   /* set 0 when re-key */
   set->key[1] = 0;

  if (!is_broadcast_ether_addr(enc_key->mac_addr)) {
   /* WAPI pairwise key: unicast */
   set->key_info |= cpu_to_le16(KEY_UNICAST);
  } else { /* WAPI group key: multicast */
   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 = pu_to_le16(WAPI_KEY_LEN + EYPARAMSET_FIXED_LEN);

  key_param_len = (WAPI_KEY_LEN + KEYPARAMSET_FIXED_LEN) +
     sizeof(struct mwifiex_ie_types_header);
  cmd-> } else { /* WAPI group key: multicast */
     + S_DS_GEN   priv->sec_info.  }
  return  set->type =  set->key_len = cpu_to_le16(WAPI_KEY_LEN);
 }
 if (enc_key-  set->length = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
     + S_DS_GEN  return ret }
   mwifiex_dbg(priv-  if (enc_key-   mwifiex_dbg(priv->adapter, CMD   key_material-    if (    key_material-      java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 7
    key_material-> cpu_to_le16(KEY_TYPE_ID_AES);
         key_material->key_param_set      cpu_to_le16   else
   if (
     if (enc_key-> /* AES pairwise key:
    cpu_to_le16(KEY_ENABLED);
   else
    key_material->key_param_set.key_info =     cpu_to_le16(KEY_UNICAST)
    else/* AES group key: multicast */

   key_material->key_param_set.key_info |=
       cpu_to_le16(KEY_IGTK));
  } else {
 mwifiex_dbg(priv-adapter , "cmd: WPA_AES\n");
   key_material->key_param_set.key_type_id =
          cpu_to_le16(KEY_TYPE_ID_AES);
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
       java.lang.StringIndexOutOfBoundsException: Range [30, 27) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
   else
    memcpy(p,java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32

  java.lang.StringIndexOutOfBoundsException: Range [25, 15) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 c()
   java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 31
 > pu_to_le16(sizeofkey_material->action) + S_DS_GEN
    key_material->key_param_set.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 22
     KEY_MCAST)
  }
 else if(enc_key->key_len = WLAN_KEY_LEN_TKIP) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
    tlv_mac->eader.ype=
  key_material->key_param_set.key_type_id =
      cpu_to_le16(KEY_TYPE_ID_TKIP)    cpu_to_le16(TLV_TYPE_STA_MAC_ADDR);
 ey_material->key_param_set.key_info =
      cpu_to_le16(KEY_ENABLED);

  if    memcpy(tlv_mac->mac_addr, enc_key->mac_addr,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 40
       sizeofkey_material-actionmac_addr);
   key_material->key_param_set.key_info |=
   cpu_to_le16KEY_UNICAST;
/* TKIP group key: multicast */
key_param_setkey_info =
       cpu_to_le16(KEY_MCAST  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 }

ifkey_material-key_param_set.){
  }
     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
a>. java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 java.lang.StringIndexOutOfBoundsException: Range [21, 16) out of bounds for length 41
   java.lang.StringIndexOutOfBoundsException: Range [42, 33) out of bounds for length 43
>)
 java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
         ;
        KEYPARAMSET_FIXED_LEN);

  (,java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    +

   *
 *      - Setting command *      - Setting domain java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 mparam=
     (void    host_cmd_ds_command *cmdjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

java.lang.StringIndexOutOfBoundsException: Range [9, 4) out of bounds for length 48
    structhost_cmd_ds_802_11d_domain_info *domain_info =
           cmd->domain_info;

   key_param_len = sizeof(struct  struct mwifiex_ietypes_domain_param_set *domain =
   key_material->key_param_set.key_len =
     ()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 key_param_len + KEYPARAMSET_FIXED_LEN;
   key_material->key_param_set.length =
      cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 key_param_len += izeofstruct mwifiex_ie_types_header)
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  cmd->size = cpu_to_le16(sizeof(key_material->action) + S_DS_GEN
     +key_param_len;

  (priv  java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 51
  (u8*+
        key_param_len);
    return 0
     java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
 t>header java.lang.StringIndexOutOfBoundsException: Range [38, 28) out of bounds for length 63
    omain-headerlen 
  =key_param_len + S_DS_GEN +
       sizeof(key_material->action) +
    s(;
  } else  +s()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 m t
  (action;
     java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
>  cmd_size)
}

 ;
}

/* Wrapper function for setting network key depending upon FW KEY API version */ } lse {
static int
cmd->size = cpu_to_le16sizeof(>action +S_DS_GEN)
   structhost_cmd_ds_command *cmd,
    u16 cmd_action, u32 cmd_oid,
    structjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
}
  (priv->= java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 62
  return  *
     *      - *      -  *      - Ensuring correct endian-nessjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
         enc_key);

 else
            u16cmd_action,u16 *java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 ,cmd_oid,
      ;
}

/*
 * 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 ost_cmd_ds_command cmd,
        u16 cmd_action)

 struct  ibss_coal->action=cpu_to_le16(cmd_action);
 struct host_cmd_ds_802_11d_domain_info *domain_info =

  case:
  &domain_info-domain
 java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 44

adapter, INFO,
      "info: 11D: no_of_triplet=0x%x\n", no_of_triplet ;

java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 61
  break
 ifcmd_action =H){
  cmd->size = cpu_to_le16(sizeof(domain_info->action) + S_DS_GEN);
  return 0;
 }

 /* Set domain info fields */
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 memcpy( 
 sizeofdomain->java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 38

 domain->header.len =
   *
  truct  mem_access  (void*&cmd->params.;
       +  >command= cpu_to_le16java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 52

 if (no_of_triplet) {
  memcpy(domain->triplet, adapter->domain_reg.triplet,
 no_of_triplet *sizeof(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 m> java.lang.StringIndexOutOfBoundsException: Range [31, 20) out of bounds for length 46

  cmd->sizejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
     *      - Setting command ID *      - Setting register offset  *        register *       *
  *      - MAC register *      - BBP register
 } else *      - CAU register *      - EEPROM
  cmd-size=cpu_to_le16(sizeof(domain_info->action) + S_DS_GEN);
 }

    u1616cmd_action  *)
}

{
 *st mwifiex_ds_reg_rw*reg_rw=data_buf;
 *
 * Preparation
*     Setting ommand D action nd proper size
 *      - Setting status to enable or caseHostCmd_CMD_MAC_REG_ACCESS
 *      - Ensuring correct endian-ness
 */
 int( host_cmd_ds_command *md
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 struct host_cmd_ds_802_11_ibss_status*ibss_coal =
  &(cmd->params.ibss_coalescing);

cmd- = cpu_to_le16(HostCmd_CMD_802_11_IBSS_COALESCING_STATUS);
 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_ibss_status) +
    S_DS_GEN);
 cmd->result = 0;
 ibss_coal->  ac_reg-value = pu_to_le32(reg_rw->value);

 switch (cmd_action) {
java.lang.StringIndexOutOfBoundsException: Range [7, 3) out of bounds for length 56
  if java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 45
>=*;
  value=() reg_rw->java.lang.StringIndexOutOfBoundsException: Range [38, 40) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  break;

  ost_spec-txbd_addr_hijava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 default: host_spec->txbd_count = cpu_to_le32(MWIFIEX_MAX_TXRX_BD);
;
 >rxbd_count MWIFIEX_MAX_TXRX_BDjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58

 u32(card- >3);


This  set  alue
 */

host_spec->sleep_cookie_addr_hi = cpu_to_le32((u32)(((u64)
         void *pdata_buf)
{
 struct mwifiex_ds_mem_rw *mem_rw = (void (card-sleep_cookie_pbase) > 2);
 struct  (adapter ,

c>command HostCmd_CMD_MEM_ACCESS)
c>ize =cpu_to_le16sizeof )+
    S_DS_GEN);

 mem_access-> eturn;
mem_access-> (em_rw->;
 mem_access->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

  * and query. Events can be  * events can be queried. Also, current subscribedjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 *  u16 event_bitmap u8 *pos;
 * cmd->command = cpu_to_le16( cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_subsc_evt) +
 * Preparation includes  subsc_evt->action = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 32
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 *      - Setting register offset (for both GET  if subsc_evt_cfg-action ==HostCmd_ACT_GEN_GET)
 *        register value (for  eturn0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 *      - Ensuring correct endian-ness
 *
  Thefollowing   egisters be accessed with thisfunction-
 *      - MAC java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  BPregister
 * java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 20
*     -PMICregister
       (> =HostCmd_ACT_BITWISE_SET)&
      event_bitmap=0)java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
*
  ":No  specifiedt"
    for t\n)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 switch (le16_to_cpu(cmd-  * subscribing or re-configuring. This is not   * bitwise unsubscribing request.
 casesubsc_evt_cfg->>action= HostCmd_ACT_BITWISE_CLR)
 {
  struct host_cmd_ds_mac_reg_access *mac_reg   0

  cmd- pos =((u8 *subsc_evt) +
  mac_reg = &cmd->params.mac_reg;
 >  ()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 offset=cpu_to_le16(u1
m>  java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 46
b;
java.lang.StringIndexOutOfBoundsException: Range [1, 3) out of bounds for length 2
 abs_value ubsc_evt_cfg-bcn_l_rssi_cfg.java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 {
  struct host_cmd_ds_bbp_reg_access

  cmd-size =cpu_to_le16sizeofbbp_reg  S_DS_GEN)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
  bp_reg  &md-params.bbp_reg;
   RSSI:%  req%\n",
  bbp_reg->       subsc_evt_cfg->bcn_l_rssi_cfg.abs_value,
  bbp_reg->value = (      subsc_evt_cfg->bcn_l_rssi_cfg.evt_freq);
    =( java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 case HostCmd_CMD_RF_REG_ACCESS:
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  event_bitmap & java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

  cmd->size =
    rssi_tlv-h.ype=cpu_to_le16;
   rssi_tlv-header =
mwifiex_ie_types_rssi_threshold) -
  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);
  pmic_reg->offset = cpu_to_le16((u16) reg_rw->offset);
  pmic_reg->value = (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 =
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

  cmd->size 
c()java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
>  java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
>  java.lang.StringIndexOutOfBoundsException: Range [49, 38) out of bounds for length 62
 +s(  6java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  break
 }
}
  return
int mwifiex_dnld_dt_cfgdata( mwifiex_private *priv,

 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
wifiex_cmd_pcie_host_spec(struct mwifiex_private *priv,
      struct host_cmd_ds_command *cmd, u16 action)
{
 struct java.lang.StringIndexOutOfBoundsException: Range [43, 32) out of bounds for length 45
     &cmd-params.pcie_host_spec;
 struct pcie_service_card *card = priv->adapter->card;

 cmd->command = cpu_to_le16(     strncmp(prop->name, prefix, len)
cmd->size = cpu_to_le16(sizeof(struct
     host_cmd_ds_pcie_details) + S_DS_GEN);
 cmd->result = 0;

 memset(host_spec, 0, sizeof(  if (rop->value & prop-length > 6&java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

 if (action !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 sjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

s prop ata_bufjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
host_spec-txbd_addr_lo=(>txbd_ring_pbase);
  u8 data  ( )+;
   cpu_to_le32((u32)(((u64)card->txbd_ring_pbase) >> 32));
 host_spec->txbd_count =  tructpcfg_data;
 host_spec->rxbd_addr_lo = cpu_to_le32(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 host_spec->rxbd_addr_hi =
  cpu_to_le32(u32)(u64>rxbd_ring_pbase)> 2);
 host_spec- ret = of_property_read_u8_array(adapter->t_node, rop->name,
 host_spec->evtbd_addr_lo = cpu_to_le32((u32)(card->evtbd_ring_pbase));
 host_spec->vtbd_addr_hi java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
   rjava.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
  mwifiex_dbg,,
 > 
java.lang.StringIndexOutOfBoundsException: Range [13, 3) out of bounds for length 35
  c()card-sleep_cookie_pbase)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 host_spec-s =()(java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
     (card->sleep_cookie_pbase) > 2);
 java.lang.StringIndexOutOfBoundsException: Range [9, 3) out of bounds for length 36
    pcfgdata  cmd-params.;
 pcfg_data->=cpu_to_le16HOST_CMD_ACT_GEN_SET;
}

  pcfg_data->data_len = cpu_to_le16(len);
}

/*
 * 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.
 */

cmd- java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
struct ost_cmd_ds_command cmd,
        struct    struct host_cmd_ds_command cmdjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
 struct host_cmd_ds_802_11_subsc_evt ost_cmd_ds_multi_chan_policy * =&>paramsjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
 struct mwifiex_ie_types_rssi_threshold *java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 0
 u16event_bitmap;
 u8 *posjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 42

>=java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 64
>size java.lang.StringIndexOutOfBoundsException: Range [38, 31) out of bounds for length 70
    S_DS_GEN  S)

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mwifiex_cmd_robust_coex java.lang.StringIndexOutOfBoundsException: Range [64, 57) out of bounds for length 64
    cmd dn,subsc_evt_cfg->ction;

/*For query requests, no configuration TLV structures are to be added.*/
 if (subsc_evt_cfg->action == HostCmd_ACT_GEN_GET struct mwifiex_ie_types_robust_coexjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 coex->action =  coex_tlv = (struct mwifiex_ie_types_robust_coex *)
 subsc_evt->events = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 11

 event_bitmap = subsc_evt_cfg->events;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      event_bitmap);

 if (((  struct host_cmd_ds_command *cmd,
      (subsc_evt_cfg-      struct cfg80211_gtk_rekey_data *
     (event_bitmap == 0)) {
  mwifiex_dbg(priv->adapter, ERRORjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       "Error: No event cmd->size = cpu_to_le16(sizeof(*rekey) + S_DS_GEN);
       "for bitwise rekey->action = cpu_to_le16(cmd_action);
    memcpy(rekey->kek,  memcpy(rekey->kck, data->kck,  rekey_ctr = be64_to_cpup((__  rekey->replay_ctr_low   rekey->replay_ctr_high =
 }

 /*
 * Append TLV structures for each of the specified events for
 * subscribing or re-configuring. This is not required for
 * bitwise unsubscribing request.
 */

 if            u16 cmd_action)
 struct host_cmd_ds_chan_region_cfg

 pos = ((u8 * cmd->size = cpu_to_le16(sizeof(*java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
   sizeof(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 if (event_bitmap & BITMASK_BCN_RSSI_LOW) {
  rssi_tlv = (struct mwifiex_ie_types_rssi_threshold *) pos;

  rssi_tlv->header.type = cpu_to_le16(TLV_TYPE_RSSI_LOW);
  rssi_tlv->header.len java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      cpu_to_le16mwifiex_cmd_coalesce_cfg(struct mwifiex_private *priv,
    sizeof    u16 {
       &cmd-> struct mwifiex_ds_coalesce_cfg *cfg = data_buf;
  rssi_tlv-> struct coalesce_receive_filt_rule *rule;

  mwifiex_dbg cmd->command = cpu_to_le16(HostCmd_CMD_COALESCE_CFG);
       "Cfg Beaconjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       "RSSI:-%d dBm, Freq:%d\n", rule = (void *)coalesce_cfg->rule_data
       subsc_evt_cfg->bcn_l_rssi_cfg.abs_value,
        rule->max_coalescing_delay =

  pos +=   rule->pkt_type = cfg->rule[cnt]. rule->num_of_fields = cfg->rule[cnt].num_of_fields;
  le16_unaligned_add_cpu(&cmd-  length = 0;
           sizeof(
           struct  for (idx = 0; idx < cfg->rule[cnt].num_of_fields; idx++) {
 }

    cfg->rule[cnt].params[idx].java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 18
  rssi_tlv = (struct mwifiex_ie_types_rssi_threshold *) pos   memcpy(param->operand_byte_stream,

  rssi_tlv->header.
   length += sizeof(struct coalesce_filt_field_param);
      cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 3
    sizeof(struct   * num_of_fields(u8), pkt_type(u8) and total length    *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r>=>java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Range [20, 11) out of bounds for length 62

 
     /* Add the rule length to the command size*/
       "RSSI:-%d dBm, Freq:%d\n)java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
       java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 47

   java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
   /* Add sizeof action tototal ommand length /
           sizeof(
)
 le16_unaligned_add_cpu(cmd-, sizeoftdls_config->tdls_action))

 return 0; witch(md_action java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}

 
mwifiex_cmd_append_rpn_expression memcpy(tdls_config->dls_data,init_config,len)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
   config=;
      u8 ** len=sizeof*config)

 struct java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 8
 int,byte_len;
 u8 *stack_ptr = *buffer;
  ( mwifiex_tdls_stop_cs_params);
 for memcpytdls_config->tdls_data,data_buf,java.lang.StringIndexOutOfBoundsException: Range [46, 43) out of bounds for length 48
  filter = &case ACT_TDLS_CS_PARAMS
  if (!filter- len=sizeof(truct mwifiex_tdls_config_cs_params)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
   break;
  put_unaligned_le32((u32)filter->repeat, stack_ptr) break;
  stack_ptr += 4;
  *stack_ptr= TYPE_DNUM;
  stack_ptr += 1;

  byte_len = filter->byte_seq[MWIFIEX_MEF_MAX_BYTESEQ       "UnknownTDLS configuration\";
   return-OPNOTSUPP;
  stack_ptr += java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 2
=;
  stack_ptr += 1;
   0
  stack_ptr += 1;}
  put_unaligned_le32((u32)filter->offset, stack_ptr);
  stack_ptr += 4;
  *stack_ptr = TYPE_DNUM;
  stack_ptr += 1;

  java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 33
  stack_ptr+ 1

        voiddata_bufjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   *stack_ptr = filter->filt_action;
   stack_ptr += 1;
  }

TACK_NBYTES)
   return -1;
  struct host_cmd_tlv_rates *lv_rates;

 *;
 return 0;
}

extcap
mwifiex_ie_types_vhtcap vjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
      struct host_cmd_ds_command *cmd  wifiex_ie_types_tdls_idle_timeout *timeout;
      struct mwifiex_ds_mef_cfg * u8 pos
{
 struct host_cmd_ds_mef_cfg *mef_cfg = &cmd- struct station_parameters*params priv->sta_params;
 struct mwifiex_fw_mef_entry *mef_entry = NULL;
 u8
 u16 i;

 cmd->command = cpu_to_le16(HostCmd_CMD_MEF_CFG);

 mef_cfg->criteria = cpu_to_le32( le16_unaligned_add_cpu(&cmd->size,
 mef_cfg->num_entries = cpu_to_le16          sizeofstructhost_cmd_ds_tdls_oper);
p + izeof(mef_cfg)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 for ( memcpytdls_oper->peer_mac, oper->,ETH_ALEN)
  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
  ef_entry- =mef-mef_entry[]mode
  mef_entry->action =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  (mef_entry)

  if (mwifiex_cmd_append_rpn_expression(priv,
            &mef->mef_entry[i  tdls_oper->tdls_action = cpu_to_le16(ACT_TDLS_DELETE);
   return -1;

  case MWIFIEX_TDLS_CREA:
   cpu_to_le16(pos - mef_entry->expr);
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 cmd->size = case MWIFIEXTDLS_CONFIG_LINK:

 return 0  tdls_oper->java.lang.StringIndexOutOfBoundsException: Range [54, 24) out of bounds for length 56
 ( {


static u32 mwifiex_parse_cal_cfg(u8 *src, size_t len, u8 *dst)
{
u8 *s = src, *d = dst;

while (s - src < len) {
if (*s && (isspace(*s) || *s == '\t')) {
s++;
continue;
}
if (isxdigit(*s)) {
*d++ = simple_strtol(s, NULL, 16);
s += 2;
} else {
s++;
}
}

return d - dst;
}

int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
    struct device_node *node, const char *prefix)
{
#ifdef CONFIG_OF
struct property *prop;
size_t len = strlen(prefix);
int ret;

/* look for all matching property names */

  wmm_qos_info->header.en =
     cpu_to_le16((>qos_info;
      strncmp(prop->name, prefix, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 29
 ;

java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
i java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 40
      prop-      )
  ret=(,HostCmd_CMD_CFG_DATA
       (WLAN_EID_HT_CAPABILITY)
   ht_capab->.lenjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
   fr)
  eturnjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
  }
 }
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 return 0;


/* This function prepares command of set_cfg_data. */
static   =
    struct  Wjava.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
{
 struct mwifiex_adapter *adapter = priv->adapter   emcpy(tlv_rates->,
 struct property *   params->link_sta_params.supported_rates,
 u32 len;
ta=(u8 )  S_DS_GEN;
 int ret;
s host_cmd_ds_802_11_cfg_data*java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  len =  extcap =java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 52
  ret .=
      data, len    WLAN_EID_EXT_CAPABILITY;
  if extcap->cparams-e;
    emcpyextcap-> >ext_capabjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

  cmd->size = cpu_to_le16(       params->ext_capab_len;
   }
   download device s"
prop->;
 } else if     )
ex_parse_cal_cfg( )>datajava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
=
     *)
  java.lang.StringIndexOutOfBoundsException: Range [11, 9) out of bounds for length 64
(java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 56
 type java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 54
  pcfg_data->data_len  params-a){
  cmd->size = cpu_to_le16(S_DS_GEN + sizeof(*pcfg_data) + len);
  mwifiex_dbg(adapter,INFO,
       "download cfg_data rom config ile\n";
 } else {
  return -;
 }

 cmd->command = cpu_to_le16(HostCmd_CMD_CFG_DATA);

  >eaderl=sizeof(>);
}

static int
mwifiex_cmd_set_mc_policy(  }
     struct
    u16   *)

s java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 71
const d=java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

 mc_pol->action = cpu_to_le16(cmd_action);
p d;
 cmd->command 
>  (java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 71
 
 return 0;
}

static
    java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 39
       u16 cmd_action, bool *is_timeshare)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 *oex =&>.coex
 struct    &cmd->.;

cmd-=;
 cmd->size = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 12

 coex->action =     S_DS_GEN)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 coex_tlv cmd_action=java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  ( )  *)
 coex_tlv-
l  m);

 if (coex->action
  return 0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

 if (*is_timeshare)
  coex_tlv-> int mwifiex_cmd_get_wakeup_reasonstructpriv,
 else
 mode ;

 return  >  java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}

 ;
      java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
      u16 cmd_action,
  java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 43
{
 struct host_cmd_ds_gtk_rekey_paramss java.lang.StringIndexOutOfBoundsException: Range [60, 34) out of bounds for length 61
 

c java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 63
 m(java.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 56

 rekey->action = cpu_to_le16(cmd_action  java.lang.StringIndexOutOfBoundsException: Range [51, 44) out of bounds for length 72
 if (
 (java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 49
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
  rekey_ctr =  int mwifiex_is_cmd_supportedstruct *riv cmd_no)
  rekey-{
rjava.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 26
   cpu_to_le32 casejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 }

 return 0;
}

 -java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 struct java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0

 cmd->command = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 2
 cmd->size = cpu_to_le16(sizeof(* * routines based upon the command number *

 if (cmd_action == HostCmd_ACT_GEN_GET)
  >ction= pu_to_le16(cmd_action;

 return 0;
}

static int
mwifiex_cmd_coalesce_cfg(struct mwifiex_privatestruct host_cmd_ds_command *md_ptr= cmd_buf;
  
    u16  (mwifiex_is_cmd_supportedpriv){
{
 struct host_cmd_ds_coalesce_cfg *coalesce_cfgjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 35
   cmd-.coalesce_cfgjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 mwifiex_ds_coalesce_cfg * java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
 struct coalesce_filt_field_param *param; java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
cnt java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 22
   

c>command HostCmd_CMD_COALESCE_CFG;
 cmd->size = cpu_to_le16(S_DS_GEN);

>=cmd_action)
 coalesce_cfg-> ret = mwifiex_cmd_cfg_data, cmd_ptr )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  HostCmd_CMD_MAC_CONTROL:

f ( =0 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 48
  rule->header.type           );
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
       ;
  rule->pkt_type = cfg->rule[ break
 num_of_fields >c]njava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

  length = 0;

 break
  for (idx = 0; idx <  case HostCmd_CMD_TX_RATE_CFGHostCmd_CMD_TX_RATE_CFG:
   param->operation = cfg->rule[cnt].params[idx].operation;
   ret = mwifiex_cmd_tx_rate_cfg(priv, cmd_ptr, cmd_action,
     cfg->rule[cnt          data_buf)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   param-> case HostCmd_CMD_TXPWR_CFGjava.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
   cpu_to_le16(>[nt.[]offset;
   memcpy            data_buf;
  >rulecntp[].,
          param->operand_len);

 ret mwifiex_cmd_rf_tx_power(riv ,,

   param++;
 }

  isjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 59
()and engtho  all
            )java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
   */
>.len length java.lang.StringIndexOutOfBoundsException: Range [52, 48) out of bounds for length 55
     java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 8

  /* Add the rule length to the command size*/
 (>,
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
           sizeof(struct  =( ;

  rule = (void *)  :
 }

 /* Add sizeof action, num_of_rules to total command length */
 le16_unaligned_add_cpu(&cmd->size,       data_buf)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

 return 0;
}

static int
(truct *riv
  struct  cmd
   HostCmd_CMD_802_11_ASSOCIATEjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
 struct host_cmd_ds_tdls_config *java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 8
  mwifiex_tdls_init_cs_params *;
 struct  ret mwifiex_cmd_802_11_deauthenticatepriv md_ptrjava.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
 u16 len;

 ase
 cmd->size = cpu_to_le16(S_DS_GEN);
 tdls_config->tdls_action = cpu_to_le16(cmd_action);
le16_unaligned_add_cpu(cmd-size (dls_config-t)java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70

 switch (cmd_action) {
  CT_TDLS_CS_ENABLE_CONFIG:
  init_config = data_buf;
  len = sizeof(*init_config); :
 ret mwifiex_cmd_802_11_ad_hoc_join(riv,cmd_ptrjava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
  break;
 java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
  config = data_buf  break
c java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  tdls_config->tdls_data  )
  break;
 case ACT_TDLS_CS_STOP  java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
  len =sizeofstruct java.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 51
  memcpy(tdls_config->        cmd_oid, data_buf);
 break;
 case ACT_TDLS_CS_PARAMS:
  len =  case:
  memcpy(tdls_config->tdls_data, data_buf, len);
java.lang.StringIndexOutOfBoundsException: Range [18, 20) out of bounds for length 8
 default:
 mwifiex_dbg(>dapter,,
       "Unknown TDLS configuration\   pu_to_le16((struct host_cmd_ds_tx_rate_query)+
n -;
}

 le16_unaligned_add_cpu(&cmd->size,  break;
r0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static int
(struct java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
        struct host_cmd_ds_command (structh))
     *ata_bufjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

 struct   _);
 struct mwifiex_ds_tdls_oper *oper = data_buf;
 struct host_cmd_tlv_rates *tlv_rates;
 struct mwifiex_ie_types_htcap *ht_capab;
 ;
 struct mwifiex_ie_types_extcap breakjava.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
 struct mwifiex_ie_types_vhtcap ()
java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 34
 java.lang.StringIndexOutOfBoundsException: Range [51, 42) out of bounds for length 52
 ;
  cpu_to_le16(tructh +
  S_DS_GEN;

 cmd->command = cpu_to_le16cjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 cmd->ize=cpu_to_le16(S_DS_GEN);
 le16_unaligned_add_cpu(&cmd->size,
java.lang.StringIndexOutOfBoundsException: Range [23, 1) out of bounds for length 48

 tdls_oper->   java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 38
 memcpy(tdls_oper->peer_mac, oper- cpu_to_le16sizeof

 pos = (u8 *)tdls_oper ;

 switch (oper->tdls_action) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
case :
  tdls_oper-> cmd_ptr->command =>command (;
  break;
 case MWIFIEX_TDLS_CREATE_LINK:
 tdls_oper-> =cpu_to_le16(ACT_TDLS_CREATE);
  break;
   break;
  tdls_oper->tdls_action = cpu_to_le16(ACT_TDLS_CONFIG case HostCmd_CMD_FUNC_SHUTDOWN:

  if (!params) {
   mwifiex_dbg(priv->adapter, ERROR,
    iv->adapter->hw_status = MWIFIEX_HW_STATUS_RESET;
        oper->peer_mac);
;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

 params-,pos)
  config_len += sizeof(  ret =mwifiex_cmd_11n_addba_req(cmd_ptr, data_buf);

  break;
   caseHostCmd_CMD_11N_DELBA:
  wmm_qos_info->header.len =
   pu_to_le16(sizeof(wmm_qos_info->qos_info));
  wmm_qos_info-  break;
  config_len += sizeof(struct  case HostCmd_CMD_11N_ADDBA_RSP

   if(params->link_sta_params.ht_capa) {
   ht_capab = (struct mwifiex_ie_types_htcap *)(pos +
   break;
   ht_capab->header.type =
         cpu_to_le16(WLAN_EID_HT_CAPABILITY);
    case ostCmd_CMD_802_11_KEY_MATERIAL:
       cpu_to_le16(sizeof(struct ieee80211_ht_cap));
   memcpy  ret = mwifiex_cmd_802_11_key_material(priv, cmd_ptr,
          sizeof(struct ieee80211_ht_cap));
   config_len += sizeof(struct mwifiex_ie_types_htcap);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3

  if (params->link_sta_params.supported_rates &&
      params-link_sta_paramssupported_rates_len) {
   tlv_rates = (struct host_cmd_tlv_rates *)(pos +
       config_len)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  lv_rates-header.ype=
            cpu_to_le16(WLAN_EID_SUPP_RATES);
  tlv_rates->java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
   java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 38
    =mwifiex_cmd_recfg_tx_buf(riv cmd_ptr,cmd_action,
          params->link_sta_params.supported_rates,
params->.)
   config_len +=   break
    aseHostCmd_CMD_AMSDU_AGGR_CTRL:
  }

  if (params->ext_capab && params->ext_capab_len) {
 ;
      java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
 extcap->eadertype java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
   cpu_to_le16(LAN_EID_EXT_CAPABILITY);
   extcap->header.len = cpu_to_le16(params->ext_capab_len);
   memcpy(extcap->ext_capab, params->ext_capab,
         params->ext_capab_len);
   config_len += sizeof(struct      "cmd: WMM: WMM_GET_STATUS cmd sentn);
          params-  cmd_ptr-command = pu_to_le16HostCmd_CMD_WMM_GET_STATUS);
  }
  ifparams-link_sta_params.)java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
   vht_capab=(m*( +
            config_len);
   vht_capab-        S_DS_GEN)
      cpu_to_le16(WLAN_EID_VHT_CAPABILITY);
   vht_capab->header.len =
     pu_to_le16((structieee80211_vht_cap);
mcpy(>,params->vjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 18
    casejava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
  }
  if (params->  ;
   Hjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
  cpu_to_le16(;
  aid->.en  cpu_to_le16((>);
   aid- caseHostCmd_CMD_RF_REG_ACCESSjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   config_len += sizeof case HostCmd_CMD_PMIC_REG_ACCESS
  }

   java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
T)
  timeout->header. break
 value=cpu_to_le16()
   cmd_ptr-command  pu_to_le16c)

  break;
 default:
  mwifiex_dbg(priv->adapter, ERROR, "Unknown TDLS operation\   cmd_ptr->params.bss_mode.con_type =
  return -EOPNOTSUPP;
 }

 le16_unaligned_add_cpu(&  elseif(> = NL80211_IFTYPE_STATION ||

 return 0;
}

/* This function prepares command of sdio rx aggr info. */
static int  else if (priv->bss_mode=NL80211_IFTYPE_AP |
    priv->=NL80211_IFTYPE_P2P_GO)
{
  host_cmd_sdio_sp_rx_aggr_cfg* java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
   ) D);

 cmd->command = cpu_to_le16( ;
 cmd->size =
 cpu_to_le16((structhost_cmd_sdio_sp_rx_aggr_cfg +
       S_DS_GEN java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 62
caction=cmd_actionjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 (md_action= java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
enable =*u8 );

 return 0;java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}

/* This function prepares command to get HS wakeup reason.
 *
 * Preparation includes -
 *      - Setting command ID, action and proper size
 *      - Ensuring correct endian-ness
 */

static       ;
      struct java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 8
caseHostCmd_CMD_TDLS_OPER
 cmd- ret=mwifiex_cmd_tdls_oper(, , data_buf)
   break;
    S_DS_GEN);

 return 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static int mwifiex_cmd_get_chan_info break;
    eHostCmd_CMD_CHAN_REPORT_REQUEST:
{
 struct host_cmd_ds_sta_configure *sta_cfg_cmd =   ret = mwifiex_cmd_issue_chan_report_request(priv, cmd_ptr,
 struct           data_buf)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 (struct host_cmd_tlv_channel_band *)java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 38

H;
  java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
izeof*tlv_band_channel)+S_DS_GEN)java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
 sta_cfg_cmd->action = cpu_to_le16(cmd_action);
 memset(tlv_band_channel, 0, sizeof(*tlv_band_channel));
 tlv_band_channel->header.type =  ret = mwifiex_cmd_set_mc_policy(priv,cmd_ptr cmd_action,
and_channel->eaderl  =cpu_to_le16((*tlv_band_channel)-
     sizeof(struct mwifiex_ie_types_header))  reak;

 return 0;
}

/* This function check if the command is supported by firmware */
staticint java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 77
{
 if (!ISSUPP_ADHOC_ENABLED caseHostCmd_CMD_GTK_REKEY_OFFLOAD_CFGjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  cmd_no)java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
  case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS:
  case HostCmd_CMD_802_11_AD_HOC_START:
  case HostCmd_CMD_802_11_AD_HOC_JOIN:
  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 mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
       u16 cmd_action, u32 cmd_oid,
       void *data_buf, void *cmd_buf)
{
 struct host_cmd_ds_command *cmd_ptr = cmd_buf;
 int ret = 0;

 if (mwifiex_is_cmd_supported(priv, cmd_no)) {
  mwifiex_dbg(priv->adapter, ERROR,
       "0x%x     data_buf);
       cmd_no);
  return 
 }

java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  (md_no java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 HostCmd_CMD_GET_HW_SPEC:
    cmd_ptr-command=c(;
  >=(D)
 case HostCmd_CMD_CFG_DATA:
  ret  mwifiex_cmd_cfg_data(, , )
  breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 case HostCmd_CMD_MAC_CONTROL:
  ret = mwifiex_cmd_mac_control(priv, cmd_ptr, cmd_action,
           data_buf);
  break;
case:
  ret = mwifiex_cmd_802_11_mac_address(priv,       ": unknown md-%x\", cmd_no)
            cmd_action);
  break;
 case java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 8
   }
   eturn ret;
  break;
 }
 
     * This function issues commands to java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 2
  break;
 case HostCmd_CMD_TXPWR_CFG:
  ret = mwifiex_cmd_tx_power_cfg( *
            data_buf);
  break;
  *      - Function init (for first interface  *      - Read MAC address (for first interface only)
  ret = mwifiex_cmd_rf_tx_power(priv *      - Enable auto deep sleep (for java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 21
 *      - Set AMSDU java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  break;
 case HostCmd_CMD_RF_ANTENNAintmwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta)
  ret = mwifiex_cmd_rf_antenna struct  adapter  >;
          data_buf); ntjava.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 9
  break;
 case HostCmd_CMD_802_11_PS_MODE_ENH:
  ret = mwifiex_cmd_enh_power_mode( struct mwifiex_ds_auto_ds auto_ds;
       (uint16_t)cmd_oid, data_buf);
  break break;
 case HostCmd_CMD_802_11_HS_CFG_ENH:
  ret =(,  cmd_actionjava.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
  struct * data_buf;
  break  ;
 case HostCmd_CMD_802_11_SCAN:
  ret = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
 break;
 case HostCmd_CMD_802_11_BG_SCAN_CONFIG:
  ret(priv cmd_ptr,
       data_buf);
  break  java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 42
HostCmd_CMD_802_11_BG_SCAN_QUERY:
  ret = mwifiex_cmd_802_11_bg_scan_query(  ifjava.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
  break;
 case java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
   mwifiex_cmd_802_11_associate(  ;
          HostCmd_ACT_GEN_SET ,NULL )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 case HostCmd_CMD_802_11_DEAUTHENTICATE:
  ret = mwifiex_cmd_802_11_deauthenticate
  /
break;
case HostCmd_CMD_802_11_AD_HOC_START:
ret = mwifiex_cmd_802_11_ad_hoc_start(priv, cmd_ptr,
      data_buf);
break;
case HostCmd_CMD_802_11_GET_LOG:
ret = mwifiex_cmd_802_11_get_log(cmd_ptr);
break;
case HostCmd_CMD_802_11_AD_HOC_JOIN:
ret = mwifiex_cmd_802_11_ad_hoc_join(priv, cmd_ptr,
     data_buf);
break;
case HostCmd_CMD_802_11_AD_HOC_STOP:
ret = mwifiex_cmd_802_11_ad_hoc_stop(cmd_ptr);
break;
case HostCmd_CMD_RSSI_INFO:
ret = mwifiex_cmd_802_11_rssi_info(priv, cmd_ptr, cmd_action);
break;
case HostCmd_CMD_802_11_SNMP_MIB:
ret = mwifiex_cmd_802_11_snmp_mib(priv, cmd_ptr, cmd_action,
  cmd_oid, data_buf);
break;
case HostCmd_CMD_802_11_TX_RATE_QUERY:
cmd_ptr->command =
cpu_to_le16(HostCmd_CMD_802_11_TX_RATE_QUERY);
cmd_ptr->size =
cpu_to_le16(sizeof(struct host_cmd_ds_tx_rate_query) +
    S_DS_GEN);
priv->tx_rate = 0;
ret = 0;
break;
case HostCmd_CMD_VERSION_EXT:
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->params.verext.version_str_sel =
(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(cmd_no);
memcpy(&cmd_ptr->params, data_buf,
       sizeof(struct host_cmd_ds_remain_on_chan));
cmd_ptr->size =
      cpu_to_le16(sizeof(struct host_cmd_ds_remain_on_chan) +
  S_DS_GEN);
break;
case HostCmd_CMD_11AC_CFG:
ret = mwifiex_cmd_11ac_cfg(priv, cmd_ptr, cmd_action, data_buf);
break;
case HostCmd_CMD_PACKET_AGGR_CTRL:
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->params.pkt_aggr_ctrl.action = cpu_to_le16(cmd_action);
cmd_ptr->params.pkt_aggr_ctrl.enable =
cpu_to_le16(*(u16 *)data_buf);
cmd_ptr->size =
cpu_to_le16(sizeof(struct host_cmd_ds_pkt_aggr_ctrl) +
    S_DS_GEN);
break;
case HostCmd_CMD_P2P_MODE_CFG:
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->params.mode_cfg.action = cpu_to_le16(cmd_action);
cmd_ptr->params.mode_cfg.mode = cpu_to_le16(
get_unaligned((u16 *)data_buf));
cmd_ptr->size =
cpu_to_le16(sizeof(struct host_cmd_ds_p2p_mode_cfg) +
    S_DS_GEN);
break;
case HostCmd_CMD_FUNC_INIT:
if (priv->adapter->hw_status == MWIFIEX_HW_STATUS_RESET)
priv->adapter->hw_status = MWIFIEX_HW_STATUS_READY;
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->size = cpu_to_le16(S_DS_GEN);
break;
case HostCmd_CMD_FUNC_SHUTDOWN:
priv->adapter->hw_status = MWIFIEX_HW_STATUS_RESET;
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->size = cpu_to_le16(S_DS_GEN);
break;
case HostCmd_CMD_11N_ADDBA_REQ:
ret = mwifiex_cmd_11n_addba_req(cmd_ptr, data_buf);
break;
case HostCmd_CMD_11N_DELBA:
ret = mwifiex_cmd_11n_delba(cmd_ptr, data_buf);
break;
case HostCmd_CMD_11N_ADDBA_RSP:
ret = mwifiex_cmd_11n_addba_rsp_gen(priv, cmd_ptr, data_buf);
break;
case HostCmd_CMD_802_11_KEY_MATERIAL:
ret = mwifiex_cmd_802_11_key_material(priv, cmd_ptr,
      cmd_action, cmd_oid,
      data_buf);
break;
case HostCmd_CMD_802_11D_DOMAIN_INFO:
ret = mwifiex_cmd_802_11d_domain_info(priv, cmd_ptr,
      cmd_action);
break;
case HostCmd_CMD_RECONFIGURE_TX_BUFF:
ret = mwifiex_cmd_recfg_tx_buf(priv, cmd_ptr, cmd_action,
       data_buf);
break;
case HostCmd_CMD_AMSDU_AGGR_CTRL:
ret = mwifiex_cmd_amsdu_aggr_ctrl(cmd_ptr, cmd_action,
  data_buf);
break;
case HostCmd_CMD_11N_CFG:
ret = mwifiex_cmd_11n_cfg(priv, cmd_ptr, cmd_action, data_buf);
break;
case HostCmd_CMD_WMM_GET_STATUS:
mwifiex_dbg(priv->adapter, CMD,
    "cmd: WMM: WMM_GET_STATUS cmd sent\n");
cmd_ptr->command = cpu_to_le16(HostCmd_CMD_WMM_GET_STATUS);
cmd_ptr->size =
cpu_to_le16(sizeof(struct host_cmd_ds_wmm_get_status) +
    S_DS_GEN);
ret = 0;
break;
case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS:
ret = mwifiex_cmd_ibss_coalescing_status(cmd_ptr, cmd_action,
 data_buf);
break;
case HostCmd_CMD_802_11_SCAN_EXT:
ret = mwifiex_cmd_802_11_scan_ext(priv, cmd_ptr, data_buf);
break;
case HostCmd_CMD_MEM_ACCESS:
ret = mwifiex_cmd_mem_access(cmd_ptr, cmd_action, data_buf);
break;
case HostCmd_CMD_MAC_REG_ACCESS:
case HostCmd_CMD_BBP_REG_ACCESS:
case HostCmd_CMD_RF_REG_ACCESS:
case HostCmd_CMD_PMIC_REG_ACCESS:
case HostCmd_CMD_CAU_REG_ACCESS:
case HostCmd_CMD_802_11_EEPROM_ACCESS:
ret = mwifiex_cmd_reg_access(cmd_ptr, cmd_action, data_buf);
break;
case HostCmd_CMD_SET_BSS_MODE:
cmd_ptr->command = cpu_to_le16(cmd_no);
if (priv->bss_mode == NL80211_IFTYPE_ADHOC)
cmd_ptr->params.bss_mode.con_type =
CONNECTION_TYPE_ADHOC;
else if (priv->bss_mode == NL80211_IFTYPE_STATION ||
 priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT)
cmd_ptr->params.bss_mode.con_type =
CONNECTION_TYPE_INFRA;
else if (priv->bss_mode == NL80211_IFTYPE_AP ||
 priv->bss_mode == NL80211_IFTYPE_P2P_GO)
cmd_ptr->params.bss_mode.con_type = CONNECTION_TYPE_AP;
cmd_ptr->size = cpu_to_le16(sizeof(struct
host_cmd_ds_set_bss_mode) + S_DS_GEN);
ret = 0;
break;
case HostCmd_CMD_PCIE_DESC_DETAILS:
ret = mwifiex_cmd_pcie_host_spec(priv, cmd_ptr, cmd_action);
break;
case HostCmd_CMD_802_11_SUBSCRIBE_EVENT:
ret = mwifiex_cmd_802_11_subsc_evt(priv, cmd_ptr, data_buf);
break;
case HostCmd_CMD_MEF_CFG:
ret = mwifiex_cmd_mef_cfg(priv, cmd_ptr, data_buf);
break;
case HostCmd_CMD_COALESCE_CFG:
ret = mwifiex_cmd_coalesce_cfg(priv, cmd_ptr, cmd_action,
       data_buf);
break;
case HostCmd_CMD_TDLS_OPER:
ret = mwifiex_cmd_tdls_oper(priv, cmd_ptr, data_buf);
break;
case HostCmd_CMD_TDLS_CONFIG:
ret = mwifiex_cmd_tdls_config(priv, cmd_ptr, cmd_action,
      data_buf);
break;
case HostCmd_CMD_CHAN_REPORT_REQUEST:
ret = mwifiex_cmd_issue_chan_report_request(priv, cmd_ptr,
    data_buf);
break;
case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG:
ret = mwifiex_cmd_sdio_rx_aggr_cfg(cmd_ptr, cmd_action,
   data_buf);
break;
case HostCmd_CMD_HS_WAKEUP_REASON:
ret = mwifiex_cmd_get_wakeup_reason(priv, cmd_ptr);
break;
case HostCmd_CMD_MC_POLICY:
ret = mwifiex_cmd_set_mc_policy(priv, cmd_ptr, cmd_action,
data_buf);
break;
case HostCmd_CMD_ROBUST_COEX:
ret = mwifiex_cmd_robust_coex(priv, cmd_ptr, cmd_action,
      data_buf);
break;
case HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG:
ret = mwifiex_cmd_gtk_rekey_offload(priv, cmd_ptr, cmd_action,
    data_buf);
break;
case HostCmd_CMD_CHAN_REGION_CFG:
ret = mwifiex_cmd_chan_region_cfg(priv, cmd_ptr, cmd_action);
break;
case HostCmd_CMD_FW_DUMP_EVENT:
cmd_ptr->command = cpu_to_le16(cmd_no);
cmd_ptr->size = cpu_to_le16(S_DS_GEN);
break;
case HostCmd_CMD_STA_CONFIGURE:
ret = mwifiex_cmd_get_chan_info(cmd_ptr, cmd_action);
break;
default:
mwifiex_dbg(priv->adapter, ERROR,
    "PREP_CMD: unknown cmd- %#x\n", cmd_no);
ret = -1;
break;
}
return ret;
}

/*
 * This function issues commands to initialize firmware.
 *
 * This is called after firmware download to bring the card to
 * working state.
 * Function is also called during reinitialization of virtual
 * interfaces.
 *
 * The following commands are issued sequentially -
 *      - Set PCI-Express host buffer configuration (PCIE only)
 *      - Function init (for first interface only)
 *      - Read MAC address (for first interface only)
 *      - Reconfigure Tx buffer size (for first interface only)
 *      - Enable auto deep sleep (for first interface only)
 *      - Get Tx rate
 *      - Get Tx power
 *      - Set IBSS coalescing status
 *      - Set AMSDU aggregation control
 *      - Set 11d control
 *      - Set MAC control (this must be the last command to initialize firmware)
 */

int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta)
{
 struct mwifiex_adapter *adapter = priv->adapter;
 int ret;
 struct mwifiex_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl;
 struct mwifiex_ds_auto_ds auto_ds;
 enum state_11d_t state_11d;
 struct mwifiex_ds_11n_tx_cfg tx_cfg;
 u8 sdio_sp_rx_aggr_enable;
 u16 packet_aggr_enable;
 int data;

 if (first_sta) {
  if (priv->adapter->iface_type == MWIFIEX_PCIE) {
   ret = mwifiex_send_cmd(priv,
            HostCmd_CMD_PCIE_DESC_DETAILS,
            HostCmd_ACT_GEN_SET, 0, NULL,
            true);
   if (ret)
    return -1;
  }

  ret = mwifiex_send_cmd(priv, HostCmd_CMD_FUNC_INIT,
           HostCmd_ACT_GEN_SET, 0, NULL, true);
  if (ret)
   return -1;

  /* Download calibration data to firmware.
 * The cal-data can be read from device tree and/or
 * a configuration file and downloaded to firmware.
 */

  if (adapter->dt_node) {
   if (of_property_read_u32(adapter->dt_node,
       "marvell,wakeup-pin",
       &data) == 0) {
    pr_debug("Wakeup pin = 0x%x\n", data);
    adapter->hs_cfg.gpio = data;
   }

   mwifiex_dnld_dt_cfgdata(priv, adapter->dt_node,
      "marvell,caldata");
  }

  if (adapter->cal_data) {
   mwifiex_send_cmd(priv, HostCmd_CMD_CFG_DATA,
      HostCmd_ACT_GEN_SET, 0, NULL, true);
   release_firmware(adapter->cal_data);
   adapter->cal_data = NULL;
  }


  /* Read MAC address from HW */
  ret = mwifiex_send_cmd(priv, HostCmd_CMD_GET_HW_SPEC,
           HostCmd_ACT_GEN_GET, 0, NULL, true);
  if (ret)
   return -1;

  /** Set SDIO Single Port RX Aggr Info */
  if (priv->adapter->iface_type == MWIFIEX_SDIO &&
      ISSUPP_SDIO_SPA_ENABLED(priv->adapter->fw_cap_info) &&
      !priv->adapter->host_disable_sdio_rx_aggr) {
   sdio_sp_rx_aggr_enable = true;
   ret = mwifiex_send_cmd(priv,
            HostCmd_CMD_SDIO_SP_RX_AGGR_CFG,
            HostCmd_ACT_GEN_SET, 0,
            &sdio_sp_rx_aggr_enable,
            true);
   if (ret) {
    mwifiex_dbg(priv->adapter, ERROR,
         "error while enabling SP aggregation..disable it");
    adapter->sdio_rx_aggr_enable = false;
   }
  }

  /* Reconfigure tx buf size */
  ret = mwifiex_send_cmd(priv, HostCmd_CMD_RECONFIGURE_TX_BUFF,
           HostCmd_ACT_GEN_SET, 0,
           &priv->adapter->tx_buf_size, true);
  if (ret)
   return -1;

  if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
   /* Enable IEEE PS by default */
   priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_PSP;
   ret = mwifiex_send_cmd(priv,
            HostCmd_CMD_802_11_PS_MODE_ENH,
            EN_AUTO_PS, BITMAP_STA_PS, NULL,
            true);
   if (ret)
    return -1;
  }

  if (drcs) {
   adapter->drcs_enabled = true;
   if (ISSUPP_DRCS_ENABLED(adapter->fw_cap_info))
    ret = mwifiex_send_cmd(priv,
             HostCmd_CMD_MC_POLICY,
             HostCmd_ACT_GEN_SET, 0,
             &adapter->drcs_enabled,
             true);
   if (ret)
    return -1;
  }

  mwifiex_send_cmd(priv, HostCmd_CMD_CHAN_REGION_CFG,
     HostCmd_ACT_GEN_GET, 0, NULL, true);
 }

 /* get tx rate */
 ret = mwifiex_send_cmd(priv, HostCmd_CMD_TX_RATE_CFG,
          HostCmd_ACT_GEN_GET, 0, NULL, true);
 if (ret)
  return -1;
 priv->data_rate = 0;

 /* get tx power */
 ret = mwifiex_send_cmd(priv, HostCmd_CMD_RF_TX_PWR,
          HostCmd_ACT_GEN_GET, 0, NULL, true);
 if (ret)
  return -1;

 memset(&amsdu_aggr_ctrl, 0, sizeof(amsdu_aggr_ctrl));
 amsdu_aggr_ctrl.enable = true;
 /* Send request to firmware */
 ret = mwifiex_send_cmd(priv, HostCmd_CMD_AMSDU_AGGR_CTRL,
          HostCmd_ACT_GEN_SET, 0,
          &amsdu_aggr_ctrl, true);
 if (ret)
  return -1;
 /* MAC Control must be the last command in init_fw */
 /* set MAC Control */
 ret = mwifiex_send_cmd(priv, HostCmd_CMD_MAC_CONTROL,
          HostCmd_ACT_GEN_SET, 0,
          &priv->curr_pkt_filter, true);
 if (ret)
  return -1;

 if (!disable_auto_ds && first_sta &&
     priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
  /* Enable auto deep sleep */
  auto_ds.auto_ds = DEEP_SLEEP_ON;
  auto_ds.idle_time = DEEP_SLEEP_IDLE_TIME;
  ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH,
           EN_AUTO_PS, BITMAP_AUTO_DS,
           &auto_ds, true);
  if (ret)
   return -1;
 }

 if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
  /* Send cmd to FW to enable/disable 11D function */
  state_11d = ENABLE_11D;
  ret = mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB,
           HostCmd_ACT_GEN_SET, DOT11D_I,
           &state_11d, true);
  if (ret)
   mwifiex_dbg(priv->adapter, ERROR,
        "11D: failed to enable 11D\n");
 }

 /* Pacekt aggregation handshake with firmware */
 if (aggr_ctrl) {
  packet_aggr_enable = true;
  mwifiex_send_cmd(priv, HostCmd_CMD_PACKET_AGGR_CTRL,
     HostCmd_ACT_GEN_SET, 0,
     &packet_aggr_enable, true);
 }

 /* Send cmd to FW to configure 11n specific configuration
 * (Short GI, Channel BW, Green field support etc.) for transmit
 */

 tx_cfg.tx_htcap = MWIFIEX_FW_DEF_HTTXCFG;
 ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_CFG,
          HostCmd_ACT_GEN_SET, 0, &tx_cfg, true);

 return ret;
}

Messung V0.5
C=98 H=98 G=97

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.80Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.