ath10k: Support 32+ stations.
PATCH 1/1 ath10k: Support 32+ stations.
From: Ben Greear <[email protected]>
Implement 64-bit vdev map to support larger numbers of virtual devices. Support up to 32 stations (actual limit will be determined when loading firmware, as different firmwares have different limits)
Enable larger limits when using Candela Technologies firmware.
---
NOTE: The 10.2 firmware uses the bit that used to be used by CT firmware, so existing CT firmware will not actually work with this patch (or any kernel with the 10.2 firmware patch). If I can get acceptance of this patch or even a simpler patch that just adds the enum for CT firmware feature,
I can immediately re-do CT firmware with the proper bit set. If there is absolutely no way that even minimal CT firmware support can be accepted upstream, then I will just choose a large feature flag and hope it is not re-used by upstream code any time soon.
drivers/net/wireless/ath/ath10k/core.c | 8 +++-- drivers/net/wireless/ath/ath10k/core.h | 5 ++- drivers/net/wireless/ath/ath10k/hw.h | 6 ++++ drivers/net/wireless/ath/ath10k/mac.c | 65 ++++++++++++++++++++++++++++------ drivers/net/wireless/ath/ath10k/wmi.c | 25 ++++++++++--- 5 files changed, 89 insertions(+), 20 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +5 -3
@@ -844,10 +844,12 @@ int ath10k_core_start(struct ath10k *ar)if (status) goto err_htc_stop; -if (test_bit (ATH10K_FW_FEATURE_WMI_10X , ar->fw_features)) - ar->free_vdev_map = (1 <<TARGET_10X_NUM_VDEVS ) -1 ; +if (test_bit (ATH10K_FW_FEATURE_WMI_10X_CT , ar->fw_features)) + ar->free_vdev_map = (1LL <<TARGET_10X_NUM_VDEVS_CT ) -1 ; +else if (test_bit (ATH10K_FW_FEATURE_WMI_10X , ar->fw_features)) + ar->free_vdev_map = (1LL <<TARGET_10X_NUM_VDEVS ) -1 ;else - ar->free_vdev_map = (1 <<TARGET_NUM_VDEVS ) -1 ; + ar->free_vdev_map = (1LL <<TARGET_NUM_VDEVS ) -1 ;INIT_LIST_HEAD (&ar->arvifs);
drivers/net/wireless/ath/ath10k/core.h +4 -1
@@ -425,6 +425,9 @@ enum ath10k_fw_features {*/ ATH10K_FW_FEATURE_WMI_10_2 =4 , +/* Firmware from Candela Technologies, enables more VIFs, etc */ +ATH10K_FW_FEATURE_WMI_10X_CT =5 , +/* keep last */ ATH10K_FW_FEATURE_COUNT, };
@@ -526,7 +529,7 @@ struct ath10k {/* current operating channel definition */ struct cfg80211_chan_def chandef; -int free_vdev_map; +unsigned long long free_vdev_map;bool promisc;bool monitor;int monitor_vdev_id;
drivers/net/wireless/ath/ath10k/hw.h +6 -0
@@ -122,6 +122,12 @@ enum ath10k_mcast2ucast_mode {#define TARGET_10X_AST_SKID_LIMIT 16#define TARGET_10X_NUM_PEERS (128 + (TARGET_10X_NUM_VDEVS))#define TARGET_10X_NUM_PEERS_MAX 128 + +/* Over-rides for Candela Technologies firmware */ +#define TARGET_10X_NUM_VDEVS_CT 32 +#define TARGET_10X_NUM_PEERS_CT (32 + (TARGET_10X_NUM_VDEVS_CT)) +#define TARGET_10X_AST_SKID_LIMIT_CT (TARGET_10X_NUM_PEERS_CT * TARGET_10X_NUM_PEER_AST) +#define TARGET_10X_NUM_OFFLOAD_PEERS 0#define TARGET_10X_NUM_OFFLOAD_REORDER_BUFS 0#define TARGET_10X_NUM_PEER_KEYS 2
drivers/net/wireless/ath/ath10k/mac.c +54 -11
133 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.c +20 -5
@@ -2160,6 +2160,13 @@ static void ath10k_wmi_10x_service_ready_event_rx(struct ath10k *ar,u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i;int ret;struct wmi_service_ready_event_10x *ev = (void *)skb->data; +int my_num_peers =TARGET_10X_NUM_PEERS ; +int my_num_vdevs =TARGET_10X_NUM_VDEVS ; + +if (test_bit (ATH10K_FW_FEATURE_WMI_10X_CT , ar->fw_features)) { + my_num_peers =TARGET_10X_NUM_PEERS_CT ; + my_num_vdevs =TARGET_10X_NUM_VDEVS_CT ; + }if (skb->len <sizeof (*ev)) { ath10k_warn("Service ready event was %d B but expected %zu B. Wrong firmware version?\n",
@@ -2222,9 +2229,9 @@ static void ath10k_wmi_10x_service_ready_event_rx(struct ath10k *ar,* peers, 1 extra for self peer on target */ /* this needs to be tied, host and target * can get out of sync */ - num_units =TARGET_10X_NUM_PEERS +1 ; + num_units = my_num_peers +1 ; else if (num_unit_info & NUM_UNITS_IS_NUM_VDEVS) - num_units =TARGET_10X_NUM_VDEVS +1 ; + num_units = my_num_vdevs +1 ; ath10k_dbg(ATH10K_DBG_WMI, "wmi mem_req_id %d num_units %d num_unit_info %d unit size %d actual units %d\n",
@@ -2952,12 +2959,20 @@ static int ath10k_wmi_10x_cmd_init(struct ath10k *ar)struct wmi_resource_config_10x config = {};u32 len, val;int i; +u32 skid_limit; - config.num_vdevs =__cpu_to_le32 (TARGET_10X_NUM_VDEVS ); - config.num_peers =__cpu_to_le32 (TARGET_10X_NUM_PEERS ); +if (test_bit (ATH10K_FW_FEATURE_WMI_10X_CT , ar->fw_features)) { + config.num_vdevs =__cpu_to_le32 (TARGET_10X_NUM_VDEVS_CT ); + config.num_peers =__cpu_to_le32 (TARGET_10X_NUM_PEERS_CT ); + skid_limit =TARGET_10X_AST_SKID_LIMIT_CT ; + }else { + config.num_vdevs =__cpu_to_le32 (TARGET_10X_NUM_VDEVS ); + config.num_peers =__cpu_to_le32 (TARGET_10X_NUM_PEERS ); + skid_limit =TARGET_10X_AST_SKID_LIMIT ; + } + config.ast_skid_limit =__cpu_to_le32 (skid_limit); config.num_peer_keys =__cpu_to_le32 (TARGET_10X_NUM_PEER_KEYS ); config.num_tids =__cpu_to_le32 (TARGET_10X_NUM_TIDS ); - config.ast_skid_limit =__cpu_to_le32 (TARGET_10X_AST_SKID_LIMIT ); config.tx_chain_mask =__cpu_to_le32 (TARGET_10X_TX_CHAIN_MASK ); config.rx_chain_mask =__cpu_to_le32 (TARGET_10X_RX_CHAIN_MASK ); config.rx_timeout_pri_vo =__cpu_to_le32 (TARGET_10X_RX_TIMEOUT_LO_PRI );
Signature · 1 line
1.7.11.7
WMI version handling
Hi,
This was "[PATCH] ath10k: Support 32+ stations." but I'll change the subject as this a bigger discussion. I'll also drop linux-wireless for now, I assume they are not interested about our discussion how to manage firmware interfaces.
Quoted 11 lines · [email protected] writes:
From: Ben Greear <[email protected]>
Implement 64-bit vdev map to support larger numbers of virtual devices. Support up to 32 stations (actual limit will be determined when loading firmware, as different firmwares have different limits)
Enable larger limits when using Candela Technologies firmware.
Signed-off-by Ben Greear <[email protected]>
So what this firmware does is that it changes these values:
drivers/net/wireless/ath/ath10k/hw.h enum ath10k_mcast2ucast_mode { · line 129
Quoted 4 lines
drivers/net/wireless/ath/ath10k/hw.h +4
-0+/* Over-rides for Candela Technologies firmware */ +#define TARGET_10X_NUM_VDEVS_CT 32 +#define TARGET_10X_NUM_PEERS_CT (32 + (TARGET_10X_NUM_VDEVS_CT)) +#define TARGET_10X_AST_SKID_LIMIT_CT (TARGET_10X_NUM_PEERS_CT * TARGET_10X_NUM_PEER_AST)
I think it would be better to provide these through FW IEs, one u32 for each. I guess we need one also for the skid limit? That way it's easier to maintain this in ath10k.
Of course that would mean we have to create struct ieee80211_iface_limit and struct ieee80211_iface_combination runtime, instead of statically how it's done now. But shouldn't be a problem, right?
Also I have been thinking that using firmware feature bits (for example ATH10K_FW_FEATURE_WMI_10_2 and ATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.
Example:
enum ath10k_fw_wmi_version {
ATH10K_FW_WMI_VERSION_MAIN = 0,
ATH10K_FW_WMI_VERSION_10_1 = 1,
ATH10K_FW_WMI_VERSION_10_2 = 2,
}And then wmi.c would set correct interface based on this version.
We would still use feature bits to enable and disable smaller changes like ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX does. But for bigger WMI changes we would change the WMI version, for example if we have a new firmware branch with significant changes or similar.
And for backwards comptability we need to do so that ATH10K_FW_FEATURE_WMI_10X sets ATH10K_FW_WMI_VERSION_10_1 and ATH10K_FW_FEATURE_WMI_10_2 sets ATH10K_FW_WMI_VERSION_10_2.
Thoughts?
Signature · 6 lines
Kalle Valo _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: WMI version handling
Quoted 19 lines · Kalle Valo
Hi,
This was "[PATCH] ath10k: Support 32+ stations." but I'll change the subject as this a bigger discussion. I'll also drop linux-wireless for now, I assume they are not interested about our discussion how to manage firmware interfaces.
Quoted 10 lines · [email protected] writes:
From: Ben Greear <[email protected]>
Implement 64-bit vdev map to support larger numbers of virtual devices. Support up to 32 stations (actual limit will be determined when loading firmware, as different firmwares have different limits)
Enable larger limits when using Candela Technologies firmware.
Quoted 8 lines
Quoted 1 line
Signed-off-by Ben Greear <[email protected]>So what this firmware does is that it changes these values:
drivers/net/wireless/ath/ath10k/hw.h enum ath10k_mcast2ucast_mode { · line 129
Quoted 4 lines
drivers/net/wireless/ath/ath10k/hw.h +4
-0+/* Over-rides for Candela Technologies firmware */ +#define TARGET_10X_NUM_VDEVS_CT 32 +#define TARGET_10X_NUM_PEERS_CT (32 + (TARGET_10X_NUM_VDEVS_CT)) +#define TARGET_10X_AST_SKID_LIMIT_CT (TARGET_10X_NUM_PEERS_CT * TARGET_10X_NUM_PEER_AST)
My firmware really makes better use of resources and is able to deal better with a wider range of configured values.
For a full list of ath10k patches that I hope to someday submit, see:
http://dmz2.candelatech.com/git/gitweb.cgi?p=linux.ath/.git;a=summary
Towards the end, I have patches to configure number of stations with kernel module variable. I think at a minimum, should be able to configure peer count as well.
Quoted 3 lines
I think it would be better to provide these through FW IEs, one u32 for each. I guess we need one also for the skid limit? That way it's easier to maintain this in ath10k.
Skid limit should depend on the others. If you get unlucky with hashes, or an attacker figures out how to do so artificially, then you can crash upstream ath10k firmware by associating more than skid-limit stations.
Quoted 3 lines
Of course that would mean we have to create struct
ieee80211_iface_limitand structieee80211_iface_combinationruntime, instead of statically how it's done now. But shouldn't be a problem, right?
Yes, I do that later in my patch series. It works, my patches as written may need some changes as I had to remove some const markings that might not be acceptable upstream.
Quoted 8 lines
Also I have been thinking that using firmware feature bits (for example
ATH10K_FW_FEATURE_WMI_10_2andATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.Example:
Quoted 7 lines
enum ath10k_fw_wmi_version { ATH10K_FW_WMI_VERSION_MAIN = 0, ATH10K_FW_WMI_VERSION_10_1 = 1, ATH10K_FW_WMI_VERSION_10_2 = 2, }And then
wmi.cwould set correct interface based on this version.
I am happy with the current flags, it seems to work well enough. I'd leave policy out of the IEs as much as possible, as normal users cannot modify it, and certainly it would be a problem if you wanted different policy with different NICs in same system.
IEs should describe the minimum needed for the
ath10k to enforce policy as best as it can. We have to assume that users tweaking station and peer count can deal with fw crashes until they get the settings right.
My CT firmware will print out available RAM once booted, so it is fairly easy to utilize maximum amount of resources with a bit of trial and error. It would be trivial to make upstream firmware do the same, of course, but upstream firmware may crash for other reasons as you change resource config...
Quoted 8 lines
We would still use feature bits to enable and disable smaller changes like
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TXdoes. But for bigger WMI changes we would change the WMI version, for example if we have a new firmware branch with significant changes or similar.And for backwards comptability we need to do so that
ATH10K_FW_FEATURE_WMI_10XsetsATH10K_FW_WMI_VERSION_10_1andATH10K_FW_FEATURE_WMI_10_2setsATH10K_FW_WMI_VERSION_10_2.
I was able to do all of my changes w/out needing new a new WMI version, and I think that is the right approach. I do not like large amounts of duplicated code and table lookups, which is what new WMI versions appear to imply.
I'd prefer to keep IEs generally as they are now (in my firmware, at least), and allow changing number of peers, stations, etc through debugfs and/or kernel modules. Just restart the firmware when users have completed the config changes. Don't assume ath10k can properly limit all configurables to keep firmware from crashing, but give users enough info (ie, RAM usage), that they can deal with it themselves. Normal users will never need to know about or change the configurables anyway, but those building APs can tweak as needed.
If QCA goes to more of a rolling release for firmware, like I do for CT firmware, then we may want to add IEs a bit more often, to notify things like "can-support-feature-foo". 10.2 v/s 10.1 can still determine the over-all WMI api, perhaps, but at specific points we can take advantage of specific firmware features based on IE flag.
Thanks,
Ben
Signature · 8 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: WMI version handling
Quoted 2 lines · Ben Greear
Quoted 1 line · Kalle Valo
Hi,
[...]
Quoted 14 lines
Quoted 14 lines
Also I have been thinking that using firmware feature bits (for example
ATH10K_FW_FEATURE_WMI_10_2andATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.Example:
enum ath10k_fw_wmi_version { ATH10K_FW_WMI_VERSION_MAIN = 0, ATH10K_FW_WMI_VERSION_10_1 = 1, ATH10K_FW_WMI_VERSION_10_2 = 2, }
Quoted 3 lines
Quoted 1 line
And then
wmi.cwould set correct interface based on this version.I am happy with the current flags, it seems to work well enough.
I'm actually okay with this but I'd actually throw out the "wmi" string from it and leave out just "ath10k_fw_version". I've recently discovered some minor HTT discrepancies between fw branches so we might want to use the version tag to pick HTT "backend" as well..
Quoted 8 lines
I'd leave policy out of the IEs as much as possible, as normal users cannot modify it, and certainly it would be a problem if you wanted different policy with different NICs in same system.
IEs should describe the minimum needed for the
ath10k to enforce policy as best as it can. We have to assume that users tweaking station and peer count can deal with fw crashes until they get the settings right.
Quoted 5 lines
My CT firmware will print out available RAM once booted, so it is fairly easy to utilize maximum amount of resources with a bit of trial and error. It would be trivial to make upstream firmware do the same, of course, but upstream firmware may crash for other reasons as you change resource config...
IOW You're okay if ath10k applies default/hardcoded configuration values of 10.1 for your firmware (as your firmware is going to advertise as a 10.1) - is that correct? You just want to be able to tune these values per-device in runtime. I think debugfs is the best candidate here then.
ath10k would need to have a separate debugfs entry for that then, i.e. one that is independent from wiphy. You could have, e.g. /sys/kernel/debug/ath10k/pci/0000:04:00.0/num_peers which re-registers to mac80211 upon modification.
Quoted 5 lines
Quoted 5 lines
We would still use feature bits to enable and disable smaller changes like
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TXdoes. But for bigger WMI changes we would change the WMI version, for example if we have a new firmware branch with significant changes or similar.
Quoted 8 lines
Quoted 3 lines
And for backwards comptability we need to do so that
ATH10K_FW_FEATURE_WMI_10XsetsATH10K_FW_WMI_VERSION_10_1andATH10K_FW_FEATURE_WMI_10_2setsATH10K_FW_WMI_VERSION_10_2.I was able to do all of my changes w/out needing new a new WMI version, and I think that is the right approach. I do not like large amounts of duplicated code and table lookups, which is what new WMI versions appear to imply.
It's actually really simple to update WMI in an ABI-safe way. Unfortunately official firmware updates break it fairly often and we have to deal with that. Aaand there's going to be another WMI backend soon most likely.
[...]
Quoted 5 lines
If QCA goes to more of a rolling release for firmware, like I do for CT firmware, then we may want to add IEs a bit more often, to notify things like "can-support-feature-foo". 10.2 v/s 10.1 can still determine the over-all WMI api, perhaps, but at specific points we can take advantage of specific firmware features based on IE flag.
This is what WMI bitmap service is actually for. ath10k is ignoring this now and exposes it via debugfs only. It's possible to, e.g. pick "max num of stations" configuration values based on the "iram tids" being set or not.
Michał
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
Re: WMI version handling
Quoted 48 lines · Michal Kazior
Quoted 2 lines · Ben Greear
Quoted 1 line · Kalle Valo
Hi,
[...]
Quoted 14 lines
Quoted 14 lines
Also I have been thinking that using firmware feature bits (for example
ATH10K_FW_FEATURE_WMI_10_2andATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.Example:
enum ath10k_fw_wmi_version { ATH10K_FW_WMI_VERSION_MAIN = 0, ATH10K_FW_WMI_VERSION_10_1 = 1, ATH10K_FW_WMI_VERSION_10_2 = 2, }Quoted 3 lines
Quoted 1 line
And then
wmi.cwould set correct interface based on this version.I am happy with the current flags, it seems to work well enough.
I'm actually okay with this but I'd actually throw out the "wmi" string from it and leave out just "
ath10k_fw_version". I've recently discovered some minor HTT discrepancies between fw branches so we might want to use the version tag to pick HTT "backend" as well..Quoted 8 lines
I'd leave policy out of the IEs as much as possible, as normal users cannot modify it, and certainly it would be a problem if you wanted different policy with different NICs in same system.
IEs should describe the minimum needed for the
ath10k to enforce policy as best as it can. We have to assume that users tweaking station and peer count can deal with fw crashes until they get the settings right.Quoted 5 lines
My CT firmware will print out available RAM once booted, so it is fairly easy to utilize maximum amount of resources with a bit of trial and error. It would be trivial to make upstream firmware do the same, of course, but upstream firmware may crash for other reasons as you change resource config...
IOW You're okay if ath10k applies default/hardcoded configuration values of 10.1 for your firmware (as your firmware is going to advertise as a 10.1) - is that correct? You just want to be able to tune these values per-device in runtime. I think debugfs is the best candidate here then.
Quoted 4 lines
ath10k would need to have a separate debugfs entry for that then, i.e. one that is independent from wiphy. You could have, e.g. /sys/kernel/debug/ath10k/pci/0000:04:00.0/num_peers which re-registers to mac80211 upon modification.
That would be fine for the number of stations and peers, but there are other features more specific to my firmware that should be enabled by default if my firmware is loaded. These include better tx-status, for instance. I figured might as well also auto-tune the stations higher at the same time.
Also, some of the logic that auto-calculates skid-len, for instance, really should be done for all firmware that can handle it to protect against malicious hashing attacks.
Quoted 27 lines
Quoted 5 lines
Quoted 5 lines
We would still use feature bits to enable and disable smaller changes like
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TXdoes. But for bigger WMI changes we would change the WMI version, for example if we have a new firmware branch with significant changes or similar.Quoted 8 lines
Quoted 3 lines
And for backwards comptability we need to do so that
ATH10K_FW_FEATURE_WMI_10XsetsATH10K_FW_WMI_VERSION_10_1andATH10K_FW_FEATURE_WMI_10_2setsATH10K_FW_WMI_VERSION_10_2.I was able to do all of my changes w/out needing new a new WMI version, and I think that is the right approach. I do not like large amounts of duplicated code and table lookups, which is what new WMI versions appear to imply.
It's actually really simple to update WMI in an ABI-safe way. Unfortunately official firmware updates break it fairly often and we have to deal with that. Aaand there's going to be another WMI backend soon most likely.
[...]
Quoted 5 lines
If QCA goes to more of a rolling release for firmware, like I do for CT firmware, then we may want to add IEs a bit more often, to notify things like "can-support-feature-foo". 10.2 v/s 10.1 can still determine the over-all WMI api, perhaps, but at specific points we can take advantage of specific firmware features based on IE flag.
Quoted 4 lines
This is what WMI bitmap service is actually for. ath10k is ignoring this now and exposes it via debugfs only. It's possible to, e.g. pick "max num of stations" configuration values based on the "iram tids" being set or not.
I guess I haven't looked into WMI bitmap, but I was hoping for minimal code changes when adding my firmware, and I want to keep my firmware backwards compat with existing kernels. With regard to max-num-of-stations, I don't think you will will be able to reliably calculate the exact resource limits combinations from ath10k driver.
Every configurable (peers, tx-buffers, stations, skid-limit, etc) affects RAM and/or IRAM and there are various
upper limits on various items in the firmware that may only be hit at unlucky times during runtime.
Thanks,
Ben
Signature · 7 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: WMI version handling
In reply to Michal KaziorQuoted 18 lines · Michal Kazior
Quoted 2 lines · Ben Greear
Quoted 1 line · Kalle Valo
Hi,
[...]
Quoted 14 lines
Quoted 14 lines
Also I have been thinking that using firmware feature bits (for example
ATH10K_FW_FEATURE_WMI_10_2andATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.Example:
enum ath10k_fw_wmi_version { ATH10K_FW_WMI_VERSION_MAIN = 0, ATH10K_FW_WMI_VERSION_10_1 = 1, ATH10K_FW_WMI_VERSION_10_2 = 2, }
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
And then
wmi.cwould set correct interface based on this version.I am happy with the current flags, it seems to work well enough.
I'm actually okay with this but I'd actually throw out the "wmi" string from it and leave out just "
ath10k_fw_version". I've recently discovered some minor HTT discrepancies between fw branches so we might want to use the version tag to pick HTT "backend" as well..
I'm again thinking that we should have a separate enum for the HTT version. So that the firmware interface is defined with WMI version, HTT version and feature flags (which define smaller changes in the interface).
Signature · 6 lines
Kalle Valo _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: WMI version handling
In reply to Ben GreearQuoted 14 lines · Ben Greear
Quoted 14 lines
Also I have been thinking that using firmware feature bits (for example
ATH10K_FW_FEATURE_WMI_10_2andATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.Example:
enum ath10k_fw_wmi_version { ATH10K_FW_WMI_VERSION_MAIN = 0, ATH10K_FW_WMI_VERSION_10_1 = 1, ATH10K_FW_WMI_VERSION_10_2 = 2, }
Quoted 3 lines
Quoted 1 line
And then
wmi.cwould set correct interface based on this version.I am happy with the current flags, it seems to work well enough.
Yeah, there's no problem at the moment. But if we start adding more interfaces handling them through feature flags will become more difficult. That's why I think adding a separate enum will be better in the long run.
Quoted 5 lines
I'd leave policy out of the IEs as much as possible, as normal users cannot modify it, and certainly it would be a problem if you wanted different policy with different NICs in same system. IEs should describe the minimum needed for the ath10k to enforce policy as best as it can.
The firmware IEs are not about policy. They are about advertising the capabilities of the firmware image so that ath10k can know how to configure the firmare.
Quoted 2 lines
We have to assume that users tweaking station and peer count can deal with fw crashes until they get the settings right.
No way. In no circumstances ath10k should configure firmware out of bounds. If we do that, it's a bug in ath10k.
Signature · 6 lines
Kalle Valo _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: WMI version handling
Quoted 16 lines · Kalle Valo
Quoted 14 lines · Ben Greear
Quoted 14 lines
Also I have been thinking that using firmware feature bits (for example
ATH10K_FW_FEATURE_WMI_10_2andATH10K_FW_FEATURE_WMI_10X) for WMI version is not the best way. I think it's easier to manage all this if we have a u32 FW IE to provide WMI version. IIRC Ben was suggesting this at some point.Example:
enum ath10k_fw_wmi_version { ATH10K_FW_WMI_VERSION_MAIN = 0, ATH10K_FW_WMI_VERSION_10_1 = 1, ATH10K_FW_WMI_VERSION_10_2 = 2, }
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
And then
wmi.cwould set correct interface based on this version.I am happy with the current flags, it seems to work well enough.
Yeah, there's no problem at the moment. But if we start adding more interfaces handling them through feature flags will become more difficult. That's why I think adding a separate enum will be better in the long run.
Worry about the long run when it gets here. Prematurely engineering for possible scenarios just wastes time. We can always go back and reorganize code later as the re-use patterns become more clear.
Quoted 9 lines
Quoted 5 lines
I'd leave policy out of the IEs as much as possible, as normal users cannot modify it, and certainly it would be a problem if you wanted different policy with different NICs in same system. IEs should describe the minimum needed for the ath10k to enforce policy as best as it can.
The firmware IEs are not about policy. They are about advertising the capabilities of the firmware image so that ath10k can know how to configure the firmare.
More stations means less peers, less tx-buffers means more of other things. Disabling some firmware offload features frees ram for other things. RAM usage per item increment is not even linear in some cases, and you would have to have intimate knowledge of the firmware to understand the limits.
Firmware can only tell you the maximum stations it can support, but if you configure too many peers or too many tx-buffers, or enable roaming offload, you would have to decrease the number of stations actually allocated.
Some users may want lots of stations, others lots of peers, other less tx-buffers, and others more. Some might want to ensure skid-length handles worst-case scenarios at cost of fewer peers or stations.
Quoted 5 lines
Quoted 2 lines
We have to assume that users tweaking station and peer count can deal with fw crashes until they get the settings right.
No way. In no circumstances ath10k should configure firmware out of bounds. If we do that, it's a bug in ath10k.
You are either going to have to fix firmware, cripple your driver, or accept some risk and let users configure settings that work best for them if they care to. Make sure the driver defaults work and do not crash, but don't be so conservative that you decrease usability for those that actually care to tinker.
If you are not swayed by my arguments, then just go ahead and implement it how you want and I will attempt to make my patches work with your methods. I am frustrated with endless discussions and no upstream patches.
Thanks,
Ben
Signature · 7 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k