3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

auth-proto: document acceptable return values for auth-protos

Since all auth-protos are hidden behind an abstraction they need
to be consisten with the return values as some should be handled
specially.
This commit is contained in:
James Prestwood 2021-09-08 14:31:58 -07:00 committed by Denis Kenzior
parent 7e9b4170b1
commit 305189523a

View File

@ -25,6 +25,21 @@
struct auth_proto {
bool (*start)(struct auth_proto *ap);
void (*free)(struct auth_proto *ap);
/*
* Callback to receive an Authenticate frame. auth-protos should
* return error codes consistent with one another as some are treated
* specially:
*
* 0 indicates success, and that a state transition occurred.
* -ENOMSG or -EBADMSG indicates the message should be ignored silently
* -EAGAIN indicates a retry, and no state transition occurred. Any
* retry is handled by the auth-proto internally
* -EPROTO indicates a fatal error
* Any other < 0 return will be treated as a fatal error
* > 0 indicates a fatal error with status code. This only applies to
* non-sta cases as non-zero status codes are rejected by the
* kernel when in station mode.
*/
int (*rx_authenticate)(struct auth_proto *driver,
const uint8_t *frame, size_t len);
int (*rx_associate)(struct auth_proto *driver,