diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 10823e2b60ce..aed6d2ad4c90 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3620,7 +3620,8 @@ static int nl80211_stop_sched_scan(struct sk_buff *skb, | |||
3620 | return __cfg80211_stop_sched_scan(rdev, false); | 3620 | return __cfg80211_stop_sched_scan(rdev, false); |
3621 | } | 3621 | } |
3622 | 3622 | ||
3623 | static int nl80211_send_bss(struct sk_buff *msg, u32 pid, u32 seq, int flags, | 3623 | static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, |
3624 | u32 seq, int flags, | ||
3624 | struct cfg80211_registered_device *rdev, | 3625 | struct cfg80211_registered_device *rdev, |
3625 | struct wireless_dev *wdev, | 3626 | struct wireless_dev *wdev, |
3626 | struct cfg80211_internal_bss *intbss) | 3627 | struct cfg80211_internal_bss *intbss) |
@@ -3632,11 +3633,13 @@ static int nl80211_send_bss(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
3632 | 3633 | ||
3633 | ASSERT_WDEV_LOCK(wdev); | 3634 | ASSERT_WDEV_LOCK(wdev); |
3634 | 3635 | ||
3635 | hdr = nl80211hdr_put(msg, pid, seq, flags, | 3636 | hdr = nl80211hdr_put(msg, NETLINK_CB(cb->skb).pid, seq, flags, |
3636 | NL80211_CMD_NEW_SCAN_RESULTS); | 3637 | NL80211_CMD_NEW_SCAN_RESULTS); |
3637 | if (!hdr) | 3638 | if (!hdr) |
3638 | return -1; | 3639 | return -1; |
3639 | 3640 | ||
3641 | genl_dump_check_consistent(cb, hdr, &nl80211_fam); | ||
3642 | |||
3640 | NLA_PUT_U32(msg, NL80211_ATTR_GENERATION, rdev->bss_generation); | 3643 | NLA_PUT_U32(msg, NL80211_ATTR_GENERATION, rdev->bss_generation); |
3641 | NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex); | 3644 | NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex); |
3642 | 3645 | ||
@@ -3725,11 +3728,12 @@ static int nl80211_dump_scan(struct sk_buff *skb, | |||
3725 | spin_lock_bh(&rdev->bss_lock); | 3728 | spin_lock_bh(&rdev->bss_lock); |
3726 | cfg80211_bss_expire(rdev); | 3729 | cfg80211_bss_expire(rdev); |
3727 | 3730 | ||
3731 | cb->seq = rdev->bss_generation; | ||
3732 | |||
3728 | list_for_each_entry(scan, &rdev->bss_list, list) { | 3733 | list_for_each_entry(scan, &rdev->bss_list, list) { |
3729 | if (++idx <= start) | 3734 | if (++idx <= start) |
3730 | continue; | 3735 | continue; |
3731 | if (nl80211_send_bss(skb, | 3736 | if (nl80211_send_bss(skb, cb, |
3732 | NETLINK_CB(cb->skb).pid, | ||
3733 | cb->nlh->nlmsg_seq, NLM_F_MULTI, | 3737 | cb->nlh->nlmsg_seq, NLM_F_MULTI, |
3734 | rdev, wdev, scan) < 0) { | 3738 | rdev, wdev, scan) < 0) { |
3735 | idx--; | 3739 | idx--; |