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
5086 * @req_ie_len: association request IEs length5086 * @req_ie_len: association request IEs length
5087 * @resp_ie: association response IEs (may be %NULL)5087 * @resp_ie: association response IEs (may be %NULL)
5088 * @resp_ie_len: assoc response IEs length5088 * @resp_ie_len: assoc response IEs length
5089 * @status: status code, 0 for successful connection, use5089 * @status: status code, %WLAN_STATUS_SUCCESS for successful connection, use
5090 * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you5090 * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you
5091 * the real status code for failures.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.
5092 * @gfp: allocation flags5097 * @gfp: allocation flags
5093 * @timeout_reason: reason for connection timeout. This is used when the5098 * @timeout_reason: reason for connection timeout. This is used when the
5094 * connection fails due to a timeout instead of an explicit rejection from5099 * 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
5097 * failure is due to a timeout and not due to explicit rejection by the AP.5102 * failure is due to a timeout and not due to explicit rejection by the AP.
5098 * This value is ignored in other cases (@status >= 0).5103 * This value is ignored in other cases (@status >= 0).
5099 *5104 *
5100 * It should be called by the underlying driver whenever connect() has5105 * It should be called by the underlying driver once execution of the connection
5101 * succeeded. This is similar to cfg80211_connect_result(), but with the5106 * request from connect() has been completed. This is similar to
5102 * option of identifying the exact bss entry for the connection. Only one of5107 * cfg80211_connect_result(), but with the option of identifying the exact bss
5103 * these functions should be called.5108 * entry for the connection. Only one of these functions should be called.
5104 */5109 */
5105void cfg80211_connect_bss(struct net_device *dev, const u8 *bssid,5110void cfg80211_connect_bss(struct net_device *dev, const u8 *bssid,
5106 struct cfg80211_bss *bss, const u8 *req_ie,5111 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
5117 * @req_ie_len: association request IEs length5122 * @req_ie_len: association request IEs length
5118 * @resp_ie: association response IEs (may be %NULL)5123 * @resp_ie: association response IEs (may be %NULL)
5119 * @resp_ie_len: assoc response IEs length5124 * @resp_ie_len: assoc response IEs length
5120 * @status: status code, 0 for successful connection, use5125 * @status: status code, %WLAN_STATUS_SUCCESS for successful connection, use
5121 * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you5126 * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you
5122 * the real status code for failures.5127 * the real status code for failures.
5123 * @gfp: allocation flags5128 * @gfp: allocation flags
5124 *5129 *
5125 * It should be called by the underlying driver whenever connect() has5130 * It should be called by the underlying driver once execution of the connection
5126 * succeeded.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.
5127 */5134 */
5128static inline void5135static inline void
5129cfg80211_connect_result(struct net_device *dev, const u8 *bssid,5136cfg80211_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