You must stop and restart your miniport if you want to change its MAC address. (Protocols don’t expect to see a MAC address change randomly; they have to be unbound and rebound to notice the change. Theoretically we could add a status indication for this, then demand protocols all implement it, but it’s such a rare situation that it’s not worth the effort.) So you don’t really need an ioctl; just disable the device, write a new address to your deivce’s configuration, then re-enable the device. The device will notice the new MAC address as part of its reinitialization.
Note that you should be changing the Current address, not the Permanent address. The Permanent address is meant to be… well… permanent, and applications might get confused if it changes.
You can choose to expose the current address as an optional Advanced Property named “NetworkAddress” with type “edit”, and it’ll show up in the Advanced Property GUI. On Windows 8, it will also be available in PowerShell’s Set-NetAdapterAdvancedProperty. Add this to your INF:
HKR,Ndi\params\NetworkAddress,ParamDesc,0,%NetworkAddress%
HKR,Ndi\params\NetworkAddress,Type,0,“edit”
HKR,Ndi\params\NetworkAddress,Default,0, “”
HKR,Ndi\params\NetworkAddress,LimitText,0,“12”
HKR,Ndi\params\NetworkAddress,UpperCase,0,“1”
HKR,Ndi\params\NetworkAddress,Optional,0,“1”