Skip to contentSkip to conversation

Can we make ieee80211_iface_combination.limits non-const?

DISCUSSION Ben Greear 2 participants 4 messages Jun 26, 2014 – Jun 27, 2014

lore
Share & tools
lore

Ben Greear

author
#0 lore raw

Depending on firmware loaded (and/or module options), a different number of vdev interfaces may be supported.

Can we remove the const from the "struct ieee80211_iface_limit *limits" member of ieee80211_iface_combination?

Thanks,
Ben

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

Depending on firmware loaded (and/or module options), a different number of vdev interfaces may be supported.

Can we remove the const from the "struct ieee80211_iface_limit *limits" member of ieee80211_iface_combination?

No, it would break drivers who actually have a static const for the pointer target.

You don't have to assign something that's const, but you also can't be changing it on the fly after wiphy registration anyway.

johannes

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

Depending on firmware loaded (and/or module options), a different number of vdev interfaces may be supported.

Can we remove the const from the "struct ieee80211_iface_limit *limits" member of ieee80211_iface_combination?

No, it would break drivers who actually have a static const for the pointer target.

That could be easily fixed, eh?

Quoted 2 lines

You don't have to assign something that's const, but you also can't be changing it on the fly after wiphy registration anyway.

This would be done before registration. I like static init for defaults, but wanted to poke a few variables at run-time based on firmware, etc.

Thanks,
Ben

Quoted 3 lines

johannes

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

Depending on firmware loaded (and/or module options), a different number of vdev interfaces may be supported.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Can we remove the const from the "struct ieee80211_iface_limit *limits" member of ieee80211_iface_combination?

No, it would break drivers who actually have a static const for the pointer target.

That could be easily fixed, eh?

Yeah but it'd be stupid :)

Quoted 6 lines
Quoted 2 lines

You don't have to assign something that's const, but you also can't be changing it on the fly after wiphy registration anyway.

This would be done before registration. I like static init for defaults, but wanted to poke a few variables at run-time based on firmware, etc.

I don't really get it anyway. If you're going to do anything dynamic, you don't want to be changing a global static value anyway. You want to be making a copy or so and building it in a dynamic data structure, and then point to it.

johannes