diff -Naur linux-2.6.22.1/Documentation/networking/README.ipw2100 linux-2.6.22.1-rndmac/Documentation/networking/README.ipw2100 --- linux-2.6.22.1/Documentation/networking/README.ipw2100 2007-07-10 11:56:30.000000000 -0700 +++ linux-2.6.22.1-rndmac/Documentation/networking/README.ipw2100 2007-10-22 15:20:07.000000000 -0700 @@ -126,6 +126,7 @@ channel int channel=3 /* Only valid in AdHoc or Monitor */ associate boolean associate=0 /* Do NOT auto associate */ disable boolean disable=1 /* Do not power the HW */ +rndmac 0,1 rndmac=1 /* Randomize MAC Address */ 4. Sysfs Helper Files diff -Naur linux-2.6.22.1/drivers/net/wireless/ipw2100.c linux-2.6.22.1-rndmac/drivers/net/wireless/ipw2100.c --- linux-2.6.22.1/drivers/net/wireless/ipw2100.c 2007-07-10 11:56:30.000000000 -0700 +++ linux-2.6.22.1-rndmac/drivers/net/wireless/ipw2100.c 2007-10-22 13:02:14.000000000 -0700 @@ -185,6 +185,7 @@ static int debug = 0; static int mode = 0; +static int rndmac = 0; static int channel = 0; static int associate = 1; static int disable = 0; @@ -198,12 +199,14 @@ module_param(channel, int, 0444); module_param(associate, int, 0444); module_param(disable, int, 0444); +module_param(rndmac, int, 0644); MODULE_PARM_DESC(debug, "debug level"); MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)"); MODULE_PARM_DESC(channel, "channel"); MODULE_PARM_DESC(associate, "auto associate when scanning (default on)"); MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); +MODULE_PARM_DESC(rndmac, "randomize mac on associate (default 0 off)"); static u32 ipw2100_debug_level = IPW_DL_NONE; @@ -4659,6 +4662,17 @@ IPW_DEBUG_INFO("MAC address read failed\n"); return -EIO; } + + // Add MAC randomization support, gimped from: [ http://code.kryo.se/linux/ ] + // Ported to ipw2100 by vector + if(rndmac) { + get_random_bytes(mac, ETH_ALEN); + memcpy(mac, priv->bssid, 3); + + priv->config |= CFG_CUSTOM_MAC; + memcpy(priv->mac_addr, mac, ETH_ALEN); + } + IPW_DEBUG_INFO("card MAC is %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);