162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef __NET_WEXT_H
362306a36Sopenharmony_ci#define __NET_WEXT_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <net/iw_handler.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_cistruct net;
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#ifdef CONFIG_WEXT_CORE
1062306a36Sopenharmony_ciint wext_handle_ioctl(struct net *net, unsigned int cmd,
1162306a36Sopenharmony_ci		      void __user *arg);
1262306a36Sopenharmony_ciint compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
1362306a36Sopenharmony_ci			     unsigned long arg);
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cistruct iw_statistics *get_wireless_stats(struct net_device *dev);
1662306a36Sopenharmony_ciint call_commit_handler(struct net_device *dev);
1762306a36Sopenharmony_ci#else
1862306a36Sopenharmony_cistatic inline int wext_handle_ioctl(struct net *net, unsigned int cmd,
1962306a36Sopenharmony_ci				    void __user *arg)
2062306a36Sopenharmony_ci{
2162306a36Sopenharmony_ci	return -EINVAL;
2262306a36Sopenharmony_ci}
2362306a36Sopenharmony_cistatic inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
2462306a36Sopenharmony_ci					   unsigned long arg)
2562306a36Sopenharmony_ci{
2662306a36Sopenharmony_ci	return -EINVAL;
2762306a36Sopenharmony_ci}
2862306a36Sopenharmony_ci#endif
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#ifdef CONFIG_WEXT_PROC
3162306a36Sopenharmony_ciint wext_proc_init(struct net *net);
3262306a36Sopenharmony_civoid wext_proc_exit(struct net *net);
3362306a36Sopenharmony_ci#else
3462306a36Sopenharmony_cistatic inline int wext_proc_init(struct net *net)
3562306a36Sopenharmony_ci{
3662306a36Sopenharmony_ci	return 0;
3762306a36Sopenharmony_ci}
3862306a36Sopenharmony_cistatic inline void wext_proc_exit(struct net *net)
3962306a36Sopenharmony_ci{
4062306a36Sopenharmony_ci	return;
4162306a36Sopenharmony_ci}
4262306a36Sopenharmony_ci#endif
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci#ifdef CONFIG_WEXT_PRIV
4562306a36Sopenharmony_ciint ioctl_private_call(struct net_device *dev, struct iwreq *iwr,
4662306a36Sopenharmony_ci		       unsigned int cmd, struct iw_request_info *info,
4762306a36Sopenharmony_ci		       iw_handler handler);
4862306a36Sopenharmony_ciint compat_private_call(struct net_device *dev, struct iwreq *iwr,
4962306a36Sopenharmony_ci			unsigned int cmd, struct iw_request_info *info,
5062306a36Sopenharmony_ci			iw_handler handler);
5162306a36Sopenharmony_ciint iw_handler_get_private(struct net_device *		dev,
5262306a36Sopenharmony_ci			   struct iw_request_info *	info,
5362306a36Sopenharmony_ci			   union iwreq_data *		wrqu,
5462306a36Sopenharmony_ci			   char *			extra);
5562306a36Sopenharmony_ci#else
5662306a36Sopenharmony_ci#define ioctl_private_call NULL
5762306a36Sopenharmony_ci#define compat_private_call NULL
5862306a36Sopenharmony_ci#endif
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci#endif /* __NET_WEXT_H */
62