BCMSDH_ERROR(("%s: out of memory\n", __func__));
return BCME_NOMEM;
}
- bcopy(cis, tmp_buf, length);
+ memcpy(tmp_buf, cis, length);
for (tmp_ptr = tmp_buf, ptr = cis; ptr < (cis + length - 4);
tmp_ptr++) {
ptr += sprintf((char *)ptr, "%.2x ", *tmp_ptr & 0xff);
val_size = sizeof(int);
if (plen >= (int)sizeof(int_val))
- bcopy(params, &int_val, sizeof(int_val));
+ memcpy(&int_val, params, sizeof(int_val));
bool_val = (int_val != 0) ? true : false;
switch (actionid) {
case IOV_GVAL(IOV_MSGLEVEL):
int_val = (s32) sd_msglevel;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_MSGLEVEL):
case IOV_GVAL(IOV_BLOCKMODE):
int_val = (s32) si->sd_blockmode;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_BLOCKMODE):
break;
}
int_val = (s32) si->client_block_size[int_val];
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_BLOCKSIZE):
case IOV_GVAL(IOV_RXCHAIN):
int_val = false;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_GVAL(IOV_DMA):
int_val = (s32) si->sd_use_dma;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_DMA):
case IOV_GVAL(IOV_USEINTS):
int_val = (s32) si->use_client_ints;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_USEINTS):
case IOV_GVAL(IOV_DIVISOR):
int_val = (u32) sd_divisor;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_DIVISOR):
case IOV_GVAL(IOV_POWER):
int_val = (u32) sd_power;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_POWER):
case IOV_GVAL(IOV_CLOCK):
int_val = (u32) sd_clock;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_CLOCK):
case IOV_GVAL(IOV_SDMODE):
int_val = (u32) sd_sdmode;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_SDMODE):
case IOV_GVAL(IOV_HISPEED):
int_val = (u32) sd_hiok;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_HISPEED):
case IOV_GVAL(IOV_NUMINTS):
int_val = (s32) si->intrcount;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_GVAL(IOV_NUMLOCALINTS):
int_val = (s32) 0;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_GVAL(IOV_HOSTREG):
int_val = 32; /* sdioh_sdmmc_rreg(si,
sd_ptr->offset); */
- bcopy(&int_val, arg, sizeof(int_val));
+ memcpy(arg, &int_val, sizeof(int_val));
break;
}
}
int_val = (int)data;
- bcopy(&int_val, arg, sizeof(int_val));
+ memcpy(arg, &int_val, sizeof(int_val));
break;
}
/* For a write, copy the buffer data into the packet. */
if (write)
- bcopy(buffer, mypkt->data, buflen_u);
+ memcpy(mypkt->data, buffer, buflen_u);
Status =
sdioh_request_packet(sd, fix_inc, write, func, addr, mypkt);
/* For a read, copy the packet data back to the buffer. */
if (!write)
- bcopy(mypkt->data, buffer, buflen_u);
+ memcpy(buffer, mypkt->data, buflen_u);
pkt_buf_free_skb(sd->osh, mypkt, write ? true : false);
} else if (((u32) (pkt->data) & DMA_ALIGN_MASK) != 0) {
/* For a write, copy the buffer data into the packet. */
if (write)
- bcopy(pkt->data, mypkt->data, pkt->len);
+ memcpy(mypkt->data, pkt->data, pkt->len);
Status =
sdioh_request_packet(sd, fix_inc, write, func, addr, mypkt);
/* For a read, copy the packet data back to the buffer. */
if (!write)
- bcopy(mypkt->data, pkt->data, mypkt->len);
+ memcpy(pkt->data, mypkt->data, mypkt->len);
pkt_buf_free_skb(sd->osh, mypkt, write ? true : false);
} else { /* case 3: We have a packet and
slen = strlen("wme_dp") + 1;
if (len >= (int)(slen + sizeof(int)))
- bcopy(((char *)buf + slen), &val, sizeof(int));
+ memcpy(&val, (char *)buf + slen, sizeof(int));
dhd->wme_dp = (u8) ltoh32(val);
}
goto exit;
if (plen >= (int)sizeof(int_val))
- bcopy(params, &int_val, sizeof(int_val));
+ memcpy(&int_val, params, sizeof(int_val));
switch (actionid) {
case IOV_GVAL(IOV_VERSION):
case IOV_GVAL(IOV_MSGLEVEL):
int_val = (s32) dhd_msg_level;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_MSGLEVEL):
case IOV_GVAL(IOV_BCMERROR):
int_val = (s32) dhd_pub->bcmerror;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_GVAL(IOV_WDTICK):
int_val = (s32) dhd_watchdog_ms;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_WDTICK):
#ifdef DHD_DEBUG
case IOV_GVAL(IOV_DCONSOLE_POLL):
int_val = (s32) dhd_console_ms;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_DCONSOLE_POLL):
case IOV_GVAL(IOV_IOCTLTIMEOUT):{
int_val = (s32) dhd_os_get_ioctl_resp_timeout();
- bcopy(&int_val, arg, sizeof(int_val));
+ memcpy(arg, &int_val, sizeof(int_val));
break;
}
(bi->length));
/*
if(bi && bi_new) {
- bcopy(bi, bi_new, results->buflen -
+ memcpy(bi_new, bi, results->buflen -
dtoh32(bi_new->length));
results->buflen -= dtoh32(bi_new->length);
}
(wl_bss_info_t *)((unsigned long)bi +
dtoh32
(bi->length));
- bcopy(bi, bi_new,
+ memcpy(bi_new, bi,
dtoh32
(bi->length));
bi_new =
#ifdef EXAMPLE_GET_MAC
/* EXAMPLE code */
{
- u8 ea_example[ETH_ALEN] = {
- {0x00, 0x11, 0x22, 0x33, 0x44, 0xFF} };
- bcopy((char *)ea_example, buf, ETH_ALEN);
+ u8 ea_example[ETH_ALEN] = {0x00, 0x11, 0x22, 0x33, 0x44, 0xFF};
+ memcpy(buf, ea_example, ETH_ALEN);
}
#endif /* EXAMPLE_GET_MAC */
bcm_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN, iovbuf,
sizeof(iovbuf));
dhdcdc_query_ioctl(dhdp, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf));
- bcopy(iovbuf, dhdp->eventmask, WL_EVENTING_MASK_LEN);
+ memcpy(dhdp->eventmask, iovbuf, WL_EVENTING_MASK_LEN);
setbit(dhdp->eventmask, WLC_E_SET_SSID);
setbit(dhdp->eventmask, WLC_E_PRUNE);
}
PKTALIGN(osh, new, pkt->len, DHD_SDALIGN);
- bcopy(pkt->data, new->data, pkt->len);
+ memcpy(new->data, pkt->data, pkt->len);
if (free_pkt)
pkt_buf_free_skb(osh, pkt, true);
/* free the pkt if canned one is not used */
dhd_os_sdlock(bus->dhd);
rxlen = bus->rxlen;
- bcopy(bus->rxctl, msg, min(msglen, rxlen));
+ memcpy(msg, bus->rxctl, min(msglen, rxlen));
bus->rxlen = 0;
dhd_os_sdunlock(bus->dhd);
pktgen.mode = bus->pktgen_mode;
pktgen.stop = bus->pktgen_stop;
- bcopy(&pktgen, arg, sizeof(pktgen));
+ memcpy(arg, &pktgen, sizeof(pktgen));
return 0;
}
dhd_pktgen_t pktgen;
uint oldcnt, oldmode;
- bcopy(arg, &pktgen, sizeof(pktgen));
+ memcpy(&pktgen, arg, sizeof(pktgen));
if (pktgen.version != DHD_PKTGEN_VERSION)
return BCME_BADARG;
/* Copy the passed variables, which should include the
terminating double-null */
- bcopy(arg, bus->vars, bus->varsz);
+ memcpy(bus->vars, arg, bus->varsz);
err:
return bcmerror;
}
goto exit;
if (plen >= (int)sizeof(int_val))
- bcopy(params, &int_val, sizeof(int_val));
+ memcpy(&int_val, params, sizeof(int_val));
bool_val = (int_val != 0) ? true : false;
bcmerror = dhdsdio_bussleep(bus, bool_val);
} else {
int_val = (s32) bus->sleeping;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
}
goto exit;
}
switch (actionid) {
case IOV_GVAL(IOV_INTR):
int_val = (s32) bus->intr;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_INTR):
case IOV_GVAL(IOV_POLLRATE):
int_val = (s32) bus->pollrate;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_POLLRATE):
case IOV_GVAL(IOV_IDLETIME):
int_val = bus->idletime;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_IDLETIME):
case IOV_GVAL(IOV_IDLECLOCK):
int_val = (s32) bus->idleclock;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_IDLECLOCK):
case IOV_GVAL(IOV_SD1IDLE):
int_val = (s32) sd1idle;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_SD1IDLE):
ASSERT(plen >= 2 * sizeof(int));
address = (u32) int_val;
- bcopy((char *)params + sizeof(int_val), &int_val,
- sizeof(int_val));
+ memcpy(&int_val, (char *)params + sizeof(int_val),
+ sizeof(int_val));
size = (uint) int_val;
/* Do some validation */
case IOV_GVAL(IOV_MEMSIZE):
int_val = (s32) bus->ramsize;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_GVAL(IOV_SDIOD_DRIVE):
int_val = (s32) dhd_sdiod_drive_strength;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_SDIOD_DRIVE):
case IOV_GVAL(IOV_READAHEAD):
int_val = (s32) dhd_readahead;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_READAHEAD):
case IOV_GVAL(IOV_SDRXCHAIN):
int_val = (s32) bus->use_rxchain;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_SDRXCHAIN):
break;
case IOV_GVAL(IOV_ALIGNCTL):
int_val = (s32) dhd_alignctl;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_ALIGNCTL):
case IOV_GVAL(IOV_SDALIGN):
int_val = DHD_SDALIGN;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
#ifdef DHD_DEBUG
case IOV_GVAL(IOV_VARS):
if (bus->varsz < (uint) len)
- bcopy(bus->vars, arg, bus->varsz);
+ memcpy(arg, bus->vars, bus->varsz);
else
bcmerror = BCME_BUFTOOSHORT;
break;
int_val = (s32) bcmsdh_reg_read(bus->sdh, addr, size);
if (bcmsdh_regfail(bus->sdh))
bcmerror = BCME_SDIO_ERROR;
- bcopy(&int_val, arg, sizeof(s32));
+ memcpy(arg, &int_val, sizeof(s32));
break;
}
sdreg_t sdreg;
u32 addr, size;
- bcopy(params, &sdreg, sizeof(sdreg));
+ memcpy(&sdreg, params, sizeof(sdreg));
addr = SI_ENUM_BASE + sdreg.offset;
size = sdreg.func;
int_val = (s32) bcmsdh_reg_read(bus->sdh, addr, size);
if (bcmsdh_regfail(bus->sdh))
bcmerror = BCME_SDIO_ERROR;
- bcopy(&int_val, arg, sizeof(s32));
+ memcpy(arg, &int_val, sizeof(s32));
break;
}
sdreg_t sdreg;
u32 addr, size;
- bcopy(params, &sdreg, sizeof(sdreg));
+ memcpy(&sdreg, params, sizeof(sdreg));
addr = SI_ENUM_BASE + sdreg.offset;
size = sdreg.func;
case IOV_GVAL(IOV_FORCEEVEN):
int_val = (s32) forcealign;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_FORCEEVEN):
case IOV_GVAL(IOV_TXBOUND):
int_val = (s32) dhd_txbound;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_TXBOUND):
case IOV_GVAL(IOV_RXBOUND):
int_val = (s32) dhd_rxbound;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_RXBOUND):
case IOV_GVAL(IOV_TXMINMAX):
int_val = (s32) dhd_txminmax;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_TXMINMAX):
#ifdef SDTEST
case IOV_GVAL(IOV_EXTLOOP):
int_val = (s32) bus->ext_loop;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_EXTLOOP):
/* Get its status */
int_val = (bool) bus->dhd->dongle_reset;
- bcopy(&int_val, arg, val_size);
+ memcpy(arg, &int_val, val_size);
break;
return BCME_NOMEM;
memset(vbuffer, 0, varsize);
- bcopy(bus->vars, vbuffer, bus->varsz);
+ memcpy(vbuffer, bus->vars, bus->varsz);
/* Write the vars list */
bcmerror =
ASSERT(bus->rxctl >= bus->rxbuf);
/* Copy the already-read portion over */
- bcopy(hdr, bus->rxctl, firstread);
+ memcpy(bus->rxctl, hdr, firstread);
if (len <= firstread)
goto gotpkt;
/* Copy the full data pkt in gSPI case and process ioctl. */
if (bus->bus == SPI_BUS) {
- bcopy(hdr, bus->rxctl, len);
+ memcpy(bus->rxctl, hdr, len);
goto gotpkt;
}
dhd_os_sdunlock_rxq(bus->dhd);
/* Now check the header */
- bcopy(rxbuf, bus->rxhdr, SDPCM_HDRLEN);
+ memcpy(bus->rxhdr, rxbuf, SDPCM_HDRLEN);
/* Extract hardware header fields */
len = ltoh16_ua(bus->rxhdr);
/* Copy the already-read portion */
skb_push(pkt, firstread);
- bcopy(bus->rxhdr, pkt->data, firstread);
+ memcpy(pkt->data, bus->rxhdr, firstread);
#ifdef DHD_DEBUG
if (DHD_BYTES_ON() && DHD_DATA_ON())
dev_wlc_ioctl(dev, WLC_GET_VAR, (void *)ioctlbuf,
MAX_WLIW_IOCTL_LEN);
if (!error)
- bcopy(ioctlbuf, buf, buflen);
+ memcpy(buf, ioctlbuf, buflen);
return error;
}
}
scbval.val = mlme->reason_code;
- bcopy(&mlme->addr.sa_data, &scbval.ea, ETH_ALEN);
+ memcpy(&scbval.ea, &mlme->addr.sa_data, ETH_ALEN);
if (mlme->cmd == IW_MLME_DISASSOC) {
scbval.val = htod32(scbval.val);
char iovbuf[WL_EVENTING_MASK_LEN + 12];
dev_iw_iovar_getbuf(dev, "event_msgs", "", 0, iovbuf, sizeof(iovbuf));
- bcopy(iovbuf, eventmask, WL_EVENTING_MASK_LEN);
+ memcpy(eventmask, iovbuf, WL_EVENTING_MASK_LEN);
setbit(eventmask, WLC_E_SCAN_COMPLETE);
dev_iw_iovar_setbuf(dev, "event_msgs", eventmask, WL_EVENTING_MASK_LEN,
iovbuf, sizeof(iovbuf));
key.len = iwe->key_len;
if (!is_multicast_ether_addr(iwe->addr.sa_data))
- bcopy((void *)&iwe->addr.sa_data, (char *)&key.ea,
- ETH_ALEN);
+ memcpy(&key.ea, &iwe->addr.sa_data, ETH_ALEN);
if (key.len == 0) {
if (iwe->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
key.flags = WL_PRIMARY_KEY;
}
- bcopy((void *)iwe->key, key.data, iwe->key_len);
+ memcpy(key.data, iwe->key, iwe->key_len);
if (iwe->alg == IW_ENCODE_ALG_TKIP) {
u8 keybuf[8];
- bcopy(&key.data[24], keybuf, sizeof(keybuf));
- bcopy(&key.data[16], &key.data[24], sizeof(keybuf));
- bcopy(keybuf, &key.data[16], sizeof(keybuf));
+ memcpy(keybuf, &key.data[24], sizeof(keybuf));
+ memcpy(&key.data[24], &key.data[16], sizeof(keybuf));
+ memcpy(&key.data[16], keybuf, sizeof(keybuf));
}
if (iwe->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
uint j;
pmkidptr = &pmkid;
- bcopy(&iwpmksa->bssid.sa_data[0],
- &pmkidptr->pmkid[0].BSSID, ETH_ALEN);
- bcopy(&iwpmksa->pmkid[0], &pmkidptr->pmkid[0].PMKID,
- WLAN_PMKID_LEN);
+ memcpy(&pmkidptr->pmkid[0].BSSID,
+ &iwpmksa->bssid.sa_data[0],
+ ETH_ALEN);
+ memcpy(&pmkidptr->pmkid[0].PMKID,
+ &iwpmksa->pmkid[0],
+ WLAN_PMKID_LEN);
WL_WSEC("wl_iw_set_pmksa:IW_PMKSA_REMOVE:PMKID: "
"%pM = ", &pmkidptr->pmkid[0].BSSID);
&& (i < pmkid_list.pmkids.npmkid)) {
memset(&pmkid_list.pmkids.pmkid[i], 0, sizeof(pmkid_t));
for (; i < (pmkid_list.pmkids.npmkid - 1); i++) {
- bcopy(&pmkid_list.pmkids.pmkid[i + 1].BSSID,
- &pmkid_list.pmkids.pmkid[i].BSSID,
- ETH_ALEN);
- bcopy(&pmkid_list.pmkids.pmkid[i + 1].PMKID,
- &pmkid_list.pmkids.pmkid[i].PMKID,
- WLAN_PMKID_LEN);
+ memcpy(&pmkid_list.pmkids.pmkid[i].BSSID,
+ &pmkid_list.pmkids.pmkid[i + 1].BSSID,
+ ETH_ALEN);
+ memcpy(&pmkid_list.pmkids.pmkid[i].PMKID,
+ &pmkid_list.pmkids.pmkid[i + 1].PMKID,
+ WLAN_PMKID_LEN);
}
pmkid_list.pmkids.npmkid--;
} else
&pmkid_list.pmkids.pmkid[i].BSSID, ETH_ALEN))
break;
if (i < MAXPMKID) {
- bcopy(&iwpmksa->bssid.sa_data[0],
- &pmkid_list.pmkids.pmkid[i].BSSID,
- ETH_ALEN);
- bcopy(&iwpmksa->pmkid[0],
- &pmkid_list.pmkids.pmkid[i].PMKID,
- WLAN_PMKID_LEN);
+ memcpy(&pmkid_list.pmkids.pmkid[i].BSSID,
+ &iwpmksa->bssid.sa_data[0],
+ ETH_ALEN);
+ memcpy(&pmkid_list.pmkids.pmkid[i].PMKID,
+ &iwpmksa->pmkid[0],
+ WLAN_PMKID_LEN);
if (i == pmkid_list.pmkids.npmkid)
pmkid_list.pmkids.npmkid++;
} else
if (pmkidcand->preauth)
iwpmkidcand->flags |=
IW_PMKID_CAND_PREAUTH;
- bcopy(&pmkidcand->BSSID,
- &iwpmkidcand->bssid.sa_data,
- ETH_ALEN);
+ memcpy(&iwpmkidcand->bssid.sa_data,
+ &pmkidcand->BSSID,
+ ETH_ALEN);
#ifndef SANDGATE2G
wireless_send_event(dev, cmd, &wrqu,
extra);
pi->vars = (char *)&pi->vars;
- bcopy(&pi->pubpi, &pi->pubpi_ro, sizeof(wlc_phy_t));
+ memcpy(&pi->pubpi_ro, &pi->pubpi, sizeof(wlc_phy_t));
return &pi->pubpi_ro;
bool mac_enabled = false;
phy_info_t *pi = (phy_info_t *) ppi;
- bcopy(&txpwr->cck[0], &pi->tx_user_target[TXP_FIRST_CCK],
- WLC_NUM_RATES_CCK);
-
- bcopy(&txpwr->ofdm[0], &pi->tx_user_target[TXP_FIRST_OFDM],
- WLC_NUM_RATES_OFDM);
- bcopy(&txpwr->ofdm_cdd[0], &pi->tx_user_target[TXP_FIRST_OFDM_20_CDD],
- WLC_NUM_RATES_OFDM);
-
- bcopy(&txpwr->ofdm_40_siso[0],
- &pi->tx_user_target[TXP_FIRST_OFDM_40_SISO], WLC_NUM_RATES_OFDM);
- bcopy(&txpwr->ofdm_40_cdd[0],
- &pi->tx_user_target[TXP_FIRST_OFDM_40_CDD], WLC_NUM_RATES_OFDM);
-
- bcopy(&txpwr->mcs_20_siso[0],
- &pi->tx_user_target[TXP_FIRST_MCS_20_SISO],
- WLC_NUM_RATES_MCS_1_STREAM);
- bcopy(&txpwr->mcs_20_cdd[0], &pi->tx_user_target[TXP_FIRST_MCS_20_CDD],
- WLC_NUM_RATES_MCS_1_STREAM);
- bcopy(&txpwr->mcs_20_stbc[0],
- &pi->tx_user_target[TXP_FIRST_MCS_20_STBC],
- WLC_NUM_RATES_MCS_1_STREAM);
- bcopy(&txpwr->mcs_20_mimo[0], &pi->tx_user_target[TXP_FIRST_MCS_20_SDM],
- WLC_NUM_RATES_MCS_2_STREAM);
-
- bcopy(&txpwr->mcs_40_siso[0],
- &pi->tx_user_target[TXP_FIRST_MCS_40_SISO],
- WLC_NUM_RATES_MCS_1_STREAM);
- bcopy(&txpwr->mcs_40_cdd[0], &pi->tx_user_target[TXP_FIRST_MCS_40_CDD],
- WLC_NUM_RATES_MCS_1_STREAM);
- bcopy(&txpwr->mcs_40_stbc[0],
- &pi->tx_user_target[TXP_FIRST_MCS_40_STBC],
- WLC_NUM_RATES_MCS_1_STREAM);
- bcopy(&txpwr->mcs_40_mimo[0], &pi->tx_user_target[TXP_FIRST_MCS_40_SDM],
- WLC_NUM_RATES_MCS_2_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_CCK],
+ &txpwr->cck[0], WLC_NUM_RATES_CCK);
+
+ memcpy(&pi->tx_user_target[TXP_FIRST_OFDM],
+ &txpwr->ofdm[0], WLC_NUM_RATES_OFDM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_20_CDD],
+ &txpwr->ofdm_cdd[0], WLC_NUM_RATES_OFDM);
+
+ memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_40_SISO],
+ &txpwr->ofdm_40_siso[0], WLC_NUM_RATES_OFDM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_40_CDD],
+ &txpwr->ofdm_40_cdd[0], WLC_NUM_RATES_OFDM);
+
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_SISO],
+ &txpwr->mcs_20_siso[0], WLC_NUM_RATES_MCS_1_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_CDD],
+ &txpwr->mcs_20_cdd[0], WLC_NUM_RATES_MCS_1_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_STBC],
+ &txpwr->mcs_20_stbc[0], WLC_NUM_RATES_MCS_1_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_SDM],
+ &txpwr->mcs_20_mimo[0], WLC_NUM_RATES_MCS_2_STREAM);
+
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_SISO],
+ &txpwr->mcs_40_siso[0], WLC_NUM_RATES_MCS_1_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_CDD],
+ &txpwr->mcs_40_cdd[0], WLC_NUM_RATES_MCS_1_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_STBC],
+ &txpwr->mcs_40_stbc[0], WLC_NUM_RATES_MCS_1_STREAM);
+ memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_SDM],
+ &txpwr->mcs_40_mimo[0], WLC_NUM_RATES_MCS_2_STREAM);
if (R_REG(pi->sh->osh, &pi->regs->maccontrol) & MCTL_EN_MAC)
mac_enabled = true;
tbl_iqcal_gainparams_lcnphy[band_idx][j][2];
cal_gains.pad_gain =
tbl_iqcal_gainparams_lcnphy[band_idx][j][3];
- bcopy(&tbl_iqcal_gainparams_lcnphy[band_idx][j][3],
- ncorr_override, sizeof(ncorr_override));
+ memcpy(ncorr_override,
+ &tbl_iqcal_gainparams_lcnphy[band_idx][j][3],
+ sizeof(ncorr_override));
break;
}
}
goto fail;
}
- bcopy(&wl->pub->cur_etheraddr, perm, ETH_ALEN);
+ memcpy(perm, &wl->pub->cur_etheraddr, ETH_ALEN);
ASSERT(is_valid_ether_addr(perm));
SET_IEEE80211_PERM_ADDR(hw, perm);
hdr->len);
goto fail;
}
- bcopy(pdata, *pbuf, hdr->len);
+ memcpy(*pbuf, pdata, hdr->len);
return 0;
}
}
/* driver needs to write the ta in the template; ta is at offset 16 */
memset(template, 0, sizeof(template));
- bcopy((char *)wlc->pub->cur_etheraddr, template, ETH_ALEN);
+ memcpy(template, wlc->pub->cur_etheraddr, ETH_ALEN);
wlc_write_template_ram(wlc, (T_BA_TPL_BASE + 16), (T_RAM_ACCESS_SZ * 2),
template);
}
void wlc_bmac_hw_etheraddr(struct wlc_hw_info *wlc_hw, u8 *ea)
{
- bcopy(wlc_hw->etheraddr, ea, ETH_ALEN);
+ memcpy(ea, wlc_hw->etheraddr, ETH_ALEN);
}
int wlc_bmac_bandtype(struct wlc_hw_info *wlc_hw)
be_bit = (R_REG(osh, ®s->maccontrol) & MCTL_BIGEND) != 0;
while (len > 0) {
- bcopy((u8 *) buf, &word, sizeof(u32));
+ memcpy(&word, buf, sizeof(u32));
if (be_bit)
word = hton32(word);
* or convert to a tx_power_legacy_t struct
*/
if (!old_power) {
- bcopy(&power, pwr, sizeof(tx_power_t));
+ memcpy(pwr, &power, sizeof(tx_power_t));
} else {
int band_idx = CHSPEC_IS2G(power.chanspec) ? 0 : 1;
wlc_bmac_hw_etheraddr(wlc->hw, wlc->perm_etheraddr);
- bcopy((char *)&wlc->perm_etheraddr, (char *)&pub->cur_etheraddr,
- ETH_ALEN);
+ memcpy(&pub->cur_etheraddr, &wlc->perm_etheraddr, ETH_ALEN);
for (j = 0; j < NBANDS(wlc); j++) {
/* Use band 1 for single band 11a */
/* Set default bss rateset */
wlc->default_bss->rateset.count = rs.count;
- bcopy((char *)rs.rates, (char *)wlc->default_bss->rateset.rates,
- sizeof(wlc->default_bss->rateset.rates));
+ memcpy(wlc->default_bss->rateset.rates, rs.rates,
+ sizeof(wlc->default_bss->rateset.rates));
return ret;
}
wlc_rateset_t rs, new;
uint bandunit;
- bcopy((char *)rs_arg, (char *)&rs, sizeof(wlc_rateset_t));
+ memcpy(&rs, rs_arg, sizeof(wlc_rateset_t));
/* check for bad count value */
if ((rs.count == 0) || (rs.count > WLC_NUMRATES))
/* try the current band */
bandunit = wlc->band->bandunit;
- bcopy((char *)&rs, (char *)&new, sizeof(wlc_rateset_t));
+ memcpy(&new, &rs, sizeof(wlc_rateset_t));
if (wlc_rate_hwrs_filter_sort_validate
(&new, &wlc->bandstate[bandunit]->hw_rateset, true,
wlc->stf->txstreams))
/* try the other band */
if (IS_MBAND_UNLOCKED(wlc)) {
bandunit = OTHERBANDUNIT(wlc);
- bcopy((char *)&rs, (char *)&new, sizeof(wlc_rateset_t));
+ memcpy(&new, &rs, sizeof(wlc_rateset_t));
if (wlc_rate_hwrs_filter_sort_validate(&new,
&wlc->
bandstate[bandunit]->
good:
/* apply new rateset */
- bcopy((char *)&new, (char *)&wlc->default_bss->rateset,
- sizeof(wlc_rateset_t));
- bcopy((char *)&new, (char *)&wlc->bandstate[bandunit]->defrateset,
- sizeof(wlc_rateset_t));
+ memcpy(&wlc->default_bss->rateset, &new, sizeof(wlc_rateset_t));
+ memcpy(&wlc->bandstate[bandunit]->defrateset, &new,
+ sizeof(wlc_rateset_t));
return 0;
}
/* This will prevent the misaligned access */
if (pval && (u32) len >= sizeof(val))
- bcopy(pval, &val, sizeof(val));
+ memcpy(&val, pval, sizeof(val));
else
val = 0;
if (src_key) {
key.index = src_key->id;
key.len = src_key->len;
- bcopy(src_key->data, key.data, key.len);
+ memcpy(key.data, src_key->data, key.len);
key.algo = src_key->algo;
if (WSEC_SOFTKEY(wlc, src_key, bsscfg))
key.flags |= WL_SOFT_KEY;
if (src_key->flags & WSEC_PRIMARY_KEY)
key.flags |= WL_PRIMARY_KEY;
- bcopy(src_key->ea, key.ea,
- ETH_ALEN);
+ memcpy(key.ea, src_key->ea, ETH_ALEN);
}
- bcopy((char *)&key, arg, sizeof(key));
+ memcpy(arg, &key, sizeof(key));
} else
bcmerror = BCME_BADKEYIDX;
break;
seq[6] = 0;
seq[7] = 0;
- bcopy((char *)seq, arg, sizeof(seq));
+ memcpy(arg, seq, sizeof(seq));
} else {
bcmerror = BCME_BADKEYIDX;
}
/* Copy only legacy rateset section */
ret_rs->count = rs->count;
- bcopy(&rs->rates, &ret_rs->rates, rs->count);
+ memcpy(&ret_rs->rates, &rs->rates, rs->count);
break;
}
/* Copy only legacy rateset section */
ret_rs->count = rs.count;
- bcopy(&rs.rates, &ret_rs->rates, rs.count);
+ memcpy(&ret_rs->rates, &rs.rates, rs.count);
break;
}
/* Copy only legacy rateset section */
rs.count = in_rs->count;
- bcopy(&in_rs->rates, &rs.rates, rs.count);
+ memcpy(&rs.rates, &in_rs->rates, rs.count);
/* merge rateset coming in with the current mcsset */
if (N_ENAB(wlc->pub)) {
if (bsscfg->associated)
- bcopy(¤t_bss->rateset.mcs[0],
- rs.mcs, MCSSET_LEN);
+ memcpy(rs.mcs,
+ ¤t_bss->rateset.mcs[0],
+ MCSSET_LEN);
else
- bcopy(&wlc->default_bss->rateset.mcs[0],
- rs.mcs, MCSSET_LEN);
+ memcpy(rs.mcs,
+ &wlc->default_bss->rateset.mcs[0],
+ MCSSET_LEN);
}
bcmerror = wlc_set_rateset(wlc, &rs);
bcmerror = BCME_BUFTOOSHORT;
break;
}
- bcopy((char *)arg, (char *)&rs, sizeof(wlc_rateset_t));
+ memcpy(&rs, arg, sizeof(wlc_rateset_t));
/* check for bad count value */
if (rs.count > WLC_NUMRATES) {
}
/* apply new rateset to the override */
- bcopy((char *)&new, (char *)&wlc->sup_rates_override,
+ memcpy(&wlc->sup_rates_override, &new,
sizeof(wlc_rateset_t));
/* update bcn and probe resp if needed */
bcmerror = BCME_BUFTOOSHORT;
break;
}
- bcopy((char *)&wlc->sup_rates_override, (char *)arg,
- sizeof(wlc_rateset_t));
+ memcpy(arg, &wlc->sup_rates_override, sizeof(wlc_rateset_t));
break;
case IOVT_UINT8:
case IOVT_UINT16:
case IOVT_UINT32:
- bcopy(arg, &int_val, sizeof(int));
+ memcpy(&int_val, arg, sizeof(int));
err = wlc_iovar_rangecheck(wlc, int_val, vi);
break;
}
/* convenience int and bool vals for first 8 bytes of buffer */
if (p_len >= (int)sizeof(int_val))
- bcopy(params, &int_val, sizeof(int_val));
+ memcpy(&int_val, params, sizeof(int_val));
if (p_len >= (int)sizeof(int_val) * 2)
- bcopy((void *)((unsigned long)params + sizeof(int_val)), &int_val2,
- sizeof(int_val));
+ memcpy(&int_val2,
+ (void *)((unsigned long)params + sizeof(int_val)),
+ sizeof(int_val));
/* convenience int ptr for 4-byte gets (requires int aligned arg) */
ret_int_ptr = (s32 *) arg;
/* (3) PLCP: determine PLCP header and MAC duration, fill d11txh_t */
wlc_compute_plcp(wlc, rspec[0], phylen, plcp);
wlc_compute_plcp(wlc, rspec[1], phylen, plcp_fallback);
- bcopy(plcp_fallback, (char *)&txh->FragPLCPFallback,
- sizeof(txh->FragPLCPFallback));
+ memcpy(&txh->FragPLCPFallback,
+ plcp_fallback, sizeof(txh->FragPLCPFallback));
/* Length field now put in CCK FBR CRC field */
if (IS_CCK(rspec[1])) {
}
/* MacFrameControl */
- bcopy((char *)&h->frame_control, (char *)&txh->MacFrameControl,
- sizeof(u16));
+ memcpy(&txh->MacFrameControl, &h->frame_control, sizeof(u16));
txh->TxFesTimeNormal = htol16(0);
txh->TxFesTimeFallback = htol16(0);
/* TxFrameRA */
- bcopy((char *)&h->addr1, (char *)&txh->TxFrameRA, ETH_ALEN);
+ memcpy(&txh->TxFrameRA, &h->addr1, ETH_ALEN);
/* TxFrameID */
txh->TxFrameID = htol16(frameid);
/* fallback rate version of RTS PLCP header */
wlc_compute_plcp(wlc, rts_rspec[1], rts_phylen,
rts_plcp_fallback);
- bcopy(rts_plcp_fallback, (char *)&txh->RTSPLCPFallback,
- sizeof(txh->RTSPLCPFallback));
+ memcpy(&txh->RTSPLCPFallback, rts_plcp_fallback,
+ sizeof(txh->RTSPLCPFallback));
/* RTS frame fields... */
rts = (struct ieee80211_rts *)&txh->rts_frame;
if (use_cts) {
rts->frame_control = htol16(FC_CTS);
- bcopy((char *)&h->addr2, (char *)&rts->ra, ETH_ALEN);
+ memcpy(&rts->ra, &h->addr2, ETH_ALEN);
} else {
rts->frame_control = htol16((u16) FC_RTS);
- bcopy((char *)&h->addr1, (char *)&rts->ra,
- 2 * ETH_ALEN);
+ memcpy(&rts->ra, &h->addr1, 2 * ETH_ALEN);
}
/* mainrate
/* DUR is 0 for multicast bcn, or filled in by MAC for prb resp */
/* A1 filled in by MAC for prb resp, broadcast for bcn */
if (type == FC_BEACON)
- bcopy((const char *)ðer_bcast, (char *)&h->da,
- ETH_ALEN);
- bcopy((char *)&cfg->cur_etheraddr, (char *)&h->sa, ETH_ALEN);
- bcopy((char *)&cfg->BSSID, (char *)&h->bssid, ETH_ALEN);
+ memcpy(&h->da, ðer_bcast, ETH_ALEN);
+ memcpy(&h->sa, &cfg->cur_etheraddr, ETH_ALEN);
+ memcpy(&h->bssid, &cfg->BSSID, ETH_ALEN);
/* SEQ filled in by MAC */
/* padding the ssid with zero and copy it into shm */
memset(ssidbuf, 0, IEEE80211_MAX_SSID_LEN);
- bcopy(ssidptr, ssidbuf, cfg->SSID_len);
+ memcpy(ssidbuf, ssidptr, cfg->SSID_len);
wlc_copyto_shm(wlc, base, ssidbuf, IEEE80211_MAX_SSID_LEN);
/* copy rateset src to dst as-is (no masking or sorting) */
void wlc_rateset_copy(const wlc_rateset_t *src, wlc_rateset_t *dst)
{
- bcopy(src, dst, sizeof(wlc_rateset_t));
+ memcpy(dst, src, sizeof(wlc_rateset_t));
}
/*
dst->htphy_membership = src->htphy_membership;
if (mcsallow && rates != WLC_RATES_CCK)
- bcopy(&src->mcs[0], &dst->mcs[0], MCSSET_LEN);
+ memcpy(&dst->mcs[0], &src->mcs[0], MCSSET_LEN);
else
wlc_rateset_mcs_clear(dst);
}
void wlc_rateset_mcs_build(wlc_rateset_t *rateset, u8 txstreams)
{
- bcopy(&cck_ofdm_mimo_rates.mcs[0], &rateset->mcs[0], MCSSET_LEN);
+ memcpy(&rateset->mcs[0], &cck_ofdm_mimo_rates.mcs[0], MCSSET_LEN);
wlc_rateset_mcs_upd(rateset, txstreams);
}
wlc->stf->rxstreams = (u8) WLC_BITSCNT(wlc->stf->hw_rxchain);
/* initialize the txcore table */
- bcopy(txcore_default, wlc->stf->txcore, sizeof(wlc->stf->txcore));
+ memcpy(wlc->stf->txcore, txcore_default, sizeof(wlc->stf->txcore));
/* default spatial_policy */
wlc->stf->spatial_policy = MIN_SPATIAL_EXPANSION;
#include <linux/kernel.h> /* for vsn/printf's */
#include <linux/string.h> /* for mem*, str* */
#endif
-/* bcopy's: Linux kernel doesn't provide these (anymore) */
-#define bcopy(src, dst, len) memcpy((dst), (src), (len))
/* register access macros */
#ifndef IL_BIGENDIAN
} while (0)
#endif /* IL_BIGENDIAN */
-#define bcopy(src, dst, len) memcpy((dst), (src), (len))
-
/* packet primitives */
extern struct sk_buff *pkt_buf_get_skb(struct osl_info *osh, uint len);
extern void pkt_buf_free_skb(struct osl_info *osh, struct sk_buff *skb, bool send);
if (offset + dsz >= *len) {
goto out;
}
- bcopy((char *)&rawotp[i + 2], &data[offset], dsz);
+ memcpy(&data[offset], &rawotp[i + 2], dsz);
offset += dsz;
/* Remove extra null characters at the end */
while (offset > 1 &&
u8 srev = cis[i + 1 + 70];
ASSERT(srev == 3);
/* make tuple value 16-bit aligned and parse it */
- bcopy(&cis[i + 1], srom,
- sizeof(srom));
+ memcpy(srom, &cis[i + 1],
+ sizeof(srom));
_initvars_srom_pci(srev, srom,
SROM3_SWRGN_OFF,
&b);
err = otp_read_region(sih, OTP_HW_RGN, (u16 *) otp, &sz);
- bcopy(otp, buf, bufsz);
+ memcpy(buf, otp, bufsz);
if (otp)
kfree(otp);
ASSERT(vp != NULL);
if (!vp)
return BCME_NOMEM;
- bcopy(start, vp, c);
+ memcpy(vp, start, c);
*vars = vp;
*count = c;
} else {
/* copy the data */
for (; p && len; p = p->next) {
n = min((uint) (p->len) - offset, (uint) len);
- bcopy(buf, p->data + offset, n);
+ memcpy(p->data + offset, buf, n);
buf += n;
len -= n;
ret += n;
/* Move the map */
if (DMASGLIST_ENAB) {
- bcopy(&di->txp_dmah[old], &di->txp_dmah[new],
- sizeof(hnddma_seg_map_t));
+ memcpy(&di->txp_dmah[new], &di->txp_dmah[old],
+ sizeof(hnddma_seg_map_t));
memset(&di->txp_dmah[old], 0, sizeof(hnddma_seg_map_t));
}
new->next = vars;
vars = new;
- bcopy((char *)(&nvh[1]), new->vars, nvs);
+ memcpy(new->vars, &nvh[1], nvs);
NVR_MSG(("%s: flash nvram @ %p, copied %d bytes to %p\n", __func__,
nvh, nvs, new->vars));
len = strlen(from) + 1;
if (resid < (acc + len))
return BCME_BUFTOOSHORT;
- bcopy(from, to, len);
+ memcpy(to, from, len);
acc += len;
from += len;
to += len;
uint idx;
struct si_pub *si_local = NULL;
- bcopy(&sih, &si_local, sizeof(si_t **));
+ memcpy(&si_local, &sih, sizeof(si_t **));
sii = SI_INFO(sih);