#include <net/cfg80211.h>
#include <net/rtnetlink.h>
#include <linux/etherdevice.h>
#include <linux/math64.h>
#include <linux/module.h>
static struct wiphy *common_wiphy;
struct virt_wifi_wiphy_priv { … };
static struct ieee80211_channel channel_2ghz = …;
static struct ieee80211_rate bitrates_2ghz[] = …;
static struct ieee80211_supported_band band_2ghz = …;
static struct ieee80211_channel channel_5ghz = …;
static struct ieee80211_rate bitrates_5ghz[] = …;
#define RX_MCS_MAP …
#define TX_MCS_MAP …
static struct ieee80211_supported_band band_5ghz = …;
static u8 fake_router_bssid[ETH_ALEN] __ro_after_init = …;
#define VIRT_WIFI_SSID …
#define VIRT_WIFI_SSID_LEN …
static void virt_wifi_inform_bss(struct wiphy *wiphy)
{ … }
static int virt_wifi_scan(struct wiphy *wiphy,
struct cfg80211_scan_request *request)
{ … }
static void virt_wifi_scan_result(struct work_struct *work)
{ … }
static void virt_wifi_cancel_scan(struct wiphy *wiphy)
{ … }
struct virt_wifi_netdev_priv { … };
static int virt_wifi_connect(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_connect_params *sme)
{ … }
static void virt_wifi_connect_complete(struct work_struct *work)
{ … }
static void virt_wifi_cancel_connect(struct net_device *netdev)
{ … }
static int virt_wifi_disconnect(struct wiphy *wiphy, struct net_device *netdev,
u16 reason_code)
{ … }
static int virt_wifi_get_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_info *sinfo)
{ … }
static int virt_wifi_dump_station(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *mac, struct station_info *sinfo)
{ … }
static const struct cfg80211_ops virt_wifi_cfg80211_ops = …;
static struct wiphy *virt_wifi_make_wiphy(void)
{ … }
static void virt_wifi_destroy_wiphy(struct wiphy *wiphy)
{ … }
static netdev_tx_t virt_wifi_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static int virt_wifi_net_device_open(struct net_device *dev)
{ … }
static int virt_wifi_net_device_stop(struct net_device *dev)
{ … }
static int virt_wifi_net_device_get_iflink(const struct net_device *dev)
{ … }
static const struct net_device_ops virt_wifi_ops = …;
static void virt_wifi_net_device_destructor(struct net_device *dev)
{ … }
static void virt_wifi_setup(struct net_device *dev)
{ … }
static rx_handler_result_t virt_wifi_rx_handler(struct sk_buff **pskb)
{ … }
static int virt_wifi_newlink(struct net *src_net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[],
struct netlink_ext_ack *extack)
{ … }
static void virt_wifi_dellink(struct net_device *dev,
struct list_head *head)
{ … }
static struct rtnl_link_ops virt_wifi_link_ops = …;
static bool netif_is_virt_wifi_dev(const struct net_device *dev)
{ … }
static int virt_wifi_event(struct notifier_block *this, unsigned long event,
void *ptr)
{ … }
static struct notifier_block virt_wifi_notifier = …;
static int __init virt_wifi_init_module(void)
{ … }
static void __exit virt_wifi_cleanup_module(void)
{ … }
module_init(…) …;
module_exit(virt_wifi_cleanup_module);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS_RTNL_LINK(…) …;