undefined4 rt2880_module_init(void)
{
int iVar1;
int iVar2;
int *local_58;
int local_54;
undefined1 auStack_50 [64];
local_58 = (int *)0x0;
if (2 < RTDebugLevel) {
printk("===> rt2880_probe\n");
}
os_alloc_mem(0,&local_58,0x100);
if (local_58 == (int *)0x0) {
if (RTDebugLevel != 0) {
printk("Allocate memory for os_cookie failed!\n");
}
}
else {
memset(local_58,0,0x100) //possible issue identified - semgrep
iVar1 = RTMPAllocAdapterBlock(local_58,&local_54);
if (iVar1 == 0) {
*(undefined4 *)(local_54 + 0xdc) = 0xb0180000;
RtmpRaDevCtrlInit(local_54,4);
iVar1 = RtmpPhyNetDevInit(local_54,auStack_50);
if (iVar1 != 0) {
*(undefined4 *)(iVar1 + 0x24) = 0xb0180000;
*(undefined4 *)(iVar1 + 0x28) = 4;
*local_58 = iVar1;
iVar2 = RtmpOSNetDevAttach(*(undefined1 *)(local_54 + 0x16964),iVar1,auStack_50);
if (iVar2 == 0) {
rt2880_dev = iVar1;
wl_proc_init();
if (2 < RTDebugLevel) {
printk("%s: at CSR addr 0x%lx, IRQ %ld. \n",iVar1,0xb0180000,
*(undefined4 *)(iVar1 + 0x28));
}
if (RTDebugLevel < 3) {
return 0;
}
printk("<=== rt2880_probe\n");
return 0;
}
if (RTDebugLevel != 0) {
printk("failed to call RtmpOSNetDevAttach(), rv=%d!\n");
}
RtmpOSNetDevFree(iVar1);
}
RTMPFreeAdapter(local_54);
}
else {
if (RTDebugLevel != 0) {
printk(" RTMPAllocAdapterBlock != NDIS_STATUS_SUCCESS\n",local_58);
}
os_free_mem(0,local_58);
}
}
return 0xffffffed;
}