History

cfg80211: Allow cfg80211_connect_result() errors to be distinguished

Previously, the status parameter to cfg80211_connect_result() was documented as using WLAN_STATUS_UNSPECIFIED_FAILURE (1) when the real status code for the failure is not known. This value can be used by an AP (and often is) and as such, user space cannot distinguish between explicitly rejected authentication/association and not being able to even try to associate or not receiving a response from the AP. Add a new inline function, cfg80211_connect_timeout(), to be used when the driver knows that the connection attempt failed due to a reason where connection could not be attempt or no response was received from the AP. The internal functions now allow a negative status value (-1) to be used as an indication of this special case. This results in the NL80211_ATTR_TIMED_OUT to be added to the NL80211_CMD_CONNECT event to allow user space to determine this case was hit. For backwards compatibility, NL80211_STATUS_CODE with the value WLAN_STATUS_UNSPECIFIED_FAILURE is still indicated in the event in such a case.

Jouni Malinen committed 10 years ago

Commit bf1ecd21 parent 0bb7ed47 files · +58 −24Browse files

Showing the changes to include/uapi/linux (1 of 7 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+6−1
@@ -493,7 +493,12 @@ · 492 unmodified lines
493 * This attribute is ignored if driver does not support roam scan.493 * This attribute is ignored if driver does not support roam scan.
494 * It is also sent as an event, with the BSSID and response IEs when the494 * It is also sent as an event, with the BSSID and response IEs when the
495 * connection is established or failed to be established. This can be495 * connection is established or failed to be established. This can be
496 * determined by the STATUS_CODE attribute.496 * determined by the %NL80211_ATTR_STATUS_CODE attribute (0 = success,
497 * non-zero = failure). If %NL80211_ATTR_TIMED_OUT is included in the
498 * event, the connection attempt failed due to not being able to initiate
499 * authentication/association or not receiving a response from the AP.
500 * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
501 * well to remain backwards compatible.
497 * @NL80211_CMD_ROAM: request that the card roam (currently not implemented),502 * @NL80211_CMD_ROAM: request that the card roam (currently not implemented),
498 * sent as an event when the card/driver roamed by itself.503 * sent as an event when the card/driver roamed by itself.
499 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify504 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t