diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ff857f10cb85..e3bee3cecdfa 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1642,7 +1642,7 @@ static int parse_station_flags(struct genl_info *info, | |||
1642 | 1642 | ||
1643 | static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | 1643 | static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, |
1644 | int flags, struct net_device *dev, | 1644 | int flags, struct net_device *dev, |
1645 | u8 *mac_addr, struct station_info *sinfo) | 1645 | const u8 *mac_addr, struct station_info *sinfo) |
1646 | { | 1646 | { |
1647 | void *hdr; | 1647 | void *hdr; |
1648 | struct nlattr *sinfoattr, *txrate; | 1648 | struct nlattr *sinfoattr, *txrate; |
@@ -5350,6 +5350,25 @@ void nl80211_send_remain_on_channel_cancel( | |||
5350 | channel_type, 0, gfp); | 5350 | channel_type, 0, gfp); |
5351 | } | 5351 | } |
5352 | 5352 | ||
5353 | void nl80211_send_sta_event(struct cfg80211_registered_device *rdev, | ||
5354 | struct net_device *dev, const u8 *mac_addr, | ||
5355 | struct station_info *sinfo, gfp_t gfp) | ||
5356 | { | ||
5357 | struct sk_buff *msg; | ||
5358 | |||
5359 | msg = nlmsg_new(NLMSG_GOODSIZE, gfp); | ||
5360 | if (!msg) | ||
5361 | return; | ||
5362 | |||
5363 | if (nl80211_send_station(msg, 0, 0, 0, dev, mac_addr, sinfo) < 0) { | ||
5364 | nlmsg_free(msg); | ||
5365 | return; | ||
5366 | } | ||
5367 | |||
5368 | genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0, | ||
5369 | nl80211_mlme_mcgrp.id, gfp); | ||
5370 | } | ||
5371 | |||
5353 | /* initialisation/exit functions */ | 5372 | /* initialisation/exit functions */ |
5354 | 5373 | ||
5355 | int nl80211_init(void) | 5374 | int nl80211_init(void) |