aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2012-11-25 13:13:28 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-26 05:28:55 -0500
commitc216e6417f473ab4666f539844652bf2f4129777 (patch)
tree78c737f511216e00167a8ddf802af97e421c22d6 /include/net/cfg80211.h
parent0172bb75073e11a5aa9d8a953bdaefb8709f00c8 (diff)
cfg80211: change function signature of cfg80211_get_p2p_attr()
The function cfg80211_get_p2p_attr() can fail and returns a negative error code. However, the return type is unsigned int. The largest positive number is determined by desired_len variable in the function, which is u16. So changing the return type to int to allow easy error checking. Also change the type for the attribute to enum for improved type checking. Signed-off-by: Arend van Spriel <arend@broadcom.com> [fix indentation, don't use u8 attr variable] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8a1aec54e68f..c2c185febb87 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3652,8 +3652,9 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev);
3652 * the data is malformed or the attribute can't be found (respectively), 3652 * the data is malformed or the attribute can't be found (respectively),
3653 * or the length of the found attribute (which can be zero). 3653 * or the length of the found attribute (which can be zero).
3654 */ 3654 */
3655unsigned int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, 3655int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
3656 u8 attr, u8 *buf, unsigned int bufsize); 3656 enum ieee80211_p2p_attr_id attr,
3657 u8 *buf, unsigned int bufsize);
3657 3658
3658/* Logging, debugging and troubleshooting/diagnostic helpers. */ 3659/* Logging, debugging and troubleshooting/diagnostic helpers. */
3659 3660