How to update the MAC address

Hi!
I got a query regarding the mac address update.
Our driver is Ndis Miniport driver.
My doubt is…*Is there any provision to update the MAC address from
driver???*

Presently Ndis queries *MAC* address through “OID_802_3_CURRENT_ADDRESS”.
After this if the driver wants to update the *MAC* address, Is there any
provision to do this??

If the driver blocks the “OID_802_3_CURRENT_ADDRESS” until driver gets
the Mac address from Eeprom
NDIS is getting struck.
So can some one suggest me the procedure to update the MAC address from
driver???

Your help is appreciated in this regard.

Thanks,
Narayana.

Where is NDIS getting ?stuck??

During MiniportInitialize() is when you should be preparing the hardware
including programming the MAC address (if overridden by configuration) or
retrieving the burned-in-address. After MiniportInitialize() has completed,
it is expected that the MAC address will stay constant. During
MiniportInitialize() you can do most anything you need to get your hardware
ready since that routine is run at IRQL == PASSIVE_LEVEL.

It is not possible to change the MAC address *after* MiniportInitialize().

Good Luck,

Dave Cattley

Consulting Engineer

Systems Software Development

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Narayana Reddy P
Sent: Friday, November 14, 2008 1:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to update the MAC address

Hi!
I got a query regarding the mac address update.
Our driver is Ndis Miniport driver.
My doubt is…Is there any provision to update the MAC address from
driver???

Presently Ndis queries MAC address through “OID_802_3_CURRENT_ADDRESS”.
After this if the driver wants to update the MAC address, Is there any
provision to do this??

If the driver blocks the “OID_802_3_CURRENT_ADDRESS” until driver gets the
Mac address from Eeprom
NDIS is getting struck.
So can some one suggest me the procedure to update the MAC address from
driver???

Your help is appreciated in this regard.

Thanks,
Narayana.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi Cattley,
NDIS is not responding when we wait in the initialize function.
Our driver will update the MAC address once we receive the interrupt
from device.
If we wait on initialize function NDIS is not responding to the interrupt.

-Thanks
NarayanaReddy

David R. Cattley wrote:

Where is NDIS getting ‘stuck’?

During MiniportInitialize() is when you should be preparing the
hardware including programming the MAC address (if overridden by
configuration) or retrieving the burned-in-address. After
MiniportInitialize() has completed, it is expected that the MAC
address will stay constant. During MiniportInitialize() you can do
most anything you need to get your hardware ready since that routine
is run at IRQL == PASSIVE_LEVEL.

It is not possible to change the MAC address **after**
MiniportInitialize().

Good Luck,

Dave Cattley

Consulting Engineer

Systems Software Development

*From:* xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] *On Behalf Of *Narayana Reddy P
*Sent:* Friday, November 14, 2008 1:24 AM
*To:* Windows System Software Devs Interest List
*Subject:* [ntdev] How to update the MAC address

Hi!
I got a query regarding the mac address update.
Our driver is Ndis Miniport driver.
My doubt is…*Is there any provision to update the MAC address from
driver???*

Presently Ndis queries *MAC* address through “OID_802_3_CURRENT_ADDRESS”.
After this if the driver wants to update the *MAC* address, Is there
any provision to do this??

If the driver blocks the “OID_802_3_CURRENT_ADDRESS” until driver gets
the Mac address from Eeprom
NDIS is getting struck.
So can some one suggest me the procedure to update the MAC address
from driver???

Your help is appreciated in this regard.

Thanks,
Narayana.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

You must poll your device in MiniportInitialize() then while waiting for the
EEPROM to be read into the hardware.

Good Luck,

-dave

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Narayana Reddy P
Sent: Friday, November 14, 2008 2:32 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to update the MAC address

Hi Cattley,
NDIS is not responding when we wait in the initialize function.
Our driver will update the MAC address once we receive the interrupt from
device.
If we wait on initialize function NDIS is not responding to the interrupt.

-Thanks
NarayanaReddy

David R. Cattley wrote:

Where is NDIS getting ?stuck??

During MiniportInitialize() is when you should be preparing the hardware
including programming the MAC address (if overridden by configuration) or
retrieving the burned-in-address. After MiniportInitialize() has completed,
it is expected that the MAC address will stay constant. During
MiniportInitialize() you can do most anything you need to get your hardware
ready since that routine is run at IRQL == PASSIVE_LEVEL.

It is not possible to change the MAC address *after* MiniportInitialize().

Good Luck,

Dave Cattley

Consulting Engineer

Systems Software Development

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Narayana Reddy P
Sent: Friday, November 14, 2008 1:24 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to update the MAC address

Hi!
I got a query regarding the mac address update.
Our driver is Ndis Miniport driver.
My doubt is…Is there any provision to update the MAC address from
driver???

Presently Ndis queries MAC address through “OID_802_3_CURRENT_ADDRESS”.
After this if the driver wants to update the MAC address, Is there any
provision to do this??

If the driver blocks the “OID_802_3_CURRENT_ADDRESS” until driver gets the
Mac address from Eeprom
NDIS is getting struck.
So can some one suggest me the procedure to update the MAC address from
driver???

Your help is appreciated in this regard.

Thanks,
Narayana.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

hi!
After you got the Mac address rebind the protocol
using NdisMRebindProtocolsToAdapter(MiniportAdapterHandle).
Ndis will query the Mac address again.

BR.

Hi Raghu,
I checked with the

NdisMRebindProtocolsToAdapter(MiniportAdapterHandle),but i am not able to find the API since i am using WinXP.
I think you might have used this for WinCE.
Can any one suggest me on this!!

-Thanks
NarayanaReddy

xxxxx@redpinesignals.com wrote:

hi!
After you got the Mac address rebind the protocol
using NdisMRebindProtocolsToAdapter(MiniportAdapterHandle).
Ndis will query the Mac address again.

BR.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Correct, NdisMRebindProtocolsToAdapter() is available on Windows CE only.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Narayana Reddy P
Sent: Friday, November 14, 2008 6:50 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to update the MAC address

Hi Raghu,
I checked with the

NdisMRebindProtocolsToAdapter(MiniportAdapterHandle),but i am not able to
find the API since i am using WinXP.
I think you might have used this for WinCE.
Can any one suggest me on this!!

-Thanks
NarayanaReddy

xxxxx@redpinesignals.com wrote:

hi!
After you got the Mac address rebind the protocol
using NdisMRebindProtocolsToAdapter(MiniportAdapterHandle).
Ndis will query the Mac address again.

BR.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

hi!
I was speaking in terms of CE.
so best option is to poll your interrupt until your mac address gets
initialized and then return
the Initialization function. Why because Oid’s gets called once you
return your Initialization function.

BR.

David R. Cattley wrote:

Correct, NdisMRebindProtocolsToAdapter() is available on Windows CE only.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Narayana Reddy P
Sent: Friday, November 14, 2008 6:50 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to update the MAC address

Hi Raghu,
I checked with the

NdisMRebindProtocolsToAdapter(MiniportAdapterHandle),but i am not able to
find the API since i am using WinXP.
I think you might have used this for WinCE.
Can any one suggest me on this!!

-Thanks
NarayanaReddy

xxxxx@redpinesignals.com wrote:

> hi!
> After you got the Mac address rebind the protocol
> using NdisMRebindProtocolsToAdapter(MiniportAdapterHandle).
> Ndis will query the Mac address again.
>
> BR.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
>
http://www.osronline.com/page.cfm?name=ListServer

>
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Updating the MAC address of an Ethernet port is much harder than discussion I see thus far.

One little detail not discussed yet is that the NIC firmware typically only looks at the MAC address in flash just after power up of the NIC, during it’s firmware initialization. So, unless you know how to tell the NIC to do a power-on reset, your software efforts, including changing flash contents, will have to wait for the change to take place at the next power up.

Oh, and for the record - you may also need to be concerned with the NIC remaining powered up when (almost) everything else is powered down, including the CPU. Reason: How the heck do you think wake-on-LAN is supposed to work if the NIC is not powered on? Simple answer: The NIC can stay powered on with the Standby power, also a little 2-wire bus that allows communication between MB components (I2C), and parts of the chipset, notably a 32-bit risc CPU hidden in the Southbridge. Gotta have some smarts to get that wake-on-LAN packet and do something about it, huh? Also, someone has to be hanging around to turn on the CPU(s), and take out the trash. But I digress…

I am working with NDIS miniport Driver too. My driver uses USB as the interface. How can I update the MAC address from my device ?? Is it the same way like getting MAC Address from NIC device??

Thanks,
Moeloek