diff options
author | Benjamin Berg <benjamin.berg@intel.com> | 2023-09-20 21:25:27 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-25 09:12:34 +0200 |
commit | a7b2cc591d556eca044c823e4e92d8c1cb430ef7 (patch) | |
tree | f605994c35c58efd467a606c3bf8bebef6c9bdf7 /include | |
parent | ef246a1480cc484cd2aeda75737cb0848616ddf3 (diff) |
wifi: cfg80211: report per-link errors during association
When one of the links (other than the assoc_link) is misconfigured
and cannot work the association will fail. However, userspace was not
able to tell that the operation only failed because of a problem with
one of the links. Fix this, by allowing the driver to set a per-link
error code and reporting the (first) offending link by setting the
bad_attr accordingly.
This only allows us to report the first error, but that is sufficient
for userspace to e.g. remove the offending link and retry.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230920211508.ebe63c0bd513.I40799998f02bf987acee1501a2522dc98bb6eb5a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/cfg80211.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 899e9ffa6048..34c50f7273d1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2980,12 +2980,15 @@ struct cfg80211_auth_request { * @elems_len: length of the elements * @disabled: If set this link should be included during association etc. but it * should not be used until enabled by the AP MLD. + * @error: per-link error code, must be <= 0. If there is an error, then the + * operation as a whole must fail. */ struct cfg80211_assoc_link { struct cfg80211_bss *bss; const u8 *elems; size_t elems_len; bool disabled; + int error; }; /** |