void MacTableReset(int param_1)
{
bool bVar1;
int iVar2;
uint uVar3;
int iVar4;
int *piVar5;
int iVar6;
undefined1 auStack_50 [2];
undefined2 local_4e;
undefined4 local_4c;
undefined4 local_48;
undefined1 auStack_44 [28];
local_4c = 0;
local_48 = 0;
if (2 < RTDebugLevel) {
printk("MacTableReset\n");
}
piVar5 = (int *)(param_1 + 0x5d958);
iVar2 = 1;
do {
iVar4 = param_1 + iVar2 * 0xa20 + 0x5d190;
if (*piVar5 == 1) {
RTMPReleaseTimer(param_1 + iVar2 * 0xa20 + 0x5cf40,auStack_50,iVar4);
*(undefined1 *)((int)piVar5 + 6) = 0;
if (piVar5[0x9d] == 2) {
iVar4 = os_alloc_mem(param_1,&local_4c,0x640);
if (iVar4 != 0) {
if (RTDebugLevel < 3) {
return;
}
printk(" MlmeAllocateMemory fail ..\n");
return;
}
local_4e = 2;
if (1 < RTDebugLevel) {
printk("Send DEAUTH - Reason = %d frame tO %02x:%02x:%02x:%02x:%02x:%02x \n",2,
(char)piVar5[0x96],*(undefined1 *)((int)piVar5 + 0x259),
*(undefined1 *)((int)piVar5 + 0x25a),*(undefined1 *)((int)piVar5 + 0x25b),
(char)piVar5[0x97],*(undefined1 *)((int)piVar5 + 0x25d));
}
MgtMacHeaderInit(param_1,auStack_44,0xc,0,param_1 + iVar2 * 0xa20 + 0x5d190,
(uint)*(byte *)((int)piVar5 + 0x31) * 0x1140 + param_1 + 0x51ac);
MakeOutgoingFrame(local_4c,&local_48,0x18,auStack_44,2,&local_4e,0xffffffff);
MiniportMMRequest(param_1,0,local_4c,local_48);
os_free_mem(param_1,local_4c);
RTMPusecDelay(5000);
}
iVar4 = param_1 + iVar2 * 0xa20 + 0x5d190;
}
iVar6 = iVar2 + 1;
MacTableDeleteEntry(param_1,iVar2,iVar4);
piVar5 = piVar5 + 0x288;
iVar2 = iVar6;
} while (iVar6 != 0x20);
uVar3 = 0;
while( true ) {
iVar2 = uVar3 * 0x1140;
bVar1 = *(byte *)(param_1 + 0x51aa) <= uVar3;
uVar3 = uVar3 + 1 & 0xff;
if (bVar1) break;
*(undefined1 *)(iVar2 + param_1 + 0x51d7) = 0;
}
local_bh_disable();
if (2 < RTDebugLevel) {
printk("McastPsQueue.Number %ld...\n",*(undefined4 *)(param_1 + 0x71344));
}
if (*(int *)(param_1 + 0x71344) != 0) {
APCleanupPsQueue(param_1,param_1 + 0x7133c);
}
if (2 < RTDebugLevel) {
printk("2McastPsQueue.Number %ld...\n",*(undefined4 *)(param_1 + 0x71344));
}
memset((void *)(param_1 + 0x71338),0,0x28) //possible issue identified - semgrep
*(undefined4 *)(param_1 + 0x71344) = 0;
*(undefined4 *)(param_1 + 0x71340) = 0;
*(undefined4 *)(param_1 + 0x7133c) = 0;
local_bh_enable();
return;
}