Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243696
b: refs/heads/master
c: bef9bac
h: refs/heads/master
v: v3
  • Loading branch information
Mariusz Kozlowski authored and John W. Linville committed Mar 28, 2011
1 parent f368a0e commit cbb9111
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67aa030c0dff6095128bcb4e8043b48360f32331
refs/heads/master: bef9bacc4ec7ea6a02876164cd6ccaa4759edce4
13 changes: 10 additions & 3 deletions trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,16 +585,23 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
struct cfg80211_internal_bss *res;
size_t ielen = len - offsetof(struct ieee80211_mgmt,
u.probe_resp.variable);
size_t privsz = wiphy->bss_priv_size;
size_t privsz;

if (WARN_ON(!mgmt))
return NULL;

if (WARN_ON(!wiphy))
return NULL;

if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC &&
(signal < 0 || signal > 100)))
return NULL;

if (WARN_ON(!mgmt || !wiphy ||
len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable)))
if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable)))
return NULL;

privsz = wiphy->bss_priv_size;

res = kzalloc(sizeof(*res) + privsz + ielen, gfp);
if (!res)
return NULL;
Expand Down

0 comments on commit cbb9111

Please sign in to comment.