Skip to contentSkip to conversation

Why "iwlwifi: read multiple MAC addresses"?

DISCUSSION Lekensteyn 2 participants 4 messages Jun 12, 2012 – Jun 13, 2012

lore
Share & tools
lore

Lekensteyn

author
#0 lore raw

Hi Wey-Yi,

I wonder what the following commit is used for:
commit c6fa17ed3fadaf056173c409c0877df428a152ec

Author: Wey-Yi Guy <[email protected]>
Date:   Thu Jul 15 05:58:30 2010 -0700

iwlwifi: read multiple MAC addresses

Some devices may have multiple MAC
addresses in their EEPROM, read them
and advertise them to cfg80211.

I was trying to debug wireless issues, and noticed that I had two MAC addresses with only the last bit being different:

    $ cat /sys/class/ieee80211/phy0/addresses
    00:23:14:xx:xx:x8
    00:23:14:xx:xx:x9

Looking at a dump provided by /sys/kernel/debug/cfg80211/phy0/iwlwifi/data/nvm, I see that the 16-bit word at 0x98 contains the value 4. What does this mean? Can this break something?

If you are interested, the wireless card I own is a Centrino Advanced-N 6200 (device ID 422c, rev 35). I can reproduce this behaviour on Linux 3.4.2, 3.5- rc1 (the wireless testing tree from 2012-06-11) and 3.3.5.

Regards,
Peter

#1 lore raw
Quoted 6 lines · Lekensteyn

I wonder what the following commit is used for:
commit c6fa17ed3fadaf056173c409c0877df428a152ec

Author: Wey-Yi Guy <[email protected]>
Date:   Thu Jul 15 05:58:30 2010 -0700

iwlwifi: read multiple MAC addresses

That commit is so that you see this:

Quoted 9 lines

I was trying to debug wireless issues, and noticed that I had two MAC addresses with only the last bit being different:

    $ cat /sys/class/ieee80211/phy0/addresses
    00:23:14:xx:xx:x8
    00:23:14:xx:xx:x9

Looking at a dump provided by /sys/kernel/debug/cfg80211/phy0/iwlwifi/data/nvm, I see that the 16-bit word at 0x98 contains the value 4. What does this mean?

The 4 actually means that there are 4 addresses assigned to this device, for use in P2P scenarios etc. We only support 2 virtual interfaces in Linux today, so we don't expose 4 (though we probably could.)

Quoted 1 line

Can this break something?

No.

johannes

author
#2 lore raw
Quoted 11 lines · On Tuesday 12 June 2012 21:58:51 Johannes Berg wrote:
Quoted 3 lines · Lekensteyn

Looking at a dump provided by /sys/kernel/debug/cfg80211/phy0/iwlwifi/data/nvm, I see that the 16-bit word at 0x98 contains the value 4. What does this mean?

The 4 actually means that there are 4 addresses assigned to this device, for use in P2P scenarios etc. We only support 2 virtual interfaces in Linux today, so we don't expose 4 (though we probably could.)

Quoted 1 line

Can this break something?

No.

Okay, thanks for your quick answer. I have noticed that the first address is stored at 0x3A while the second one is stored at 0x92. Did you make an assumption that this address is other address + 1?

Regards,
Peter

#3 lore raw
Quoted 9 lines · Lekensteyn
Quoted 8 lines · On Tuesday 12 June 2012 21:58:51 Johannes Berg wrote:
Quoted 3 lines · Lekensteyn

Looking at a dump provided by /sys/kernel/debug/cfg80211/phy0/iwlwifi/data/nvm, I see that the 16-bit word at 0x98 contains the value 4. What does this mean?

The 4 actually means that there are 4 addresses assigned to this device, for use in P2P scenarios etc. We only support 2 virtual interfaces in Linux today, so we don't expose 4 (though we probably could.)

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Can this break something?

No.

Okay, thanks for your quick answer. I have noticed that the first address is stored at 0x3A while the second one is stored at 0x92. Did you make an assumption that this address is other address + 1?

That's how it was specified.

johannes