18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __NET_WEXT_H
38c2ecf20Sopenharmony_ci#define __NET_WEXT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <net/iw_handler.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistruct net;
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifdef CONFIG_WEXT_CORE
108c2ecf20Sopenharmony_ciint wext_handle_ioctl(struct net *net, unsigned int cmd,
118c2ecf20Sopenharmony_ci		      void __user *arg);
128c2ecf20Sopenharmony_ciint compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
138c2ecf20Sopenharmony_ci			     unsigned long arg);
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistruct iw_statistics *get_wireless_stats(struct net_device *dev);
168c2ecf20Sopenharmony_ciint call_commit_handler(struct net_device *dev);
178c2ecf20Sopenharmony_ci#else
188c2ecf20Sopenharmony_cistatic inline int wext_handle_ioctl(struct net *net, unsigned int cmd,
198c2ecf20Sopenharmony_ci				    void __user *arg)
208c2ecf20Sopenharmony_ci{
218c2ecf20Sopenharmony_ci	return -EINVAL;
228c2ecf20Sopenharmony_ci}
238c2ecf20Sopenharmony_cistatic inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
248c2ecf20Sopenharmony_ci					   unsigned long arg)
258c2ecf20Sopenharmony_ci{
268c2ecf20Sopenharmony_ci	return -EINVAL;
278c2ecf20Sopenharmony_ci}
288c2ecf20Sopenharmony_ci#endif
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#ifdef CONFIG_WEXT_PROC
318c2ecf20Sopenharmony_ciint wext_proc_init(struct net *net);
328c2ecf20Sopenharmony_civoid wext_proc_exit(struct net *net);
338c2ecf20Sopenharmony_ci#else
348c2ecf20Sopenharmony_cistatic inline int wext_proc_init(struct net *net)
358c2ecf20Sopenharmony_ci{
368c2ecf20Sopenharmony_ci	return 0;
378c2ecf20Sopenharmony_ci}
388c2ecf20Sopenharmony_cistatic inline void wext_proc_exit(struct net *net)
398c2ecf20Sopenharmony_ci{
408c2ecf20Sopenharmony_ci	return;
418c2ecf20Sopenharmony_ci}
428c2ecf20Sopenharmony_ci#endif
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci#ifdef CONFIG_WEXT_PRIV
458c2ecf20Sopenharmony_ciint ioctl_private_call(struct net_device *dev, struct iwreq *iwr,
468c2ecf20Sopenharmony_ci		       unsigned int cmd, struct iw_request_info *info,
478c2ecf20Sopenharmony_ci		       iw_handler handler);
488c2ecf20Sopenharmony_ciint compat_private_call(struct net_device *dev, struct iwreq *iwr,
498c2ecf20Sopenharmony_ci			unsigned int cmd, struct iw_request_info *info,
508c2ecf20Sopenharmony_ci			iw_handler handler);
518c2ecf20Sopenharmony_ciint iw_handler_get_private(struct net_device *		dev,
528c2ecf20Sopenharmony_ci			   struct iw_request_info *	info,
538c2ecf20Sopenharmony_ci			   union iwreq_data *		wrqu,
548c2ecf20Sopenharmony_ci			   char *			extra);
558c2ecf20Sopenharmony_ci#else
568c2ecf20Sopenharmony_ci#define ioctl_private_call NULL
578c2ecf20Sopenharmony_ci#define compat_private_call NULL
588c2ecf20Sopenharmony_ci#endif
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#endif /* __NET_WEXT_H */
62