Skip to contentSkip to conversation

Any reason AID is not in the NL80211_STA_INFO enumeration?

DISCUSSION Ben Greear 2 participants 7 messages Feb 18, 2020 – Mar 3, 2020

lore
Share & tools
lore

Ben Greear

author
#0 lore raw

To sniff /AX stations, it is helpful to know their AID. So, any problems with adding it to 'iw station dump' output?

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#1 lore raw
Quoted 2 lines · Ben Greear

To sniff /AX stations, it is helpful to know their AID. So, any problems with adding it to 'iw station dump' output?

No, no problem at all. I guess it was just never added because it originally comes from userspace (hostapd), and so didn't really need to be sent back. But yeah, we have trivial infrastructure to send it back, so sure, why not.

johannes

author
#2 lore raw
Quoted 8 lines · Johannes Berg
Quoted 2 lines · Ben Greear

To sniff /AX stations, it is helpful to know their AID. So, any problems with adding it to 'iw station dump' output?

No, no problem at all. I guess it was just never added because it originally comes from userspace (hostapd), and so didn't really need to be sent back. But yeah, we have trivial infrastructure to send it back, so sure, why not.

Ok, thanks for the response.

From looking at debugfs for a station device, there is the netdev AID:

cat /debug/ieee80211/wiphy0/netdev\:wlan0/aid
1

And there is a peer AID:

cat /debug/ieee80211/wiphy0/netdev\:wlan0/stations/04\:f0\:21\:c2\:fd\:b0/aid 0

For sniffing AX, I'd need to use '1' here as far as I can tell. Maybe for station devices the peer is always zero? And for AP devices, the peer IDs are what is useful and the netdev AID is not?

Thanks,
Ben

Quoted 3 lines

johannes

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#3 lore raw
Quoted 18 lines · Ben Greear
Quoted 8 lines · Johannes Berg
Quoted 2 lines · Ben Greear

To sniff /AX stations, it is helpful to know their AID. So, any problems with adding it to 'iw station dump' output?

No, no problem at all. I guess it was just never added because it originally comes from userspace (hostapd), and so didn't really need to be sent back. But yeah, we have trivial infrastructure to send it back, so sure, why not.

Ok, thanks for the response.

From looking at debugfs for a station device, there is the netdev AID:

cat /debug/ieee80211/wiphy0/netdev\:wlan0/aid
1

Quoted 8 lines

And there is a peer AID:

cat /debug/ieee80211/wiphy0/netdev\:wlan0/stations/04\:f0\:21\:c2\:fd\:b0/aid 0

For sniffing AX, I'd need to use '1' here as far as I can tell. Maybe for station devices the peer is always zero? And for AP devices, the peer IDs are what is useful and the netdev AID is not?

Yeah. The first is u.mgd.aid (i.e. the netdev data), and the latter is the STA AID.

It makes sense the latter is not assigned in the client-side case.

Arguably, only the *latter* should be in nl80211 per STA, since in the client-side case it's *our* AID, not the APs.

johannes

author
#4 lore raw
Quoted 28 lines · Johannes Berg
Quoted 18 lines · Ben Greear
Quoted 8 lines · Johannes Berg
Quoted 2 lines · Ben Greear

To sniff /AX stations, it is helpful to know their AID. So, any problems with adding it to 'iw station dump' output?

No, no problem at all. I guess it was just never added because it originally comes from userspace (hostapd), and so didn't really need to be sent back. But yeah, we have trivial infrastructure to send it back, so sure, why not.

Ok, thanks for the response.

From looking at debugfs for a station device, there is the netdev AID:

cat /debug/ieee80211/wiphy0/netdev\:wlan0/aid
1

Quoted 8 lines

And there is a peer AID:

cat /debug/ieee80211/wiphy0/netdev\:wlan0/stations/04\:f0\:21\:c2\:fd\:b0/aid 0

For sniffing AX, I'd need to use '1' here as far as I can tell. Maybe for station devices the peer is always zero? And for AP devices, the peer IDs are what is useful and the netdev AID is not?

Quoted 7 lines

Yeah. The first is u.mgd.aid (i.e. the netdev data), and the latter is the STA AID.

It makes sense the latter is not assigned in the client-side case.

Arguably, only the *latter* should be in nl80211 per STA, since in the client-side case it's *our* AID, not the APs.

Although it is a bit weird, I was thinking to always return the AID as part of the station dump, and for station netdevs, use the local netdev AID, and for APs, use the remote station AID.

That seems a bit cleaner to me than having two separate ways to get the AID for stations and APs, but I can do two separate ways if you prefer that.

Thanks,
Ben

Quoted 3 lines

johannes

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#5 lore raw
Quoted 6 lines · Ben Greear

Although it is a bit weird, I was thinking to always return the AID as part of the station dump, and for station netdevs, use the local netdev AID, and for APs, use the remote station AID.

That seems a bit cleaner to me than having two separate ways to get the AID for stations and APs, but I can do two separate ways if you prefer that.

I don't really agree that it's cleaner - by definition, the data in a station is data about that station, not data about "self".

We may not have a great way right now to show the latter ('data about self')? But I still don't think we should mix it.

johannes

author
#6 lore raw
Quoted 5 lines · Johannes Berg
Quoted 4 lines · Ben Greear

Although it is a bit weird, I was thinking to always return the AID as part of the station dump, and for station netdevs, use the local netdev AID, and for APs, use the remote station AID.

Quoted 8 lines
Quoted 2 lines

That seems a bit cleaner to me than having two separate ways to get the AID for stations and APs, but I can do two separate ways if you prefer that.

I don't really agree that it's cleaner - by definition, the data in a station is data about that station, not data about "self".

We may not have a great way right now to show the latter ('data about self')? But I still don't think we should mix it.

Ok, I'll go poke at the code and see what I can figure out.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com