Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255409
b: refs/heads/master
c: 180cdc7
h: refs/heads/master
i:
  255407: 324a189
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jun 1, 2011
1 parent 12a5e0d commit 277bb10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 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: 84288044dc9a50d2c0b0f1a024d7cd87ab3dd131
refs/heads/master: 180cdc79c2204d0abe15509689dde631290f6a95
19 changes: 15 additions & 4 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3754,10 +3754,6 @@ static int nl80211_send_survey(struct sk_buff *msg, u32 pid, u32 seq,
void *hdr;
struct nlattr *infoattr;

/* Survey without a channel doesn't make sense */
if (!survey->channel)
return -EINVAL;

hdr = nl80211hdr_put(msg, pid, seq, flags,
NL80211_CMD_NEW_SURVEY_RESULTS);
if (!hdr)
Expand Down Expand Up @@ -3820,13 +3816,28 @@ static int nl80211_dump_survey(struct sk_buff *skb,
}

while (1) {
struct ieee80211_channel *chan;

res = dev->ops->dump_survey(&dev->wiphy, netdev, survey_idx,
&survey);
if (res == -ENOENT)
break;
if (res)
goto out_err;

/* Survey without a channel doesn't make sense */
if (!survey.channel) {
res = -EINVAL;
goto out;
}

chan = ieee80211_get_channel(&dev->wiphy,
survey.channel->center_freq);
if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) {
survey_idx++;
continue;
}

if (nl80211_send_survey(skb,
NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, NLM_F_MULTI,
Expand Down

0 comments on commit 277bb10

Please sign in to comment.