if (!memcmp(GetAddr3Ptr(pframe), get_my_bssid(&pmlmeinfo->network), ETH_ALEN)) {
if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) {
/* we should update current network before auth, or some IE is wrong */
- pbss = rtw_malloc(sizeof(struct wlan_bssid_ex));
+ pbss = kmalloc(sizeof(*pbss), GFP_ATOMIC);
if (pbss) {
if (collect_bss_info(padapter, precv_frame, pbss) == _SUCCESS) {
update_network(&(pmlmepriv->cur_network.network), pbss, padapter, true);
} else {
u8 *tmpbuf;
- tmpbuf = rtw_malloc(8);
+ tmpbuf = kmalloc(8, GFP_ATOMIC);
if (!tmpbuf)
return SDIO_ERR_VAL32;
ftaddr &= ~(u16)0x3;
n = cnt + shift;
- tmpbuf = rtw_malloc(n);
+ tmpbuf = kmalloc(n, GFP_ATOMIC);
if (!tmpbuf)
- return -1;
+ return -ENOMEM;
err = sd_read(intfhdl, ftaddr, n, tmpbuf);
if (!err)
ftaddr &= ~(u16)0x3;
n = cnt + shift;
- tmpbuf = rtw_malloc(n);
+ tmpbuf = kmalloc(n, GFP_ATOMIC);
if (!tmpbuf)
- return -1;
+ return -ENOMEM;
err = sd_read(intfhdl, ftaddr, 4, tmpbuf);
if (err) {
kfree(tmpbuf);
return _sd_cmd52_read(intfhdl, addr, cnt, buf);
n = round_up(cnt, 4);
- tmpbuf = rtw_malloc(n);
+ tmpbuf = kmalloc(n, GFP_ATOMIC);
if (!tmpbuf)
- return -1;
+ return -ENOMEM;
err = _sd_read(intfhdl, addr, n, tmpbuf);
if (!err)
return sd_cmd52_read(intfhdl, addr, cnt, buf);
n = round_up(cnt, 4);
- tmpbuf = rtw_malloc(n);
+ tmpbuf = kmalloc(n, GFP_ATOMIC);
if (!tmpbuf)
- return -1;
+ return -ENOMEM;
err = sd_read(intfhdl, addr, n, tmpbuf);
if (!err)
)
return sd_cmd52_write(intfhdl, addr, cnt, buf);
- tmpbuf = rtw_malloc(cnt);
+ tmpbuf = kmalloc(cnt, GFP_ATOMIC);
if (!tmpbuf)
- return -1;
+ return -ENOMEM;
memcpy(tmpbuf, buf, cnt);
u8 *status;
u32 addr;
- status = rtw_malloc(4);
+ status = kmalloc(4, GFP_ATOMIC);
if (status) {
addr = REG_TXDMA_STATUS;
hal_sdio_get_cmd_addr_8723b(adapter, WLAN_IOREG_DEVICE_ID, addr, &addr);