remember when we were discussing MAC addresses? I found this interesting piece of code that was pertinent to our discussion about faking mac addresses...
static void
fa31x_mac_address_set (u32 iobase, char *mac_addr)
{
u16 * mac_addr_ptr;
int i;
for (i=0, mac_addr_ptr = (u16 *)mac_addr; i<3; i++, mac_addr_ptr++) {
DP_REG32_WRITE (DP_RFCR, DP_RFCR_RFADDR_PMATCH1 + i*2);
DP_REG32_WRITE (DP_RFDR, CPU_TO_BUS_SWAP_16 (*mac_addr_ptr));
}
}
this is the linux driver for the Netgear FA311/FA312, and just change the mac_addr value and you're done! hehe
static void
fa31x_mac_address_set (u32 iobase, char *mac_addr)
{
u16 * mac_addr_ptr;
int i;
for (i=0, mac_addr_ptr = (u16 *)mac_addr; i<3; i++, mac_addr_ptr++) {
DP_REG32_WRITE (DP_RFCR, DP_RFCR_RFADDR_PMATCH1 + i*2);
DP_REG32_WRITE (DP_RFDR, CPU_TO_BUS_SWAP_16 (*mac_addr_ptr));
}
}
this is the linux driver for the Netgear FA311/FA312, and just change the mac_addr value and you're done! hehe