Commit f1a97700 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

pfilter: restore default MAC in the binary with rules after they are loaded

parent 5cbbec15
...@@ -167,5 +167,15 @@ void pfilter_init_default(void) ...@@ -167,5 +167,15 @@ void pfilter_init_default(void)
*v_vlan |= 0x0aaa << 13; *v_vlan |= 0x0aaa << 13;
} }
/* Restore default MAC, so that the rule-set check doesn't fail on LM32
* restart */
v = vini + 1; /* rewind v to the beginning, skipping the first magic number */
v[2] &= ~(0xffff << 13);
v[4] &= ~(0xffff << 13);
v[6] &= ~(0xffff << 13);
v[2] |= 0x1234 << 13;
v[4] |= 0x5678 << 13;
v[6] |= 0x9abc << 13;
EP->PFCR0 = EP_PFCR0_ENABLE; EP->PFCR0 = EP_PFCR0_ENABLE;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment