History

cfg80211: Fix documentation for connect result

The function documentation for cfg80211_connect_bss() and cfg80211_connect_result() was still claiming that they are used only for a success case while these functions can now be used to report both success and various failure cases. The actual use cases were already described in the connect() documentation. Update the function specific comments to note the failure cases and also describe how the special status == -1 case is used in cfg80211_connect_bss() to indicate a connection timeout based on the internal implementation in cfg80211_connect_timeout().

Jouni Malinen committed 9 years ago

Commit c88215d1 parent 3093ebb1 file · +17 −10Browse files

Unified · Split

include/net/cfg80211.h+17−10
@@ -5086,9 +5086,14 @@ static inline void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp) · 5085 unmodified lines
50865086 * @req_ie_len: association request IEs length
50875087 * @resp_ie: association response IEs (may be %NULL)
50885088 * @resp_ie_len: assoc response IEs length
5089− * @status: status code, 0 for successful connection, use
5090− * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you
5091− * the real status code for failures.
5089+ * @status: status code, %WLAN_STATUS_SUCCESS for successful connection, use
5090+ * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you
5091+ * the real status code for failures. If this call is used to report a
5092+ * failure due to a timeout (e.g., not receiving an Authentication frame
5093+ * from the AP) instead of an explicit rejection by the AP, -1 is used to
5094+ * indicate that this is a failure, but without a status code.
5095+ * @timeout_reason is used to report the reason for the timeout in that
5096+ * case.
50925097 * @gfp: allocation flags
50935098 * @timeout_reason: reason for connection timeout. This is used when the
50945099 * connection fails due to a timeout instead of an explicit rejection from
@@ -5097,10 +5102,10 @@ static inline void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp) · 2 unmodified lines
50975102 * failure is due to a timeout and not due to explicit rejection by the AP.
50985103 * This value is ignored in other cases (@status >= 0).
50995104 *
5100− * It should be called by the underlying driver whenever connect() has
5101− * succeeded. This is similar to cfg80211_connect_result(), but with the
5102− * option of identifying the exact bss entry for the connection. Only one of
5103− * these functions should be called.
5105+ * It should be called by the underlying driver once execution of the connection
5106+ * request from connect() has been completed. This is similar to
5107+ * cfg80211_connect_result(), but with the option of identifying the exact bss
5108+ * entry for the connection. Only one of these functions should be called.
51045109 */
51055110 void cfg80211_connect_bss(struct net_device *dev, const u8 *bssid,
51065111 struct cfg80211_bss *bss, const u8 *req_ie,
@@ -5117,13 +5122,15 @@ void cfg80211_connect_bss(struct net_device *dev, const u8 *bssid, · 10 unmodified lines
51175122 * @req_ie_len: association request IEs length
51185123 * @resp_ie: association response IEs (may be %NULL)
51195124 * @resp_ie_len: assoc response IEs length
5120− * @status: status code, 0 for successful connection, use
5125+ * @status: status code, %WLAN_STATUS_SUCCESS for successful connection, use
51215126 * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you
51225127 * the real status code for failures.
51235128 * @gfp: allocation flags
51245129 *
5125− * It should be called by the underlying driver whenever connect() has
5126− * succeeded.
5130+ * It should be called by the underlying driver once execution of the connection
5131+ * request from connect() has been completed. This is similar to
5132+ * cfg80211_connect_bss() which allows the exact bss entry to be specified. Only
5133+ * one of these functions should be called.
51275134 */
51285135 static inline void
51295136 cfg80211_connect_result(struct net_device *dev, const u8 *bssid,

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