blob: b96933322077c6238dd39c4d990941e85154e757 [file] [log] [blame]
Johannes Berg55682962007-09-20 13:09:35 -04001#ifndef __NET_WIRELESS_NL80211_H
2#define __NET_WIRELESS_NL80211_H
3
4#include "core.h"
5
Johannes Bergdad82332009-07-01 21:26:46 +02006int nl80211_init(void);
7void nl80211_exit(void);
Johannes Berg3bb20552014-05-26 13:52:25 +02008void nl80211_notify_wiphy(struct cfg80211_registered_device *rdev,
9 enum nl80211_commands cmd);
Denis Kenzior896ff062016-08-03 16:58:33 -050010void nl80211_notify_iface(struct cfg80211_registered_device *rdev,
11 struct wireless_dev *wdev,
12 enum nl80211_commands cmd);
Johannes Bergdad82332009-07-01 21:26:46 +020013void nl80211_send_scan_start(struct cfg80211_registered_device *rdev,
Johannes Bergfd014282012-06-18 19:17:03 +020014 struct wireless_dev *wdev);
Johannes Bergf9d15d12014-01-22 11:14:19 +020015struct sk_buff *nl80211_build_scan_msg(struct cfg80211_registered_device *rdev,
16 struct wireless_dev *wdev, bool aborted);
Arend Van Spriel505a2e82016-12-16 11:21:54 +000017void nl80211_send_scan_msg(struct cfg80211_registered_device *rdev,
18 struct sk_buff *msg);
Arend Van Spriel96b08fd2017-04-13 13:06:27 +010019void nl80211_send_sched_scan(struct cfg80211_sched_scan_request *req, u32 cmd);
Jonathan Doronb0d7aa52014-12-15 19:26:00 +020020void nl80211_common_reg_change_event(enum nl80211_commands cmd_id,
21 struct regulatory_request *request);
22
23static inline void
24nl80211_send_reg_change_event(struct regulatory_request *request)
25{
26 nl80211_common_reg_change_event(NL80211_CMD_REG_CHANGE, request);
27}
28
29static inline void
30nl80211_send_wiphy_reg_change_event(struct regulatory_request *request)
31{
32 nl80211_common_reg_change_event(NL80211_CMD_WIPHY_REG_CHANGE, request);
33}
34
Johannes Bergdad82332009-07-01 21:26:46 +020035void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev,
36 struct net_device *netdev,
Johannes Berge6d6e342009-07-01 21:26:47 +020037 const u8 *buf, size_t len, gfp_t gfp);
Johannes Bergdad82332009-07-01 21:26:46 +020038void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
39 struct net_device *netdev,
Eliad Pellerb0b6aa22014-09-09 17:09:45 +030040 const u8 *buf, size_t len, gfp_t gfp,
41 int uapsd_queues);
Johannes Bergdad82332009-07-01 21:26:46 +020042void nl80211_send_deauth(struct cfg80211_registered_device *rdev,
43 struct net_device *netdev,
Johannes Berge6d6e342009-07-01 21:26:47 +020044 const u8 *buf, size_t len, gfp_t gfp);
Johannes Bergdad82332009-07-01 21:26:46 +020045void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
46 struct net_device *netdev,
Johannes Berge6d6e342009-07-01 21:26:47 +020047 const u8 *buf, size_t len, gfp_t gfp);
Johannes Bergdad82332009-07-01 21:26:46 +020048void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev,
49 struct net_device *netdev,
Johannes Berge6d6e342009-07-01 21:26:47 +020050 const u8 *addr, gfp_t gfp);
Johannes Bergdad82332009-07-01 21:26:46 +020051void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev,
Jouni Malinen53b46b82009-03-27 20:53:56 +020052 struct net_device *netdev,
Johannes Berge6d6e342009-07-01 21:26:47 +020053 const u8 *addr, gfp_t gfp);
Samuel Ortizb23aa672009-07-01 21:26:54 +020054void nl80211_send_connect_result(struct cfg80211_registered_device *rdev,
Vidyullatha Kanchanapally5349a0f2017-03-31 00:22:33 +030055 struct net_device *netdev,
56 struct cfg80211_connect_resp_params *params,
Purushottam Kushwaha3093ebbeab2017-01-13 01:12:21 +020057 gfp_t gfp);
Samuel Ortizb23aa672009-07-01 21:26:54 +020058void nl80211_send_roamed(struct cfg80211_registered_device *rdev,
Avraham Stern29ce6ec2017-04-26 10:58:49 +030059 struct net_device *netdev,
60 struct cfg80211_roam_info *info, gfp_t gfp);
Samuel Ortizb23aa672009-07-01 21:26:54 +020061void nl80211_send_disconnected(struct cfg80211_registered_device *rdev,
62 struct net_device *netdev, u16 reason,
Johannes Berg667503d2009-07-07 03:56:11 +020063 const u8 *ie, size_t ie_len, bool from_ap);
Samuel Ortizb23aa672009-07-01 21:26:54 +020064
Johannes Bergdad82332009-07-01 21:26:46 +020065void
Jouni Malinena3b8b052009-03-27 21:59:49 +020066nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
67 struct net_device *netdev, const u8 *addr,
68 enum nl80211_key_type key_type,
Johannes Berge6d6e342009-07-01 21:26:47 +020069 int key_id, const u8 *tsc, gfp_t gfp);
Johannes Berg55682962007-09-20 13:09:35 -040070
Johannes Bergdad82332009-07-01 21:26:46 +020071void
Luis R. Rodriguez6bad8762009-04-02 14:08:09 -040072nl80211_send_beacon_hint_event(struct wiphy *wiphy,
73 struct ieee80211_channel *channel_before,
74 struct ieee80211_channel *channel_after);
75
Johannes Berg04a773a2009-04-19 21:24:32 +020076void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
77 struct net_device *netdev, const u8 *bssid,
78 gfp_t gfp);
79
Johannes Berg2e161f72010-08-12 15:38:38 +020080int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
Johannes Berg71bbc992012-06-15 15:30:18 +020081 struct wireless_dev *wdev, u32 nlpid,
Johannes Berg804483e2012-03-05 22:18:41 +010082 int freq, int sig_dbm,
Vladimir Kondratiev19504cf2013-08-15 14:51:28 +030083 const u8 *buf, size_t len, u32 flags, gfp_t gfp);
Simon Wunderlich04f39042013-02-08 18:16:19 +010084
85void
86nl80211_radar_notify(struct cfg80211_registered_device *rdev,
Janusz Dziedzicd2859df2013-11-06 13:55:51 +010087 const struct cfg80211_chan_def *chandef,
Simon Wunderlich04f39042013-02-08 18:16:19 +010088 enum nl80211_radar_event event,
89 struct net_device *netdev, gfp_t gfp);
90
Johannes Berg348baf02014-01-24 14:06:29 +010091void nl80211_send_ap_stopped(struct wireless_dev *wdev);
92
Amitkumar Karwarbe29b992013-06-28 11:51:26 -070093void cfg80211_rdev_free_coalesce(struct cfg80211_registered_device *rdev);
94
Johannes Berg55682962007-09-20 13:09:35 -040095#endif /* __NET_WIRELESS_NL80211_H */