#define pr_fmt(fmt) …
#include <linux/hardirq.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/slab.h>
#include <linux/ieee80211.h>
#include <net/cfg80211.h>
#include <asm/unaligned.h>
#include "decl.h"
#include "cfg.h"
#include "cmd.h"
#include "mesh.h"
#define CHAN2G(_channel, _freq, _flags) …
static struct ieee80211_channel lbs_2ghz_channels[] = …;
#define RATETAB_ENT(_rate, _hw_value, _flags) …
static struct ieee80211_rate lbs_rates[] = …;
static struct ieee80211_supported_band lbs_band_2ghz = …;
static const u32 cipher_suites[] = …;
#define LBS_DWELL_PASSIVE …
#define LBS_DWELL_ACTIVE …
static int lbs_auth_to_authtype(enum nl80211_auth_type auth_type)
{ … }
static int lbs_add_rates(u8 *rates)
{ … }
#define LBS_MAX_SSID_TLV_SIZE …
static int lbs_add_ssid_tlv(u8 *tlv, const u8 *ssid, int ssid_len)
{ … }
#define LBS_MAX_CHANNEL_LIST_TLV_SIZE …
static int lbs_add_channel_list_tlv(struct lbs_private *priv, u8 *tlv,
int last_channel, int active_scan)
{ … }
#define LBS_MAX_RATES_TLV_SIZE …
static int lbs_add_supported_rates_tlv(u8 *tlv)
{ … }
static u8 *
add_ie_rates(u8 *tlv, const u8 *ie, int *nrates)
{ … }
static int lbs_add_common_rates_tlv(u8 *tlv, struct cfg80211_bss *bss)
{ … }
#define LBS_MAX_AUTH_TYPE_TLV_SIZE …
static int lbs_add_auth_type_tlv(u8 *tlv, enum nl80211_auth_type auth_type)
{ … }
#define LBS_MAX_CHANNEL_TLV_SIZE …
static int lbs_add_channel_tlv(u8 *tlv, u8 channel)
{ … }
#define LBS_MAX_CF_PARAM_TLV_SIZE …
static int lbs_add_cf_param_tlv(u8 *tlv)
{ … }
#define LBS_MAX_WPA_TLV_SIZE …
static int lbs_add_wpa_tlv(u8 *tlv, const u8 *ie, u8 ie_len)
{ … }
#define LBS_MAX_WPS_ENROLLEE_TLV_SIZE …
static int lbs_add_wps_enrollee_tlv(u8 *tlv, const u8 *ie, size_t ie_len)
{ … }
static int lbs_cfg_set_monitor_channel(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef)
{ … }
static int lbs_cfg_set_mesh_channel(struct wiphy *wiphy,
struct net_device *netdev,
struct ieee80211_channel *channel)
{ … }
#define LBS_SCAN_BEFORE_NAP …
#define LBS_SCAN_RSSI_TO_MBM(rssi) …
static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
struct cmd_header *resp)
{ … }
#define LBS_SCAN_MAX_CMD_SIZE …
static void lbs_scan_worker(struct work_struct *work)
{ … }
static void _internal_start_scan(struct lbs_private *priv, bool internal,
struct cfg80211_scan_request *request)
{ … }
void lbs_scan_done(struct lbs_private *priv)
{ … }
static int lbs_cfg_scan(struct wiphy *wiphy,
struct cfg80211_scan_request *request)
{ … }
void lbs_send_disconnect_notification(struct lbs_private *priv,
bool locally_generated)
{ … }
void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event)
{ … }
static int lbs_remove_wep_keys(struct lbs_private *priv)
{ … }
static int lbs_set_wep_keys(struct lbs_private *priv)
{ … }
static int lbs_enable_rsn(struct lbs_private *priv, int enable)
{ … }
struct cmd_key_material { … } __packed;
static int lbs_set_key_material(struct lbs_private *priv,
int key_type, int key_info,
const u8 *key, u16 key_len)
{ … }
static int lbs_set_authtype(struct lbs_private *priv,
struct cfg80211_connect_params *sme)
{ … }
#define LBS_ASSOC_MAX_CMD_SIZE …
static int lbs_associate(struct lbs_private *priv,
struct cfg80211_bss *bss,
struct cfg80211_connect_params *sme)
{ … }
static struct cfg80211_scan_request *
_new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme)
{ … }
static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
{ … }
int lbs_disconnect(struct lbs_private *priv, u16 reason)
{ … }
static int lbs_cfg_disconnect(struct wiphy *wiphy, struct net_device *dev,
u16 reason_code)
{ … }
static int lbs_cfg_set_default_key(struct wiphy *wiphy,
struct net_device *netdev, int link_id,
u8 key_index, bool unicast,
bool multicast)
{ … }
static int lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev,
int link_id, u8 idx, bool pairwise,
const u8 *mac_addr, struct key_params *params)
{ … }
static int lbs_cfg_del_key(struct wiphy *wiphy, struct net_device *netdev,
int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr)
{ … }
static int lbs_cfg_get_station(struct wiphy *wiphy, struct net_device *dev,
const u8 *mac, struct station_info *sinfo)
{ … }
static int lbs_change_intf(struct wiphy *wiphy, struct net_device *dev,
enum nl80211_iftype type,
struct vif_params *params)
{ … }
#define CAPINFO_MASK …
static void lbs_join_post(struct lbs_private *priv,
struct cfg80211_ibss_params *params,
u8 *bssid, u16 capability)
{ … }
static int lbs_ibss_join_existing(struct lbs_private *priv,
struct cfg80211_ibss_params *params,
struct cfg80211_bss *bss)
{ … }
static int lbs_ibss_start_new(struct lbs_private *priv,
struct cfg80211_ibss_params *params)
{ … }
static int lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params)
{ … }
static int lbs_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
{ … }
static int lbs_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
bool enabled, int timeout)
{ … }
static const struct cfg80211_ops lbs_cfg80211_ops = …;
struct wireless_dev *lbs_cfg_alloc(struct device *dev)
{ … }
static void lbs_cfg_set_regulatory_hint(struct lbs_private *priv)
{ … }
static void lbs_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{ … }
int lbs_cfg_register(struct lbs_private *priv)
{ … }
void lbs_scan_deinit(struct lbs_private *priv)
{ … }
void lbs_cfg_free(struct lbs_private *priv)
{ … }