summaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-10-27 14:45:02 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 16:00:59 -0500
commitef100682814c429709f0904b757595e25019cb31 (patch)
tree60afaeb0de107b24430f870bd626c691e983a216 /include/net/cfg80211.h
parentc74d084f914e16e42730bcf625ab3f37a4cae8d4 (diff)
cfg80211: annotate cfg80211_inform_bss
This function returns a referenced BSS struct (or NULL), annotate with __must_check. It seems that a lot of drivers get this completely wrong and leak all BSS structs as a result. Reported-by: Adam Mikuta <Adam.Mikuta@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 95852e36713..0c71d4a30cd 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2636,8 +2636,10 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
*
* This informs cfg80211 that BSS information was found and
* the BSS should be updated/added.
+ *
+ * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()!
*/
-struct cfg80211_bss*
+struct cfg80211_bss * __must_check
cfg80211_inform_bss_frame(struct wiphy *wiphy,
struct ieee80211_channel *channel,
struct ieee80211_mgmt *mgmt, size_t len,
@@ -2659,8 +2661,10 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
*
* This informs cfg80211 that BSS information was found and
* the BSS should be updated/added.
+ *
+ * NOTE: Returns a referenced struct, must be released with cfg80211_put_bss()!
*/
-struct cfg80211_bss*
+struct cfg80211_bss * __must_check
cfg80211_inform_bss(struct wiphy *wiphy,
struct ieee80211_channel *channel,
const u8 *bssid,