sdioh_detach(osh, bcmsdh->sdioh);
bcmsdh->sdioh = NULL;
}
- MFREE(osh, bcmsdh, sizeof(bcmsdh_info_t));
+ kfree(bcmsdh);
}
l_bcmsdh = NULL;
if ((((tmp_ptr - tmp_buf) + 1) & 0xf) == 0)
ptr += sprintf((char *)ptr, "\n");
}
- MFREE(bcmsdh->osh, tmp_buf, length);
+ kfree(tmp_buf);
}
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
if (sdhc) {
if (sdhc->sdh)
bcmsdh_detach(sdhc->osh, sdhc->sdh);
- MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
+ kfree(sdhc);
}
if (osh)
osl_detach(osh);
/* release SDIO Host Controller info */
osh = sdhc->osh;
- MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
+ kfree(sdhc);
osl_detach(osh);
#if !defined(BCMLXSDMMC)
if (sdhc->sdh)
bcmsdh_detach(sdhc->osh, sdhc->sdh);
if (sdhc)
- MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
+ kfree(sdhc);
if (osh)
osl_detach(osh);
return -ENODEV;
/* release SDIO Host Controller info */
osh = sdhc->osh;
- MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
+ kfree(sdhc);
osl_detach(osh);
}
#endif /* BCMLXSDMMC */
sd->osh = osh;
if (sdioh_sdmmc_osinit(sd) != 0) {
sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
- MFREE(sd->osh, sd, sizeof(sdioh_info_t));
+ kfree(sd);
return NULL;
}
/* deregister irq */
sdioh_sdmmc_osfree(sd);
- MFREE(sd->osh, sd, sizeof(sdioh_info_t));
+ kfree(sd);
}
return SDIOH_API_RC_SUCCESS;
}
ASSERT(sd && sd->sdos_info);
sdos = (struct sdos_info *)sd->sdos_info;
- MFREE(sd->osh, sdos, sizeof(struct sdos_info));
+ kfree(sdos);
}
/* Interrupt enable/disable */
fail:
if (cdc != NULL)
- MFREE(dhd->osh, cdc, sizeof(dhd_prot_t));
+ kfree(cdc);
return BCME_NOMEM;
}
/* ~NOTE~ What if another thread is waiting on the semaphore? Holding it? */
void dhd_prot_detach(dhd_pub_t *dhd)
{
- MFREE(dhd->osh, dhd->prot, sizeof(dhd_prot_t));
+ kfree(dhd->prot);
dhd->prot = NULL;
}
fail:
if (arg_org)
- MFREE(dhd->osh, arg_org, strlen(arg) + 1);
+ kfree(arg_org);
}
void dhd_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)
fail:
if (arg_org)
- MFREE(dhd->osh, arg_org, strlen(arg) + 1);
+ kfree(arg_org);
if (buf)
- MFREE(dhd->osh, buf, BUF_SIZE);
+ kfree(buf);
}
void dhd_arp_offload_set(dhd_pub_t *dhd, int arp_mode)
iscanbuf_free = iscanbuf_cur;
iscanbuf_cur = iscanbuf_cur->next;
iscanbuf_free->next = 0;
- MFREE(dhd->osh, iscanbuf_free, sizeof(iscan_buf_t));
+ kfree(iscanbuf_free);
}
iscan_chain = 0;
} else {
iscanbuf_prv->next = iscan_delete->next;
iscan_delete->next = 0;
- MFREE(dhd->osh, iscan_delete, sizeof(iscan_buf_t));
+ kfree(iscan_delete);
if (!iscanbuf_prv)
iscan_chain = 0;
allmulti = cnt ? true : allmulti;
}
- MFREE(dhd->pub.osh, buf, buflen);
+ kfree(buf);
/* Now send the allmulti setting. This is based on the setting in the
* net_device flags, but might be modified above to be turned on if we
DHD_ERROR(("%s: mkiovar failed for allmulti, datalen %d "
"buflen %u\n", dhd_ifname(&dhd->pub, ifidx),
(int)sizeof(allmulti), buflen));
- MFREE(dhd->pub.osh, buf, buflen);
+ kfree(buf);
return;
}
dhd_ifname(&dhd->pub, ifidx), ltoh32(allmulti)));
}
- MFREE(dhd->pub.osh, buf, buflen);
+ kfree(buf);
/* Finally, pick up the PROMISC flag as well, like the NIC
driver does */
free_netdev(ifp->net);
dhd->iflist[ifp->idx] = NULL;
- MFREE(dhd->pub.osh, ifp, sizeof(*ifp));
+ kfree(ifp);
#ifdef SOFTAP
if (ifp->net == ap_net_dev)
ap_net_dev = NULL; /* NULL SOFTAP global
}
if (buf)
- MFREE(dhd->pub.osh, buf, buflen);
+ kfree(buf);
return OSL_ERROR(bcmerror);
}
WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_LINK_DOWN_TMOUT);
WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_PNO_FIND_TMOUT);
free_netdev(ifp->net);
- MFREE(dhd->pub.osh, ifp, sizeof(*ifp));
- MFREE(dhd->pub.osh, dhd, sizeof(*dhd));
+ kfree(ifp);
+ kfree(dhd);
}
}
}
exit:
/* free buf before return */
- MFREE(dhd->osh, buf, size);
+ kfree(buf);
/* close file before return */
if (fp)
filp_close(fp, current->files);
done:
if (mbuffer)
- MFREE(bus->dhd->osh, mbuffer, msize);
+ kfree(mbuffer);
if (str)
- MFREE(bus->dhd->osh, str, maxstrlen);
+ kfree(str);
return bcmerror;
}
if (ret) {
printf("%s: Error membytes %d\n", __func__, ret);
if (buf)
- MFREE(bus->dhd->osh, buf, size);
+ kfree(buf);
return -1;
}
printf(".");
/* Free the old ones and replace with passed variables */
if (bus->vars)
- MFREE(bus->dhd->osh, bus->vars, bus->varsz);
+ kfree(bus->vars);
bus->vars = kmalloc(len, GFP_ATOMIC);
bus->varsz = bus->vars ? len : 0;
DHD_ERROR(("%s: Download/Upload/Compare of NVRAM ok.\n",
__func__));
- MFREE(bus->dhd->osh, nvram_ularray, varsize);
+ kfree(nvram_ularray);
#endif /* DHD_DEBUG */
- MFREE(bus->dhd->osh, vbuffer, varsize);
+ kfree(vbuffer);
}
/* adjust to the user specified RAM */
if (err) {
DHD_INFO(("dhdsdio_probe: fn %d cis read "
"err %d\n", fn, err));
- MFREE(osh, cis[fn], SBSDIO_CIS_SIZE_LIMIT);
+ kfree(cis[fn]);
break;
}
dhd_dump_cis(fn, cis[fn]);
while (fn-- > 0) {
ASSERT(cis[fn]);
- MFREE(osh, cis[fn], SBSDIO_CIS_SIZE_LIMIT);
+ kfree(cis[fn]);
}
if (err) {
__func__, MAX_DATA_BUF));
/* release rxbuf which was already located as above */
if (!bus->rxblen)
- MFREE(osh, bus->rxbuf, bus->rxblen);
+ kfree(bus->rxbuf);
goto fail;
}
dhdsdio_release_malloc(bus, osh);
- MFREE(osh, bus, sizeof(dhd_bus_t));
+ kfree(bus);
}
if (osh)
return;
if (bus->rxbuf) {
- MFREE(osh, bus->rxbuf, bus->rxblen);
+ kfree(bus->rxbuf);
bus->rxctl = bus->rxbuf = NULL;
bus->rxlen = 0;
}
if (bus->databuf) {
- MFREE(osh, bus->databuf, MAX_DATA_BUF);
+ kfree(bus->databuf);
bus->databuf = NULL;
}
}
dhdsdio_clkctl(bus, CLK_NONE, false);
si_detach(bus->sih);
if (bus->vars && bus->varsz)
- MFREE(osh, bus->vars, bus->varsz);
+ kfree(bus->vars);
bus->vars = NULL;
}
DHD_ERROR(("%s: Download/Upload/Compare succeeded.\n",
__func__));
- MFREE(bus->dhd->osh, ularray, bus->ramsize);
+ kfree(ularray);
}
#endif /* DHD_DEBUG */
err:
if (memblock)
- MFREE(bus->dhd->osh, memblock, MEMBLOCK + DHD_SDALIGN);
+ kfree(memblock);
if (image)
dhd_os_close_image(image);
err:
if (memblock)
- MFREE(bus->dhd->osh, memblock, MEMBLOCK);
+ kfree(memblock);
if (image)
dhd_os_close_image(image);
#define BUS_SWAP32(v) (v)
-#define MFREE(osh, addr, size) osl_mfree((osh), (addr), (size))
-extern void osl_mfree(osl_t *osh, void *addr, uint size);
-
#define DMA_CONSISTENT_ALIGN osl_dma_consistent_align()
extern uint osl_dma_consistent_align(void);
extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align,
if (phy_sh->phy_head) {
ASSERT(!phy_sh->phy_head);
}
- MFREE(osh, phy_sh, sizeof(shared_phy_t));
+ kfree(phy_sh);
}
}
err:
if (pi)
- MFREE(sh->osh, pi, sizeof(phy_info_t));
+ kfree(pi);
return NULL;
}
if (pi->pi_fptr.detach)
(pi->pi_fptr.detach) (pi);
- MFREE(pi->sh->osh, pi, sizeof(phy_info_t));
+ kfree(pi);
}
}
cleanup:
wlc_lcnphy_tx_iqlo_loopback_cleanup(pi, values_to_save);
- MFREE(pi->sh->osh, values_to_save, 20 * sizeof(u16));
+ kfree(values_to_save);
if (!keep_tone)
wlc_lcnphy_stop_tx_tone(pi);
}
cal_done:
- MFREE(pi->sh->osh, ptr, 131 * sizeof(s16));
+ kfree(ptr);
return result;
}
write_phy_reg(pi, 0x4d8, phy_c30);
write_radio_reg(pi, RADIO_2064_REG026, phy_c31);
- MFREE(pi->sh->osh, phy_c32, 20 * sizeof(u16));
- MFREE(pi->sh->osh, ptr, 131 * sizeof(s16));
+ kfree(phy_c32);
+ kfree(ptr);
}
static void
void wlc_phy_detach_lcnphy(phy_info_t *pi)
{
- MFREE(pi->sh->osh, pi->u.pi_lcnphy, sizeof(phy_info_lcnphy_t));
+ kfree(pi->u.pi_lcnphy);
}
bool wlc_phy_attach_lcnphy(phy_info_t *pi)
wlc_phy_loadsampletable_nphy(pi, tone_buf, num_samps);
if (tone_buf != NULL)
- MFREE(pi->sh->osh, tone_buf, sizeof(cs32) * tbl_len);
+ kfree(tone_buf);
return num_samps;
}
data_buf);
if (data_buf != NULL)
- MFREE(pi->sh->osh, data_buf, sizeof(u32) * num_samps);
+ kfree(data_buf);
if (pi->phyhang_avoid)
wlc_phy_stay_in_carriersearch_nphy(pi, false);
PHY_CORE_0) ? NPHY_TBL_ID_EPSILONTBL0 :
NPHY_TBL_ID_EPSILONTBL1, sz, start, 32, dst);
- MFREE(pi->sh->osh, buf, 2 * sizeof(u32) * NPHY_PAPD_EPS_TBL_SIZE);
+ kfree(buf);
}
static void
next = t->next;
#ifdef BCMDBG
if (t->name)
- MFREE(wl->osh, t->name, strlen(t->name) + 1);
+ kfree(t->name);
#endif
- MFREE(wl->osh, t, sizeof(wl_timer_t));
+ kfree(t);
}
osh = wl->osh;
if (!schedule_work(&task->work)) {
WL_ERROR(("wl%d: schedule_work() failed\n", wl->pub->unit));
- MFREE(wl->osh, task, sizeof(wl_task_t));
+ kfree(task);
return -ENOMEM;
}
wl->timers = wl->timers->next;
#ifdef BCMDBG
if (t->name)
- MFREE(wl->osh, t->name, strlen(t->name) + 1);
+ kfree(t->name);
#endif
- MFREE(wl->osh, t, sizeof(wl_timer_t));
+ kfree(t);
return;
}
tmp->next = t->next;
#ifdef BCMDBG
if (t->name)
- MFREE(wl->osh, t->name, strlen(t->name) + 1);
+ kfree(t->name);
#endif
- MFREE(wl->osh, t, sizeof(wl_timer_t));
+ kfree(t);
return;
}
tmp = tmp->next;
RPCQ_UNLOCK(wl, flags);
- MFREE(wl->osh, task, sizeof(wl_task_t));
+ kfree(task);
atomic_dec(&wl->callbacks);
}
wl_timer_t *t = (wl_timer_t *) task->context;
_wl_timer(t);
- MFREE(t->wl->osh, task, sizeof(wl_task_t));
+ kfree(task);
/* This dec is for the task_schedule. The timer related
* callback is decremented in _wl_timer
return;
if (pub->multicast)
- MFREE(osh, pub->multicast,
- (sizeof(struct ether_addr) * MAXMULTILIST));
-
+ kfree(pub->multicast);
if (pub->tunables) {
- MFREE(osh, pub->tunables, sizeof(wlc_tunables_t));
+ kfree(pub->tunables);
pub->tunables = NULL;
}
- MFREE(osh, pub, sizeof(wlc_pub_t));
+ kfree(pub);
}
wlc_bsscfg_t *wlc_bsscfg_malloc(osl_t *osh, uint unit)
return;
if (cfg->maclist) {
- MFREE(osh, cfg->maclist,
- (int)(offsetof(struct maclist, ea) +
- cfg->nmac * ETHER_ADDR_LEN));
+ kfree(cfg->maclist);
cfg->maclist = NULL;
}
if (cfg->current_bss != NULL) {
wlc_bss_info_t *current_bss = cfg->current_bss;
if (current_bss->bcn_prb != NULL)
- MFREE(osh, current_bss->bcn_prb,
- current_bss->bcn_prb_len);
- MFREE(osh, current_bss, sizeof(wlc_bss_info_t));
+ kfree(current_bss->bcn_prb);
+ kfree(current_bss);
cfg->current_bss = NULL;
}
- MFREE(osh, cfg, sizeof(wlc_bsscfg_t));
+ kfree(cfg);
}
void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg)
return;
if (wlc->modulecb) {
- MFREE(osh, wlc->modulecb, sizeof(modulecb_t) * WLC_MAXMODULES);
+ kfree(wlc->modulecb);
wlc->modulecb = NULL;
}
if (wlc->default_bss) {
- MFREE(osh, wlc->default_bss, sizeof(wlc_bss_info_t));
+ kfree(wlc->default_bss);
wlc->default_bss = NULL;
}
if (wlc->cfg) {
}
if (wlc->pkt_callback && wlc->pub && wlc->pub->tunables) {
- MFREE(osh,
- wlc->pkt_callback,
- sizeof(pkt_cb_t) * (wlc->pub->tunables->maxpktcb + 1));
+ kfree(wlc->pkt_callback);
wlc->pkt_callback = NULL;
}
if (wlc->wsec_def_keys[0])
- MFREE(osh, wlc->wsec_def_keys[0],
- (sizeof(wsec_key_t) * WLC_DEFAULT_KEYS));
-
+ kfree(wlc->wsec_def_keys[0]);
if (wlc->protection) {
- MFREE(osh, wlc->protection, sizeof(wlc_protection_t));
+ kfree(wlc->protection);
wlc->protection = NULL;
}
if (wlc->stf) {
- MFREE(osh, wlc->stf, sizeof(wlc_stf_t));
+ kfree(wlc->stf);
wlc->stf = NULL;
}
if (wlc->bandstate[0])
- MFREE(osh, wlc->bandstate[0], (sizeof(wlcband_t) * MAXBANDS));
+ kfree(wlc->bandstate[0]);
if (wlc->corestate) {
if (wlc->corestate->macstat_snapshot) {
- MFREE(osh, wlc->corestate->macstat_snapshot,
- sizeof(macstat_t));
- wlc->corestate->macstat_snapshot = NULL;
+ kfree(wlc->corestate->macstat_snapshot); wlc->corestate->macstat_snapshot = NULL;
}
- MFREE(osh, wlc->corestate, sizeof(wlccore_t));
+ kfree(wlc->corestate);
wlc->corestate = NULL;
}
if (wlc->hw) {
#ifdef WLC_LOW
if (wlc->hw->bandstate[0]) {
- MFREE(osh, wlc->hw->bandstate[0],
- (sizeof(wlc_hwband_t) * MAXBANDS));
+ kfree(wlc->hw->bandstate[0]);
wlc->hw->bandstate[0] = NULL;
}
#endif
/* free hw struct */
- MFREE(osh, wlc->hw, sizeof(wlc_hw_info_t));
+ kfree(wlc->hw);
wlc->hw = NULL;
}
/* free the wlc */
- MFREE(osh, wlc, sizeof(wlc_info_t));
+ kfree(wlc);
wlc = NULL;
}
/* free all ini's which were to be freed on callbacks which were never called */
for (i = 0; i < AMPDU_INI_FREE; i++) {
if (ampdu->ini_free[i]) {
- MFREE(ampdu->wlc->osh, ampdu->ini_free[i],
- sizeof(scb_ampdu_tid_ini_t));
+ kfree(ampdu->ini_free[i]);
}
}
wlc_module_unregister(ampdu->wlc->pub, "ampdu", ampdu);
- MFREE(ampdu->wlc->osh, ampdu, sizeof(ampdu_info_t));
+ kfree(ampdu);
}
void scb_ampdu_cleanup(ampdu_info_t *ampdu, struct scb *scb)
if (!asi)
return;
- MFREE(asi->pub->osh, asi, sizeof(antsel_info_t));
+ kfree(asi);
}
void wlc_antsel_init(antsel_info_t *asi)
/* free vars */
if (wlc_hw->vars) {
- MFREE(wlc_hw->osh, wlc_hw->vars, wlc_hw->vars_size);
+ kfree(wlc_hw->vars);
wlc_hw->vars = NULL;
}
void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm)
{
if (wlc_cm)
- MFREE(wlc_cm->pub->osh, wlc_cm, sizeof(wlc_cm_info_t));
+ kfree(wlc_cm);
}
const char *wlc_channel_country_abbrev(wlc_cm_info_t *wlc_cm)
if (!eq->timer) {
WL_ERROR(("wl%d: wlc_eventq_attach: timer failed\n",
pub->unit));
- MFREE(eq->pub->osh, eq, sizeof(wlc_eventq_t));
+ kfree(eq);
return NULL;
}
}
ASSERT(wlc_eventq_avail(eq) == false);
- MFREE(eq->pub->osh, eq, sizeof(wlc_eventq_t));
+ kfree(eq);
return 0;
}
{
ASSERT(e->data == NULL);
ASSERT(e->next == NULL);
- MFREE(eq->pub->osh, e, sizeof(wlc_event_t));
+ kfree(e);
}
void wlc_eventq_enq(wlc_eventq_t *eq, wlc_event_t *e)
for (idx = 0; idx < MAXBANDS; idx++)
if (wlc->bandstate[idx]->pi) {
- osl_mfree(wlc->osh, wlc->bandstate[idx]->pi,
- sizeof(wlc_phy_t));
+ kfree(wlc->bandstate[idx]->pi);
wlc->bandstate[idx]->pi = NULL;
}
* references the wlc->hw->vars which is freed in wlc_bmac_detach()
*/
if (wlc->pub->vars) {
- osl_mfree(wlc->osh, wlc->pub->vars, wlc->vars_size);
+ kfree(wlc->pub->vars);
wlc->pub->vars = NULL;
}
#endif
#ifdef BCMDBG
if (wlc->country_ie_override) {
- osl_mfree(wlc->osh, wlc->country_ie_override,
- wlc->country_ie_override->len + TLV_HDR_LEN);
+ kfree(wlc->country_ie_override);
wlc->country_ie_override = NULL;
}
#endif /* BCMDBG */
prev = ptr = wlc->dumpcb_head;
while (ptr) {
ptr = prev->next;
- osl_mfree(wlc->osh, prev, sizeof(dumpcb_t));
+ kfree(prev);
prev = ptr;
}
wlc->dumpcb_head = NULL;
bi = bss_list->ptrs[index];
if (bi) {
if (bi->bcn_prb) {
- osl_mfree(wlc->osh, bi->bcn_prb,
- bi->bcn_prb_len);
+ kfree(bi->bcn_prb);
}
- osl_mfree(wlc->osh, bi, sizeof(wlc_bss_info_t));
+ kfree(bi);
bss_list->ptrs[index] = NULL;
}
}
/* Perform OS specific event processing */
wl_event(wlc->wl, etmp->event.ifname, etmp);
if (etmp->data) {
- osl_mfree(wlc->osh, etmp->data, etmp->event.datalen);
+ kfree(etmp->data);
etmp->data = NULL;
}
wlc_event_free(wlc->eventq, etmp);
p->next = p->next->next;
}
- osl_mfree(osh, qi, sizeof(wlc_txq_info_t));
+ kfree(qi);
}
if (!physhim)
return;
- MFREE(physhim->wlc_hw->osh, physhim, sizeof(wlc_phy_shim_info_t));
+ kfree(physhim);
}
struct wlapi_timer *wlapi_init_timer(wlc_phy_shim_info_t *physhim,
out:
if (rawotp)
- MFREE(si_osh(oi->sih), rawotp, lim);
+ kfree(rawotp);
si_setcoreidx(oi->sih, idx);
return rc;
ASSERT(b.buf - base <= MAXSZ_NVRAM_VARS);
err = initvars_table(osh, base, b.buf, vars, count);
- MFREE(osh, base, MAXSZ_NVRAM_VARS);
+ kfree(base);
return err;
}
bcopy(otp, buf, bufsz);
if (otp)
- MFREE(osh, otp, OTP_SZ_MAX);
+ kfree(otp);
/* Check CRC */
if (buf[0] == 0xffff) {
*base = vp;
- exit: MFREE(osh, flash, NVRAM_SPACE);
+ exit: kfree(flash);
return err;
}
if (err == 0)
err = initvars_table(osh, base, vp, vars, count);
- MFREE(osh, base, MAXSZ_NVRAM_VARS);
+ kfree(base);
return err;
}
errout:
if (base)
- MFREE(osh, base, MAXSZ_NVRAM_VARS);
+ kfree(base);
- MFREE(osh, srom, SROM_MAX);
+ kfree(srom);
return err;
}
if (bcmsdh_cis_read(NULL, fn, cis[fn], SBSDIO_CIS_SIZE_LIMIT) !=
0) {
- MFREE(osh, cis[fn], SBSDIO_CIS_SIZE_LIMIT);
+ kfree(cis[fn]);
rc = -2;
break;
}
rc = srom_parsecis(osh, cis, fn, vars, count);
while (fn-- > 0)
- MFREE(osh, cis[fn], SBSDIO_CIS_SIZE_LIMIT);
+ kfree(cis[fn]);
return rc;
}
/* free packet pointer vectors */
if (di->txp)
- MFREE(di->osh, (void *)di->txp, (di->ntxd * sizeof(void *)));
+ kfree((void *)di->txp);
if (di->rxp)
- MFREE(di->osh, (void *)di->rxp, (di->nrxd * sizeof(void *)));
+ kfree((void *)di->rxp);
/* free tx packet DMA handles */
if (di->txp_dmah)
- MFREE(di->osh, (void *)di->txp_dmah,
- di->ntxd * sizeof(hnddma_seg_map_t));
+ kfree(di->txp_dmah);
/* free rx packet DMA handles */
if (di->rxp_dmah)
- MFREE(di->osh, (void *)di->rxp_dmah,
- di->nrxd * sizeof(hnddma_seg_map_t));
+ kfree(di->rxp_dmah);
/* free our private info structure */
- MFREE(di->osh, (void *)di, sizeof(dma_info_t));
+ kfree((void *)di);
}
return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn);
}
-void osl_mfree(osl_t *osh, void *addr, uint size)
-{
- if (osh) {
- ASSERT(osh->magic == OS_HANDLE_MAGIC);
- osh->malloced -= size;
- }
- kfree(addr);
-}
-
uint osl_dma_consistent_align(void)
{
return PAGE_SIZE;
if (pi == NULL)
return;
- MFREE(pi->osh, pi, sizeof(pcicore_info_t));
+ kfree(pi);
}
/* return cap_offset if requested capability exists in the PCI config space */
this = vars;
if (this)
- MFREE(si_osh(sih), this->vars, this->size);
+ kfree(this->vars);
while (this) {
next = this->next;
- MFREE(si_osh(sih), this, this->bufsz);
+ kfree(this);
this = next;
}
vars = NULL;
if (si_doattach(sii, devid, osh, regs, bustype, sdh, vars, varsz) ==
NULL) {
- MFREE(osh, sii, sizeof(si_info_t));
+ kfree(sii);
return NULL;
}
sii->vars = vars ? *vars : NULL;
#if !defined(BCMBUSTYPE) || (BCMBUSTYPE == SI_BUS)
if (sii != &ksii)
#endif /* !BCMBUSTYPE || (BCMBUSTYPE == SI_BUS) */
- MFREE(sii->osh, sii, sizeof(si_info_t));
+ kfree(sii);
}
void *si_osh(si_t *sih)