Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228246
b: refs/heads/master
c: 9249ede
h: refs/heads/master
v: v3
  • Loading branch information
Brett Rudley authored and Greg Kroah-Hartman committed Dec 1, 2010
1 parent 1c1e40c commit c9748bf
Show file tree
Hide file tree
Showing 20 changed files with 83 additions and 81 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c10407ac459577f6b58f3db0777b6d0d53a3be9f
refs/heads/master: 9249ede9d4d9dbf41ab6545a7a43fd5f6e5aa620
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length)
sd_trace(("%s: Func = %d\n", __func__, func));

if (!sd->func_cis_ptr[func]) {
bzero(cis, length);
memset(cis, 0, length);
sd_err(("%s: no func_cis_ptr[%d]\n", __func__, func));
return SDIOH_API_RC_FAIL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ int sdio_function_init(void)
if (!gInstance)
return -ENOMEM;

bzero(&sdmmc_dev, sizeof(sdmmc_dev));
memset(&sdmmc_dev, 0, sizeof(sdmmc_dev));
error = sdio_register_driver(&bcmsdh_sdmmc_driver);

return error;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
frame = (u8 *) (pkt->data);

ASSERT((pad + SDPCM_HDRLEN) <= (int)(pkt->len));
bzero(frame, pad + SDPCM_HDRLEN);
memset(frame, 0, pad + SDPCM_HDRLEN);
}
}
ASSERT(pad < DHD_SDALIGN);
Expand Down Expand Up @@ -1252,7 +1252,7 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
frame -= doff;
len += doff;
msglen += doff;
bzero(frame, doff + SDPCM_HDRLEN);
memset(frame, 0, doff + SDPCM_HDRLEN);
}
ASSERT(doff < DHD_SDALIGN);
}
Expand Down Expand Up @@ -2536,7 +2536,7 @@ static int dhdsdio_write_vars(dhd_bus_t *bus)
if (!vbuffer)
return BCME_NOMEM;

bzero(vbuffer, varsize);
memset(vbuffer, 0, varsize);
bcopy(bus->vars, vbuffer, bus->varsz);

/* Write the vars list */
Expand Down Expand Up @@ -5285,7 +5285,7 @@ dhdsdio_probe_attach(struct dhd_bus *bus, struct osl_info *osh, void *sdh,
"failed\n", fn));
break;
}
bzero(cis[fn], SBSDIO_CIS_SIZE_LIMIT);
memset(cis[fn], 0, SBSDIO_CIS_SIZE_LIMIT);

err = bcmsdh_cis_read(sdh, fn, cis[fn],
SBSDIO_CIS_SIZE_LIMIT);
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/staging/brcm80211/brcmfmac/wl_iw.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ wl_iw_config_commit(struct net_device *dev,
if (!ssid.SSID_len)
return 0;

bzero(&bssid, sizeof(struct sockaddr));
memset(&bssid, 0, sizeof(struct sockaddr));
error = dev_wlc_ioctl(dev, WLC_REASSOC, &bssid, ETHER_ADDR_LEN);
if (error) {
WL_ERROR(("%s: WLC_REASSOC to %s failed \n", __func__,
WL_ERROR(("%s: WLC_REASSOC to %s failed\n", __func__,
ssid.SSID));
return error;
}
Expand Down Expand Up @@ -775,7 +775,7 @@ wl_iw_set_wap(struct net_device *dev,

if (ETHER_ISBCAST(awrq->sa_data) || ETHER_ISNULLADDR(awrq->sa_data)) {
scb_val_t scbval;
bzero(&scbval, sizeof(scb_val_t));
memset(&scbval, 0, sizeof(scb_val_t));
(void)dev_wlc_ioctl(dev, WLC_DISASSOC, &scbval,
sizeof(scb_val_t));
return 0;
Expand Down Expand Up @@ -2412,7 +2412,7 @@ wl_iw_get_encode(struct net_device *dev,

WL_TRACE(("%s: SIOCGIWENCODE\n", dev->name));

bzero(&key, sizeof(wl_wsec_key_t));
memset(&key, 0, sizeof(wl_wsec_key_t));

if ((dwrq->flags & IW_ENCODE_INDEX) == 0) {
for (key.index = 0; key.index < DOT11_MAX_DEFAULT_KEYS;
Expand Down Expand Up @@ -2647,7 +2647,7 @@ wl_iw_set_pmksa(struct net_device *dev,

if (iwpmksa->cmd == IW_PMKSA_FLUSH) {
WL_WSEC(("wl_iw_set_pmksa - IW_PMKSA_FLUSH\n"));
bzero((char *)&pmkid_list, sizeof(pmkid_list));
memset((char *)&pmkid_list, 0, sizeof(pmkid_list));
}

else if (iwpmksa->cmd == IW_PMKSA_REMOVE) {
Expand Down Expand Up @@ -2676,7 +2676,7 @@ wl_iw_set_pmksa(struct net_device *dev,

if ((pmkid_list.pmkids.npmkid > 0)
&& (i < pmkid_list.pmkids.npmkid)) {
bzero(&pmkid_list.pmkids.pmkid[i], sizeof(pmkid_t));
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,
Expand Down Expand Up @@ -3409,16 +3409,16 @@ void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void *data)
case WLC_E_DEAUTH_IND:
case WLC_E_DISASSOC_IND:
cmd = SIOCGIWAP;
bzero(wrqu.addr.sa_data, ETHER_ADDR_LEN);
memset(wrqu.addr.sa_data, 0, ETHER_ADDR_LEN);
wrqu.addr.sa_family = ARPHRD_ETHER;
bzero(&extra, ETHER_ADDR_LEN);
memset(&extra, 0, ETHER_ADDR_LEN);
break;
case WLC_E_LINK:
case WLC_E_NDIS_LINK:
cmd = SIOCGIWAP;
if (!(flags & WLC_EVENT_MSG_LINK)) {
bzero(wrqu.addr.sa_data, ETHER_ADDR_LEN);
bzero(&extra, ETHER_ADDR_LEN);
memset(wrqu.addr.sa_data, 0, ETHER_ADDR_LEN);
memset(&extra, 0, ETHER_ADDR_LEN);
WAKE_LOCK_TIMEOUT(iw->pub, WAKE_LOCK_LINK_DOWN_TMOUT,
20 * HZ);
} else {
Expand Down Expand Up @@ -3488,7 +3488,7 @@ void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void *data)
wrqu.data.length = sizeof(struct iw_pmkid_cand);
pmkidcand = pmkcandlist->pmkid_cand;
while (count) {
bzero(iwpmkidcand,
memset(iwpmkidcand, 0,
sizeof(struct iw_pmkid_cand));
if (pmkidcand->preauth)
iwpmkidcand->flags |=
Expand Down Expand Up @@ -3586,7 +3586,7 @@ wl_iw_get_wireless_stats(struct net_device *dev, struct iw_statistics *wstats)
phy_noise = dtoh32(phy_noise);
WL_TRACE(("wl_iw_get_wireless_stats phy noise=%d\n", phy_noise));

bzero(&scb_val, sizeof(scb_val_t));
memset(&scb_val, 0, sizeof(scb_val_t));
res = dev_wlc_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t));
if (res)
goto done;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/staging/brcm80211/include/linux_osl.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size,
/* bcopy's: Linux kernel doesn't provide these (anymore) */
#define bcopy(src, dst, len) memcpy((dst), (src), (len))
#define bcmp(b1, b2, len) memcmp((b1), (b2), (len))
#define bzero(b, len) memset((b), '\0', (len))

/* register access macros */
#if defined(OSLREGOPS)
Expand Down Expand Up @@ -201,10 +200,8 @@ extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size,
#define AND_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) & (v))
#define OR_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) | (v))

/* bcopy, bcmp, and bzero functions */
#define bcopy(src, dst, len) memcpy((dst), (src), (len))
#define bcmp(b1, b2, len) memcmp((b1), (b2), (len))
#define bzero(b, len) memset((b), '\0', (len))

/* uncached/cached virtual address */
#ifdef __mips__
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/staging/brcm80211/phy/wlc_phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ wlc_phy_chanspec_band_validch(wlc_phy_t *ppi, uint band, chanvec_t *channels)

ASSERT((band == WLC_BAND_2G) || (band == WLC_BAND_5G));

bzero(channels, sizeof(chanvec_t));
memset(channels, 0, sizeof(chanvec_t));

for (i = 0; i < ARRAY_SIZE(chan_info_all); i++) {
channel = chan_info_all[i].chan;
Expand Down Expand Up @@ -1900,7 +1900,7 @@ void wlc_phy_txpower_recalc_target(phy_info_t *pi)
tx_pwr_min = min(tx_pwr_min, tx_pwr_target[rate]);
}

bzero(pi->tx_power_offset, sizeof(pi->tx_power_offset));
memset(pi->tx_power_offset, 0, sizeof(pi->tx_power_offset));
pi->tx_power_max = tx_pwr_max;
pi->tx_power_min = tx_pwr_min;
pi->tx_power_max_rate_ind = tx_pwr_max_rate_ind;
Expand Down Expand Up @@ -2511,7 +2511,7 @@ wlc_phy_noise_calc_phy(phy_info_t *pi, u32 *cmplx_pwr, s8 *pwr_ant)
s8 cmplx_pwr_dbm[PHY_CORE_MAX];
u8 i;

bzero((u8 *) cmplx_pwr_dbm, sizeof(cmplx_pwr_dbm));
memset((u8 *) cmplx_pwr_dbm, 0, sizeof(cmplx_pwr_dbm));
ASSERT(pi->pubpi.phy_corenum <= PHY_CORE_MAX);
wlc_phy_compute_dB(cmplx_pwr, cmplx_pwr_dbm, pi->pubpi.phy_corenum);

Expand Down Expand Up @@ -2625,9 +2625,9 @@ wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, u8 ch)
u8 wait_crs = 0;
u8 i;

bzero((u8 *) est, sizeof(est));
bzero((u8 *) cmplx_pwr, sizeof(cmplx_pwr));
bzero((u8 *) noise_dbm_ant, sizeof(noise_dbm_ant));
memset((u8 *) est, 0, sizeof(est));
memset((u8 *) cmplx_pwr, 0, sizeof(cmplx_pwr));
memset((u8 *) noise_dbm_ant, 0, sizeof(noise_dbm_ant));

log_num_samps = PHY_NOISE_SAMPLE_LOG_NUM_NPHY;
num_samps = 1 << log_num_samps;
Expand Down Expand Up @@ -2708,8 +2708,8 @@ static s8 wlc_phy_noise_read_shmem(phy_info_t *pi)
u8 idx, core;

ASSERT(pi->pubpi.phy_corenum <= PHY_CORE_MAX);
bzero((u8 *) cmplx_pwr, sizeof(cmplx_pwr));
bzero((u8 *) noise_dbm_ant, sizeof(noise_dbm_ant));
memset((u8 *) cmplx_pwr, 0, sizeof(cmplx_pwr));
memset((u8 *) noise_dbm_ant, 0, sizeof(noise_dbm_ant));

for (idx = 0, core = 0; core < pi->pubpi.phy_corenum; idx += 2, core++) {
lo = wlapi_bmac_read_shm(pi->sh->physhim, M_PWRIND_MAP(idx));
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/brcm80211/phy/wlc_phy_lcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ static void wlc_lcnphy_clear_tx_power_offsets(phy_info_t *pi)
u32 data_buf[64];
phytbl_info_t tab;

bzero(data_buf, sizeof(data_buf));
memset(data_buf, 0, sizeof(data_buf));

tab.tbl_id = LCNPHY_TBL_ID_TXPWRCTL;
tab.tbl_width = 32;
Expand Down Expand Up @@ -1955,7 +1955,7 @@ wlc_lcnphy_tx_iqlo_cal(phy_info_t *pi,
band_idx = (CHSPEC_IS5G(pi->radio_chanspec) ? 1 : 0);

cal_gains = *target_gains;
bzero(ncorr_override, sizeof(ncorr_override));
memset(ncorr_override, 0, sizeof(ncorr_override));
for (j = 0; j < iqcal_gainparams_numgains_lcnphy[band_idx]; j++) {
if (hash == tbl_iqcal_gainparams_lcnphy[band_idx][j][0]) {
cal_gains.gm_gain =
Expand Down Expand Up @@ -2533,7 +2533,7 @@ static void wlc_lcnphy_clear_papd_comptable(phy_info_t *pi)
tab.tbl_width = 32;
tab.tbl_offset = 0;

bzero(temp_offset, sizeof(temp_offset));
memset(temp_offset, 0, sizeof(temp_offset));
for (j = 1; j < 128; j += 2)
temp_offset[j] = 0x80000;

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/sys/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ wl_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,

/* Init the scb */
scb = (struct scb *)sta->drv_priv;
bzero(scb, sizeof(struct scb));
memset(scb, 0, sizeof(struct scb));
for (i = 0; i < NUMPRIO; i++)
scb->seqctl[i] = 0xFFFF;
scb->seqctl_nonqos = 0xFFFF;
Expand Down Expand Up @@ -1073,7 +1073,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

pci_set_drvdata(pdev, hw);

bzero(hw->priv, sizeof(*wl));
memset(hw->priv, 0, sizeof(*wl));

wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0),
PCI_BUS, pdev, pdev->irq);
Expand Down Expand Up @@ -1555,7 +1555,7 @@ wl_timer_t *wl_init_timer(wl_info_t *wl, void (*fn) (void *arg), void *arg,
return 0;
}

bzero(t, sizeof(wl_timer_t));
memset(t, 0, sizeof(wl_timer_t));

init_timer(&t->timer);
t->timer.data = (unsigned long) t;
Expand Down Expand Up @@ -1747,7 +1747,7 @@ static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev)
char fw_name[100];
int i;

bzero((void *)&wl->fw, sizeof(struct wl_firmware));
memset((void *)&wl->fw, 0, sizeof(struct wl_firmware));
for (i = 0; i < WL_MAX_FW; i++) {
if (wl_firmwares[i] == NULL)
break;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/brcm80211/sys/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,

#ifdef BCMDBG
u8 hole[AMPDU_MAX_MPDU];
bzero(hole, sizeof(hole));
memset(hole, 0, sizeof(hole));
#endif

ASSERT(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
Expand All @@ -993,7 +993,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,

ASSERT(ini->scb == scb);

bzero(bitmap, sizeof(bitmap));
memset(bitmap, 0, sizeof(bitmap));
queue = txs->frameid & TXFID_QUEUE_MASK;
ASSERT(queue < AC_COUNT);

Expand Down Expand Up @@ -1318,7 +1318,7 @@ void wlc_ampdu_macaddr_upd(wlc_info_t *wlc)
char template[T_RAM_ACCESS_SZ * 2];

/* driver needs to write the ta in the template; ta is at offset 16 */
bzero(template, sizeof(template));
memset(template, 0, sizeof(template));
bcopy((char *)wlc->pub->cur_etheraddr.octet, template, ETHER_ADDR_LEN);
wlc_write_template_ram(wlc, (T_BA_TPL_BASE + 16), (T_RAM_ACCESS_SZ * 2),
template);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/sys/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ wlc_mhfdef(wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init)
{
wlc_hw_info_t *wlc_hw = wlc->hw;

bzero(mhfs, sizeof(u16) * MHFMAX);
memset(mhfs, 0, MHFMAX * sizeof(u16));

mhfs[MHF2] |= mhf2_init;

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/sys/wlc_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void wlc_locale_get_channels(const locale_info_t *locale, chanvec_t *channels)
{
u8 i;

bzero(channels, sizeof(chanvec_t));
memset(channels, 0, sizeof(chanvec_t));

for (i = 0; i < ARRAY_SIZE(g_table_locale_base); i++) {
if (locale->valid_channels & (1 << i)) {
Expand Down Expand Up @@ -634,7 +634,7 @@ wlc_cm_info_t *wlc_channel_mgr_attach(wlc_info_t *wlc)
}

/* internal country information which must match regulatory constraints in firmware */
bzero(country_abbrev, WLC_CNTRY_BUF_SZ);
memset(country_abbrev, 0, WLC_CNTRY_BUF_SZ);
strncpy(country_abbrev, "X2", sizeof(country_abbrev) - 1);
country = wlc_country_lookup(wlc, country_abbrev);

Expand Down Expand Up @@ -763,7 +763,7 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm,
/* save current country state */
wlc_cm->country = country;

bzero(&prev_country_abbrev, WLC_CNTRY_BUF_SZ);
memset(&prev_country_abbrev, 0, WLC_CNTRY_BUF_SZ);
strncpy(prev_country_abbrev, wlc_cm->country_abbrev,
WLC_CNTRY_BUF_SZ - 1);

Expand Down Expand Up @@ -1008,7 +1008,7 @@ void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm)
wlcband_t *band;
const chanvec_t *chanvec;

bzero(&wlc_cm->quiet_channels, sizeof(chanvec_t));
memset(&wlc_cm->quiet_channels, 0, sizeof(chanvec_t));

band = wlc->band;
for (i = 0; i < NBANDS(wlc);
Expand Down Expand Up @@ -1319,7 +1319,7 @@ wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
int maxpwr_idx;
uint j;

bzero(txpwr, sizeof(txpwr_limits_t));
memset(txpwr, 0, sizeof(txpwr_limits_t));

if (!wlc_valid_chanspec_db(wlc_cm, chanspec)) {
country = wlc_country_lookup(wlc, wlc->autocountry_default);
Expand Down
Loading

0 comments on commit c9748bf

Please sign in to comment.